Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

dialysisSolution.vue 57KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
  4. <div class="patient-app-container app-container">
  5. <div class="Total">
  6. <!-- <div class="plan" >透析计划</div> -->
  7. <!-- <table-title title="长期透析处方"></table-title> -->
  8. <div class="sum">
  9. <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
  10. <el-button
  11. type="primary"
  12. size="small"
  13. icon="el-icon-plus"
  14. @click="openNew"
  15. :disabled="
  16. $store.getters.xt_user.subscibe.state == 3 ? true : false
  17. "
  18. >新增透析处方
  19. </el-button>
  20. </div>
  21. </div>
  22. <el-table
  23. ref="solutionTable"
  24. :data="tableData"
  25. border
  26. fit
  27. highlight-current-row
  28. @current-change="tableCurrentChange"
  29. :header-cell-style="{
  30. backgroundColor: 'rgb(245, 247, 250)',
  31. color: '#606266'
  32. }"
  33. :row-style="{ color: '#303133' }"
  34. style="width: 100%"
  35. >
  36. <el-table-column type="index" align="center" label="序号" width="60">
  37. </el-table-column>
  38. <el-table-column
  39. prop="mode_name"
  40. align="center"
  41. label="透析模式"
  42. min-width="50"
  43. >
  44. <template slot-scope="scope">
  45. {{ modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:'' }}
  46. </template>
  47. </el-table-column>
  48. <el-table-column
  49. prop="dialysis_duration"
  50. align="center"
  51. label="透析时长"
  52. min-width="50"
  53. >
  54. <template slot-scope="scope">
  55. {{ scope.row.dialysis_duration_hour }} 小时
  56. {{ scope.row.dialysis_duration_minute }} 分钟
  57. </template>
  58. </el-table-column>
  59. <!-- <el-table-column
  60. prop="period"
  61. label="频率"
  62. align="center"
  63. min-width="50">
  64. <template slot-scope="scope" >
  65. <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
  66. <span v-else >--</span>
  67. </template>
  68. </el-table-column> -->
  69. <!-- <el-table-column
  70. prop="name"
  71. label="处方名"
  72. align="center"
  73. min-width="50">
  74. <template slot-scope="scope" >
  75. <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
  76. </template>
  77. </el-table-column> -->
  78. <el-table-column
  79. prop="doctor"
  80. label="医生"
  81. align="center"
  82. min-width="110"
  83. >
  84. <template slot-scope="scope">
  85. <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column
  89. prop="updated_time"
  90. align="center"
  91. label="更新日期"
  92. min-width="60"
  93. >
  94. <template slot-scope="scope">
  95. <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
  96. </template>
  97. </el-table-column>
  98. <!-- <el-table-column
  99. prop="state"
  100. label="状态"
  101. align="center"
  102. min-width="40">
  103. <template slot-scope="scope" >
  104. <span v-if="scope.row.initiate_mode==1">启用</span>
  105. <span v-else-if="scope.row.initiate_mode==2">停用</span>
  106. <span v-else>未知</span>
  107. </template>
  108. </el-table-column> -->
  109. <el-table-column label="操作" align="center" min-width="140">
  110. <template slot-scope="scope">
  111. <el-tooltip
  112. class="item"
  113. effect="dark"
  114. content="编辑"
  115. placement="top"
  116. >
  117. <el-button
  118. size="small"
  119. type="primary"
  120. icon="el-icon-edit-outline"
  121. @click="openEdit(scope.$index, scope.row)"
  122. ></el-button>
  123. </el-tooltip>
  124. <!-- <el-button
  125. size="mini"
  126. type="primary"
  127. @click="openChildEdit(scope.$index, scope.row)" v-else>编辑</el-button>
  128. <el-button
  129. size="mini"
  130. type="success"
  131. @click="openNewChild(scope.$index, scope.row)" v-if="scope.row.parent_id===0">新增</el-button>
  132. <el-button
  133. size="mini"
  134. type="danger"
  135. @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
  136. </template>
  137. </el-table-column>
  138. </el-table>
  139. <el-pagination
  140. align="right"
  141. @size-change="handleSizeChange"
  142. @current-change="handleCurrentChange"
  143. :current-page="queryParams.page"
  144. :page-sizes="[10, 20, 50, 100]"
  145. :page-size="10"
  146. background
  147. style="margin-top:20px;"
  148. layout="total, sizes, prev, pager, next, jumper"
  149. :total="total"
  150. >
  151. </el-pagination>
  152. </div>
  153. <el-dialog
  154. :title="isEdit ? '编辑透析处方' : '新增透析处方'"
  155. :visible.sync="dialogVisible"
  156. width="1010px"
  157. >
  158. <el-form
  159. ref="addPlan"
  160. :model="addPlan"
  161. :rules="addPlanRules"
  162. label-width="160px"
  163. >
  164. <el-row :gutter="20">
  165. <el-col :span="8" v-if="isShows('透析模式')">
  166. <el-form-item label="透析模式:" prop="mode">
  167. <el-select
  168. v-model="addPlan.mode"
  169. @change="addPlanModeChange"
  170. :disabled="isEdit ? true : false"
  171. >
  172. <el-option
  173. v-for="item in modeOptions"
  174. :label="item.name"
  175. :key="item.id"
  176. :value="item.id"
  177. ></el-option>
  178. </el-select>
  179. </el-form-item>
  180. </el-col>
  181. <el-col :span="8" v-if="isShows('透析时长')">
  182. <el-form-item label="透析时长(h):" prop="dialysis_duration">
  183. <el-time-picker
  184. v-model="dialysisTimeShow"
  185. :picker-options="{
  186. selectableRange: '00:01:00 - 23:59:00'
  187. }"
  188. placeholder="透析时长"
  189. style="width:100%;"
  190. value-format="H:m"
  191. format="H:m"
  192. @change="selectnDialysisTime"
  193. >
  194. </el-time-picker>
  195. </el-form-item>
  196. </el-col>
  197. <!-- <el-col :span="8">
  198. <el-form-item label="透析器:" prop="dialyzer">
  199. <el-select v-model="addPlan.dialyzer" placeholder="" >
  200. <el-option v-for="item in deviceList" :label="item.name" :key="item.id" :value="item.id"></el-option>
  201. </el-select>
  202. </el-form-item>
  203. </el-col> -->
  204. <!-- <el-col :span="8">
  205. <el-form-item label="透析器:" prop="hemodialysis_machine">
  206. <el-select v-model="addPlan.hemodialysis_machine" placeholder="" >
  207. <el-option v-for="item in hemodialysis_machines" :label="item.name" :key="item.id" :value="item.id"></el-option>
  208. </el-select>
  209. </el-form-item>
  210. </el-col> -->
  211. <!-- <el-col :span="8">
  212. <el-form-item label="灌流器:" prop="perfusion_apparatus">
  213. <el-select v-model="addPlan.perfusion_apparatus" placeholder="" >
  214. <el-option v-for="item in perfusion_apparatus" :label="item.name" :key="item.id" :value="item.id"></el-option>
  215. </el-select>
  216. </el-form-item>
  217. </el-col> -->
  218. <el-col :span="8" v-if="isShows('血流量')">
  219. <el-form-item label="血流量(ml/min):" prop="blood_flow_volume">
  220. <el-input v-model="addPlan.blood_flow_volume"></el-input>
  221. </el-form-item>
  222. </el-col>
  223. <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id == 6">-->
  224. <!--<el-form-item label="目标超滤量(ml) : ">-->
  225. <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
  226. <!--</el-form-item>-->
  227. <!--</el-col>-->
  228. <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id != 6">-->
  229. <!--<el-form-item label="目标超滤量(L) : ">-->
  230. <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
  231. <!--</el-form-item>-->
  232. <!--</el-col>-->
  233. <el-col :span="8" v-if="isShows('透析液配方')">
  234. <el-form-item label="透析液配方:">
  235. <el-select v-model="addPlan.dialysate_formulation">
  236. <el-option
  237. v-for="item in dialysate_formulation"
  238. :label="item.name"
  239. :key="item.id"
  240. :value="item.id"
  241. ></el-option>
  242. </el-select>
  243. </el-form-item>
  244. </el-col>
  245. <!-- <el-col :span="12">
  246. <el-form-item label="脱水量(L):" prop="dewater">
  247. <el-input v-model="addPlan.dewater" ></el-input>
  248. </el-form-item>
  249. </el-col> -->
  250. <!-- <el-col :span="12">
  251. <el-form-item label="置换液(L):" prop="displace_liqui">
  252. <el-input v-model="addPlan.displace_liqui" ></el-input>
  253. </el-form-item>
  254. </el-col>
  255. <el-col :span="12">
  256. <el-form-item label="置换方式:" prop="replacement_way" >
  257. <el-select v-model="addPlan.replacement_way" >
  258. <el-option v-for="item in replacementWays" :label="item.name" :key="item.id" :value="item.id"></el-option>
  259. </el-select>
  260. </el-form-item>
  261. </el-col> -->
  262. <el-col :span="8" v-if="isShows('抗凝剂')">
  263. <el-form-item label="抗凝剂:" prop="anticoagulant">
  264. <el-select
  265. v-model="addPlan.anticoagulant"
  266. @change="changeThisAnticoagulant"
  267. >
  268. <el-option
  269. v-for="item in anticoagulantsConfit"
  270. :label="item.name"
  271. :key="item.id"
  272. :value="item.id"
  273. ></el-option>
  274. </el-select>
  275. </el-form-item>
  276. </el-col>
  277. <el-col
  278. :span="8"
  279. v-if="anticoagulant.shouji != -1 && isShows('首剂')"
  280. >
  281. <el-form-item
  282. :label="'首剂(' + anticoagulant.shouji_unit + '): '"
  283. prop="anticoagulant_shouji"
  284. >
  285. <el-input
  286. v-model="addPlan.anticoagulant_shouji"
  287. :disabled="anticoagulant.shouji == 1 ? false : true"
  288. type="number"
  289. ></el-input>
  290. </el-form-item>
  291. </el-col>
  292. <el-col
  293. :span="8"
  294. v-if="anticoagulant.weichi != -1 && isShows('维持')"
  295. >
  296. <el-form-item
  297. :label="'维持(' + anticoagulant.weichi_unit + '): '"
  298. prop="anticoagulant_weichi"
  299. >
  300. <el-input
  301. v-model="addPlan.anticoagulant_weichi"
  302. :disabled="anticoagulant.weichi == 1 ? false : true"
  303. type="number"
  304. ></el-input>
  305. </el-form-item>
  306. </el-col>
  307. <el-col
  308. :span="8"
  309. v-if="anticoagulant.zongliang != -1 && isShows('总量')"
  310. >
  311. <el-form-item
  312. :label="'总量(' + anticoagulant.zongliang_unit + '): '"
  313. prop="anticoagulant_zongliang"
  314. >
  315. <el-input
  316. v-model="addPlan.anticoagulant_zongliang"
  317. :disabled="anticoagulant.zongliang == 1 ? false : true"
  318. type="number"
  319. ></el-input>
  320. </el-form-item>
  321. </el-col>
  322. <el-col
  323. :span="8"
  324. v-if="anticoagulant.gaimingcheng != -1 && isShows('钙名称')"
  325. >
  326. <el-form-item label="钙名称:" prop="anticoagulant_gaimingcheng">
  327. <el-input
  328. v-model="addPlan.anticoagulant_gaimingcheng"
  329. :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
  330. placeholder="钙名称"
  331. ></el-input>
  332. </el-form-item>
  333. </el-col>
  334. <el-col
  335. :span="8"
  336. v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
  337. >
  338. <el-form-item
  339. :label="'钙剂量(' + anticoagulant.gaimingcheng_unit + '): '"
  340. prop="anticoagulant_gaijiliang"
  341. >
  342. <el-input
  343. v-model="addPlan.anticoagulant_gaijiliang"
  344. :disabled="anticoagulant.gaijiliang == 1 ? false : true"
  345. placeholder="钙剂量"
  346. ></el-input>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="8" v-if="isShows('置换量')">
  350. <el-form-item label="置换量(L) : " prop="replacement_total">
  351. <el-input
  352. v-model="addPlan.replacement_total"
  353. type="number"
  354. ></el-input>
  355. </el-form-item>
  356. </el-col>
  357. <el-col :span="8" v-if="isShows('钾')">
  358. <el-form-item label="钾(mmol/L): " prop="kalium">
  359. <el-input v-model="addPlan.kalium"></el-input>
  360. </el-form-item>
  361. </el-col>
  362. <el-col :span="8" v-if="isShows('钠')">
  363. <el-form-item label="钠(mmol/L): " prop="sodium">
  364. <el-input v-model="addPlan.sodium"></el-input>
  365. </el-form-item>
  366. </el-col>
  367. <el-col :span="8" v-if="isShows('钙')">
  368. <el-form-item label="钙(mmol/L): " prop="calcium">
  369. <el-input v-model="addPlan.calcium"></el-input>
  370. </el-form-item>
  371. </el-col>
  372. <el-col :span="8" v-if="isShows('透析器/灌流器')">
  373. <el-form-item label="透析器/灌流器:">
  374. <el-input
  375. v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
  376. </el-form-item>
  377. </el-col>
  378. <el-col :span="8" v-if="isShows('碳酸氢盐')">
  379. <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
  380. <el-input v-model="addPlan.bicarbonate"></el-input>
  381. </el-form-item>
  382. </el-col>
  383. <el-col :span="8" v-if="isShows('葡萄糖')">
  384. <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
  385. <el-input v-model="addPlan.glucose"></el-input>
  386. </el-form-item>
  387. </el-col>
  388. <el-col :span="8" v-if="isShows('透析液流量')">
  389. <el-form-item label="透析液流量(ml/min): " prop="dialysate_flow">
  390. <el-input v-model="addPlan.dialysate_flow"></el-input>
  391. </el-form-item>
  392. </el-col>
  393. <el-col :span="8" v-if="isShows('透析液温度')">
  394. <el-form-item
  395. label="透析液温度(℃): "
  396. prop="dialysate_temperature"
  397. >
  398. <el-input v-model="addPlan.dialysate_temperature"></el-input>
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="8" v-if="isShows('电导度')">
  402. <el-form-item label="电导度(mS/cm): " prop="conductivity">
  403. <el-input v-model="addPlan.conductivity"></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="8" v-if="isShows('体液过多症状')">
  407. <el-form-item label="体液过多症状:">
  408. <el-select v-model="addPlan.body_fluid" @change="changeBodyFluid">
  409. <el-option
  410. v-for="item in body_fluid_option"
  411. :label="item.name"
  412. :key="item.id"
  413. :value="item.id"
  414. ></el-option>
  415. </el-select>
  416. </el-form-item>
  417. </el-col>
  418. <el-col :span="8" v-if="isShows('体液过多其他症状')">
  419. <el-form-item label="体液过多其他症状">
  420. <el-input v-model="addPlan.body_fluid_other"></el-input>
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
  424. <el-form-item label="透析前使用特殊药物">
  425. <el-select
  426. v-model="addPlan.special_medicine"
  427. placeholder="请选择"
  428. style="width:100%;"
  429. >
  430. <el-option :key="0" label="请选择" :value="0"></el-option>
  431. <el-option
  432. v-for="item in special_medicine_option"
  433. :label="item.name"
  434. :key="item.id"
  435. :value="item.id"
  436. ></el-option>
  437. </el-select>
  438. </el-form-item>
  439. </el-col>
  440. <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
  441. <el-form-item label="使用其他特殊药物">
  442. <el-input v-model="addPlan.special_medicine_other"></el-input>
  443. </el-form-item>
  444. </el-col>
  445. <el-col :span="8">
  446. <el-form-item
  447. label="置换液:"
  448. v-if="
  449. isShows('置换液') &&
  450. this.$store.getters.xt_user.template_info.template_id != 6
  451. "
  452. >
  453. <el-select
  454. v-model="addPlan.displace_liqui_part"
  455. placeholder="请选择"
  456. >
  457. <el-option :key="0" label="请选择" :value="0"></el-option>
  458. <el-option
  459. v-for="(option, index) in displace_liqui_part_option"
  460. :key="index"
  461. :label="option.name"
  462. :value="option.id"
  463. ></el-option>
  464. </el-select>
  465. </el-form-item>
  466. <el-form-item
  467. label="置换方式:"
  468. v-if="
  469. isShows('置换液') &&
  470. this.$store.getters.xt_user.template_info.template_id == 6
  471. "
  472. >
  473. <el-select
  474. v-model="addPlan.displace_liqui_part"
  475. placeholder="请选择"
  476. >
  477. <el-option :key="0" label="请选择" :value="0"></el-option>
  478. <el-option
  479. v-for="(option, index) in displace_liqui_part_option"
  480. :key="index"
  481. :label="option.name"
  482. :value="option.id"
  483. ></el-option>
  484. </el-select>
  485. </el-form-item>
  486. </el-col>
  487. <el-col :span="8" v-if="isShows('置换液总量')">
  488. <el-form-item label="置换液总量(L)">
  489. <el-input v-model="addPlan.displace_liqui_value"></el-input>
  490. </el-form-item>
  491. </el-col>
  492. <el-col :span="8" v-if="isShows('血管通路')">
  493. <el-form-item label="血管通路:">
  494. <el-select v-model="addPlan.blood_access" placeholder="请选择">
  495. <el-option :key="0" label="请选择" :value="0"></el-option>
  496. <el-option
  497. v-for="(option, index) in blood_access_option"
  498. :key="index"
  499. :label="option.name"
  500. :value="option.id"
  501. ></el-option>
  502. </el-select>
  503. </el-form-item>
  504. </el-col>
  505. <!-- </el-row>
  506. <el-row :gutter="20" > -->
  507. <el-col :span="8" v-if="isShows('实际超滤量')">
  508. <el-form-item label="实际超滤量(L)">
  509. <el-input v-model="addPlan.ultrafiltration"></el-input>
  510. </el-form-item>
  511. </el-col>
  512. <el-col :span="8" v-if="isShows('目标KT/V')">
  513. <el-form-item label="目标KT/V">
  514. <el-input v-model="addPlan.target_ktv"></el-input>
  515. </el-form-item>
  516. </el-col>
  517. </el-row>
  518. <el-row :gutter="24">
  519. <el-col :span="24">
  520. <el-form-item label="备注: " prop="remark">
  521. <el-input
  522. type="textarea"
  523. :rows="2"
  524. placeholder="请输入内容"
  525. v-model="addPlan.remark"
  526. >
  527. </el-input>
  528. </el-form-item>
  529. </el-col>
  530. </el-row>
  531. </el-form>
  532. <span slot="footer" class="dialog-footer">
  533. <el-button @click="dialogVisible = false">取 消</el-button>
  534. <el-button
  535. type="primary"
  536. @click="submitEditSolution('addPlan')"
  537. v-if="isEdit"
  538. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  539. >保 存</el-button
  540. >
  541. <el-button
  542. type="primary"
  543. @click="submitNewSolution('addPlan')"
  544. v-else
  545. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  546. >保 存</el-button
  547. >
  548. </span>
  549. </el-dialog>
  550. <multi-select-box
  551. :propsForm="InnerDialogProps"
  552. v-on:dialog-comfirm="innerDialogComfirm"
  553. v-on:dialog-cancle="innerDialogCancle">
  554. </multi-select-box>
  555. </div>
  556. </template>
  557. <script>
  558. import tableTitle from './components/tableTitle'
  559. import PatientSidebar from './components/PatientSidebar'
  560. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  561. import {
  562. createChildPatientDialysisSolution,
  563. createPatientDialysisSolution,
  564. deleteDialysisSolution,
  565. editChildPatientDialysisSolution,
  566. editDialysisSolutionDetail,
  567. editPatientDialysisSolution,
  568. fetchPatientDialysisSolutions
  569. } from '@/api/patient'
  570. import { getSystemPrescription } from '@/api/config'
  571. import { getDataConfig } from '@/utils/data'
  572. import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
  573. import store from '@/store'
  574. import { GetDeviceInfo } from '@/api/dialysis'
  575. import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
  576. const periodWeek = [
  577. { value: '每周', label: '每周' },
  578. { value: '两周', label: '两周' },
  579. { value: '三周', label: '三周' },
  580. { value: '四周', label: '四周' }
  581. ]
  582. const periodDay = [
  583. { value: '2天', label: '2天' },
  584. { value: '3天', label: '3天' },
  585. { value: '4天', label: '4天' },
  586. { value: '5天', label: '5天' },
  587. { value: '10天', label: '10天' },
  588. { value: '15天', label: '15天' },
  589. { value: '30天', label: '30天' }
  590. ]
  591. const numOptionsWeek = [
  592. { value: '1次', label: '1次' },
  593. { value: '2次', label: '2次' },
  594. { value: '3次', label: '3次' },
  595. { value: '4次', label: '4次' },
  596. { value: '5次', label: '5次' },
  597. { value: '6次', label: '6次' },
  598. { value: '7次', label: '7次' }
  599. ]
  600. const numOptionsDay = [{ value: '1次', label: '1次' }]
  601. export default {
  602. name: 'Dialysis',
  603. data() {
  604. var checkFirstDialysis = (rule, value, callback) => {
  605. if (this.addPlan.type == 2 && !value) {
  606. return callback(new Error('请选择首次透析!'))
  607. }
  608. callback()
  609. }
  610. var checkSubName = (rule, value, callback) => {
  611. var pattern = /^\d*$/
  612. if (!pattern.test(value)) {
  613. return callback(new Error('只填写0-9的数字'))
  614. }
  615. callback()
  616. }
  617. return {
  618. InnerDialogProps: {
  619. values: [],
  620. visibility: false,
  621. isShowTextArea: true,
  622. customContent: '',
  623. titles: '',
  624. type: '' // 不同弹框类型,用来匹配数据
  625. },
  626. deviceList: [],
  627. dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
  628. isEdit: false,
  629. isChildEdit: false,
  630. totalrate: '无/两周一次',
  631. patientID: 0,
  632. dialogVisible: false,
  633. dialogFormVisible: false,
  634. formLabelWidth: '80px',
  635. formInputWidth: '80px',
  636. total: 0,
  637. tableData: null,
  638. form: {
  639. name: '',
  640. region: '',
  641. date1: '',
  642. date2: '',
  643. delivery: false,
  644. type: [],
  645. resource: '',
  646. desc: ''
  647. },
  648. addPlan: {
  649. id: 0,
  650. mode: '',
  651. mode_name: '',
  652. registrars_id: 0,
  653. dialyzer: '',
  654. dialysis_duration: '',
  655. dialysis_duration_hour: '',
  656. dialysis_duration_minute: '',
  657. hemodialysis_machine: '',
  658. perfusion_apparatus: '',
  659. blood_flow_volume: '',
  660. dewater: '',
  661. displace_liqui: 0,
  662. replacement_way: '',
  663. anticoagulant: '',
  664. anticoagulant_shouji: '',
  665. anticoagulant_weichi: '',
  666. anticoagulant_zongliang: '',
  667. anticoagulant_gaimingcheng: '',
  668. anticoagulant_gaijiliang: '',
  669. kalium: '',
  670. replacement_total: '',
  671. sodium: '',
  672. calcium: '',
  673. bicarbonate: '',
  674. glucose: '',
  675. dry_weight: '',
  676. dialysate_flow: '',
  677. dialysate_temperature: '',
  678. conductivity: '',
  679. doctor: '',
  680. dialysate_formulation: '',
  681. remark: '',
  682. target_ktv: '',
  683. target_ultrafiltration: '',
  684. dialyzer_perfusion_apparatus: '',
  685. body_fluid: '',
  686. body_fluid_other: '',
  687. special_medicine: '',
  688. special_medicine_other: '',
  689. displace_liqui_part: '',
  690. displace_liqui_value: '',
  691. ultrafiltration: '',
  692. blood_access: ''
  693. },
  694. childPlan: {
  695. mode: '',
  696. frequency: '',
  697. name: '',
  698. parent_id: 0,
  699. sub_name: '',
  700. initiate_mode: '',
  701. doctor: ''
  702. },
  703. modeOptions: null,
  704. anticoagulantsSet: {
  705. type: 1
  706. },
  707. replacementWays: null,
  708. anticoagulantsConfit: null,
  709. dialysate_formulation: [],
  710. body_fluid_option: [],
  711. special_medicine_option: [],
  712. displace_liqui_part_option: [],
  713. blood_access_option: [],
  714. timeOptions: [{ value: 1, label: '按周' }, { value: 2, label: '按日' }],
  715. periodOptions: periodWeek,
  716. numOptions: numOptionsWeek,
  717. stateOptions: [{ value: 1, label: '启用' }, { value: 2, label: '停用' }],
  718. doctorOptions: null,
  719. adminUserOptions: null,
  720. current_index: -1,
  721. addPlanRules: {
  722. mode: [{ required: true, message: '请选择透析模式', trigger: 'blur' }],
  723. type: [{ required: true, message: '请选择频率', trigger: 'blur' }],
  724. period: [{ required: true, message: '请选择周期', trigger: 'blur' }],
  725. times: [{ required: true, message: '请选择次数', trigger: 'blur' }],
  726. initiate_mode: [
  727. { required: true, message: '请选择状态', trigger: 'blur' }
  728. ],
  729. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
  730. first_dialysis: [{ validator: checkFirstDialysis, trigger: 'blur' }]
  731. },
  732. addChildPlanRules: {
  733. sub_name: [
  734. { required: true, message: '请填写处方名', trigger: 'blur' },
  735. {
  736. validator: checkSubName,
  737. trigger: 'blur'
  738. }
  739. ],
  740. initiate_mode: [
  741. { required: true, message: '请选择状态', trigger: 'blur' }
  742. ],
  743. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }]
  744. },
  745. current_model: {
  746. id: 0,
  747. name: '',
  748. dialysis_duration: 2,
  749. replacement_total: 0,
  750. replacement_way: 2,
  751. hemodialysis_machine: 2,
  752. blood_filter: 2,
  753. perfusion_apparatus: 2,
  754. blood_flow_volume: 2,
  755. dialysate_flow: 2,
  756. kalium: 2,
  757. sodium: 2,
  758. calcium: 2,
  759. bicarbonate: 2
  760. },
  761. current_solution: {
  762. id: 0,
  763. name: '',
  764. sub_name: '',
  765. period: '',
  766. times: '',
  767. doctor: 0
  768. },
  769. anticoagulant: {
  770. id: 0,
  771. name: '',
  772. type: 1,
  773. shouji: 1,
  774. weichi: 1,
  775. zongliang: 1,
  776. gaimingcheng: -1,
  777. gaijiliang: -1,
  778. shouji_unit: 'mg',
  779. weichi_unit: 'mg/h',
  780. zongliang_unit: 'mg',
  781. gaimingcheng_unit: '',
  782. gaijiliang_unit: ''
  783. },
  784. blood_filters: null,
  785. perfusion_apparatus: null,
  786. hemodialysis_machines: null,
  787. dialyzerPerfusionApparatus: [],
  788. solution_detail: {
  789. id: 0,
  790. affirm_state: 0,
  791. dialysis_duration: '',
  792. replacement_way: '',
  793. mode_id: '',
  794. blood_flow_volume: '',
  795. hemodialysis_machine: '',
  796. blood_filter: '',
  797. perfusion_apparatus: '',
  798. dialysate_flow: '',
  799. kalium: '',
  800. replacement_total: '',
  801. sodium: '',
  802. calcium: '',
  803. bicarbonate: '',
  804. anticoagulant: '',
  805. anticoagulant_shouji: '',
  806. anticoagulant_weichi: '',
  807. anticoagulant_zongliang: '',
  808. anticoagulant_gaimingcheng: '',
  809. anticoagulant_gaijiliang: ''
  810. },
  811. queryParams: {
  812. page: 1,
  813. limit: 10,
  814. id: 0
  815. }
  816. }
  817. },
  818. watch: {
  819. 'addPlan.dialysis_duration': function() {
  820. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  821. 1,
  822. this.addPlan.anticoagulant_shouji,
  823. this.addPlan.dialysis_duration,
  824. this.addPlan.anticoagulant_weichi
  825. )
  826. },
  827. 'addPlan.anticoagulant_shouji': function() {
  828. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  829. 1,
  830. this.addPlan.anticoagulant_shouji,
  831. this.addPlan.dialysis_duration,
  832. this.addPlan.anticoagulant_weichi
  833. )
  834. },
  835. 'addPlan.anticoagulant_weichi': function() {
  836. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  837. 1,
  838. this.addPlan.anticoagulant_shouji,
  839. this.addPlan.dialysis_duration,
  840. this.addPlan.anticoagulant_weichi
  841. )
  842. }
  843. },
  844. components: {
  845. MultiSelectBox,
  846. tableTitle,
  847. PatientSidebar
  848. },
  849. methods: {
  850. showInnerDialog: function(val) {
  851. this.InnerDialogProps.visibility = true
  852. switch (val) {
  853. case '5': // 透析器/灌流器
  854. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  855. this.InnerDialogProps.titles = '透析器/灌流器'
  856. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  857. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  858. this.InnerDialogProps.isShowTextArea = false
  859. break
  860. }
  861. },
  862. innerDialogComfirm: function(val) {
  863. this.InnerDialogProps.visibility = false
  864. switch (val.type) {
  865. case 'dialyzer_perfusion_apparatus':
  866. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  867. break
  868. }
  869. },
  870. innerDialogCancle: function() {
  871. this.InnerDialogProps.visibility = false
  872. },
  873. changeBodyFluid: function() {},
  874. GetDeviceData: function() {
  875. const params = {}
  876. GetDeviceInfo(params).then(response => {
  877. this.deviceList = response.data.data.device
  878. })
  879. },
  880. selectnDialysisTime(val) {
  881. var valTime = val.split(':')
  882. this.addPlan.dialysis_duration =
  883. parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  884. this.addPlan.dialysis_duration_hour = valTime[0]
  885. this.addPlan.dialysis_duration_minute = valTime[1]
  886. },
  887. tableCurrentChange(current) {
  888. if (typeof current === 'undefined' || current == null) {
  889. this.current_solution = {
  890. id: 0,
  891. name: '',
  892. sub_name: '',
  893. period: '',
  894. times: '',
  895. doctor: 0
  896. }
  897. this.solution_detail = {
  898. id: 0,
  899. affirm_state: 0,
  900. dialysis_duration: '',
  901. replacement_way: '',
  902. mode_id: '',
  903. blood_flow_volume: '',
  904. hemodialysis_machine: '',
  905. blood_filter: '',
  906. perfusion_apparatus: '',
  907. dialysate_flow: '',
  908. kalium: '',
  909. replacement_total: '',
  910. sodium: '',
  911. calcium: '',
  912. bicarbonate: '',
  913. anticoagulant: '',
  914. anticoagulant_shouji: '',
  915. anticoagulant_weichi: '',
  916. anticoagulant_zongliang: '',
  917. anticoagulant_gaimingcheng: '',
  918. anticoagulant_gaijiliang: ''
  919. }
  920. return
  921. }
  922. this.current_solution = current
  923. this.setCurrentMode(current.mode_id)
  924. this.solution_detail = {
  925. id: this.current_solution.id,
  926. affirm_state: this.current_solution.affirm_state,
  927. dialysis_duration:
  928. this.current_solution.dialysis_duration != 0
  929. ? this.current_solution.dialysis_duration
  930. : '',
  931. replacement_way:
  932. this.current_solution.replacement_way != 0
  933. ? this.current_solution.replacement_way
  934. : '',
  935. replacement_total:
  936. this.current_solution.replacement_total != 0
  937. ? this.current_solution.replacement_total
  938. : '',
  939. mode_id: this.current_solution.mode_id,
  940. blood_flow_volume:
  941. this.current_solution.blood_flow_volume != 0
  942. ? this.current_solution.blood_flow_volume
  943. : '',
  944. hemodialysis_machine:
  945. this.current_solution.hemodialysis_machine != 0
  946. ? this.current_solution.hemodialysis_machine
  947. : '',
  948. blood_filter:
  949. this.current_solution.blood_filter != 0
  950. ? this.current_solution.blood_filter
  951. : '',
  952. perfusion_apparatus:
  953. this.current_solution.perfusion_apparatus != 0
  954. ? this.current_solution.perfusion_apparatus
  955. : '',
  956. dialysate_flow:
  957. this.current_solution.dialysate_flow != 0
  958. ? this.current_solution.dialysate_flow
  959. : '',
  960. kalium:
  961. this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
  962. sodium:
  963. this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
  964. calcium:
  965. this.current_solution.calcium != 0
  966. ? this.current_solution.calcium
  967. : '',
  968. bicarbonate:
  969. this.current_solution.bicarbonate != 0
  970. ? this.current_solution.bicarbonate
  971. : '',
  972. anticoagulant:
  973. this.current_solution.anticoagulant != 0
  974. ? this.current_solution.anticoagulant
  975. : '',
  976. anticoagulant_shouji:
  977. this.current_solution.anticoagulant_shouji != 0
  978. ? this.current_solution.anticoagulant_shouji
  979. : '',
  980. anticoagulant_weichi:
  981. this.current_solution.anticoagulant_weichi != 0
  982. ? this.current_solution.anticoagulant_weichi
  983. : '',
  984. anticoagulant_zongliang:
  985. this.current_solution.anticoagulant_zongliang != 0
  986. ? this.current_solution.anticoagulant_zongliang
  987. : ''
  988. }
  989. },
  990. handleDelete(index, row) {
  991. if (row.use_state == 1) {
  992. this.$message.error('方案已被使用,不能删除')
  993. return false
  994. }
  995. this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
  996. confirmButtonText: '确定',
  997. cancelButtonText: '取消',
  998. type: 'warning'
  999. }).then(() => {
  1000. deleteDialysisSolution(row.id).then(response => {
  1001. if (response.data.state == 0) {
  1002. this.$message.error(response.data.msg)
  1003. return false
  1004. } else {
  1005. this.$notify({
  1006. title: '成功',
  1007. message: '删除成功',
  1008. type: 'success',
  1009. duration: 2000
  1010. })
  1011. this.tableData.splice(index, 1)
  1012. // if (row.parent_id>0) {
  1013. // this.tableData.splice(index,1);
  1014. // }else {
  1015. // var resetTableData = this.tableData;
  1016. // this.tableData = [];
  1017. // var that = this;
  1018. // resetTableData.forEach(function(item, itemindex){
  1019. // if (item.id != row.id && item.parent_id != row.id) {
  1020. // that.tableData.push(item);
  1021. // }
  1022. // });
  1023. // }
  1024. }
  1025. })
  1026. })
  1027. },
  1028. submitSolution(formName) {
  1029. editDialysisSolutionDetail(
  1030. this.patientID,
  1031. this.solution_detail.id,
  1032. this.solution_detail
  1033. ).then(response => {
  1034. if (response.data.state == 0) {
  1035. this.$message.error(response.data.msg)
  1036. return false
  1037. } else {
  1038. this.$notify({
  1039. title: '成功',
  1040. message: '修改成功',
  1041. type: 'success',
  1042. duration: 2000
  1043. })
  1044. var thisSolution = response.data.data.solution
  1045. var spliceIndex = -1
  1046. for (let index = this.tableData.length - 1; ; index--) {
  1047. if (this.tableData[index].id === thisSolution.id) {
  1048. spliceIndex = index
  1049. break
  1050. }
  1051. }
  1052. if (spliceIndex > -1) {
  1053. var newIndex = spliceIndex + 1
  1054. if (newIndex === this.tableData.length) {
  1055. this.tableData.pop()
  1056. this.tableData.push(thisSolution)
  1057. } else {
  1058. var swapData = this.tableData.splice(newIndex)
  1059. this.tableData.pop()
  1060. this.tableData.push(thisSolution)
  1061. this.tableData = this.tableData.concat(swapData)
  1062. }
  1063. }
  1064. this.solution_detail.affirm_state = thisSolution.affirm_state
  1065. this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
  1066. }
  1067. })
  1068. },
  1069. submitEditChildSolution(formName) {
  1070. this.$refs[formName].validate(valid => {
  1071. if (valid) {
  1072. var editData = {
  1073. initiate_mode: this.childPlan.initiate_mode,
  1074. doctor: this.childPlan.doctor
  1075. }
  1076. editChildPatientDialysisSolution(
  1077. this.patientID,
  1078. this.childPlan.id,
  1079. editData
  1080. ).then(response => {
  1081. if (response.data.state == 0) {
  1082. this.$message.error(response.data.msg)
  1083. return false
  1084. } else {
  1085. this.$notify({
  1086. title: '成功',
  1087. message: '修改成功',
  1088. type: 'success',
  1089. duration: 2000
  1090. })
  1091. this.$refs[formName].resetFields()
  1092. this.dialogFormVisible = false
  1093. this.tableData[this.current_index].doctor =
  1094. response.data.data.solution.doctor
  1095. this.tableData[this.current_index].updated_time =
  1096. response.data.data.solution.updated_time
  1097. this.tableData[this.current_index].initiate_mode =
  1098. response.data.data.solution.initiate_mode
  1099. this.current_index = -1
  1100. return false
  1101. }
  1102. })
  1103. }
  1104. })
  1105. },
  1106. submitNewChildSolution(formName) {
  1107. this.$refs[formName].validate(valid => {
  1108. if (valid) {
  1109. var createData = {
  1110. parent_id: this.childPlan.parent_id,
  1111. sub_name: this.childPlan.sub_name,
  1112. initiate_mode: this.childPlan.initiate_mode,
  1113. doctor: this.childPlan.doctor
  1114. }
  1115. createChildPatientDialysisSolution(this.patientID, createData).then(
  1116. response => {
  1117. if (response.data.state == 0) {
  1118. this.$message.error(response.data.msg)
  1119. return false
  1120. } else {
  1121. this.$notify({
  1122. title: '成功',
  1123. message: '创建成功',
  1124. type: 'success',
  1125. duration: 2000
  1126. })
  1127. this.$refs[formName].resetFields()
  1128. var spliceIndex = -1
  1129. for (let index = this.tableData.length - 1; ; index--) {
  1130. if (
  1131. this.tableData[index].parent_id === createData.parent_id
  1132. ) {
  1133. spliceIndex = index
  1134. break
  1135. } else if (
  1136. this.tableData[index].id === createData.parent_id
  1137. ) {
  1138. spliceIndex = index
  1139. break
  1140. }
  1141. }
  1142. if (spliceIndex > -1) {
  1143. spliceIndex += 1
  1144. if (spliceIndex === this.tableData.length) {
  1145. this.tableData.push(response.data.data.solution)
  1146. } else {
  1147. var swapData = this.tableData.splice(spliceIndex)
  1148. this.tableData.push(response.data.data.solution)
  1149. this.tableData = this.tableData.concat(swapData)
  1150. }
  1151. }
  1152. this.dialogFormVisible = false
  1153. return false
  1154. }
  1155. }
  1156. )
  1157. }
  1158. })
  1159. },
  1160. submitEditSolution(formName) {
  1161. this.$refs[formName].validate(valid => {
  1162. if (valid) {
  1163. let mode = '2'
  1164. if (
  1165. this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
  1166. ) {
  1167. mode = '3'
  1168. }
  1169. editPatientDialysisSolution(
  1170. this.patientID,
  1171. this.addPlan.id,
  1172. this.addPlan,
  1173. mode
  1174. ).then(response => {
  1175. if (response.data.state == 0) {
  1176. this.$message.error(response.data.msg)
  1177. return false
  1178. } else {
  1179. this.$notify({
  1180. title: '成功',
  1181. message: '修改成功',
  1182. type: 'success',
  1183. duration: 2000
  1184. })
  1185. this.$refs[formName].resetFields()
  1186. this.dialogVisible = false
  1187. for (var dindex in response.data.data.solution) {
  1188. if (dindex == 'id') {
  1189. continue
  1190. }
  1191. this.tableData[this.current_index][dindex] =
  1192. response.data.data.solution[dindex]
  1193. }
  1194. // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
  1195. // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
  1196. // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
  1197. this.current_index = -1
  1198. return false
  1199. }
  1200. })
  1201. }
  1202. })
  1203. },
  1204. submitNewSolution(formName) {
  1205. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
  1206. this.$refs[formName].validate(valid => {
  1207. if (valid) {
  1208. const mode = '1'
  1209. createPatientDialysisSolution(
  1210. this.patientID,
  1211. this.addPlan,
  1212. mode
  1213. ).then(response => {
  1214. if (response.data.state == 0) {
  1215. this.$message.error(response.data.msg)
  1216. return false
  1217. } else {
  1218. this.$notify({
  1219. title: '成功',
  1220. message: '创建成功',
  1221. type: 'success',
  1222. duration: 2000
  1223. })
  1224. this.$refs[formName].resetFields()
  1225. this.dialogVisible = false
  1226. this.tableData.unshift(response.data.data.solution)
  1227. if (this.tableData.length > 10) {
  1228. this.tableData.pop()
  1229. }
  1230. this.total += 1
  1231. return false
  1232. }
  1233. })
  1234. }
  1235. })
  1236. },
  1237. handleEdit(index, row) {
  1238. console.log(index, row)
  1239. },
  1240. handleSizeChange(val) {
  1241. this.queryParams.limit = val
  1242. this.fetchPatientDialysisSolutions()
  1243. },
  1244. handleCurrentChange(val) {
  1245. this.queryParams.page = val
  1246. this.fetchPatientDialysisSolutions()
  1247. },
  1248. openEdit(index, row) {
  1249. this.current_index = index
  1250. this.addPlan.id = row.id
  1251. this.addPlan.mode = row.mode_id
  1252. this.addPlan.mode_name = row.mode_name
  1253. this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
  1254. this.addPlan.dialysis_duration = '' + row.dialysis_duration
  1255. this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
  1256. this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
  1257. this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
  1258. this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
  1259. this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
  1260. if (row.anticoagulant == 3) {
  1261. this.addPlan.anticoagulant = '低分子肝素'
  1262. }
  1263. if (row.anticoagulant != 3) {
  1264. this.addPlan.anticoagulant = row.anticoagulant
  1265. }
  1266. this.addPlan.replacement_total = row.replacement_total
  1267. this.addPlan.target_ktv = row.target_ktv.toString()
  1268. this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
  1269. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
  1270. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
  1271. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
  1272. this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
  1273. this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
  1274. this.addPlan.kalium = row.kalium.toString()
  1275. this.addPlan.sodium = row.sodium.toString()
  1276. this.addPlan.calcium = row.calcium.toString()
  1277. this.addPlan.bicarbonate = row.bicarbonate.toString()
  1278. this.addPlan.glucose = row.glucose.toString()
  1279. this.addPlan.dialysate_flow = row.dialysate_flow.toString()
  1280. this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
  1281. this.addPlan.conductivity = row.conductivity.toString()
  1282. this.addPlan.remark = row.remark
  1283. this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
  1284. this.addPlan.body_fluid = row.body_fluid
  1285. this.addPlan.body_fluid_other = row.body_fluid_other.toString()
  1286. this.addPlan.special_medicine = row.special_medicine
  1287. this.addPlan.special_medicine_other = row.special_medicine_other.toString()
  1288. this.addPlan.displace_liqui_part = row.displace_liqui_part
  1289. this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
  1290. this.addPlan.ultrafiltration = row.ultrafiltration.toString()
  1291. this.addPlan.blood_access = row.blood_access
  1292. this.addPlan.registrars_id = row.registrars_id
  1293. this.dialogVisible = true
  1294. this.isEdit = true
  1295. this.addPlan.dialysate_formulation = row.dialysate_formulation
  1296. this.dialysisTimeShow = new Date(
  1297. 2018,
  1298. 1,
  1299. 1,
  1300. this.addPlan.dialysis_duration_hour,
  1301. this.addPlan.dialysis_duration_minute
  1302. )
  1303. },
  1304. isShows(name) {
  1305. var filedList = store.getters.xt_user.fileds
  1306. for (let i = 0; i < filedList.length; i++) {
  1307. if (
  1308. filedList[i].module == 1 &&
  1309. filedList[i].filed_name_cn == name &&
  1310. filedList[i].is_show == 1
  1311. ) {
  1312. return true
  1313. }
  1314. }
  1315. return false
  1316. },
  1317. openNew() {
  1318. this.current_index = -1
  1319. this.addPlan = {
  1320. mode: '',
  1321. mode_name: '',
  1322. id: 0,
  1323. type: 1,
  1324. period: '',
  1325. times: '',
  1326. initiate_mode: '',
  1327. doctor: '',
  1328. first_dialysis: '',
  1329. dialyzer: '',
  1330. dialysate_formulation: '',
  1331. hemodialysis_machine: '',
  1332. perfusion_apparatus: '',
  1333. blood_flow_volume: '',
  1334. dewater: '',
  1335. displace_liqui: 0,
  1336. replacement_way: '',
  1337. anticoagulant: '',
  1338. anticoagulant_shouji: '',
  1339. anticoagulant_weichi: '',
  1340. anticoagulant_zongliang: '',
  1341. anticoagulant_gaimingcheng: '',
  1342. anticoagulant_gaijiliang: '',
  1343. kalium: '',
  1344. replacement_total: '',
  1345. sodium: '',
  1346. calcium: '',
  1347. bicarbonate: '',
  1348. glucose: '',
  1349. dry_weight: '',
  1350. dialysate_flow: '',
  1351. dialysate_temperature: '',
  1352. conductivity: '',
  1353. remark: '',
  1354. target_ktv: '',
  1355. target_ultrafiltration: '',
  1356. dialyzer_perfusion_apparatus: '',
  1357. body_fluid: '',
  1358. body_fluid_other: '',
  1359. special_medicine: '',
  1360. special_medicine_other: '',
  1361. displace_liqui_part: '',
  1362. displace_liqui_value: '',
  1363. ultrafiltration: '',
  1364. blood_access: '',
  1365. dialysis_duration: '3.30',
  1366. dialysis_duration_hour: '3',
  1367. dialysis_duration_minute: '30'
  1368. }
  1369. this.addPlanTypeChange()
  1370. this.dialogVisible = true
  1371. this.isEdit = false
  1372. },
  1373. openNewChild(index, row) {
  1374. this.childPlan = {
  1375. mode: row.mode_name,
  1376. frequency: row.period + row.times,
  1377. name: row.name,
  1378. parent_id: row.id,
  1379. sub_name: '',
  1380. initiate_mode: '',
  1381. doctor: ''
  1382. }
  1383. this.isChildEdit = false
  1384. this.dialogFormVisible = true
  1385. },
  1386. openChildEdit(index, row) {
  1387. this.childPlan = {
  1388. mode: row.mode_name,
  1389. frequency: row.period + row.times,
  1390. name: row.name,
  1391. parent_id: row.parent_id,
  1392. id: row.id,
  1393. sub_name: row.sub_name,
  1394. initiate_mode: row.initiate_mode,
  1395. doctor: row.doctor
  1396. }
  1397. this.current_index = index
  1398. this.isChildEdit = true
  1399. this.dialogFormVisible = true
  1400. },
  1401. fetchAllDoctorAndNurse() {
  1402. fetchAllDoctorAndNurse().then(response => {
  1403. if (response.data.state == 1) {
  1404. this.doctorOptions = response.data.data.doctors
  1405. }
  1406. })
  1407. },
  1408. fetchAllAdminUsers() {
  1409. fetchAllAdminUsers().then(response => {
  1410. if (response.data.state == 1) {
  1411. this.adminUserOptions = response.data.data.users
  1412. }
  1413. })
  1414. },
  1415. fetchPatientDialysisSolutions() {
  1416. fetchPatientDialysisSolutions(this.queryParams).then(response => {
  1417. if (response.data.state == 1) {
  1418. this.tableData = response.data.data.solutions
  1419. this.total = response.data.data.total
  1420. }
  1421. })
  1422. },
  1423. addPlanTypeChange() {
  1424. if (this.addPlan.type == 1) {
  1425. this.periodOptions = periodWeek
  1426. this.numOptions = numOptionsWeek
  1427. } else {
  1428. this.addPlan.type == 2
  1429. this.periodOptions = periodDay
  1430. this.numOptions = numOptionsDay
  1431. }
  1432. },
  1433. changeThisAnticoagulant() {
  1434. var thismode = parseInt(this.addPlan.anticoagulant)
  1435. if (isNaN(thismode) || thismode <= 0) {
  1436. return false
  1437. }
  1438. if (
  1439. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1440. this.anticoagulantsConfit[thismode] == null
  1441. ) {
  1442. return false
  1443. }
  1444. this.anticoagulant = this.anticoagulantsConfit[thismode]
  1445. },
  1446. addPlanModeChange() {
  1447. var thismode = parseInt(this.addPlan.mode)
  1448. if (isNaN(thismode) || thismode <= 0) {
  1449. return false
  1450. }
  1451. if (
  1452. typeof this.modeOptions[thismode] === 'undefined' ||
  1453. this.modeOptions[thismode] == null
  1454. ) {
  1455. return false
  1456. }
  1457. // this.current_model = this.modeOptions[thismode];
  1458. this.addPlan.mode_name = this.modeOptions[thismode].name
  1459. const params = {
  1460. id: thismode
  1461. }
  1462. getSystemPrescription(params).then(response => {
  1463. if (response.data.state == 1) {
  1464. if (response.data.data.prescription.id > 0) {
  1465. for (const key in response.data.data.prescription) {
  1466. // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
  1467. this.$set(
  1468. this.addPlan,
  1469. key,
  1470. response.data.data.prescription[key].toString()
  1471. )
  1472. }
  1473. // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
  1474. this.$set(
  1475. this.addPlan,
  1476. 'dialysate_formulation',
  1477. response.data.data.prescription['dialysate_formulation']
  1478. )
  1479. this.$set(
  1480. this.addPlan,
  1481. 'anticoagulant',
  1482. response.data.data.prescription['anticoagulant']
  1483. )
  1484. this.$set(
  1485. this.addPlan,
  1486. 'body_fluid',
  1487. response.data.data.prescription['body_fluid']
  1488. )
  1489. this.$set(
  1490. this.addPlan,
  1491. 'special_medicine',
  1492. response.data.data.prescription['special_medicine']
  1493. )
  1494. this.$set(
  1495. this.addPlan,
  1496. 'displace_liqui_part',
  1497. response.data.data.prescription['displace_liqui_part']
  1498. )
  1499. this.$set(
  1500. this.addPlan,
  1501. 'blood_access',
  1502. response.data.data.prescription['blood_access']
  1503. )
  1504. this.dialysisTimeShow = new Date(
  1505. 2018,
  1506. 1,
  1507. 1,
  1508. this.addPlan.dialysis_duration_hour,
  1509. this.addPlan.dialysis_duration_minute
  1510. )
  1511. } else {
  1512. var tempAddPlan = {
  1513. id: 0,
  1514. dialyzer: '',
  1515. dialysis_duration: '',
  1516. dialysis_duration_hour: '',
  1517. dialysis_duration_minute: '',
  1518. hemodialysis_machine: '',
  1519. dialysate_formulation: '',
  1520. perfusion_apparatus: '',
  1521. blood_flow_volume: '',
  1522. dewater: '',
  1523. displace_liqui: 0,
  1524. replacement_way: '',
  1525. anticoagulant: '',
  1526. anticoagulant_shouji: '',
  1527. anticoagulant_weichi: '',
  1528. anticoagulant_zongliang: '',
  1529. anticoagulant_gaimingcheng: '',
  1530. anticoagulant_gaijiliang: '',
  1531. kalium: '',
  1532. replacement_total: '',
  1533. sodium: '',
  1534. calcium: '',
  1535. bicarbonate: '',
  1536. glucose: '',
  1537. dry_weight: '',
  1538. dialysate_flow: '',
  1539. dialysate_temperature: '',
  1540. conductivity: '',
  1541. doctor: '',
  1542. remark: '',
  1543. target_ktv: '',
  1544. target_ultrafiltration: '',
  1545. dialyzer_perfusion_apparatus: '',
  1546. body_fluid: '',
  1547. body_fluid_other: '',
  1548. special_medicine: '',
  1549. special_medicine_other: '',
  1550. displace_liqui_part: '',
  1551. displace_liqui_value: '',
  1552. ultrafiltration: '',
  1553. blood_access: ''
  1554. }
  1555. for (const key in tempAddPlan) {
  1556. this.addPlan[key] = tempAddPlan[key]
  1557. }
  1558. }
  1559. }
  1560. })
  1561. },
  1562. setCurrentMode(id) {
  1563. if (
  1564. typeof this.modeOptions[id] === 'undefined' ||
  1565. this.modeOptions[id] == null
  1566. ) {
  1567. return false
  1568. }
  1569. this.current_model = this.modeOptions[id]
  1570. },
  1571. getDoctorName(doctorid) {
  1572. var name = ''
  1573. if (this.doctorOptions == null) {
  1574. return name
  1575. }
  1576. if (typeof this.doctorOptions.length === 'undefined') {
  1577. return name
  1578. }
  1579. var leng = this.doctorOptions.length
  1580. if (leng == 0) {
  1581. return name
  1582. }
  1583. for (let index = 0; index < leng; index++) {
  1584. if (this.doctorOptions[index].id == doctorid) {
  1585. name = this.doctorOptions[index].name
  1586. break
  1587. }
  1588. }
  1589. return name
  1590. },
  1591. getAdminUserName(id) {
  1592. var name = ''
  1593. if (this.adminUserOptions == null) {
  1594. return name
  1595. }
  1596. if (typeof this.adminUserOptions.length === 'undefined') {
  1597. return name
  1598. }
  1599. var leng = this.adminUserOptions.length
  1600. if (leng == 0) {
  1601. return name
  1602. }
  1603. for (let index = 0; index < leng; index++) {
  1604. if (this.adminUserOptions[index].id == id) {
  1605. name = this.adminUserOptions[index].name
  1606. break
  1607. }
  1608. }
  1609. return name
  1610. }
  1611. },
  1612. created() {
  1613. const id = this.$route.params && this.$route.params.id
  1614. this.patientID = parseInt(id)
  1615. if (isNaN(this.patientID) || this.patientID <= 0) {
  1616. this.$notify.error({
  1617. title: '错误',
  1618. message: '无效的id'
  1619. })
  1620. this.$router.back(-1)
  1621. }
  1622. this.GetDeviceData()
  1623. this.modeOptions = this.$store.getters.treatment_mode
  1624. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  1625. this.replacementWays = this.$store.getters.replacement_ways
  1626. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1627. this.blood_filters = this.$store.getters.blood_filters
  1628. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  1629. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
  1630. this.dialysate_formulation = this.$store.getters.dialysate_formulation
  1631. this.body_fluid_option = this.$store.getters.body_fluid
  1632. this.special_medicine_option = this.$store.getters.special_medicine
  1633. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  1634. this.blood_access_option = this.$store.getters.blood_access
  1635. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  1636. this.dialyzerPerfusionApparatus = getDataConfig(
  1637. 'hemodialysis',
  1638. 'dialyzer_perfusion_apparatus'
  1639. )
  1640. this.queryParams.id = this.patientID
  1641. // this.fetchAllDoctorAndNurse();
  1642. this.fetchAllAdminUsers()
  1643. this.fetchPatientDialysisSolutions()
  1644. }
  1645. }
  1646. </script>
  1647. <style rel="stylesheet/scss" lang="scss" scoped>
  1648. .Total {
  1649. .sure {
  1650. float: right;
  1651. margin: 5px 10px 0 0;
  1652. }
  1653. .plan {
  1654. font-size: 15px;
  1655. color: #6caef7;
  1656. background: #ecf5ff;
  1657. height: 42px;
  1658. line-height: 42px;
  1659. border: 1px #ebeef5 solid;
  1660. width: 100%;
  1661. padding-left: 15px;
  1662. span {
  1663. margin: 0 20px 0 0;
  1664. }
  1665. }
  1666. }
  1667. .form-table {
  1668. border: 1px #ebeef5 solid;
  1669. padding-bottom: 20px;
  1670. .el-col-6 {
  1671. width: 380px;
  1672. }
  1673. .el-row {
  1674. margin: 0 !important;
  1675. .el-form-item {
  1676. margin-bottom: 12px;
  1677. .el-form-item__content {
  1678. .el-select {
  1679. width: 100%;
  1680. }
  1681. }
  1682. }
  1683. }
  1684. }
  1685. </style>
  1686. <style>
  1687. .el-table td,
  1688. .el-table th.is-leaf,
  1689. .el-table--border,
  1690. .el-table--group {
  1691. border-color: #d0d3da;
  1692. }
  1693. .el-table--border::after,
  1694. .el-table--group::after,
  1695. .el-table::before {
  1696. background-color: #d0d3da;
  1697. }
  1698. </style>