prescription.vue 34KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063
  1. <template>
  2. <div class="app-container ">
  3. <div class="dataTitle">透析方案</div>
  4. <div
  5. class="app-container"
  6. style="margin-left: -20px;margin-top: -20px"
  7. v-loading="pageLoading"
  8. element-loading-text="拼命加载中"
  9. >
  10. <el-row :gutter="20">
  11. <el-col :span="7">
  12. <el-table
  13. :header-cell-style="{
  14. backgroundColor: 'rgb(245, 247, 250)',
  15. color: '#606266'
  16. }"
  17. height="450"
  18. :row-style="{ color: '#303133' }"
  19. :data="treatment_mode"
  20. border
  21. style="width: 100%"
  22. highlight-current-row
  23. :row-class-name="tableRows"
  24. @row-click="onRowClicks"
  25. ref="singleTable"
  26. >
  27. <el-table-column label="透析模式" align="center">
  28. <template slot-scope="scope">
  29. {{ scope.row.name }}
  30. </template>
  31. </el-table-column>
  32. <el-table-column label="状态" width="80" align="center">
  33. <template slot-scope="scope">
  34. {{ getModeStatus(scope.row.id) }}
  35. </template>
  36. </el-table-column>
  37. </el-table>
  38. </el-col>
  39. <el-col :span="17" v-loading="itemLoading">
  40. <div class="filter-container">
  41. <el-row :gutter="20">
  42. <el-col :span="16">
  43. <div>{{ mode_name }}</div>
  44. </el-col>
  45. <el-col :span="8">
  46. <el-button
  47. style="float: right;visibility: hidden"
  48. size="small"
  49. class="filter-item"
  50. type="primary"
  51. icon="el-icon-edit-outline"
  52. @click="openEdit()"
  53. >修改
  54. </el-button>
  55. </el-col>
  56. </el-row>
  57. </div>
  58. <div class="filter-container" style="float:right">
  59. <el-form
  60. ref="addPlan"
  61. :model="addPlan"
  62. label-width="160px"
  63. style="border: black"
  64. >
  65. <el-row :gutter="20">
  66. <el-col :span="8">
  67. <el-form-item label="透析时长(h):" prop="dialysis_duration">
  68. <el-time-picker
  69. v-model="dialysisTimeShow"
  70. :picker-options="{
  71. selectableRange: '00:01:00 - 23:59:00'
  72. }"
  73. placeholder="透析时长"
  74. style="width:100%;"
  75. value-format="H:m"
  76. format="H:m"
  77. @change="selectnDialysisTime"
  78. >
  79. </el-time-picker>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="8">
  83. <el-form-item
  84. label="血流量(ml/min):"
  85. prop="blood_flow_volume"
  86. >
  87. <el-input v-model="addPlan.blood_flow_volume"></el-input>
  88. </el-form-item>
  89. </el-col>
  90. <!--<el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id == 6">-->
  91. <!--<el-form-item label="目标超滤量(ml) : ">-->
  92. <!--<el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>-->
  93. <!--</el-form-item>-->
  94. <!--</el-col>-->
  95. <!--<el-col :span="8" v-if="this.$store.getters.xt_user.template_info.template_id != 6">-->
  96. <!--<el-form-item label="目标超滤量(L) : ">-->
  97. <!--<el-input v-model="addPlan.target_ultrafiltration" type="number" ></el-input>-->
  98. <!--</el-form-item>-->
  99. <!--</el-col>-->
  100. <el-col :span="8">
  101. <el-form-item label="透析液配方:">
  102. <el-select v-model="addPlan.dialysate_formulation">
  103. <el-option
  104. v-for="(item, index) in dialysate_formulation"
  105. :label="item.name"
  106. :key="index"
  107. :value="item.id"
  108. ></el-option>
  109. </el-select>
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="8">
  113. <el-form-item label="抗凝剂:" prop="anticoagulant">
  114. <el-select
  115. v-model="addPlan.anticoagulant"
  116. @change="changeThisAnticoagulant"
  117. >
  118. <el-option
  119. v-for="(item, index) in anticoagulantsConfit"
  120. :label="item.name"
  121. :key="index"
  122. :value="item.id"
  123. ></el-option>
  124. </el-select>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="8" v-if="anticoagulant.shouji != -1">
  128. <el-form-item
  129. :label="'首剂(' + anticoagulant.shouji_unit + '): '"
  130. prop="anticoagulant_shouji"
  131. >
  132. <el-input
  133. v-model="addPlan.anticoagulant_shouji"
  134. :disabled="anticoagulant.shouji == 1 ? false : true"
  135. type="number"
  136. ></el-input>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :span="8" v-if="anticoagulant.weichi != -1">
  140. <el-form-item
  141. :label="'维持(' + anticoagulant.weichi_unit + '): '"
  142. prop="anticoagulant_weichi"
  143. >
  144. <el-input
  145. v-model="addPlan.anticoagulant_weichi"
  146. :disabled="anticoagulant.weichi == 1 ? false : true"
  147. type="number"
  148. ></el-input>
  149. </el-form-item>
  150. </el-col>
  151. <el-col :span="8" v-if="anticoagulant.zongliang != -1">
  152. <el-form-item
  153. :label="'总量(' + anticoagulant.zongliang_unit + '): '"
  154. prop="anticoagulant_zongliang"
  155. >
  156. <el-input
  157. v-model="addPlan.anticoagulant_zongliang"
  158. :disabled="anticoagulant.zongliang == 1 ? false : true"
  159. type="number"
  160. ></el-input>
  161. </el-form-item>
  162. </el-col>
  163. <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1">
  164. <el-form-item
  165. label="钙名称:"
  166. prop="anticoagulant_gaimingcheng"
  167. >
  168. <el-input
  169. v-model="addPlan.anticoagulant_gaimingcheng"
  170. :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
  171. placeholder="钙名称"
  172. ></el-input>
  173. </el-form-item>
  174. </el-col>
  175. <el-col :span="8" v-if="anticoagulant.gaijiliang != -1">
  176. <el-form-item
  177. :label="
  178. '钙剂量(' + anticoagulant.gaimingcheng_unit + '): '
  179. "
  180. prop="anticoagulant_gaijiliang"
  181. >
  182. <el-input
  183. v-model="addPlan.anticoagulant_gaijiliang"
  184. :disabled="anticoagulant.gaijiliang == 1 ? false : true"
  185. placeholder="钙剂量"
  186. ></el-input>
  187. </el-form-item>
  188. </el-col>
  189. <el-col
  190. :span="8"
  191. v-if="
  192. current_select == 2 ||
  193. current_select == 5 ||
  194. current_select == 12
  195. "
  196. >
  197. <el-form-item label="置换量(L) : " prop="replacement_total">
  198. <el-input
  199. v-model="addPlan.replacement_total"
  200. type="number"
  201. ></el-input>
  202. </el-form-item>
  203. </el-col>
  204. <el-col :span="8">
  205. <el-form-item label="钾(mmol/L): " prop="kalium">
  206. <el-input v-model="addPlan.kalium"></el-input>
  207. </el-form-item>
  208. </el-col>
  209. <el-col :span="8">
  210. <el-form-item label="钠(mmol/L): " prop="sodium">
  211. <el-input v-model="addPlan.sodium"></el-input>
  212. </el-form-item>
  213. </el-col>
  214. <el-col :span="8">
  215. <el-form-item label="钙(mmol/L): " prop="calcium">
  216. <el-input v-model="addPlan.calcium"></el-input>
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="8">
  220. <el-form-item label="透析器/灌流器:">
  221. <el-input
  222. v-model="addPlan.dialyzer_perfusion_apparatus"
  223. ></el-input>
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="8">
  227. <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
  228. <el-input v-model="addPlan.bicarbonate"></el-input>
  229. </el-form-item>
  230. </el-col>
  231. <el-col :span="8">
  232. <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
  233. <el-input v-model="addPlan.glucose"></el-input>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="8">
  237. <el-form-item
  238. label="透析液流量(ml/min): "
  239. prop="dialysate_flow"
  240. >
  241. <el-input v-model="addPlan.dialysate_flow"></el-input>
  242. </el-form-item>
  243. </el-col>
  244. <el-col :span="8">
  245. <el-form-item
  246. label="透析液温度(℃): "
  247. prop="dialysate_temperature"
  248. >
  249. <el-input
  250. v-model="addPlan.dialysate_temperature"
  251. ></el-input>
  252. </el-form-item>
  253. </el-col>
  254. <el-col :span="8">
  255. <el-form-item label="电导度(mS/cm): " prop="conductivity">
  256. <el-input v-model="addPlan.conductivity"></el-input>
  257. </el-form-item>
  258. </el-col>
  259. <el-col :span="8">
  260. <el-form-item label="体液过多症状:">
  261. <el-select v-model="addPlan.body_fluid">
  262. <el-option
  263. v-for="(item, index) in body_fluid_option"
  264. :label="item.name"
  265. :key="index"
  266. :value="item.id"
  267. ></el-option>
  268. </el-select>
  269. </el-form-item>
  270. </el-col>
  271. <el-col :span="8">
  272. <el-form-item label="体液过多其他症状">
  273. <el-input v-model="addPlan.body_fluid_other"></el-input>
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="8">
  277. <el-form-item label="透析前使用特殊药物">
  278. <el-select
  279. v-model="addPlan.special_medicine"
  280. placeholder="请选择"
  281. style="width:100%;"
  282. >
  283. <el-option :key="0" label="请选择" :value="0"></el-option>
  284. <el-option
  285. v-for="(item, index) in special_medicine_option"
  286. :label="item.name"
  287. :key="index"
  288. :value="item.id"
  289. ></el-option>
  290. </el-select>
  291. </el-form-item>
  292. </el-col>
  293. <el-col :span="8">
  294. <el-form-item label="使用其他特殊药物">
  295. <el-input
  296. v-model="addPlan.special_medicine_other"
  297. ></el-input>
  298. </el-form-item>
  299. </el-col>
  300. <el-col :span="8">
  301. <el-form-item
  302. label="置换液:"
  303. v-if="
  304. (current_select == 2 ||
  305. current_select == 5 ||
  306. current_select == 12) &&
  307. this.$store.getters.xt_user.template_info.template_id !=
  308. 6
  309. "
  310. >
  311. <el-select
  312. v-model="addPlan.displace_liqui_part"
  313. placeholder="请选择"
  314. >
  315. <el-option :key="0" label="请选择" :value="0"></el-option>
  316. <el-option
  317. v-for="(option, index) in displace_liqui_part_option"
  318. :key="index"
  319. :label="option.name"
  320. :value="option.id"
  321. ></el-option>
  322. </el-select>
  323. </el-form-item>
  324. <el-form-item
  325. label="置换方式:"
  326. v-if="
  327. current_select == 2 &&
  328. this.$store.getters.xt_user.template_info.template_id ==
  329. 6
  330. "
  331. >
  332. <el-select
  333. v-model="addPlan.displace_liqui_part"
  334. placeholder="请选择"
  335. >
  336. <el-option :key="0" label="请选择" :value="0"></el-option>
  337. <el-option
  338. v-for="(option, index) in displace_liqui_part_option"
  339. :key="index"
  340. :label="option.name"
  341. :value="option.id"
  342. ></el-option>
  343. </el-select>
  344. </el-form-item>
  345. </el-col>
  346. <el-col
  347. :span="8"
  348. v-if="
  349. current_select == 2 ||
  350. current_select == 5 ||
  351. current_select == 12
  352. "
  353. >
  354. <el-form-item label="置换液总量(L)">
  355. <el-input v-model="addPlan.displace_liqui_value"></el-input>
  356. </el-form-item>
  357. </el-col>
  358. <el-col :span="8">
  359. <el-form-item label="血管通路:">
  360. <el-select
  361. v-model="addPlan.blood_access"
  362. placeholder="请选择"
  363. >
  364. <el-option :key="0" label="请选择" :value="0"></el-option>
  365. <el-option
  366. v-for="(option, index) in blood_access_option"
  367. :key="index"
  368. :label="option.name"
  369. :value="option.id"
  370. ></el-option>
  371. </el-select>
  372. </el-form-item>
  373. </el-col>
  374. <!-- </el-row>
  375. <el-row :gutter="20" > -->
  376. <el-col :span="8">
  377. <el-form-item label="实际超滤量(L)">
  378. <el-input v-model="addPlan.ultrafiltration"></el-input>
  379. </el-form-item>
  380. </el-col>
  381. <el-col :span="8">
  382. <el-form-item label="目标KT/V">
  383. <el-input v-model="addPlan.target_ktv"></el-input>
  384. </el-form-item>
  385. </el-col>
  386. </el-row>
  387. </el-form>
  388. <el-button
  389. style="float: right"
  390. size="small"
  391. class="filter-item"
  392. type="primary"
  393. icon="el-icon-edit-outline"
  394. @click="savePrescription()"
  395. >保存
  396. </el-button>
  397. </div>
  398. </el-col>
  399. </el-row>
  400. </div>
  401. </div>
  402. </template>
  403. <script>
  404. import { calculateAnticoagulantZL, uParseTime } from "@/utils/tools";
  405. import {
  406. getAllSystemPrescription,
  407. getSystemPrescription,
  408. postSystemPrescription,
  409. updateSystemPrescription
  410. } from "@/api/config";
  411. export default {
  412. name: "prescription",
  413. components: {},
  414. data() {
  415. return {
  416. dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
  417. modeOptions: null,
  418. current_select: 0,
  419. mode_name: "HD",
  420. pageLoading: false,
  421. itemLoading: false,
  422. treatment_mode: [
  423. // 治疗模式
  424. {
  425. id: 1,
  426. name: "HD",
  427. dialysis_duration: 1,
  428. replacement_way: 2,
  429. hemodialysis_machine: 1,
  430. blood_filter: 2,
  431. perfusion_apparatus: 2,
  432. blood_flow_volume: 1,
  433. dialysate_flow: 1,
  434. kalium: 1,
  435. sodium: 1,
  436. calcium: 1,
  437. bicarbonate: 1
  438. },
  439. {
  440. id: 2,
  441. name: "HDF",
  442. dialysis_duration: 1,
  443. replacement_way: 1,
  444. hemodialysis_machine: 2,
  445. blood_filter: 1,
  446. perfusion_apparatus: 2,
  447. blood_flow_volume: 1,
  448. dialysate_flow: 1,
  449. kalium: 1,
  450. sodium: 1,
  451. calcium: 1,
  452. bicarbonate: 1
  453. },
  454. {
  455. id: 3,
  456. name: "HD+HP",
  457. dialysis_duration: 1,
  458. replacement_way: 2,
  459. hemodialysis_machine: 1,
  460. blood_filter: 2,
  461. perfusion_apparatus: 1,
  462. blood_flow_volume: 1,
  463. dialysate_flow: 1,
  464. kalium: 1,
  465. sodium: 1,
  466. calcium: 1,
  467. bicarbonate: 1
  468. },
  469. {
  470. id: 4,
  471. name: "HP",
  472. dialysis_duration: 1,
  473. replacement_way: 2,
  474. hemodialysis_machine: 2,
  475. blood_filter: 2,
  476. perfusion_apparatus: 1,
  477. blood_flow_volume: 1,
  478. dialysate_flow: 2,
  479. kalium: 2,
  480. sodium: 2,
  481. calcium: 2,
  482. bicarbonate: 2
  483. },
  484. {
  485. id: 5,
  486. name: "HF",
  487. dialysis_duration: 1,
  488. replacement_way: 1,
  489. hemodialysis_machine: 2,
  490. blood_filter: 1,
  491. perfusion_apparatus: 2,
  492. blood_flow_volume: 1,
  493. dialysate_flow: 2,
  494. kalium: 1,
  495. sodium: 1,
  496. calcium: 1,
  497. bicarbonate: 1
  498. },
  499. {
  500. id: 6,
  501. name: "SCUF",
  502. dialysis_duration: 1,
  503. replacement_way: 2,
  504. hemodialysis_machine: 1,
  505. blood_filter: 2,
  506. perfusion_apparatus: 2,
  507. blood_flow_volume: 1,
  508. dialysate_flow: 2,
  509. kalium: 2,
  510. sodium: 2,
  511. calcium: 2,
  512. bicarbonate: 2
  513. },
  514. {
  515. id: 7,
  516. name: "IUF",
  517. dialysis_duration: 1,
  518. replacement_way: 2,
  519. hemodialysis_machine: 1,
  520. blood_filter: 2,
  521. perfusion_apparatus: 2,
  522. blood_flow_volume: 2,
  523. dialysate_flow: 2,
  524. kalium: 2,
  525. sodium: 2,
  526. calcium: 2,
  527. bicarbonate: 2
  528. },
  529. {
  530. id: 8,
  531. name: "HFHD",
  532. dialysis_duration: 1,
  533. replacement_way: 2,
  534. hemodialysis_machine: 1,
  535. blood_filter: 2,
  536. perfusion_apparatus: 2,
  537. blood_flow_volume: 1,
  538. dialysate_flow: 1,
  539. kalium: 1,
  540. sodium: 1,
  541. calcium: 1,
  542. bicarbonate: 1
  543. },
  544. {
  545. id: 9,
  546. name: "HFHD+HP",
  547. dialysis_duration: 1,
  548. replacement_way: 2,
  549. hemodialysis_machine: 1,
  550. blood_filter: 2,
  551. perfusion_apparatus: 1,
  552. blood_flow_volume: 1,
  553. dialysate_flow: 1,
  554. kalium: 1,
  555. sodium: 1,
  556. calcium: 1,
  557. bicarbonate: 1
  558. },
  559. {
  560. id: 10,
  561. name: "PHF",
  562. dialysis_duration: 1,
  563. replacement_way: 1,
  564. hemodialysis_machine: 2,
  565. blood_filter: 1,
  566. perfusion_apparatus: 2,
  567. blood_flow_volume: 1,
  568. dialysate_flow: 1,
  569. kalium: 1,
  570. sodium: 1,
  571. calcium: 1,
  572. bicarbonate: 1
  573. },
  574. {
  575. id: 11,
  576. name: "HFR",
  577. dialysis_duration: 1,
  578. replacement_way: 2,
  579. hemodialysis_machine: 2,
  580. blood_filter: 1,
  581. perfusion_apparatus: 1,
  582. blood_flow_volume: 1,
  583. dialysate_flow: 1,
  584. kalium: 1,
  585. sodium: 1,
  586. calcium: 1,
  587. bicarbonate: 1
  588. },
  589. {
  590. id: 12,
  591. name: "HDF+HP",
  592. dialysis_duration: 1,
  593. replacement_way: 1,
  594. hemodialysis_machine: 2,
  595. blood_filter: 1,
  596. perfusion_apparatus: 1,
  597. blood_flow_volume: 1,
  598. dialysate_flow: 1,
  599. kalium: 1,
  600. sodium: 1,
  601. calcium: 1,
  602. bicarbonate: 1
  603. },
  604. {
  605. id: 13,
  606. name: "CRRT",
  607. dialysis_duration: 1,
  608. replacement_way: 1,
  609. hemodialysis_machine: 2,
  610. blood_filter: 1,
  611. perfusion_apparatus: 2,
  612. blood_flow_volume: 1,
  613. dialysate_flow: 2,
  614. kalium: 1,
  615. sodium: 1,
  616. calcium: 1,
  617. bicarbonate: 1
  618. },
  619. {
  620. id: 14,
  621. name: "腹水回输",
  622. dialysis_duration: 1,
  623. replacement_way: 2,
  624. hemodialysis_machine: 1,
  625. blood_filter: 2,
  626. perfusion_apparatus: 2,
  627. blood_flow_volume: 2,
  628. dialysate_flow: 2,
  629. kalium: 2,
  630. sodium: 2,
  631. calcium: 2,
  632. bicarbonate: 2
  633. },
  634. // {
  635. // id: 15,
  636. // name: "HD前置换",
  637. // dialysis_duration: 1,
  638. // replacement_way: 2,
  639. // hemodialysis_machine: 1,
  640. // blood_filter: 2,
  641. // perfusion_apparatus: 2,
  642. // blood_flow_volume: 1,
  643. // dialysate_flow: 1,
  644. // kalium: 1,
  645. // sodium: 1,
  646. // calcium: 1,
  647. // bicarbonate: 1
  648. // },
  649. // {
  650. // id: 16,
  651. // name: "HD后置换",
  652. // dialysis_duration: 1,
  653. // replacement_way: 2,
  654. // hemodialysis_machine: 1,
  655. // blood_filter: 2,
  656. // perfusion_apparatus: 2,
  657. // blood_flow_volume: 1,
  658. // dialysate_flow: 1,
  659. // kalium: 1,
  660. // sodium: 1,
  661. // calcium: 1,
  662. // bicarbonate: 1
  663. // },
  664. // {
  665. // id: 17,
  666. // name: "HDF前置换",
  667. // dialysis_duration: 1,
  668. // replacement_way: 1,
  669. // hemodialysis_machine: 2,
  670. // blood_filter: 1,
  671. // perfusion_apparatus: 2,
  672. // blood_flow_volume: 1,
  673. // dialysate_flow: 1,
  674. // kalium: 1,
  675. // sodium: 1,
  676. // calcium: 1,
  677. // bicarbonate: 1
  678. // },
  679. // {
  680. // id: 18,
  681. // name: "HDF后置换",
  682. // dialysis_duration: 1,
  683. // replacement_way: 1,
  684. // hemodialysis_machine: 2,
  685. // blood_filter: 1,
  686. // perfusion_apparatus: 2,
  687. // blood_flow_volume: 1,
  688. // dialysate_flow: 1,
  689. // kalium: 1,
  690. // sodium: 1,
  691. // calcium: 1,
  692. // bicarbonate: 1
  693. // },
  694. {
  695. id: 19,
  696. name: "IUF+HD",
  697. dialysis_duration: 1,
  698. replacement_way: 2,
  699. hemodialysis_machine: 1,
  700. blood_filter: 2,
  701. perfusion_apparatus: 2,
  702. blood_flow_volume: 1,
  703. dialysate_flow: 1,
  704. kalium: 1,
  705. sodium: 1,
  706. calcium: 1,
  707. bicarbonate: 1
  708. }
  709. ],
  710. addPlan: {
  711. id: 0,
  712. mode: "",
  713. dialyzer: "",
  714. dialysis_duration: "",
  715. dialysis_duration_hour: "",
  716. dialysis_duration_minute: "",
  717. hemodialysis_machine: "",
  718. perfusion_apparatus: "",
  719. dialysate_formulation: "",
  720. blood_flow_volume: "",
  721. dewater: "",
  722. displace_liqui: 0,
  723. replacement_way: "",
  724. anticoagulant: "",
  725. anticoagulant_shouji: "",
  726. anticoagulant_weichi: "",
  727. anticoagulant_zongliang: "",
  728. anticoagulant_gaimingcheng: "",
  729. anticoagulant_gaijiliang: "",
  730. kalium: "",
  731. replacement_total: "",
  732. sodium: "",
  733. calcium: "",
  734. bicarbonate: "",
  735. glucose: "",
  736. dry_weight: "",
  737. dialysate_flow: "",
  738. dialysate_temperature: "",
  739. conductivity: "",
  740. doctor: "",
  741. remark: "",
  742. target_ktv: "",
  743. target_ultrafiltration: "",
  744. dialyzer_perfusion_apparatus: "",
  745. body_fluid: "",
  746. body_fluid_other: "",
  747. special_medicine: "",
  748. special_medicine_other: "",
  749. displace_liqui_part: "",
  750. displace_liqui_value: "",
  751. ultrafiltration: "",
  752. blood_access: ""
  753. },
  754. system_prescription: [],
  755. isEdit: false,
  756. anticoagulant: {
  757. id: 0,
  758. name: "",
  759. type: 1,
  760. shouji: 1,
  761. weichi: 1,
  762. zongliang: 1,
  763. gaimingcheng: -1,
  764. gaijiliang: -1,
  765. shouji_unit: "mg",
  766. weichi_unit: "mg/h",
  767. zongliang_unit: "mg",
  768. gaimingcheng_unit: "",
  769. gaijiliang_unit: ""
  770. },
  771. anticoagulantsSet: {
  772. type: 1
  773. },
  774. replacementWays: null,
  775. anticoagulantsConfit: null,
  776. dialysate_formulation: [],
  777. body_fluid_option: [],
  778. special_medicine_option: [],
  779. displace_liqui_part_option: [],
  780. blood_access_option: []
  781. };
  782. },
  783. computed: {},
  784. methods: {
  785. openEdit() {},
  786. tableRows({ row, rowIndex }) {
  787. // 把每一行的索引放进row
  788. row.index = rowIndex;
  789. },
  790. onRowClicks(row, event, column) {
  791. console.log("row------", row.id);
  792. this.current_select = row.id;
  793. this.mode_name = row.name;
  794. this.isEdit = false;
  795. this.addPlan.mode = row.id;
  796. this.getSystemPrescription(row.id);
  797. },
  798. getSystemPrescription(id) {
  799. var tempAddPlan = {
  800. id: 0,
  801. mode: "",
  802. dialyzer: "",
  803. dialysis_duration: "",
  804. dialysis_duration_hour: "",
  805. dialysis_duration_minute: "",
  806. hemodialysis_machine: "",
  807. dialysate_formulation: "",
  808. perfusion_apparatus: "",
  809. blood_flow_volume: "",
  810. dewater: "",
  811. displace_liqui: 0,
  812. replacement_way: "",
  813. anticoagulant: "",
  814. anticoagulant_shouji: "",
  815. anticoagulant_weichi: "",
  816. anticoagulant_zongliang: "",
  817. anticoagulant_gaimingcheng: "",
  818. anticoagulant_gaijiliang: "",
  819. kalium: "",
  820. replacement_total: "",
  821. sodium: "",
  822. calcium: "",
  823. bicarbonate: "",
  824. glucose: "",
  825. dry_weight: "",
  826. dialysate_flow: "",
  827. dialysate_temperature: "",
  828. conductivity: "",
  829. doctor: "",
  830. remark: "",
  831. target_ktv: "",
  832. target_ultrafiltration: "",
  833. dialyzer_perfusion_apparatus: "",
  834. body_fluid: "",
  835. body_fluid_other: "",
  836. special_medicine: "",
  837. special_medicine_other: "",
  838. displace_liqui_part: "",
  839. displace_liqui_value: "",
  840. ultrafiltration: "",
  841. blood_access: ""
  842. };
  843. for (const key in tempAddPlan) {
  844. this.addPlan[key] = tempAddPlan[key];
  845. }
  846. this.isEdit = false;
  847. let params = {
  848. id: id
  849. };
  850. this.dialysisTimeShow = new Date(
  851. 2018,
  852. 1,
  853. 1,
  854. this.addPlan.dialysis_duration_hour,
  855. this.addPlan.dialysis_duration_minute
  856. );
  857. getSystemPrescription(params).then(response => {
  858. if (response.data.state == 0) {
  859. this.$message.error(response.data.msg);
  860. return false;
  861. } else {
  862. if (response.data.data.prescription.id > 0) {
  863. for (const key in response.data.data.prescription) {
  864. this.addPlan[key] = response.data.data.prescription[key];
  865. }
  866. this.dialysisTimeShow = new Date(
  867. 2018,
  868. 1,
  869. 1,
  870. this.addPlan.dialysis_duration_hour,
  871. this.addPlan.dialysis_duration_minute
  872. );
  873. if (this.addPlan.id > 0) {
  874. this.isEdit = true;
  875. }
  876. }
  877. this.addPlan.mode = id;
  878. }
  879. });
  880. },
  881. getModeStatus: function(id) {
  882. for (let i = 0; i < this.system_prescription.length; i++) {
  883. if (this.system_prescription[i].mode_id == id) {
  884. return "已保存";
  885. }
  886. }
  887. return "未保存";
  888. },
  889. getAllSystemPrescription() {
  890. getAllSystemPrescription().then(response => {
  891. if (response.data.state == 0) {
  892. this.$message.error(response.data.msg);
  893. return false;
  894. } else {
  895. this.system_prescription = response.data.data.prescriptions;
  896. for (let i = 0; i < this.system_prescription.length; i++) {
  897. if (this.system_prescription[i].mode == 1) {
  898. this.isEdit = true;
  899. }
  900. }
  901. }
  902. });
  903. },
  904. selectnDialysisTime(val) {
  905. console.log(val);
  906. console.log(this.addPlan.dialysis_duration);
  907. console.log(this.addPlan.dialysis_duration_hour);
  908. console.log(this.addPlan.dialysis_duration_minute);
  909. var valTime = val.split(":");
  910. this.addPlan.dialysis_duration =
  911. parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2));
  912. this.addPlan.dialysis_duration_hour = valTime[0];
  913. this.addPlan.dialysis_duration_minute = valTime[1];
  914. },
  915. changeThisAnticoagulant() {
  916. var thismode = parseInt(this.addPlan.anticoagulant);
  917. console.log("------", thismode);
  918. if (isNaN(thismode) || thismode <= 0) {
  919. return false;
  920. }
  921. if (
  922. typeof this.anticoagulantsConfit[thismode] == "undefined" ||
  923. this.anticoagulantsConfit[thismode] == null
  924. ) {
  925. return false;
  926. }
  927. this.anticoagulant = this.anticoagulantsConfit[thismode];
  928. },
  929. savePrescription: function() {
  930. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString();
  931. if (!this.isEdit) {
  932. postSystemPrescription(this.addPlan).then(response => {
  933. if (response.data.state == 0) {
  934. this.$message.error(response.data.msg);
  935. return false;
  936. } else {
  937. this.$notify({
  938. title: "成功",
  939. message: "创建成功",
  940. type: "success",
  941. duration: 2000
  942. });
  943. this.isEdit = true;
  944. this.system_prescription = [];
  945. this.system_prescription = response.data.data.prescriptions;
  946. this.addPlan.id = response.data.data.prescription.id;
  947. return false;
  948. }
  949. });
  950. } else {
  951. updateSystemPrescription(this.addPlan.id, this.addPlan).then(
  952. response => {
  953. if (response.data.state == 0) {
  954. this.$message.error(response.data.msg);
  955. return false;
  956. } else {
  957. this.isEdit = true;
  958. this.addPlan.id = response.data.data.prescription.id;
  959. this.$notify({
  960. title: "成功",
  961. message: "编辑成功",
  962. type: "success",
  963. duration: 2000
  964. });
  965. return false;
  966. }
  967. }
  968. );
  969. }
  970. }
  971. },
  972. mounted() {
  973. this.$refs.singleTable.setCurrentRow(this.treatment_mode[0]);
  974. this.mode_name = this.treatment_mode[0].name;
  975. this.current_select = this.treatment_mode[0].id;
  976. },
  977. created() {
  978. this.anticoagulantsSet = this.$store.getters.anticoagulants_set;
  979. this.replacementWays = this.$store.getters.replacement_ways;
  980. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  981. this.blood_filters = this.$store.getters.blood_filters;
  982. this.dialysate_formulation = this.$store.getters.dialysate_formulation;
  983. this.body_fluid_option = this.$store.getters.body_fluid;
  984. this.special_medicine_option = this.$store.getters.special_medicine;
  985. this.displace_liqui_part_option = this.$store.getters.displace_liqui;
  986. this.blood_access_option = this.$store.getters.blood_access;
  987. this.addPlan.mode = 1;
  988. this.getAllSystemPrescription();
  989. this.getSystemPrescription(this.addPlan.mode);
  990. },
  991. watch: {
  992. "addPlan.dialysis_duration": function() {
  993. console.log(this.addPlan.anticoagulant_shouji);
  994. console.log(this.addPlan.dialysis_duration);
  995. console.log(this.addPlan.anticoagulant_weichi);
  996. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  997. 1,
  998. this.addPlan.anticoagulant_shouji,
  999. this.addPlan.dialysis_duration,
  1000. this.addPlan.anticoagulant_weichi
  1001. );
  1002. },
  1003. "addPlan.anticoagulant_shouji": function() {
  1004. console.log(this.addPlan.anticoagulant_shouji);
  1005. console.log(this.addPlan.dialysis_duration);
  1006. console.log(this.addPlan.anticoagulant_weichi);
  1007. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1008. 1,
  1009. this.addPlan.anticoagulant_shouji,
  1010. this.addPlan.dialysis_duration,
  1011. this.addPlan.anticoagulant_weichi
  1012. );
  1013. },
  1014. "addPlan.anticoagulant_weichi": function() {
  1015. console.log(this.addPlan.anticoagulant_shouji);
  1016. console.log(this.addPlan.dialysis_duration);
  1017. console.log(this.addPlan.anticoagulant_weichi);
  1018. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1019. 1,
  1020. this.addPlan.anticoagulant_shouji,
  1021. this.addPlan.dialysis_duration,
  1022. this.addPlan.anticoagulant_weichi
  1023. );
  1024. }
  1025. }
  1026. };
  1027. </script>
  1028. <style rel="stylesheet/scss" lang="scss" scoped></style>