血透系统pad前端

PrescriptionDialog.vue 40KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108
  1. <template>
  2. <div>
  3. <div v-if="isShowDialog" class="Dialog">
  4. <div class="DialogTit">
  5. <span @click="close()" class="iconfont">&#xe6e9;</span>
  6. <h1 class="name">透析处方</h1>
  7. <span @click="commitInfo" class="success">完成</span>
  8. </div>
  9. <div class="DialogContent" id="dialogTop">
  10. <div @click="showSubMenu('mode')" class="item" ref="mode" v-if="isShow('透析模式')">
  11. <label class="name" for="txms">透析模式</label>
  12. <div class="content">
  13. <span class="text" id="txms">{{GetModeByModeId(dialysisPrescription.mode_id)}}</span>
  14. <span class="iconfont">&#xe6f9;</span>
  15. </div>
  16. </div>
  17. <div class="item" @click="openPicker" v-if="isShow('透析时长')">
  18. <label class="name" for="txsc">透析时长</label>
  19. <div class="content">
  20. <span class="text" style="width: 100px">{{timeValue}}</span>
  21. <span class="iconfont">&#xe6f9;</span>
  22. </div>
  23. </div>
  24. <div class="item" v-if="isShow('血流量')">
  25. <label class="name" for="xll">血流量(ml/min)</label>
  26. <div class="content">
  27. <input type="tel" @focus="inputFocus" id="xll" v-model="dialysisPrescription.blood_flow_volume"/>
  28. </div>
  29. </div>
  30. <div class="item" v-if="isShow('目标超滤量')">
  31. <label class="name" for="mbcll">目标超滤量(L)</label>
  32. <div class="content">
  33. <input type="tel" @focus="inputFocus" id="mbcll" v-model="dialysisPrescription.target_ultrafiltration"/>
  34. </div>
  35. </div>
  36. <div @click="showSubMenu('dialysate_formulation')" class="item" ref="dialysate_formulation" v-if="isShow('透析液配方')">
  37. <label class="name" for="txypf">透析液配方</label>
  38. <div class="content">
  39. <span class="text"
  40. id="txypf">{{GetDialysateFormulationById(dialysisPrescription.dialysate_formulation)}}</span>
  41. <span class="iconfont">&#xe6f9;</span>
  42. </div>
  43. </div>
  44. <div @click="showSubMenu('anticoagulant')" class="item" ref="anticoagulant" v-if="isShow('抗凝剂')">
  45. <label class="name" for="knj">抗凝剂</label>
  46. <div class="content">
  47. <span class="text" id="knj">{{GetAnticoagulantById(dialysisPrescription.anticoagulant)}}</span>
  48. <span class="iconfont">&#xe6f9;</span>
  49. </div>
  50. </div>
  51. <div class="item" v-if="anticoagulant.shouji != -1&&isShow('首剂')">
  52. <label class="name" for="sj">首剂({{anticoagulant.shouji_unit}})</label>
  53. <div class="content">
  54. <input type="tel" @focus="inputFocus" id="sj" v-model="dialysisPrescription.anticoagulant_shouji"
  55. :disabled="anticoagulant.shouji==1?false:true"/>
  56. </div>
  57. </div>
  58. <div class="item" v-if="anticoagulant.weichi != -1&&isShow('维持')">
  59. <label class="name" for="wz">维持({{anticoagulant.weichi_unit}})</label>
  60. <div class="content">
  61. <input type="tel" @focus="inputFocus" id="wz" class="inputBox"
  62. v-model="dialysisPrescription.anticoagulant_weichi"
  63. :disabled="anticoagulant.weichi==1?false:true">
  64. </div>
  65. </div>
  66. <div class="item" v-if="anticoagulant.zongliang != -1 && isShow('总量')">
  67. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">总量(mg)</label>
  68. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">总量(IU)</label>
  69. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">总量(mg)</label>
  70. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">总量(mg)</label>
  71. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">总量(mg)</label>
  72. <div class="content">
  73. <input type="tel" @focus="inputFocus" id="zl" class="inputBox"
  74. v-model="dialysisPrescription.anticoagulant_zongliang"
  75. :disabled="anticoagulant.zongliang==1?false:true">
  76. </div>
  77. </div>
  78. <div class="item" v-if="anticoagulant.gaimingcheng != -1 && isShow('钙名称')">
  79. <label class="name" for="g">钙名称({{anticoagulant.gaimingcheng_unit}})</label>
  80. <div class="content">
  81. <input type="text" id="g" class="inputBox" v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  82. :disabled="anticoagulant.gaimingcheng==1?false:true">
  83. </div>
  84. </div>
  85. <div class="item" v-if="anticoagulant.gaijiliang != -1 && isShow('钙剂量')">
  86. <label class="name" for="gjl">钙剂量</label>
  87. <div class="content">
  88. <input type="text" id="gjl" class="inputBox" v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  89. :disabled="anticoagulant.gaimingcheng==1?false:true">
  90. </div>
  91. </div>
  92. <!-- <div class="item">
  93. <label class="name" for="gtz">干体重(kg)</label>
  94. <div class="content">
  95. <input type="tel" @focus="inputFocus" id="gtz" v-model="dialysisPrescription.dry_weight"/>
  96. </div>
  97. </div> -->
  98. <div class="line"></div>
  99. <div class="item" v-if="isShow('置换量')">
  100. <label class="name" for="zhy">置换量(L)</label>
  101. <div class="content">
  102. <input type="tel" @focus="inputFocus" id="zhy" v-model="dialysisPrescription.replacement_total"/>
  103. </div>
  104. </div>
  105. <!-- <div class="line"></div> -->
  106. <div class="item" v-if="isShow('钾')">
  107. <label class="name" for="j">钾(mmol/L)</label>
  108. <div class="content">
  109. <input type="tel" @focus="inputFocus" id="j" v-model="dialysisPrescription.kalium"/>
  110. </div>
  111. </div>
  112. <div class="item" v-if="isShow('钠')">
  113. <label class="name" for="n">钠(mmol/L):</label>
  114. <div class="content">
  115. <input type="tel" @focus="inputFocus" id="n" v-model="dialysisPrescription.sodium"/>
  116. </div>
  117. </div>
  118. <div class="item" v-if="isShow('钙')">
  119. <label class="name" for="gg">钙(mmol/L)</label>
  120. <div class="content">
  121. <input type="tel" @focus="inputFocus" id="gg" v-model="dialysisPrescription.calcium"/>
  122. </div>
  123. </div>
  124. <div class="item" v-if="isShow('碳酸氢盐')">
  125. <label class="name" for="tsqy">碳酸氢盐(mmol/L)</label>
  126. <div class="content">
  127. <input type="tel" @focus="inputFocus" id="tsqy" v-model="dialysisPrescription.bicarbonate"/>
  128. </div>
  129. </div>
  130. <div class="item" v-if="isShow('葡萄糖')">
  131. <label class="name" for="ptt">葡萄糖(mmol/L)</label>
  132. <div class="content">
  133. <input type="tel" @focus="inputFocus" id="ptt" v-model="dialysisPrescription.glucose"/>
  134. </div>
  135. </div>
  136. <div class="line"></div>
  137. <div class="item" v-if="isShow('透析液流量')">
  138. <label class="name" for="txyll">透析液流量(ml/min)</label>
  139. <div class="content">
  140. <input type="tel" @focus="inputFocus" id="txyll" v-model="dialysisPrescription.dialysate_flow"/>
  141. </div>
  142. </div>
  143. <div class="item" v-if="isShow('透析液温度')">
  144. <label class="name" for="txywd">透析液温度(℃)</label>
  145. <div class="content">
  146. <!--<span class="text">HD</span>-->
  147. <!--<span class="iconfont">&#xe6f9;</span>-->
  148. <input type="tel" @focus="inputFocus" id="txywd" v-model="dialysisPrescription.dialysate_temperature"/>
  149. </div>
  150. </div>
  151. <div class="item" v-if="isShow('电导度')">
  152. <label class="name" for="dtl">电导度(mS/m)</label>
  153. <div class="content">
  154. <input type="tel" @focus="inputFocus" id="dtl" v-model="dialysisPrescription.conductivity"/>
  155. </div>
  156. </div>
  157. <div class="item" v-if="isShow('透析器/灌流器')">
  158. <label class="name" for="dtl">透析器/灌流器</label>
  159. <div class="content">
  160. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.dialyzer_perfusion_apparatus"/>
  161. </div>
  162. </div>
  163. <div class="line"></div>
  164. <div @click="showSubMenu('body_fluid')" class="item" ref="body_fluid" v-if="isShow('体液过多症状')">
  165. <label class="name" for="knj">体液过多症状</label>
  166. <div class="content">
  167. <span class="text" id="knja">{{getBodyFluid(dialysisPrescription.body_fluid)}}</span>
  168. <span class="iconfont">&#xe6f9;</span>
  169. </div>
  170. </div>
  171. <div class="item" v-if="isShow('体液过多其他症状')">
  172. <label class="name" for="knj">体液过多其他症状</label>
  173. <div class="content">
  174. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.body_fluid_other"/>
  175. </div>
  176. </div>
  177. <div @click="showSubMenu('special_medicine')" class="item" ref="special_medicine" v-if="isShow('透析前使用特殊药物')">
  178. <label class="name" for="knj">透析前使用特殊药物</label>
  179. <div class="content">
  180. <span class="text" id="knjaa">{{getSpecialMedicine(dialysisPrescription.special_medicine)}}</span>
  181. <span class="iconfont">&#xe6f9;</span>
  182. </div>
  183. </div>
  184. <div class="item" v-if="isShow('透析前使用其他特殊药物')">
  185. <label class="name" for="knj">透析前使用其他特殊药物</label>
  186. <div class="content">
  187. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.special_medicine_other"/>
  188. </div>
  189. </div>
  190. <div @click="showSubMenu('displace_liqui_part')" class="item" ref="displace_liqui_part" v-if="isShow('置换液')">
  191. <label class="name" for="knj">置换液</label>
  192. <div class="content">
  193. <span class="text" id="knjaa">{{getDisplaceLiquiPart(dialysisPrescription.displace_liqui_part)}}</span>
  194. <span class="iconfont">&#xe6f9;</span>
  195. </div>
  196. </div>
  197. <div class="item" v-if="isShow('置换液总量')">
  198. <label class="name" for="knj">置换液总量(L)</label>
  199. <div class="content">
  200. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.displace_liqui_value"/>
  201. </div>
  202. </div>
  203. <div class="item" v-if="isShow('目标KT/V')">
  204. <label class="name" for="knj">目标KT/V</label>
  205. <div class="content">
  206. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.target_ktv"/>
  207. </div>
  208. </div>
  209. <div @click="showSubMenu('blood_access')" class="item" ref="blood_access" v-if="isShow('血管通路')">
  210. <label class="name" for="knj">血管通路</label>
  211. <div class="content">
  212. <span class="text" id="knjaa">{{getBloodAccess(dialysisPrescription.blood_access)}}</span>
  213. <span class="iconfont">&#xe6f9;</span>
  214. </div>
  215. </div>
  216. <div class="item" v-if="isShow('实际超滤量')">
  217. <label class="name" for="knj">实际超滤量(L)</label>
  218. <div class="content">
  219. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.ultrafiltration"/>
  220. </div>
  221. </div>
  222. <div @click="dialysisGoodsClick()" class="item" ref="consumable_material" v-if="config.is_open == 1">
  223. <label class="name" for="knj">透析耗材</label>
  224. <div class="content">
  225. <span class="text" id="knjaa"></span>
  226. <span class="iconfont">&#xe6f9;</span>
  227. </div>
  228. </div>
  229. <div class="item" style="display: none">
  230. <label class="name" for="dtl">医生签名</label>
  231. <div class="content">
  232. <div v-if="isShowDesc">医生尚未签名</div>
  233. <img v-if="isShowDoctorSign" style="width: 100px;height: 30px" :src="signUrl"
  234. alt="" srcset="">
  235. </div>
  236. </div>
  237. <div class="line"></div>
  238. <div>
  239. <div class="item">
  240. <label class="name" for="bz">备注</label>
  241. <div class="content">
  242. <span class="text"></span>
  243. </div>
  244. </div>
  245. <textarea class="textarea" id="bz" placeholder="请输入内容" v-model="dialysisPrescription.remark"
  246. @focus="lastInputFocus" @blur="lastInputBlur"></textarea>
  247. </div>
  248. <!--<div class="footer">-->
  249. <!--处方医生:刘小军 医生-->
  250. <!--</div>-->
  251. <div class="PrescSubmit">
  252. <button style="display: none" class="tj" @click="sign()">医生签名</button>
  253. <button class="tjcq" @click="commitSolutionInfo">保存并设为长期处方</button>
  254. <button class="tj" @click="commitInfo">保存</button>
  255. </div>
  256. </div>
  257. </div>
  258. <!--<two-menu title="二级菜单" v-show="isShowModeSubMenu"></two-menu>-->
  259. <check-box-sub-menu :visibility="visibility" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm" v-on:menu-empty="menuEmpty"
  260. :propsForm="propForm" ></check-box-sub-menu>
  261. <!--<multiple-sub-menu :goodTypes="types" :visibility="is_show" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm" :propsForm="propForm"></multiple-sub-menu>-->
  262. <multiple-sub-menu :goodTypes="types" :info="info" :visibility="is_show" v-on:menu-cancel-two="menuCancleTwo" v-on:menu-comfirm-two="menuComfirmTwo" :propsForm="propForm" :dialysisPrescription="dialysisPrescription"></multiple-sub-menu>
  263. <mt-datetime-picker
  264. ref="picker"
  265. type="time"
  266. hourFormat="{value}小时"
  267. minuteFormat="{value}分钟"
  268. @confirm="handleTimeConfirm"
  269. v-model="time">
  270. </mt-datetime-picker>
  271. </div>
  272. </template>
  273. <script>
  274. import CheckBoxSubMenu from "./subMenu/checkBoxSubMenu";
  275. import MultipleSubMenu from "./subMenu/multipleSubMenu"
  276. import {commitDialysisPrescription, postSign, postSolution} from "@/api/dialysis";
  277. import {Toast} from 'vant';
  278. import {getDataConfig} from '@/utils/data';
  279. export default {
  280. name: "PrescriptionDialog",
  281. props: {
  282. patient_prop: {
  283. type: Object
  284. },
  285. solution_prop: {
  286. type: Object
  287. },
  288. config: {
  289. type: Object
  290. },
  291. operators:{
  292. type:Array,
  293. default: function () {
  294. return new Array();
  295. }
  296. },
  297. types:{
  298. type:Array,
  299. default: function () {
  300. return new Array();
  301. }
  302. },
  303. info:{
  304. type:Array,
  305. default: function () {
  306. return new Array();
  307. }
  308. },
  309. prescription_prop: {
  310. type: Object,
  311. },
  312. machines_prop: {
  313. type: Array,
  314. default: function () {
  315. return new Array();
  316. }
  317. }
  318. },
  319. data() {
  320. return {
  321. loading:false,
  322. signUrl:"",
  323. isShowDesc:true,
  324. time: '03:00',
  325. timeValue: '',
  326. isShowSign: false,
  327. anticoagulantsConfit: {},
  328. dialysateFormulationOptions: [],
  329. bodyFluidOptions:[],
  330. specialMedicineOptions:[],
  331. displaceLiquiPartOptions:[],
  332. bloodAccessOptions:[],
  333. is_show:false,
  334. perfusion_apparatus: {},
  335. replacementWays: [],
  336. dialyserList: [],
  337. modeOption: [],
  338. isShowDoctorBtn: true,
  339. isShowDoctorSign: false,
  340. visibility: false,
  341. isShowDialog: true,
  342. isShowModeSubMenu: false,
  343. dialysisPrescription: {
  344. mode_id: "",
  345. dialysis_duration: "",
  346. dialysis_duration_hour: "",
  347. dialysis_duration_minute: "",
  348. mode_name: "",
  349. dialyzer: "",
  350. perfusion_apparatus: "",
  351. blood_flow_volume: "",
  352. dewater_amount: "",
  353. displace_liqui: "",
  354. replacement_total: '',
  355. replacement_way: "",
  356. anticoagulant: "",
  357. anticoagulant_shouji: "",
  358. anticoagulant_weichi: "",
  359. anticoagulant_zongliang: "",
  360. anticoagulant_gaimingcheng: "",
  361. anticoagulant_gaijiliang: "",
  362. dialyzer_perfusion_apparatus:"",
  363. kalium: "",
  364. sodium: "",
  365. calcium: "",
  366. bicarbonate: "",
  367. glucose: "",
  368. prescription_doctor: "",
  369. // dry_weight: "",
  370. dialysate_flow: "",
  371. dialysate_temperature: "",
  372. target_ultrafiltration: "",
  373. dialysate_formulation: "",
  374. conductivity: "",
  375. doctor: "",
  376. remark: "",
  377. body_fluid:"",
  378. special_medicine:"",
  379. special_medicine_other:"",
  380. displace_liqui_part:"",
  381. displace_liqui_value:"",
  382. blood_access:"",
  383. ultrafiltration:"",
  384. body_fluid_other:"",
  385. niprocart:'',
  386. jms:'',
  387. fistula_needle_set:'',
  388. fistula_needle_set_16:'',
  389. hemoperfusion:'',
  390. dialyser_sterilised:'',
  391. filtryzer:'',
  392. target_ktv:'',
  393. dialyzers:'',
  394. injector:'',
  395. bloodlines:'',
  396. tubing_hemodialysis:'',
  397. package:'',
  398. a_liquid:'',
  399. },
  400. anticoagulant: {
  401. id: 0,
  402. name: "",
  403. type: 1,
  404. shouji: 1,
  405. weichi: 1,
  406. zongliang: 1,
  407. gaimingcheng: -1,
  408. gaijiliang: -1,
  409. shouji_unit: "mg",
  410. weichi_unit: "mg/h",
  411. zongliang_unit: "mg",
  412. gaimingcheng_unit: "",
  413. gaijiliang_unit: ""
  414. },
  415. propForm: {
  416. title: "",
  417. list: [],
  418. optionList: [],
  419. isMultiple: 2,
  420. result: [], //选中的值
  421. type: 1, //用来区分不同子菜单,方便对返回值进行赋值
  422. selectId: 0
  423. }
  424. };
  425. },
  426. methods: {
  427. isShow(name){
  428. var filedList = this.$store.getters.user.fileds
  429. for (let i = 0; i < filedList.length; i++){
  430. if(filedList[i].module == 1 && filedList[i].filed_name_cn == name&&filedList[i].is_show == 1){
  431. return true
  432. }
  433. }
  434. return false
  435. },
  436. openPicker: function () {
  437. this.$refs.picker.open();
  438. },
  439. handleTimeConfirm: function (val) {
  440. val = val.replace("小时")
  441. val = val.replace("分钟")
  442. let timeArray = val.split(":")
  443. if (parseInt(timeArray[0].substring(0, 1)) == 0) {
  444. this.dialysisPrescription.dialysis_duration_hour = timeArray[0].charAt(timeArray[0].length - 1)
  445. } else {
  446. this.dialysisPrescription.dialysis_duration_hour = timeArray[0]
  447. }
  448. if (parseInt(timeArray[1].substring(0, 1)) == 0) {
  449. this.dialysisPrescription.dialysis_duration_minute = timeArray[1].charAt(timeArray[1].length - 1)
  450. } else {
  451. this.dialysisPrescription.dialysis_duration_minute = timeArray[1]
  452. }
  453. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + "小时" + this.dialysisPrescription.dialysis_duration_minute + "分钟"
  454. this.dialysisPrescription.dialysis_duration = this.dialysisPrescription.dialysis_duration_hour + "." + (this.dialysisPrescription.dialysis_duration_minute)
  455. },
  456. inputFocus: function (event) {
  457. var input = event.target
  458. setTimeout(function () {
  459. input.scrollIntoView()
  460. }, 0);
  461. if (input.setSelectionRange) {
  462. setTimeout(function () {
  463. input.setSelectionRange(0, input.value.length);
  464. }, 0);
  465. } else if (input.createTextRange) {
  466. var rng = input.createTextRange();
  467. rng.move('character', input.value.length);
  468. rng.select();
  469. }
  470. },
  471. lastInputFocus: function (event) {
  472. var input = event.target
  473. setTimeout(function () {
  474. input.style.marginBottom = "2rem"
  475. input.parentNode.scrollIntoView()
  476. }, 0);
  477. },
  478. lastInputBlur: function (event) {
  479. var input = event.target
  480. setTimeout(function () {
  481. input.style.marginBottom = ""
  482. }, 0);
  483. },
  484. showSubMenu: function (val) {
  485. switch (val) {
  486. case "mode":
  487. this.propForm.type = 1;
  488. this.isShowDialog = false;
  489. this.propForm.title = "透析模式";
  490. this.visibility = true;
  491. this.propForm.list = [];
  492. this.propForm.optionList = this.modeOption;
  493. this.propForm.isMultiple = 1;
  494. this.propForm.selectId = this.dialysisPrescription.mode_id;
  495. this.propForm.click_ref = "mode"
  496. break;
  497. case "dialyzer":
  498. this.propForm.type = 2;
  499. this.isShowDialog = false;
  500. this.propForm.title = "透析器";
  501. this.visibility = true;
  502. this.propForm.list = [];
  503. this.propForm.optionList = this.machines_prop;
  504. this.propForm.isMultiple = 1;
  505. this.propForm.selectId = this.dialysisPrescription.dialyzer;
  506. this.propForm.click_ref = "dialyzer"
  507. break;
  508. case "perfusion_apparatus":
  509. this.propForm.type = 3;
  510. this.isShowDialog = false;
  511. this.propForm.title = "灌流器";
  512. this.visibility = true;
  513. this.propForm.list = [];
  514. this.propForm.optionList = this.perfusion_apparatus;
  515. this.propForm.isMultiple = 1;
  516. this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus;
  517. this.propForm.click_ref = "perfusion_apparatus"
  518. break;
  519. case "replacement_way":
  520. this.propForm.type = 4;
  521. this.isShowDialog = false;
  522. this.propForm.title = "置换方式";
  523. this.visibility = true;
  524. this.propForm.list = [];
  525. this.propForm.optionList = this.replacementWays;
  526. this.propForm.isMultiple = 1;
  527. this.propForm.selectId = this.dialysisPrescription.replacement_way;
  528. this.propForm.click_ref = "replacement_way"
  529. break;
  530. case "anticoagulant":
  531. this.propForm.type = 5;
  532. this.isShowDialog = false;
  533. this.propForm.title = "抗疑剂";
  534. this.visibility = true;
  535. this.propForm.list = [];
  536. this.propForm.optionList = this.anticoagulantsConfit;
  537. this.propForm.isMultiple = 1;
  538. this.propForm.selectId = this.dialysisPrescription.anticoagulant;
  539. this.propForm.click_ref = "anticoagulant"
  540. break;
  541. case "dialysate_formulation":
  542. this.propForm.type = 6;
  543. this.isShowDialog = false;
  544. this.propForm.title = "透析液配方";
  545. this.visibility = true;
  546. this.propForm.list = [];
  547. this.propForm.optionList = this.dialysateFormulationOptions;
  548. this.propForm.isMultiple = 1;
  549. this.propForm.selectId = this.dialysisPrescription.dialysate_formulation;
  550. this.propForm.click_ref = "dialysate_formulation"
  551. break;
  552. case "body_fluid":
  553. this.propForm.type = 7;
  554. this.isShowDialog = false;
  555. this.propForm.title = "体液过多症状";
  556. this.visibility = true;
  557. this.propForm.list = [];
  558. this.propForm.optionList = this.bodyFluidOptions;
  559. this.propForm.isMultiple = 1;
  560. this.propForm.selectId = this.dialysisPrescription.body_fluid;
  561. this.propForm.click_ref = "body_fluid"
  562. break
  563. case "special_medicine":
  564. this.propForm.type = 8;
  565. this.isShowDialog = false;
  566. this.propForm.title = "透析前使用特殊药物";
  567. this.visibility = true;
  568. this.propForm.list = [];
  569. this.propForm.optionList = this.specialMedicineOptions;
  570. this.propForm.isMultiple = 1;
  571. this.propForm.selectId = this.dialysisPrescription.special_medicine;
  572. this.propForm.click_ref = "special_medicine"
  573. break;
  574. case "displace_liqui_part":
  575. this.propForm.type = 9;
  576. this.isShowDialog = false;
  577. this.propForm.title = "置换液";
  578. this.visibility = true;
  579. this.propForm.list = [];
  580. this.propForm.optionList = this.displaceLiquiPartOptions;
  581. this.propForm.isMultiple = 1;
  582. this.propForm.selectId = this.dialysisPrescription.displace_liqui_part;
  583. this.propForm.click_ref = "displace_liqui_part"
  584. break;
  585. case "blood_access":
  586. this.propForm.type = 10;
  587. this.isShowDialog = false;
  588. this.propForm.title = "血管通路";
  589. this.visibility = true;
  590. this.propForm.list = [];
  591. this.propForm.optionList = this.bloodAccessOptions;
  592. this.propForm.isMultiple = 1;
  593. this.propForm.selectId = this.dialysisPrescription.blood_access;
  594. this.propForm.click_ref = "blood_access"
  595. break;
  596. }
  597. },
  598. menuCancle: function () {
  599. this.visibility = false;
  600. this.isShowDialog = true;
  601. this.$nextTick(() => {
  602. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  603. this.$refs[this.propForm.click_ref].scrollIntoView()
  604. }
  605. })
  606. },
  607. menuComfirm: function (val) {
  608. this.visibility = false;
  609. this.isShowDialog = true;
  610. this.$nextTick(() => {
  611. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  612. this.$refs[this.propForm.click_ref].scrollIntoView()
  613. }
  614. })
  615. switch (val.type) {
  616. case 1:
  617. this.dialysisPrescription.mode_id = val.selectId;
  618. break;
  619. case 2:
  620. this.dialysisPrescription.dialyzer = val.selectId;
  621. break;
  622. case 3:
  623. this.dialysisPrescription.perfusion_apparatus = val.selectId;
  624. break;
  625. case 4:
  626. this.dialysisPrescription.replacement_way = val.selectId;
  627. break;
  628. case 5:
  629. this.dialysisPrescription.anticoagulant = val.selectId;
  630. if (typeof this.anticoagulantsConfit[val.selectId] == "undefined" || this.anticoagulantsConfit[val.selectId] == null) {
  631. return;
  632. }
  633. this.anticoagulant = this.anticoagulantsConfit[val.selectId];
  634. break;
  635. case 6:
  636. this.dialysisPrescription.dialysate_formulation = val.selectId;
  637. break;
  638. case 7:
  639. this.dialysisPrescription.body_fluid = val.selectId;
  640. break;
  641. case 8:
  642. this.dialysisPrescription.special_medicine = val.selectId;
  643. break;
  644. case 9:
  645. this.dialysisPrescription.displace_liqui_part = val.selectId;
  646. break;
  647. case 10:
  648. this.dialysisPrescription.blood_access = val.selectId;
  649. break;
  650. }
  651. },
  652. GetModeByModeId: function (val) {
  653. let treatment_mode_name = "";
  654. let treatment_mode = this.modeOption;
  655. for (let keys in treatment_mode) {
  656. if (treatment_mode[keys].id == val) {
  657. treatment_mode_name = treatment_mode[keys].name;
  658. }
  659. }
  660. return treatment_mode_name;
  661. },
  662. GetDialysateFormulationById: function (val) {
  663. let name = "";
  664. let dfl = this.dialysateFormulationOptions.length;
  665. for (let index = 0; index < dfl; index++) {
  666. if (this.dialysateFormulationOptions[index].id == val) {
  667. name = this.dialysateFormulationOptions[index].name;
  668. break;
  669. }
  670. }
  671. return name;
  672. },
  673. GetDialyzerById: function (val) {
  674. let dialyzer_name = "";
  675. let machines = this.machines_prop;
  676. for (let i = 0; i < machines.length; i++) {
  677. if (machines[i].id == val) {
  678. dialyzer_name = machines[i].name;
  679. }
  680. }
  681. return dialyzer_name;
  682. },
  683. GetPerfusionApparatusById: function (val) {
  684. let perfusion_apparatus_name = "";
  685. let perfusion_apparatus = this.perfusion_apparatus;
  686. for (let i = 0; i < perfusion_apparatus.length; i++) {
  687. if (perfusion_apparatus[i].id == val) {
  688. perfusion_apparatus_name = perfusion_apparatus[i].name;
  689. }
  690. }
  691. return perfusion_apparatus_name;
  692. },
  693. GetReplacementWayById: function (val) {
  694. let replacement_ways_name = "";
  695. let replacement_ways = this.replacementWays;
  696. for (let i = 0; i < replacement_ways.length; i++) {
  697. if (replacement_ways[i].id == val) {
  698. replacement_ways_name = replacement_ways[i].name;
  699. }
  700. }
  701. return replacement_ways_name;
  702. },
  703. GetAnticoagulantById: function (val) {
  704. let anticoagulan_name = "";
  705. let anticoagulant = this.anticoagulantsConfit;
  706. for (let keys in anticoagulant) {
  707. if (anticoagulant[keys].id == val) {
  708. anticoagulan_name = anticoagulant[keys].name;
  709. }
  710. }
  711. return anticoagulan_name;
  712. },
  713. commitInfo: function () {
  714. Toast.loading({forbidClick: true, duration: 0})
  715. let ParamsQuery = this.dialysisPrescription;
  716. ParamsQuery["patient"] = this.$route.query.patient_id;
  717. ParamsQuery["record_date"] = this.record_date;
  718. commitDialysisPrescription(ParamsQuery).then(response => {
  719. if (response.data.state == 0) {
  720. Toast.fail(response.data.msg);
  721. return false;
  722. } else {
  723. Toast.success("提交成功");
  724. this.$emit("prescription", response.data.data.prescription);
  725. // for (const key in response.data.data.prescription) {
  726. // // this.prescription_prop[key] = response.data.data.prescription[key];
  727. // }
  728. this.finish();
  729. }
  730. });
  731. }, commitSolutionInfo: function () {
  732. // plus.runtime.openURL("http://www.baidu.com");
  733. Toast.loading({forbidClick: true, duration: 0})
  734. let ParamsQuery = this.dialysisPrescription;
  735. ParamsQuery["patient"] = this.$route.query.patient_id;
  736. ParamsQuery["record_date"] = this.record_date;
  737. postSolution(ParamsQuery).then(response => {
  738. if (response.data.state == 0) {
  739. Toast.fail(response.data.msg);
  740. return false;
  741. } else {
  742. Toast.success("提交成功");
  743. // for (const key in response.data.data.solution) {
  744. // this.solution_prop[key] = response.data.data.solution[key];
  745. // }
  746. // for (const key in response.data.data.prescription) {
  747. // this.prescription_prop[key] = response.data.data.prescription[key];
  748. // }
  749. // console.log(response.data.data.prescription)
  750. this.$emit("longSolution", response.data.data.solution);
  751. this.$emit("prescription", response.data.data.prescription);
  752. this.finish();
  753. }
  754. });
  755. }, finish: function () {
  756. this.$emit("finish")
  757. }, close: function () {
  758. this.$emit("close")
  759. }, open: function () {
  760. this.isShowDialog = true;
  761. this.visibility = false;
  762. this.$refs.picker.close();
  763. var dialogTop = document.querySelector('#dialogTop');
  764. if (dialogTop != null) {
  765. this.$nextTick(() => {
  766. dialogTop.scrollTop = 0;
  767. });
  768. }
  769. }, sign: function () {
  770. let params = {
  771. patient_id: this.$route.query.patient_id,
  772. date: this.record_date,
  773. }
  774. postSign(params).then(response => {
  775. if (response.data.state == 0) {
  776. Toast.fail(response.data.msg);
  777. return false;
  778. } else {
  779. this.isShowDesc = false
  780. this.isShowDoctorSign = true
  781. this.dialysisPrescription.prescription_doctor = response.data.data.doctor_id
  782. for(let i = 0; i < this.operators.length; i++){
  783. if(this.operators[i].creator == response.data.data.doctor_id){
  784. console.log(this.operators[i].url)
  785. this.signUrl = this.operators[i].url
  786. }
  787. }
  788. Toast.success("签名成功");
  789. }
  790. });
  791. },getBodyFluid:function (val) {
  792. let body_fluid_name = "";
  793. let body_fluid = this.bodyFluidOptions;
  794. for (let i = 0; i < body_fluid.length; i++) {
  795. if (body_fluid[i].id == val) {
  796. body_fluid_name = body_fluid[i].name;
  797. }
  798. }
  799. return body_fluid_name;
  800. },getSpecialMedicine:function (val) {
  801. let special_medicine_name = "";
  802. let special_medicine = this.specialMedicineOptions;
  803. for (let i = 0; i < special_medicine.length; i++) {
  804. if (special_medicine[i].id == val) {
  805. special_medicine_name = special_medicine[i].name;
  806. }
  807. }
  808. return special_medicine_name;
  809. },getDisplaceLiquiPart:function (val) {
  810. let displace_liqui_part_name = "";
  811. let displace_liqui_part = this.displaceLiquiPartOptions;
  812. for (let i = 0; i < displace_liqui_part.length; i++) {
  813. if (displace_liqui_part[i].id == val) {
  814. displace_liqui_part_name = displace_liqui_part[i].name;
  815. }
  816. }
  817. return displace_liqui_part_name;
  818. },getBloodAccess:function (val) {
  819. let blood_access_name = "";
  820. let blood_access = this.bloodAccessOptions;
  821. for (let i = 0; i < blood_access.length; i++) {
  822. if (blood_access[i].id == val) {
  823. blood_access_name = blood_access[i].name;
  824. }
  825. }
  826. return blood_access_name;
  827. },menuEmpty:function (val) {
  828. this.visibility = false
  829. this.isShowDialog = true
  830. switch (val.type) {
  831. case 1:
  832. this.dialysisPrescription.mode_id = '';
  833. break;
  834. case 2:
  835. this.dialysisPrescription.dialyzer ='';
  836. break;
  837. case 3:
  838. this.dialysisPrescription.perfusion_apparatus = '';
  839. break;
  840. case 4:
  841. this.dialysisPrescription.replacement_way = '';
  842. break;
  843. case 5:
  844. this.anticoagulant = '';
  845. break;
  846. case 6:
  847. this.dialysisPrescription.dialysate_formulation = '';
  848. break;
  849. case 7:
  850. this.dialysisPrescription.body_fluid = '';
  851. break;
  852. case 8:
  853. this.dialysisPrescription.special_medicine = '';
  854. break;
  855. case 9:
  856. this.dialysisPrescription.displace_liqui_part = '';
  857. break;
  858. case 10:
  859. this.dialysisPrescription.blood_access = '';
  860. break;
  861. }
  862. },getFloat: function(x) {
  863. if (x != '.') {
  864. var f = Math.round(x * 100) / 100;
  865. var s = f.toString();
  866. var rs = s.indexOf('.');
  867. if (rs <= 0) {
  868. rs = s.length;
  869. s += '.';
  870. }
  871. while (s.length <= rs + 1) {
  872. s += '0';
  873. }
  874. return s;
  875. } else {
  876. return '0.0';
  877. }
  878. },dialysisGoodsClick:function () {
  879. this.isShowDialog = false
  880. this.is_show = true
  881. },menuCancleTwo:function () {
  882. this.isShowDialog = true
  883. this.is_show = false
  884. },menuComfirmTwo:function (dialysisPrescription) {
  885. this.isShowDialog = true
  886. this.is_show = false
  887. this.dialysisPrescription.niprocart = dialysisPrescription.niprocart
  888. this.dialysisPrescription.jms = dialysisPrescription.jms
  889. this.dialysisPrescription.fistula_needle_set = dialysisPrescription.fistula_needle_set
  890. this.dialysisPrescription.fistula_needle_set_16 = dialysisPrescription.fistula_needle_set_16
  891. this.dialysisPrescription.hemoperfusion = dialysisPrescription.hemoperfusion
  892. this.dialysisPrescription.dialyser_sterilised = dialysisPrescription.dialyser_sterilised
  893. this.dialysisPrescription.filtryzer = dialysisPrescription.filtryzer
  894. this.dialysisPrescription.dialyzers = dialysisPrescription.dialyzers
  895. this.dialysisPrescription.injector = dialysisPrescription.injector
  896. this.dialysisPrescription.bloodlines = dialysisPrescription.bloodlines
  897. this.dialysisPrescription.tubing_hemodialysis = dialysisPrescription.tubing_hemodialysis
  898. this.dialysisPrescription.package = dialysisPrescription.package
  899. this.dialysisPrescription.a_liquid = dialysisPrescription.a_liquid
  900. }
  901. },
  902. created() {
  903. if (this.$store.getters.user.user.user_type == 2) {
  904. this.isShowSign = true;
  905. }
  906. this.modeOption = this.$store.getters.treatment_mode;
  907. delete this.modeOption['0']
  908. var perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
  909. this.perfusion_apparatus = perfusion_apparatus;
  910. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  911. this.bodyFluidOptions = this.$store.getters.body_fluid;
  912. this.specialMedicineOptions = this.$store.getters.special_medicine
  913. this.displaceLiquiPartOptions = this.$store.getters.displace_liqui
  914. this.bloodAccessOptions = this.$store.getters.blood_access
  915. this.dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation');
  916. this.replacementWays = getDataConfig('hemodialysis', 'replacement_ways');
  917. this.patient = this.patient_prop;
  918. if (this.prescription_prop != null && typeof (this.prescription_prop.id) != 'undefined' && this.prescription_prop.id > 0) {
  919. for (const key in this.prescription_prop) {
  920. this.dialysisPrescription[key] = this.prescription_prop[key];
  921. }
  922. } else if (this.solution_prop != null && typeof this.solution_prop.id != 'undefined' && this.solution_prop.id) {
  923. for (const key in this.solution_prop) {
  924. this.dialysisPrescription[key] = this.solution_prop[key];
  925. }
  926. }
  927. if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
  928. this.timeValue = '';
  929. this.time = '03:00';
  930. } else {
  931. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + "小时" + this.dialysisPrescription.dialysis_duration_minute + "分钟"
  932. this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : "0" + this.dialysisPrescription.dialysis_duration_hour) + ":" + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : "0" + this.dialysisPrescription.dialysis_duration_minute)
  933. }
  934. this.dialyserList = this.machines_prop;
  935. // this.doctor = this.$store.getters.user.user.user_type;
  936. var date = this.$route.query && this.$route.query.date;
  937. date *= 1000;
  938. var newDate = new Date(date);
  939. var y = newDate.getFullYear();
  940. var m = newDate.getMonth() + 1;
  941. var d = newDate.getDate();
  942. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  943. newDate = new Date();
  944. y = newDate.getFullYear();
  945. m = newDate.getMonth() + 1;
  946. d = newDate.getDate();
  947. }
  948. this.record_date =
  949. y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  950. // this.patient.id = this.patient_prop.id
  951. if(this.dialysisPrescription.prescription_doctor == ''){
  952. this.isShowDesc = true
  953. this.isShowDoctorSign = false
  954. }else{
  955. this.isShowDesc = false
  956. this.isShowDoctorSign = true
  957. for(let i = 0; i < this.operators.length; i++){
  958. if(this.operators[i].creator == this.dialysisPrescription.prescription_doctor){
  959. this.signUrl = this.operators[i].url
  960. }
  961. }
  962. }
  963. this.dialysisPrescription.kalium = this.getFloat(this.dialysisPrescription.kalium )
  964. this.dialysisPrescription.sodium = this.getFloat(this.dialysisPrescription.sodium )
  965. this.dialysisPrescription.calcium = this.getFloat(this.dialysisPrescription.calcium )
  966. this.dialysisPrescription.ultrafiltration = this.getFloat(this.dialysisPrescription.ultrafiltration )
  967. this.dialysisPrescription.target_ultrafiltration = this.getFloat(this.dialysisPrescription.target_ultrafiltration )
  968. },
  969. components: {
  970. MultipleSubMenu,
  971. // MultipleSubMenu,
  972. CheckBoxSubMenu
  973. }
  974. };
  975. </script>
  976. <style style="stylesheet/scss" lang="scss" scoped>
  977. .DialogContent {
  978. // padding-bottom:2rem !important;
  979. .textarea {
  980. width: 100%;
  981. height: 2.4rem;
  982. line-height: 0.6rem;
  983. color: $pgh-color;
  984. font-size: 0.28rem;
  985. padding-left: 0.36rem;
  986. border: none;
  987. border-bottom: 1px #e5e5e5 solid;
  988. }
  989. }
  990. </style>