prescription.vue 41KB

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