血透系统pad前端

PrescriptionDialog.vue 85KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320
  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 newName">透析处方</h1>
  7. <button class="newButton" @click="showmsgtip">{{patient.name}}</button>
  8. <span @click="commitInfo" class="success" v-if="isPermission()">保存</span>
  9. <span @click="commitInfo" class="success" v-if="!isPermission()"></span>
  10. </div>
  11. <div class="DialogContent newDialogContent" id="dialogTop">
  12. <div>
  13. <div @click="showSubMenu('mode')" class="item" ref="mode" v-if="isShow('透析模式')">
  14. <label class="name" for="txms">透析模式</label>
  15. <div class="content">
  16. <span class="text" id="txms">{{GetModeByModeId(dialysisPrescription.mode_id)}}</span>
  17. <span class="iconfont">&#xe6f9;</span>
  18. </div>
  19. </div>
  20. <div class="item" @click="openPicker" v-if="isShow('透析时长')">
  21. <label class="name" for="txsc">透析时长</label>
  22. <div class="content">
  23. <span class="text" style="width: 100px">{{timeValue}}</span>
  24. <span class="iconfont">&#xe6f9;</span>
  25. </div>
  26. </div>
  27. <div class="item" v-if="isShow('血流量')">
  28. <label class="name" for="xll">血流量(ml/min)</label>
  29. <div class="content">
  30. <input
  31. type="number"
  32. @click="newClick($event)"
  33. @focus="inputFocus"
  34. id="xll"
  35. v-model="dialysisPrescription.blood_flow_volume"
  36. />
  37. </div>
  38. </div>
  39. <div class="item" v-if="isShow('目标超滤量')">
  40. <label class="name" for="mbcll">目标超滤量(L)</label>
  41. <div class="content">
  42. <input
  43. type="number"
  44. @click="newClick($event)"
  45. @focus="inputFocus"
  46. id="mbcll"
  47. v-model="dialysisPrescription.target_ultrafiltration"
  48. />
  49. </div>
  50. </div>
  51. <div
  52. @click="showSubMenu('dialysate_formulation')"
  53. class="item"
  54. ref="dialysate_formulation"
  55. v-if="isShow('透析液配方')"
  56. >
  57. <label class="name" for="txypf">透析液配方</label>
  58. <div class="content">
  59. <span
  60. class="text"
  61. id="txypf"
  62. >{{GetDialysateFormulationById(dialysisPrescription.dialysate_formulation)}}</span>
  63. <span class="iconfont">&#xe6f9;</span>
  64. </div>
  65. </div>
  66. <div
  67. @click="showSubMenu('anticoagulant')"
  68. class="item"
  69. ref="anticoagulant"
  70. v-if="isShow('抗凝剂')"
  71. >
  72. <label class="name" for="knj">抗凝剂</label>
  73. <div class="content">
  74. <span
  75. class="text"
  76. id="knj"
  77. >{{GetAnticoagulantById(dialysisPrescription.anticoagulant)}}</span>
  78. <span class="iconfont">&#xe6f9;</span>
  79. </div>
  80. </div>
  81. <div class="item" v-if="anticoagulant.shouji != -1&&isShow('首剂')">
  82. <label
  83. class="name"
  84. for="zl"
  85. v-if="dialysisPrescription.anticoagulant == 0 ||dialysisPrescription.anticoagulant == -2"
  86. >首剂(mg)</label>
  87. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">首剂(mg)</label>
  88. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">首剂(iu)</label>
  89. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">首剂(mg)</label>
  90. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">首剂(mg)</label>
  91. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">首剂(mg)</label>
  92. <div class="content">
  93. <input
  94. v-if="dialysisPrescription.anticoagulant != 1"
  95. type="number"
  96. @click="newClick($event)"
  97. @focus="inputFocus"
  98. id="sj"
  99. v-model="dialysisPrescription.anticoagulant_shouji"
  100. :disabled="anticoagulant.shouji==1?false:true"
  101. />
  102. <input
  103. v-if="dialysisPrescription.anticoagulant == 1"
  104. type="number"
  105. @click="newClick($event)"
  106. @focus="inputFocus"
  107. id="sj"
  108. v-model="dialysisPrescription.no_anticoagulant_shouji"
  109. disabled="true"
  110. />
  111. </div>
  112. </div>
  113. <div class="item" v-if="anticoagulant.weichi != -1&&isShow('维持')">
  114. <label
  115. class="name"
  116. for="zl"
  117. v-if="dialysisPrescription.anticoagulant == 0 ||dialysisPrescription.anticoagulant == -2"
  118. >维持(mg/h)</label>
  119. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">维持(mg/h)</label>
  120. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">维持(iu)</label>
  121. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">维持(mg/h)</label>
  122. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">维持(ml/h)</label>
  123. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">维持(mg/h)</label>
  124. <div class="content">
  125. <input
  126. v-if="dialysisPrescription.anticoagulant != 1"
  127. type="number"
  128. @click="newClick($event)"
  129. @focus="inputFocus"
  130. id="wz"
  131. class="inputBox"
  132. v-model="dialysisPrescription.anticoagulant_weichi"
  133. :disabled="anticoagulant.weichi==1?false:true"
  134. />
  135. <input
  136. v-if="dialysisPrescription.anticoagulant == 1"
  137. type="number"
  138. @click="newClick($event)"
  139. @focus="inputFocus"
  140. id="sj"
  141. v-model="dialysisPrescription.no_anticoagulant_weichi"
  142. disabled="true"
  143. />
  144. </div>
  145. </div>
  146. <div class="item" v-if="anticoagulant.zongliang != -1 && isShow('总量')">
  147. <label
  148. class="name"
  149. for="zl"
  150. v-if="dialysisPrescription.anticoagulant == 0 ||dialysisPrescription.anticoagulant == -2"
  151. >总量(mg)</label>
  152. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">总量(mg)</label>
  153. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">总量(iu)</label>
  154. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">总量(mg)</label>
  155. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">总量(mg)</label>
  156. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">总量(mg)</label>
  157. <div class="content">
  158. <input
  159. v-if="dialysisPrescription.anticoagulant != 1"
  160. type="number"
  161. @click="newClick($event)"
  162. @focus="inputFocus"
  163. id="zl"
  164. class="inputBox"
  165. v-model="dialysisPrescription.anticoagulant_zongliang"
  166. :disabled="anticoagulant.zongliang==1?false:true"
  167. />
  168. <input
  169. v-if="dialysisPrescription.anticoagulant == 1"
  170. type="number"
  171. @click="newClick($event)"
  172. @focus="inputFocus"
  173. id="sj"
  174. v-model="dialysisPrescription.no_anticoagulant_zongliang"
  175. disabled="true"
  176. />
  177. </div>
  178. </div>
  179. <div class="item" v-if="anticoagulant.gaimingcheng != -1 && isShow('钙名称')">
  180. <label class="name" for="g">钙名称</label>
  181. <div class="content">
  182. <input
  183. type="text"
  184. id="g"
  185. class="inputBox"
  186. v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  187. :disabled="anticoagulant.gaimingcheng==1?false:true"
  188. />
  189. </div>
  190. </div>
  191. <div class="item" v-if="anticoagulant.gaijiliang != -1 && isShow('钙剂量')">
  192. <label class="name" for="gjl">钙剂量({{anticoagulant.gaimingcheng_unit}})</label>
  193. <div class="content">
  194. <input
  195. type="text"
  196. id="gjl"
  197. class="inputBox"
  198. v-model="dialysisPrescription.anticoagulant_gaijiliang"
  199. :disabled="anticoagulant.gaijiliang==1?false:true"
  200. />
  201. </div>
  202. </div>
  203. <!-- <div class="item">
  204. <label class="name" for="gtz">干体重(kg)</label>
  205. <div class="content">
  206. <input type="tel" @focus="inputFocus" id="gtz" v-model="dialysisPrescription.dry_weight"/>
  207. </div>
  208. </div>-->
  209. <div class="line"></div>
  210. <div class="item" v-if="isShow('置换量')" v-show="zhiShow">
  211. <label class="name" for="zhy">置换量(L)</label>
  212. <div class="content">
  213. <input
  214. type="number"
  215. @click="newClick($event)"
  216. @focus="inputFocus"
  217. id="zhy"
  218. v-model="dialysisPrescription.replacement_total"
  219. />
  220. </div>
  221. </div>
  222. <!-- <div class="line"></div> -->
  223. <div class="item" v-if="isShow('钾')">
  224. <label class="name" for="j">钾(mmol/L)</label>
  225. <div class="content">
  226. <input type="number" @click="newClick($event)" @focus="inputFocus" id="j" v-model="dialysisPrescription.kalium" />
  227. </div>
  228. </div>
  229. <div class="item" v-if="isShow('钠')">
  230. <label class="name" for="n">钠(mmol/L):</label>
  231. <div class="content">
  232. <input type="number" @click="newClick($event)" @focus="inputFocus" id="n" v-model="dialysisPrescription.sodium" />
  233. </div>
  234. </div>
  235. <div class="item" v-if="isShow('钙')">
  236. <label class="name" for="gg">钙(mmol/L)</label>
  237. <div class="content">
  238. <input
  239. type="number"
  240. @click="newClick($event)"
  241. @focus="inputFocus"
  242. id="gg"
  243. v-model="dialysisPrescription.calcium"
  244. />
  245. </div>
  246. </div>
  247. <div class="item" v-if="isShow('碳酸氢盐')">
  248. <label class="name" for="tsqy">碳酸氢盐(mmol/L)</label>
  249. <div class="content">
  250. <input
  251. type="number"
  252. @click="newClick($event)"
  253. @focus="inputFocus"
  254. id="tsqy"
  255. v-model="dialysisPrescription.bicarbonate"
  256. />
  257. </div>
  258. </div>
  259. <div class="item" v-if="isShow('葡萄糖')">
  260. <label class="name" for="ptt">葡萄糖(mmol/L)</label>
  261. <div class="content">
  262. <input
  263. type="number"
  264. @click="newClick($event)"
  265. @focus="inputFocus"
  266. id="ptt"
  267. v-model="dialysisPrescription.glucose"
  268. />
  269. </div>
  270. </div>
  271. <div class="line"></div>
  272. <div class="item" v-if="isShow('透析液流量')">
  273. <label class="name" for="txyll">透析液流量(ml/min)</label>
  274. <div class="content">
  275. <input
  276. type="number"
  277. @click="newClick($event)"
  278. @focus="inputFocus"
  279. id="txyll"
  280. v-model="dialysisPrescription.dialysate_flow"
  281. />
  282. </div>
  283. </div>
  284. <div class="item" v-if="isShow('透析液温度')">
  285. <label class="name" for="txywd">透析液温度(℃)</label>
  286. <div class="content">
  287. <!--<span class="text">HD</span>-->
  288. <!--<span class="iconfont">&#xe6f9;</span>-->
  289. <input
  290. type="number"
  291. @click="newClick($event)"
  292. @focus="inputFocus"
  293. id="txywd"
  294. v-model="dialysisPrescription.dialysate_temperature"
  295. />
  296. </div>
  297. </div>
  298. <div class="item" v-if="isShow('电导度')">
  299. <label class="name" for="dtl">电导度(mS/m)</label>
  300. <div class="content">
  301. <input
  302. type="number"
  303. @click="newClick($event)"
  304. @focus="inputFocus"
  305. id="dtl"
  306. v-model="dialysisPrescription.conductivity"
  307. />
  308. </div>
  309. </div>
  310. <div class="item" v-if="isShow('透析器/灌流器')">
  311. <label class="name" for="dtl">透析器/灌流器</label>
  312. <div class="content">
  313. <input
  314. @focus="inputFocus"
  315. id="dt"
  316. v-model="dialysisPrescription.dialyzer_perfusion_apparatus"
  317. />
  318. </div>
  319. </div>
  320. <div class="line"></div>
  321. <div
  322. @click="showSubMenu('body_fluid')"
  323. class="item"
  324. ref="body_fluid"
  325. v-if="isShow('体液过多症状')"
  326. >
  327. <label class="name" for="knj">体液过多症状</label>
  328. <div class="content">
  329. <span class="text" id="knja">{{getBodyFluid(dialysisPrescription.body_fluid)}}</span>
  330. <span class="iconfont">&#xe6f9;</span>
  331. </div>
  332. </div>
  333. <div class="item" v-if="isShow('体液过多其他症状')">
  334. <label class="name" for="knj">体液过多其他症状</label>
  335. <div class="content">
  336. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.body_fluid_other" />
  337. </div>
  338. </div>
  339. <div
  340. @click="showSubMenu('special_medicine')"
  341. class="item"
  342. ref="special_medicine"
  343. v-if="isShow('透析前使用特殊药物')"
  344. >
  345. <label class="name" for="knj">透析前使用特殊药物</label>
  346. <div class="content">
  347. <span
  348. class="text"
  349. id="knjaa"
  350. >{{getSpecialMedicine(dialysisPrescription.special_medicine)}}</span>
  351. <span class="iconfont">&#xe6f9;</span>
  352. </div>
  353. </div>
  354. <div class="item" v-if="isShow('透析前使用其他特殊药物')">
  355. <label class="name" for="knj">透析前使用其他特殊药物</label>
  356. <div class="content">
  357. <input
  358. @focus="inputFocus"
  359. id="dt"
  360. v-model="dialysisPrescription.special_medicine_other"
  361. />
  362. </div>
  363. </div>
  364. <div
  365. @click="showSubMenu('displace_liqui_part')"
  366. class="item"
  367. ref="displace_liqui_part"
  368. v-if="isShow('置换液')"
  369. v-show="huShow"
  370. >
  371. <label class="name" for="knj">置换液</label>
  372. <div class="content">
  373. <span
  374. class="text"
  375. id="knjaa"
  376. >{{getDisplaceLiquiPart(dialysisPrescription.displace_liqui_part)}}</span>
  377. <span class="iconfont">&#xe6f9;</span>
  378. </div>
  379. </div>
  380. <div class="item" v-if="isShow('置换液总量')" v-show="totalShow">
  381. <label class="name" for="knj">置换液总量(L)</label>
  382. <div class="content">
  383. <input
  384. @focus="inputFocus"
  385. id="dt"
  386. v-model="dialysisPrescription.displace_liqui_value"
  387. />
  388. </div>
  389. </div>
  390. <div class="item" v-if="isShow('目标KT/V')">
  391. <label class="name" for="knj">目标KT/V</label>
  392. <div class="content">
  393. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.target_ktv" />
  394. </div>
  395. </div>
  396. <div
  397. @click="showSubMenu('blood_access')"
  398. class="item"
  399. ref="blood_access"
  400. v-if="isShow('血管通路')"
  401. >
  402. <label class="name" for="knj">血管通路</label>
  403. <div class="content">
  404. <span class="text" id="knjaa">{{getBloodAccess(dialysisPrescription.blood_access)}}</span>
  405. <span class="iconfont">&#xe6f9;</span>
  406. </div>
  407. </div>
  408. <div class="item" v-if="isShow('实际超滤量')">
  409. <label class="name" for="knj">实际超滤量(L)</label>
  410. <div class="content">
  411. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.ultrafiltration" />
  412. </div>
  413. </div>
  414. <div
  415. @click="dialysisGoodsClick()"
  416. class="item"
  417. ref="consumable_material"
  418. v-if="config.is_open == 1"
  419. >
  420. <label class="name" for="knj">透析耗材</label>
  421. <div class="content">
  422. <span class="text" id="knjaa"></span>
  423. <span class="iconfont">&#xe6f9;</span>
  424. </div>
  425. </div>
  426. <div class="item" style="display: none">
  427. <label class="name" for="dtl">医生签名</label>
  428. <div class="content">
  429. <div v-if="isShowDesc">医生尚未签名</div>
  430. <img
  431. v-if="isShowDoctorSign"
  432. style="width: 100px;height: 30px"
  433. :src="signUrl"
  434. alt
  435. srcset
  436. />
  437. </div>
  438. </div>
  439. <div class="line"></div>
  440. <div>
  441. <div class="item">
  442. <label class="name" for="bz">备注</label>
  443. <div class="content">
  444. <span class="text"></span>
  445. </div>
  446. </div>
  447. <textarea
  448. class="textarea"
  449. id="bz"
  450. placeholder="请输入内容"
  451. v-model="dialysisPrescription.remark"
  452. @focus="lastInputFocus"
  453. @blur="lastInputBlur"
  454. ></textarea>
  455. </div>
  456. </div>
  457. <!--<div class="footer">-->
  458. <!--处方医生:刘小军 医生-->
  459. <!--</div>-->
  460. <div class="PrescSubmit">
  461. <button style="display: none" class="tj" @click="sign()">医生签名</button>
  462. <button class="tjcq" @click="commitSolutionInfo" v-if="isPermission()">保存并设为长期处方</button>
  463. <button class="tj" style="display:none;" @click="commitInfo" v-if="isPermission()">保存</button>
  464. </div>
  465. </div>
  466. </div>
  467. <!--<two-menu title="二级菜单" v-show="isShowModeSubMenu"></two-menu>-->
  468. <check-box-sub-menu
  469. :visibility="visibility"
  470. v-on:menu-cancle="menuCancle"
  471. v-on:menu-comfirm="menuComfirm"
  472. v-on:menu-empty="menuEmpty"
  473. :propsForm="propForm"
  474. ></check-box-sub-menu>
  475. <!--<multiple-sub-menu :goodTypes="types" :visibility="is_show" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm" :propsForm="propForm"></multiple-sub-menu>-->
  476. <multiple-sub-menu
  477. :goodTypes="types"
  478. :info="info"
  479. :visibility="is_show"
  480. v-on:menu-cancel-two="menuCancleTwo"
  481. v-on:menu-comfirm-two="menuComfirmTwo"
  482. :propsForm="propForm"
  483. :dialysisPrescription="dialysisPrescription"
  484. ></multiple-sub-menu>
  485. <mt-datetime-picker
  486. ref="picker"
  487. type="time"
  488. hourFormat="{value}小时"
  489. minuteFormat="{value}分钟"
  490. @confirm="handleTimeConfirm"
  491. v-model="time"
  492. ></mt-datetime-picker>
  493. <long-advice-sub-menu
  494. :visibility="advice_visibility"
  495. v-on:menu-cancle-three="menuCancleThree"
  496. v-on:menu-comfirm-three="menuComfirmThree"
  497. :propsForm="advicePropForm"
  498. ></long-advice-sub-menu>
  499. <msg-tip
  500. :visibility="msgtip_visibility"
  501. :predialysis="predialysis"
  502. :last_predialysis="last_predialysis"
  503. :record="record"
  504. :last_record="last_record"
  505. :patient_prop="patient"
  506. :prescription_prop="prescription_prop"
  507. v-on:menu-msg-tip="menuMsgTip"
  508. ></msg-tip>
  509. </div>
  510. </template>
  511. <script>
  512. import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
  513. import MultipleSubMenu from './subMenu/multipleSubMenu'
  514. import {commitDialysisPrescription, CreateGroupAdvice, GetSolution, postSign, postSolution} from '@/api/dialysis'
  515. import { calculateAnticoagulantZL} from '@/utils/tools'
  516. import {Toast} from 'vant'
  517. import {getDataConfig} from '@/utils/data'
  518. import {parseTime} from '@/utils'
  519. import LongAdviceSubMenu from './subMenu/LongAdviceSubMenu'
  520. import MsgTip from './subMenu/MsgTip'
  521. export default {
  522. name: 'PrescriptionDialog',
  523. props: {
  524. admin_users_prop: {
  525. type: Array,
  526. default: function () {
  527. return new Array()
  528. }
  529. },
  530. predialysis: {
  531. type: Object
  532. },
  533. last_predialysis: {
  534. type: Object
  535. },
  536. record: {
  537. type: Object
  538. },
  539. last_record: {
  540. type: Object
  541. },
  542. patient_prop: {
  543. type: Object
  544. },
  545. solution_prop: {
  546. type: Object
  547. },
  548. config: {
  549. type: Object
  550. }, schedual: {
  551. type: Object
  552. }, dry_weight: {
  553. type: Object
  554. },
  555. operators: {
  556. type: Array,
  557. default: function () {
  558. return new Array()
  559. }
  560. },
  561. types: {
  562. type: Array,
  563. default: function () {
  564. return new Array()
  565. }
  566. },
  567. info: {
  568. type: Array,
  569. default: function () {
  570. return new Array()
  571. }
  572. }, last_prescription: {
  573. type: Object,
  574. },
  575. prescription_prop: {
  576. type: Object,
  577. }, is_open: {
  578. type: Number,
  579. }, targetAdvices: {
  580. type: Array,
  581. default: function () {
  582. return new Array()
  583. }
  584. }, waitUploadAdvices: {
  585. type: Array,
  586. default: function () {
  587. return new Array()
  588. }
  589. },
  590. machines_prop: {
  591. type: Array,
  592. default: function () {
  593. return new Array()
  594. }
  595. }
  596. },
  597. data () {
  598. return {
  599. is_pre: 0,
  600. template_id: 0,
  601. loading: false,
  602. signUrl: '',
  603. isShowDesc: true,
  604. advice_visibility: false,
  605. msgtip_visibility: false,
  606. time: '03:00',
  607. timeValue: '',
  608. tempTimeValue:'',
  609. isShowSign: false,
  610. anticoagulantsConfit: {},
  611. dialysateFormulationOptions: [],
  612. bodyFluidOptions: [],
  613. specialMedicineOptions: [],
  614. displaceLiquiPartOptions: [],
  615. bloodAccessOptions: [],
  616. advicePropForm: {
  617. list: [],
  618. result: [],
  619. operators: [],
  620. },
  621. is_show: false,
  622. perfusion_apparatus: {},
  623. replacementWays: [],
  624. dialyserList: [],
  625. modeOption: [],
  626. isShowDoctorBtn: true,
  627. isShowDoctorSign: false,
  628. visibility: false,
  629. isShowDialog: true,
  630. isShowModeSubMenu: false,
  631. dialysisPrescription: {
  632. mode_id: '',
  633. dialysis_duration: '',
  634. dialysis_duration_hour: '',
  635. dialysis_duration_minute: '',
  636. mode_name: '',
  637. dialyzer: '',
  638. perfusion_apparatus: '',
  639. blood_flow_volume: '',
  640. dewater_amount: '',
  641. displace_liqui: '',
  642. replacement_total: '',
  643. replacement_way: '',
  644. anticoagulant: '',
  645. anticoagulant_shouji: '',
  646. anticoagulant_weichi: '',
  647. anticoagulant_zongliang: '',
  648. anticoagulant_gaimingcheng: '',
  649. anticoagulant_gaijiliang: '',
  650. dialyzer_perfusion_apparatus: '',
  651. no_anticoagulant_shouji: '0',
  652. no_anticoagulant_weichi: '0',
  653. no_anticoagulant_zongliang: '0',
  654. kalium: '',
  655. sodium: '',
  656. calcium: '',
  657. bicarbonate: '',
  658. glucose: '',
  659. prescription_doctor: '',
  660. // dry_weight: "",
  661. dialysate_flow: '',
  662. dialysate_temperature: '',
  663. target_ultrafiltration: '',
  664. dialysate_formulation: '',
  665. conductivity: '',
  666. doctor: '',
  667. remark: '',
  668. body_fluid: '',
  669. special_medicine: '',
  670. special_medicine_other: '',
  671. displace_liqui_part: '',
  672. displace_liqui_value: '',
  673. blood_access: '',
  674. ultrafiltration: '',
  675. body_fluid_other: '',
  676. niprocart: '',
  677. jms: '',
  678. fistula_needle_set: '',
  679. fistula_needle_set_16: '',
  680. hemoperfusion: '',
  681. dialyser_sterilised: '',
  682. filtryzer: '',
  683. target_ktv: '',
  684. dialyzers: '',
  685. injector: '',
  686. bloodlines: '',
  687. tubing_hemodialysis: '',
  688. package: '',
  689. a_liquid: '',
  690. creater: '',
  691. modifier: '',
  692. },
  693. anticoagulant: {
  694. id: 0,
  695. name: '',
  696. type: 1,
  697. shouji: 1,
  698. weichi: 1,
  699. zongliang: 1,
  700. gaimingcheng: -1,
  701. gaijiliang: -1,
  702. shouji_unit: 'mg',
  703. weichi_unit: 'mg/h',
  704. zongliang_unit: 'mg',
  705. gaimingcheng_unit: '',
  706. gaijiliang_unit: ''
  707. },
  708. zhiShow: true,
  709. totalShow: true,
  710. huShow: true,
  711. doctorAdvices: [],
  712. propForm: {
  713. title: '',
  714. list: [],
  715. optionList: [],
  716. isMultiple: 2,
  717. result: [], //选中的值
  718. type: 1, //用来区分不同子菜单,方便对返回值进行赋值
  719. selectId: 0
  720. }
  721. }
  722. }, computed: {
  723. // 计算属性的 getter
  724. }, methods: {
  725. newClick(event){
  726. event.currentTarget.select();
  727. },
  728. showmsgtip () {
  729. this.msgtip_visibility = true
  730. this.isShowDialog = false
  731. },
  732. isPermission () {
  733. if (this.$store.getters.user.user.user_type == 3 && (this.$store.getters.user.template_info.template_id == 2 || this.$store.getters.user.template_info.template_id == 6)) {
  734. return false
  735. } else {
  736. return true
  737. }
  738. },
  739. isShow (name) {
  740. var filedList = this.$store.getters.user.fileds
  741. for (let i = 0; i < filedList.length; i++) {
  742. if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  743. return true
  744. }
  745. }
  746. return false
  747. },
  748. openPicker: function () {
  749. this.$refs.picker.open()
  750. },
  751. handleTimeConfirm: function (val) {
  752. val = val.replace('小时')
  753. val = val.replace('分钟')
  754. let timeArray = val.split(':')
  755. if (parseInt(timeArray[0].substring(0, 1)) == 0) {
  756. this.dialysisPrescription.dialysis_duration_hour = timeArray[0].charAt(timeArray[0].length - 1)
  757. } else {
  758. this.dialysisPrescription.dialysis_duration_hour = timeArray[0]
  759. }
  760. if (parseInt(timeArray[1].substring(0, 1)) == 0) {
  761. this.dialysisPrescription.dialysis_duration_minute = timeArray[1].charAt(timeArray[1].length - 1)
  762. } else {
  763. this.dialysisPrescription.dialysis_duration_minute = timeArray[1]
  764. }
  765. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  766. this.dialysisPrescription.dialysis_duration = parseFloat(this.dialysisPrescription.dialysis_duration_hour) + parseFloat((this.dialysisPrescription.dialysis_duration_minute / 60).toFixed(2))
  767. },
  768. inputFocus: function (event) {
  769. var input = event.target
  770. setTimeout(function () {
  771. input.scrollIntoView()
  772. }, 0)
  773. if (input.setSelectionRange) {
  774. setTimeout(function () {
  775. input.setSelectionRange(0, input.value.length)
  776. }, 0)
  777. } else if (input.createTextRange) {
  778. var rng = input.createTextRange()
  779. rng.move('character', input.value.length)
  780. rng.select()
  781. }
  782. },
  783. lastInputFocus: function (event) {
  784. var input = event.target
  785. event.currentTarget.select();
  786. setTimeout(function () {
  787. input.style.marginBottom = '2rem'
  788. input.parentNode.scrollIntoView()
  789. }, 0)
  790. },
  791. lastInputBlur: function (event) {
  792. var input = event.target
  793. setTimeout(function () {
  794. input.style.marginBottom = ''
  795. }, 0)
  796. },
  797. showSubMenu: function (val) {
  798. switch (val) {
  799. case 'mode':
  800. this.propForm.type = 1
  801. this.isShowDialog = false
  802. this.propForm.title = '透析模式'
  803. this.visibility = true
  804. this.propForm.list = []
  805. this.propForm.optionList = this.modeOption
  806. this.propForm.isMultiple = 1
  807. this.propForm.selectId = this.dialysisPrescription.mode_id
  808. this.propForm.click_ref = 'mode'
  809. break
  810. case 'dialyzer':
  811. this.propForm.type = 2
  812. this.isShowDialog = false
  813. this.propForm.title = '透析器'
  814. this.visibility = true
  815. this.propForm.list = []
  816. this.propForm.optionList = this.machines_prop
  817. this.propForm.isMultiple = 1
  818. this.propForm.selectId = this.dialysisPrescription.dialyzer
  819. this.propForm.click_ref = 'dialyzer'
  820. break
  821. case 'perfusion_apparatus':
  822. this.propForm.type = 3
  823. this.isShowDialog = false
  824. this.propForm.title = '灌流器'
  825. this.visibility = true
  826. this.propForm.list = []
  827. this.propForm.optionList = this.perfusion_apparatus
  828. this.propForm.isMultiple = 1
  829. this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus
  830. this.propForm.click_ref = 'perfusion_apparatus'
  831. break
  832. case 'replacement_way':
  833. this.propForm.type = 4
  834. this.isShowDialog = false
  835. this.propForm.title = '置换方式'
  836. this.visibility = true
  837. this.propForm.list = []
  838. this.propForm.optionList = this.replacementWays
  839. this.propForm.isMultiple = 1
  840. this.propForm.selectId = this.dialysisPrescription.replacement_way
  841. this.propForm.click_ref = 'replacement_way'
  842. break
  843. case 'anticoagulant':
  844. this.propForm.type = 5
  845. this.isShowDialog = false
  846. this.propForm.title = '抗疑剂'
  847. this.visibility = true
  848. this.propForm.list = []
  849. this.propForm.optionList = this.anticoagulantsConfit
  850. this.propForm.isMultiple = 1
  851. this.propForm.selectId = this.dialysisPrescription.anticoagulant
  852. this.propForm.click_ref = 'anticoagulant'
  853. break
  854. case 'dialysate_formulation':
  855. this.propForm.type = 6
  856. this.isShowDialog = false
  857. this.propForm.title = '透析液配方'
  858. this.visibility = true
  859. this.propForm.list = []
  860. this.propForm.optionList = this.dialysateFormulationOptions
  861. this.propForm.isMultiple = 1
  862. this.propForm.selectId = this.dialysisPrescription.dialysate_formulation
  863. this.propForm.click_ref = 'dialysate_formulation'
  864. break
  865. case 'body_fluid':
  866. this.propForm.type = 7
  867. this.isShowDialog = false
  868. this.propForm.title = '体液过多症状'
  869. this.visibility = true
  870. this.propForm.list = []
  871. this.propForm.optionList = this.bodyFluidOptions
  872. this.propForm.isMultiple = 1
  873. this.propForm.selectId = this.dialysisPrescription.body_fluid
  874. this.propForm.click_ref = 'body_fluid'
  875. break
  876. case 'special_medicine':
  877. this.propForm.type = 8
  878. this.isShowDialog = false
  879. this.propForm.title = '透析前使用特殊药物'
  880. this.visibility = true
  881. this.propForm.list = []
  882. this.propForm.optionList = this.specialMedicineOptions
  883. this.propForm.isMultiple = 1
  884. this.propForm.selectId = this.dialysisPrescription.special_medicine
  885. this.propForm.click_ref = 'special_medicine'
  886. break
  887. case 'displace_liqui_part':
  888. this.propForm.type = 9
  889. this.isShowDialog = false
  890. this.propForm.title = '置换液'
  891. this.visibility = true
  892. this.propForm.list = []
  893. this.propForm.optionList = this.displaceLiquiPartOptions
  894. this.propForm.isMultiple = 1
  895. this.propForm.selectId = this.dialysisPrescription.displace_liqui_part
  896. this.propForm.click_ref = 'displace_liqui_part'
  897. break
  898. case 'blood_access':
  899. this.propForm.type = 10
  900. this.isShowDialog = false
  901. this.propForm.title = '血管通路'
  902. this.visibility = true
  903. this.propForm.list = []
  904. this.propForm.optionList = this.bloodAccessOptions
  905. this.propForm.isMultiple = 1
  906. this.propForm.selectId = this.dialysisPrescription.blood_access
  907. this.propForm.click_ref = 'blood_access'
  908. break
  909. case 'dialyzer_perfusion_apparatus':
  910. // this.propForm.type = 11
  911. // this.isShowDialog = false
  912. // this.propForm.title = '透析器/灌流器'
  913. // this.visibility = true
  914. // this.propForm.list = []
  915. // this.propForm.optionList = this.bloodAccessOptions
  916. // this.propForm.isMultiple = 1
  917. // this.propForm.selectId = this.dialysisPrescription.dialyzer_perfusion_apparatus
  918. // this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
  919. // break
  920. this.propForm.result = []
  921. this.isHasOther = 2
  922. this.propForm.type = 11
  923. this.isShowDialog = false
  924. this.propForm.title = '透析器/灌流器'
  925. this.visibility = true
  926. this.propForm.list = []
  927. this.propForm.list = getDataConfig('hemodialysis', 'dialyzer_perfusion_apparatus')
  928. this.propForm.optionList = []
  929. this.propForm.isMultiple = 2
  930. // this.propForm.result = typeof(this.formValue.hemorrhage) == "string"? this.formValue.hemorrhage.split(","):[]
  931. if (this.dialysisPrescription.dialyzer_perfusion_apparatus != undefined || this.dialysisPrescription.dialyzer_perfusion_apparatus != null) {
  932. if (this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0) {
  933. this.propForm.result = this.dialysisPrescription.dialyzer_perfusion_apparatus.split(',')
  934. } else {
  935. this.propForm.result = []
  936. }
  937. } else {
  938. this.propForm.result = []
  939. }
  940. this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
  941. break
  942. }
  943. },
  944. menuCancle: function () {
  945. this.visibility = false
  946. this.isShowDialog = true
  947. this.$nextTick(() => {
  948. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  949. this.$refs[this.propForm.click_ref].scrollIntoView()
  950. }
  951. })
  952. },
  953. menuCancleThree: function () {
  954. this.advice_visibility = false
  955. this.isShowDialog = true
  956. },
  957. menuMsgTip: function () {
  958. this.msgtip_visibility = false
  959. this.isShowDialog = true
  960. },
  961. menuComfirmThree: function (targetAdvices) {
  962. if (targetAdvices.length > 0) {
  963. if (this.is_pre == 1) {
  964. Toast.loading({forbidClick: true, duration: 0})
  965. let ParamsQuery = this.dialysisPrescription
  966. ParamsQuery['patient'] = this.$route.query.patient_id
  967. ParamsQuery['record_date'] = this.record_date
  968. commitDialysisPrescription(ParamsQuery).then(response => {
  969. if (response.data.state == 0) {
  970. Toast.fail(response.data.msg)
  971. return false
  972. } else {
  973. var date = new Date();
  974. var year = date.getFullYear();
  975. var month = date.getMonth() + 1;
  976. var day = date.getDate();
  977. var hours = date.getHours();
  978. var minites = date.getMinutes();
  979. if (month < 10) {
  980. month = "0" + month;
  981. }
  982. if (day < 10) {
  983. day = "0" + day;
  984. }
  985. if (hours < 10) {
  986. hours = "0" + hours;
  987. }
  988. if (minites < 10) {
  989. minites = "0" + minites;
  990. }
  991. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  992. Toast.success('提交成功')
  993. let params = {
  994. advices: targetAdvices,
  995. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  996. advice_doctor: targetAdvices[0].advice_doctor,
  997. advice_type: targetAdvices[0].advice_type,
  998. parent_id: this.$route.query.patient_id,
  999. start_time: nowDate,
  1000. remark: '',
  1001. }
  1002. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1003. var resp = rs.data
  1004. if (resp.state == 1) {
  1005. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  1006. } else {
  1007. }
  1008. })
  1009. this.finish()
  1010. }
  1011. })
  1012. } else if (this.is_pre == 2) {
  1013. Toast.loading({forbidClick: true, duration: 0})
  1014. let ParamsQuery = this.dialysisPrescription
  1015. ParamsQuery['patient'] = this.$route.query.patient_id
  1016. ParamsQuery['record_date'] = this.record_date
  1017. postSolution(ParamsQuery).then(response => {
  1018. if (response.data.state == 0) {
  1019. Toast.fail(response.data.msg)
  1020. return false
  1021. } else {
  1022. Toast.success('提交成功')
  1023. var date = new Date();
  1024. var year = date.getFullYear();
  1025. var month = date.getMonth() + 1;
  1026. var day = date.getDate();
  1027. var hours = date.getHours();
  1028. var minites = date.getMinutes();
  1029. if (month < 10) {
  1030. month = "0" + month;
  1031. }
  1032. if (day < 10) {
  1033. day = "0" + day;
  1034. }
  1035. if (hours < 10) {
  1036. hours = "0" + hours;
  1037. }
  1038. if (minites < 10) {
  1039. minites = "0" + minites;
  1040. }
  1041. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1042. let params = {
  1043. advices: targetAdvices,
  1044. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1045. advice_doctor: targetAdvices[0].advice_doctor,
  1046. advice_type: targetAdvices[0].advice_type,
  1047. parent_id: this.$route.query.patient_id,
  1048. start_time: nowDate,
  1049. remark: '',
  1050. }
  1051. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1052. var resp = rs.data
  1053. if (resp.state == 1) {
  1054. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  1055. this.$emit('longSolution', response.data.data.solution,resp.data.advices)
  1056. } else {
  1057. }
  1058. })
  1059. this.finish()
  1060. }
  1061. })
  1062. }
  1063. } else {
  1064. if (this.is_pre == 1) {
  1065. Toast.loading({forbidClick: true, duration: 0})
  1066. let ParamsQuery = this.dialysisPrescription
  1067. ParamsQuery['patient'] = this.$route.query.patient_id
  1068. ParamsQuery['record_date'] = this.record_date
  1069. commitDialysisPrescription(ParamsQuery).then(response => {
  1070. if (response.data.state == 0) {
  1071. Toast.fail(response.data.msg)
  1072. return false
  1073. } else {
  1074. Toast.success('提交成功')
  1075. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1076. this.finish()
  1077. }
  1078. })
  1079. } else if (this.is_pre == 2) {
  1080. Toast.loading({forbidClick: true, duration: 0})
  1081. let ParamsQuery = this.dialysisPrescription
  1082. ParamsQuery['patient'] = this.$route.query.patient_id
  1083. ParamsQuery['record_date'] = this.record_date
  1084. postSolution(ParamsQuery).then(response => {
  1085. if (response.data.state == 0) {
  1086. Toast.fail(response.data.msg)
  1087. return false
  1088. } else {
  1089. Toast.success('提交成功')
  1090. this.$emit('longSolution', response.data.data.solution, this.doctorAdvices)
  1091. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1092. this.finish()
  1093. }
  1094. })
  1095. }
  1096. }
  1097. },
  1098. menuComfirm: function (val) {
  1099. this.visibility = false
  1100. this.isShowDialog = true
  1101. this.$nextTick(() => {
  1102. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  1103. this.$refs[this.propForm.click_ref].scrollIntoView()
  1104. }
  1105. })
  1106. switch (val.type) {
  1107. case 1:
  1108. Toast.loading({forbidClick: true, duration: 0, message: '切换模式中,请稍候',})
  1109. //从服务器获取对应模式的长期处方
  1110. let ParamsQuery = {}
  1111. ParamsQuery['patient_id'] = this.$route.query.patient_id
  1112. ParamsQuery['mode_id'] = val.selectId
  1113. GetSolution(ParamsQuery).then(response => {
  1114. if (response.data.state == 0) {
  1115. Toast.fail(response.data.msg)
  1116. return false
  1117. } else {
  1118. Toast.success('切换成功')
  1119. if (response.data.data.solution != null) {
  1120. for (const key in response.data.data.solution) { //长期处方不为空
  1121. if (key != 'target_ultrafiltration') {
  1122. this.dialysisPrescription[key] = response.data.data.solution[key]
  1123. }
  1124. }
  1125. } else {
  1126. if (response.data.data.prescription != null) { //临时处方不为空
  1127. for (const key in response.data.data.prescription) {
  1128. if (key != 'target_ultrafiltration') {
  1129. this.dialysisPrescription[key] = response.data.data.prescription[key]
  1130. }
  1131. }
  1132. } else {
  1133. for (const key in this.dialysisPrescription) { //临时处方为空
  1134. if (key != 'target_ultrafiltration') {
  1135. this.dialysisPrescription[key] = ''
  1136. }
  1137. }
  1138. this.dialysisPrescription.mode_id = val.selectId
  1139. }
  1140. }
  1141. }
  1142. if (this.dialysisPrescription.dialysis_duration_hour === '' || this.dialysisPrescription.dialysis_duration_minute === '') {
  1143. this.timeValue = ''
  1144. this.time = '03:00'
  1145. } else {
  1146. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  1147. 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)
  1148. }
  1149. })
  1150. break
  1151. case 2:
  1152. this.dialysisPrescription.dialyzer = val.selectId
  1153. break
  1154. case 3:
  1155. this.dialysisPrescription.perfusion_apparatus = val.selectId
  1156. break
  1157. case 4:
  1158. this.dialysisPrescription.replacement_way = val.selectId
  1159. break
  1160. case 5:
  1161. this.dialysisPrescription.anticoagulant = val.selectId
  1162. if (typeof this.anticoagulantsConfit[val.selectId] == 'undefined' || this.anticoagulantsConfit[val.selectId] == null) {
  1163. return
  1164. }
  1165. this.anticoagulant = this.anticoagulantsConfit[val.selectId]
  1166. break
  1167. case 6:
  1168. this.dialysisPrescription.dialysate_formulation = val.selectId
  1169. break
  1170. case 7:
  1171. this.dialysisPrescription.body_fluid = val.selectId
  1172. break
  1173. case 8:
  1174. this.dialysisPrescription.special_medicine = val.selectId
  1175. break
  1176. case 9:
  1177. this.dialysisPrescription.displace_liqui_part = val.selectId
  1178. break
  1179. case 10:
  1180. this.dialysisPrescription.blood_access = val.selectId
  1181. break
  1182. case 11:
  1183. this.dialysisPrescription.dialyzer_perfusion_apparatus = val.result.join(',')
  1184. break
  1185. }
  1186. },
  1187. GetModeByModeId: function (val) {
  1188. let treatment_mode_name = ''
  1189. let treatment_mode = this.modeOption
  1190. for (let keys in treatment_mode) {
  1191. if (treatment_mode[keys].id == val) {
  1192. treatment_mode_name = treatment_mode[keys].name
  1193. }
  1194. }
  1195. for (let keys in treatment_mode) {
  1196. if (treatment_mode[keys].id == val) {
  1197. treatment_mode_name = treatment_mode[keys].name
  1198. var treatment_mode_id = treatment_mode[keys].id
  1199. console.log("treatment_mode_id",treatment_mode_id)
  1200. if(treatment_mode_id === 1 || treatment_mode_id === 3 || treatment_mode_id === 4 || treatment_mode_id === 6 || treatment_mode_id === 7 || treatment_mode_id === 8 || treatment_mode_id === 9 || treatment_mode_id === 10 || treatment_mode_id === 11 || treatment_mode_id === 13 || treatment_mode_id === 14 || treatment_mode_id === 15 || treatment_mode_id === 16){
  1201. this.zhiShow = false
  1202. this.totalShow = false
  1203. this.huShow =false
  1204. }else{
  1205. this.zhiShow = true
  1206. this.totalShow = true
  1207. this.huShow = true
  1208. console.log("aa")
  1209. }
  1210. }
  1211. }
  1212. return treatment_mode_name
  1213. },
  1214. GetDialysateFormulationById: function (val) {
  1215. let name = ''
  1216. let dfl = this.dialysateFormulationOptions.length
  1217. for (let index = 0; index < dfl; index++) {
  1218. if (this.dialysateFormulationOptions[index].id == val) {
  1219. name = this.dialysateFormulationOptions[index].name
  1220. break
  1221. }
  1222. }
  1223. return name
  1224. },
  1225. GetDialyzerById: function (val) {
  1226. let dialyzer_name = ''
  1227. let machines = this.machines_prop
  1228. for (let i = 0; i < machines.length; i++) {
  1229. if (machines[i].id == val) {
  1230. dialyzer_name = machines[i].name
  1231. }
  1232. }
  1233. return dialyzer_name
  1234. },
  1235. GetPerfusionApparatusById: function (val) {
  1236. let perfusion_apparatus_name = ''
  1237. let perfusion_apparatus = this.perfusion_apparatus
  1238. for (let i = 0; i < perfusion_apparatus.length; i++) {
  1239. if (perfusion_apparatus[i].id == val) {
  1240. perfusion_apparatus_name = perfusion_apparatus[i].name
  1241. }
  1242. }
  1243. return perfusion_apparatus_name
  1244. },
  1245. GetReplacementWayById: function (val) {
  1246. let replacement_ways_name = ''
  1247. let replacement_ways = this.replacementWays
  1248. for (let i = 0; i < replacement_ways.length; i++) {
  1249. if (replacement_ways[i].id == val) {
  1250. replacement_ways_name = replacement_ways[i].name
  1251. }
  1252. }
  1253. return replacement_ways_name
  1254. },
  1255. GetAnticoagulantById: function (val) {
  1256. let anticoagulan_name = ''
  1257. let anticoagulant = this.anticoagulantsConfit
  1258. for (let keys in anticoagulant) {
  1259. if (anticoagulant[keys].id == val) {
  1260. anticoagulan_name = anticoagulant[keys].name
  1261. }
  1262. }
  1263. return anticoagulan_name
  1264. },
  1265. commitInfo: function () {
  1266. if(this.dialysisPrescription.anticoagulant == 1){
  1267. this.dialysisPrescription.anticoagulant_weichi = '0'
  1268. this.dialysisPrescription.anticoagulant_shouji = '0'
  1269. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1270. }
  1271. if (this.$store.getters.user.template_info.template_id == 6) {
  1272. if (this.dialysisPrescription.mode_id == 2) {
  1273. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1274. Toast.fail('HDF模式下置换方式和置换液总量不能为空!')
  1275. return
  1276. }
  1277. }
  1278. }
  1279. this.is_pre = 1
  1280. if (this.prescription_prop.id == '') {
  1281. if (this.is_open == 0) {
  1282. Toast.loading({forbidClick: true, duration: 0})
  1283. let ParamsQuery = this.dialysisPrescription
  1284. ParamsQuery['patient'] = this.$route.query.patient_id
  1285. ParamsQuery['record_date'] = this.record_date
  1286. commitDialysisPrescription(ParamsQuery).then(response => {
  1287. if (response.data.state == 0) {
  1288. Toast.fail(response.data.msg)
  1289. return false
  1290. } else {
  1291. Toast.success('提交成功')
  1292. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1293. this.finish()
  1294. }
  1295. })
  1296. } else if (this.is_open == 1) {
  1297. if (this.targetAdvices.length > 0) {
  1298. //弹框推送提醒
  1299. this.advicePropForm.list = this.targetAdvices
  1300. this.advicePropForm.operators = this.admin_users_prop
  1301. this.advice_visibility = true
  1302. this.isShowDialog = false
  1303. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1304. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1305. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1306. }
  1307. }
  1308. } else {
  1309. Toast.loading({forbidClick: true, duration: 0})
  1310. let ParamsQuery = this.dialysisPrescription
  1311. ParamsQuery['patient'] = this.$route.query.patient_id
  1312. ParamsQuery['record_date'] = this.record_date
  1313. commitDialysisPrescription(ParamsQuery).then(response => {
  1314. if (response.data.state == 0) {
  1315. Toast.fail(response.data.msg)
  1316. return false
  1317. } else {
  1318. Toast.success('提交成功')
  1319. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1320. this.finish()
  1321. }
  1322. })
  1323. }
  1324. } else if (this.is_open == 2) {
  1325. if (this.waitUploadAdvices.length > 0) {
  1326. Toast.loading({forbidClick: true, duration: 0})
  1327. let ParamsQuery = this.dialysisPrescription
  1328. ParamsQuery['patient'] = this.$route.query.patient_id
  1329. ParamsQuery['record_date'] = this.record_date
  1330. commitDialysisPrescription(ParamsQuery).then(response => {
  1331. if (response.data.state == 0) {
  1332. Toast.fail(response.data.msg)
  1333. return false
  1334. } else {
  1335. Toast.success('提交成功')
  1336. var date = new Date();
  1337. var year = date.getFullYear();
  1338. var month = date.getMonth() + 1;
  1339. var day = date.getDate();
  1340. var hours = date.getHours();
  1341. var minites = date.getMinutes();
  1342. if (month < 10) {
  1343. month = "0" + month;
  1344. }
  1345. if (day < 10) {
  1346. day = "0" + day;
  1347. }
  1348. if (hours < 10) {
  1349. hours = "0" + hours;
  1350. }
  1351. if (minites < 10) {
  1352. minites = "0" + minites;
  1353. }
  1354. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1355. let params = {
  1356. advices: this.waitUploadAdvices,
  1357. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1358. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1359. advice_type: this.waitUploadAdvices[0].advice_type,
  1360. parent_id: this.$route.query.patient_id,
  1361. start_time: nowDate,
  1362. remark: '',
  1363. }
  1364. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1365. var resp = rs.data
  1366. if (resp.state == 1) {
  1367. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1368. } else {
  1369. }
  1370. })
  1371. this.finish()
  1372. }
  1373. })
  1374. } else {
  1375. Toast.loading({forbidClick: true, duration: 0})
  1376. let ParamsQuery = this.dialysisPrescription
  1377. ParamsQuery['patient'] = this.$route.query.patient_id
  1378. ParamsQuery['record_date'] = this.record_date
  1379. commitDialysisPrescription(ParamsQuery).then(response => {
  1380. if (response.data.state == 0) {
  1381. Toast.fail(response.data.msg)
  1382. return false
  1383. } else {
  1384. this.advice_visibility = false
  1385. Toast.success('提交成功')
  1386. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1387. this.finish()
  1388. }
  1389. })
  1390. }
  1391. }
  1392. } else {
  1393. if (this.prescription_prop.creater == 0) {
  1394. if (this.is_open == 0) {
  1395. Toast.loading({forbidClick: true, duration: 0})
  1396. let ParamsQuery = this.dialysisPrescription
  1397. ParamsQuery['patient'] = this.$route.query.patient_id
  1398. ParamsQuery['record_date'] = this.record_date
  1399. commitDialysisPrescription(ParamsQuery).then(response => {
  1400. if (response.data.state == 0) {
  1401. Toast.fail(response.data.msg)
  1402. return false
  1403. } else {
  1404. Toast.success('提交成功')
  1405. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1406. this.finish()
  1407. }
  1408. })
  1409. } else if (this.is_open == 1) {
  1410. if (this.targetAdvices.length > 0) {
  1411. //弹框推送提醒
  1412. this.advicePropForm.list = this.targetAdvices
  1413. this.advicePropForm.operators = this.admin_users_prop
  1414. this.advice_visibility = true
  1415. this.isShowDialog = false
  1416. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1417. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1418. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1419. }
  1420. }
  1421. } else {
  1422. Toast.loading({forbidClick: true, duration: 0})
  1423. let ParamsQuery = this.dialysisPrescription
  1424. ParamsQuery['patient'] = this.$route.query.patient_id
  1425. ParamsQuery['record_date'] = this.record_date
  1426. commitDialysisPrescription(ParamsQuery).then(response => {
  1427. if (response.data.state == 0) {
  1428. Toast.fail(response.data.msg)
  1429. return false
  1430. } else {
  1431. Toast.success('提交成功')
  1432. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1433. this.finish()
  1434. }
  1435. })
  1436. }
  1437. } else if (this.is_open == 2) {
  1438. if (this.waitUploadAdvices.length > 0) {
  1439. Toast.loading({forbidClick: true, duration: 0})
  1440. let ParamsQuery = this.dialysisPrescription
  1441. ParamsQuery['patient'] = this.$route.query.patient_id
  1442. ParamsQuery['record_date'] = this.record_date
  1443. commitDialysisPrescription(ParamsQuery).then(response => {
  1444. if (response.data.state == 0) {
  1445. Toast.fail(response.data.msg)
  1446. return false
  1447. } else {
  1448. var date = new Date();
  1449. var year = date.getFullYear();
  1450. var month = date.getMonth() + 1;
  1451. var day = date.getDate();
  1452. var hours = date.getHours();
  1453. var minites = date.getMinutes();
  1454. if (month < 10) {
  1455. month = "0" + month;
  1456. }
  1457. if (day < 10) {
  1458. day = "0" + day;
  1459. }
  1460. if (hours < 10) {
  1461. hours = "0" + hours;
  1462. }
  1463. if (minites < 10) {
  1464. minites = "0" + minites;
  1465. }
  1466. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1467. let params = {
  1468. advices: this.waitUploadAdvices,
  1469. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1470. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1471. advice_type: this.waitUploadAdvices[0].advice_type,
  1472. parent_id: this.$route.query.patient_id,
  1473. start_time: nowDate,
  1474. remark: '',
  1475. }
  1476. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1477. var resp = rs.data
  1478. if (resp.state == 1) {
  1479. this.doctorAdvices = resp.data.advices
  1480. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1481. } else {
  1482. }
  1483. })
  1484. Toast.success('提交成功')
  1485. this.finish()
  1486. }
  1487. })
  1488. } else {
  1489. Toast.loading({forbidClick: true, duration: 0})
  1490. let ParamsQuery = this.dialysisPrescription
  1491. ParamsQuery['patient'] = this.$route.query.patient_id
  1492. ParamsQuery['record_date'] = this.record_date
  1493. commitDialysisPrescription(ParamsQuery).then(response => {
  1494. if (response.data.state == 0) {
  1495. Toast.fail(response.data.msg)
  1496. return false
  1497. } else {
  1498. Toast.success('提交成功')
  1499. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1500. this.finish()
  1501. }
  1502. })
  1503. }
  1504. }
  1505. } else {
  1506. Toast.loading({forbidClick: true, duration: 0})
  1507. let ParamsQuery = this.dialysisPrescription
  1508. ParamsQuery['patient'] = this.$route.query.patient_id
  1509. ParamsQuery['record_date'] = this.record_date
  1510. commitDialysisPrescription(ParamsQuery).then(response => {
  1511. if (response.data.state == 0) {
  1512. Toast.fail(response.data.msg)
  1513. return false
  1514. } else {
  1515. Toast.success('提交成功')
  1516. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1517. this.finish()
  1518. }
  1519. })
  1520. }
  1521. }
  1522. }, commitSolutionInfo: function () {
  1523. if (this.$store.getters.user.template_info.template_id == 6) {
  1524. if (this.dialysisPrescription.mode_id == 2) {
  1525. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1526. Toast.fail('HDF模式下置换方式和置换液总量不能为空!')
  1527. return
  1528. }
  1529. }
  1530. }
  1531. this.is_pre = 2
  1532. if (this.prescription_prop.id == '') {
  1533. if (this.is_open == 0) {
  1534. Toast.loading({forbidClick: true, duration: 0})
  1535. let ParamsQuery = this.dialysisPrescription
  1536. ParamsQuery['patient'] = this.$route.query.patient_id
  1537. ParamsQuery['record_date'] = this.record_date
  1538. postSolution(ParamsQuery).then(response => {
  1539. if (response.data.state == 0) {
  1540. Toast.fail(response.data.msg)
  1541. return false
  1542. } else {
  1543. Toast.success('提交成功')
  1544. this.$emit('advice')
  1545. this.$emit('longSolution', response.data.data.solution)
  1546. this.$emit('prescription', response.data.data.prescription)
  1547. this.finish()
  1548. }
  1549. })
  1550. } else if (this.is_open == 1) {
  1551. if (this.targetAdvices.length > 0) {
  1552. //弹框推送提醒
  1553. this.advicePropForm.list = this.targetAdvices
  1554. this.advicePropForm.operators = this.admin_users_prop
  1555. this.advice_visibility = true
  1556. this.isShowDialog = false
  1557. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1558. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1559. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1560. }
  1561. }
  1562. } else {
  1563. Toast.loading({forbidClick: true, duration: 0})
  1564. let ParamsQuery = this.dialysisPrescription
  1565. ParamsQuery['patient'] = this.$route.query.patient_id
  1566. ParamsQuery['record_date'] = this.record_date
  1567. postSolution(ParamsQuery).then(response => {
  1568. if (response.data.state == 0) {
  1569. Toast.fail(response.data.msg)
  1570. return false
  1571. } else {
  1572. Toast.success('提交成功')
  1573. this.$emit('advice')
  1574. this.$emit('longSolution', response.data.data.solution)
  1575. this.$emit('prescription', response.data.data.prescription)
  1576. this.finish()
  1577. }
  1578. })
  1579. }
  1580. } else if (this.is_open == 2) {
  1581. if (this.waitUploadAdvices.length > 0) {
  1582. Toast.loading({forbidClick: true, duration: 0})
  1583. let ParamsQuery = this.dialysisPrescription
  1584. ParamsQuery['patient'] = this.$route.query.patient_id
  1585. ParamsQuery['record_date'] = this.record_date
  1586. postSolution(ParamsQuery).then(response => {
  1587. if (response.data.state == 0) {
  1588. Toast.fail(response.data.msg)
  1589. return false
  1590. } else {
  1591. Toast.success('提交成功')
  1592. var date = new Date();
  1593. var year = date.getFullYear();
  1594. var month = date.getMonth() + 1;
  1595. var day = date.getDate();
  1596. var hours = date.getHours();
  1597. var minites = date.getMinutes();
  1598. if (month < 10) {
  1599. month = "0" + month;
  1600. }
  1601. if (day < 10) {
  1602. day = "0" + day;
  1603. }
  1604. if (hours < 10) {
  1605. hours = "0" + hours;
  1606. }
  1607. if (minites < 10) {
  1608. minites = "0" + minites;
  1609. }
  1610. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1611. let params = {
  1612. advices: this.waitUploadAdvices,
  1613. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1614. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1615. advice_type: this.waitUploadAdvices[0].advice_type,
  1616. parent_id: this.$route.query.patient_id,
  1617. start_time: nowDate,
  1618. remark: '',
  1619. }
  1620. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1621. var resp = rs.data
  1622. if (resp.state == 1) {
  1623. this.doctorAdvices = resp.data.advices
  1624. this.$emit('longSolution', response.data.data.solution, resp.data.advices)
  1625. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1626. } else {
  1627. }
  1628. })
  1629. this.finish()
  1630. }
  1631. })
  1632. } else {
  1633. Toast.loading({forbidClick: true, duration: 0})
  1634. let ParamsQuery = this.dialysisPrescription
  1635. ParamsQuery['patient'] = this.$route.query.patient_id
  1636. ParamsQuery['record_date'] = this.record_date
  1637. postSolution(ParamsQuery).then(response => {
  1638. if (response.data.state == 0) {
  1639. Toast.fail(response.data.msg)
  1640. return false
  1641. } else {
  1642. Toast.success('提交成功')
  1643. this.$emit('longSolution', response.data.data.solution)
  1644. this.$emit('prescription', response.data.data.prescription)
  1645. this.finish()
  1646. }
  1647. })
  1648. }
  1649. }
  1650. } else {
  1651. if (this.prescription_prop.creater == 0) {
  1652. if (this.is_open == 0) {
  1653. Toast.loading({forbidClick: true, duration: 0})
  1654. let ParamsQuery = this.dialysisPrescription
  1655. ParamsQuery['patient'] = this.$route.query.patient_id
  1656. ParamsQuery['record_date'] = this.record_date
  1657. postSolution(ParamsQuery).then(response => {
  1658. if (response.data.state == 0) {
  1659. Toast.fail(response.data.msg)
  1660. return false
  1661. } else {
  1662. Toast.success('提交成功')
  1663. this.$emit('longSolution', response.data.data.solution)
  1664. this.$emit('prescription', response.data.data.prescription)
  1665. this.finish()
  1666. }
  1667. })
  1668. } else if (this.is_open == 1) {
  1669. if (this.targetAdvices.length > 0) {
  1670. //弹框推送提醒
  1671. this.advicePropForm.list = this.targetAdvices
  1672. this.advicePropForm.operators = this.admin_users_prop
  1673. this.advice_visibility = true
  1674. this.isShowDialog = false
  1675. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1676. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1677. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1678. }
  1679. }
  1680. } else {
  1681. Toast.loading({forbidClick: true, duration: 0})
  1682. let ParamsQuery = this.dialysisPrescription
  1683. ParamsQuery['patient'] = this.$route.query.patient_id
  1684. ParamsQuery['record_date'] = this.record_date
  1685. postSolution(ParamsQuery).then(response => {
  1686. if (response.data.state == 0) {
  1687. Toast.fail(response.data.msg)
  1688. return false
  1689. } else {
  1690. Toast.success('提交成功')
  1691. this.$emit('longSolution', response.data.data.solution)
  1692. this.$emit('prescription', response.data.data.prescription)
  1693. this.finish()
  1694. }
  1695. })
  1696. }
  1697. } else if (this.is_open == 2) {
  1698. if (this.waitUploadAdvices.length > 0) {
  1699. Toast.loading({forbidClick: true, duration: 0})
  1700. let ParamsQuery = this.dialysisPrescription
  1701. ParamsQuery['patient'] = this.$route.query.patient_id
  1702. ParamsQuery['record_date'] = this.record_date
  1703. postSolution(ParamsQuery).then(response => {
  1704. if (response.data.state == 0) {
  1705. Toast.fail(response.data.msg)
  1706. return false
  1707. } else {
  1708. this.advice_visibility = false
  1709. var date = new Date();
  1710. var year = date.getFullYear();
  1711. var month = date.getMonth() + 1;
  1712. var day = date.getDate();
  1713. var hours = date.getHours();
  1714. var minites = date.getMinutes();
  1715. if (month < 10) {
  1716. month = "0" + month;
  1717. }
  1718. if (day < 10) {
  1719. day = "0" + day;
  1720. }
  1721. if (hours < 10) {
  1722. hours = "0" + hours;
  1723. }
  1724. if (minites < 10) {
  1725. minites = "0" + minites;
  1726. }
  1727. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1728. let params = {
  1729. advices: this.waitUploadAdvices,
  1730. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1731. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1732. advice_type: this.waitUploadAdvices[0].advice_type,
  1733. parent_id: this.$route.query.patient_id,
  1734. start_time: nowDate,
  1735. remark: '',
  1736. }
  1737. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1738. var resp = rs.data
  1739. if (resp.state == 1) {
  1740. this.doctorAdvices = resp.data.advices
  1741. this.$emit('longSolution', response.data.data.solution,resp.data.advices)
  1742. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  1743. } else {
  1744. }
  1745. })
  1746. Toast.success('提交成功')
  1747. this.finish()
  1748. }
  1749. })
  1750. } else {
  1751. Toast.loading({forbidClick: true, duration: 0})
  1752. let ParamsQuery = this.dialysisPrescription
  1753. ParamsQuery['patient'] = this.$route.query.patient_id
  1754. ParamsQuery['record_date'] = this.record_date
  1755. postSolution(ParamsQuery).then(response => {
  1756. if (response.data.state == 0) {
  1757. Toast.fail(response.data.msg)
  1758. return false
  1759. } else {
  1760. Toast.success('提交成功')
  1761. this.$emit('advice')
  1762. this.$emit('longSolution', response.data.data.solution)
  1763. this.$emit('prescription', response.data.data.prescription)
  1764. this.finish()
  1765. }
  1766. })
  1767. }
  1768. }
  1769. } else {
  1770. Toast.loading({forbidClick: true, duration: 0})
  1771. let ParamsQuery = this.dialysisPrescription
  1772. ParamsQuery['patient'] = this.$route.query.patient_id
  1773. ParamsQuery['record_date'] = this.record_date
  1774. postSolution(ParamsQuery).then(response => {
  1775. if (response.data.state == 0) {
  1776. Toast.fail(response.data.msg)
  1777. return false
  1778. } else {
  1779. Toast.success('提交成功')
  1780. this.$emit('longSolution', response.data.data.solution)
  1781. this.$emit('prescription', response.data.data.prescription)
  1782. this.finish()
  1783. }
  1784. })
  1785. }
  1786. }
  1787. }, finish: function () {
  1788. this.$emit('finish')
  1789. }, close: function () {
  1790. this.$emit('close')
  1791. }, open: function () {
  1792. this.isShowDialog = true
  1793. this.visibility = false
  1794. this.$refs.picker.close()
  1795. var dialogTop = document.querySelector('#dialogTop')
  1796. if (dialogTop != null) {
  1797. this.$nextTick(() => {
  1798. dialogTop.scrollTop = 0
  1799. })
  1800. }
  1801. }, sign: function () {
  1802. let params = {
  1803. patient_id: this.$route.query.patient_id,
  1804. date: this.record_date,
  1805. }
  1806. postSign(params).then(response => {
  1807. if (response.data.state == 0) {
  1808. Toast.fail(response.data.msg)
  1809. return false
  1810. } else {
  1811. this.isShowDesc = false
  1812. this.isShowDoctorSign = true
  1813. this.dialysisPrescription.prescription_doctor = response.data.data.doctor_id
  1814. for (let i = 0; i < this.operators.length; i++) {
  1815. if (this.operators[i].creator == response.data.data.doctor_id) {
  1816. console.log(this.operators[i].url)
  1817. this.signUrl = this.operators[i].url
  1818. }
  1819. }
  1820. Toast.success('签名成功')
  1821. }
  1822. })
  1823. }, getBodyFluid: function (val) {
  1824. let body_fluid_name = ''
  1825. let body_fluid = this.bodyFluidOptions
  1826. for (let i = 0; i < body_fluid.length; i++) {
  1827. if (body_fluid[i].id == val) {
  1828. body_fluid_name = body_fluid[i].name
  1829. }
  1830. }
  1831. return body_fluid_name
  1832. }, getSpecialMedicine: function (val) {
  1833. let special_medicine_name = ''
  1834. let special_medicine = this.specialMedicineOptions
  1835. for (let i = 0; i < special_medicine.length; i++) {
  1836. if (special_medicine[i].id == val) {
  1837. special_medicine_name = special_medicine[i].name
  1838. }
  1839. }
  1840. return special_medicine_name
  1841. }, getDisplaceLiquiPart: function (val) {
  1842. let displace_liqui_part_name = ''
  1843. let displace_liqui_part = this.displaceLiquiPartOptions
  1844. for (let i = 0; i < displace_liqui_part.length; i++) {
  1845. if (displace_liqui_part[i].id == val) {
  1846. displace_liqui_part_name = displace_liqui_part[i].name
  1847. }
  1848. }
  1849. return displace_liqui_part_name
  1850. }, getBloodAccess: function (val) {
  1851. let blood_access_name = ''
  1852. let blood_access = this.bloodAccessOptions
  1853. for (let i = 0; i < blood_access.length; i++) {
  1854. if (blood_access[i].id == val) {
  1855. blood_access_name = blood_access[i].name
  1856. }
  1857. }
  1858. return blood_access_name
  1859. }, menuEmpty: function (val) {
  1860. this.visibility = false
  1861. this.isShowDialog = true
  1862. switch (val.type) {
  1863. case 1:
  1864. this.dialysisPrescription.mode_id = ''
  1865. break
  1866. case 2:
  1867. this.dialysisPrescription.dialyzer = ''
  1868. break
  1869. case 3:
  1870. this.dialysisPrescription.perfusion_apparatus = ''
  1871. break
  1872. case 4:
  1873. this.dialysisPrescription.replacement_way = ''
  1874. break
  1875. case 5:
  1876. this.anticoagulant = ''
  1877. break
  1878. case 6:
  1879. this.dialysisPrescription.dialysate_formulation = ''
  1880. break
  1881. case 7:
  1882. this.dialysisPrescription.body_fluid = ''
  1883. break
  1884. case 8:
  1885. this.dialysisPrescription.special_medicine = ''
  1886. break
  1887. case 9:
  1888. this.dialysisPrescription.displace_liqui_part = ''
  1889. break
  1890. case 10:
  1891. this.dialysisPrescription.blood_access = ''
  1892. break
  1893. }
  1894. }, getFloat: function (x) {
  1895. if (x != '.') {
  1896. var f = Math.round(x * 100) / 100
  1897. var s = f.toString()
  1898. var rs = s.indexOf('.')
  1899. if (rs <= 0) {
  1900. rs = s.length
  1901. s += '.'
  1902. }
  1903. while (s.length <= rs + 1) {
  1904. s += '0'
  1905. }
  1906. return s
  1907. } else {
  1908. return '0.0'
  1909. }
  1910. }, dialysisGoodsClick: function () {
  1911. this.isShowDialog = false
  1912. this.is_show = true
  1913. }, menuCancleTwo: function () {
  1914. this.isShowDialog = true
  1915. this.is_show = false
  1916. }, menuComfirmTwo: function (dialysisPrescription) {
  1917. this.isShowDialog = true
  1918. this.is_show = false
  1919. this.dialysisPrescription.niprocart = dialysisPrescription.niprocart
  1920. this.dialysisPrescription.jms = dialysisPrescription.jms
  1921. this.dialysisPrescription.fistula_needle_set = dialysisPrescription.fistula_needle_set
  1922. this.dialysisPrescription.fistula_needle_set_16 = dialysisPrescription.fistula_needle_set_16
  1923. this.dialysisPrescription.hemoperfusion = dialysisPrescription.hemoperfusion
  1924. this.dialysisPrescription.dialyser_sterilised = dialysisPrescription.dialyser_sterilised
  1925. this.dialysisPrescription.filtryzer = dialysisPrescription.filtryzer
  1926. this.dialysisPrescription.dialyzers = dialysisPrescription.dialyzers
  1927. this.dialysisPrescription.injector = dialysisPrescription.injector
  1928. this.dialysisPrescription.bloodlines = dialysisPrescription.bloodlines
  1929. this.dialysisPrescription.tubing_hemodialysis = dialysisPrescription.tubing_hemodialysis
  1930. this.dialysisPrescription.package = dialysisPrescription.package
  1931. this.dialysisPrescription.a_liquid = dialysisPrescription.a_liquid
  1932. }
  1933. },
  1934. created () {
  1935. this.template_id = this.$store.getters.user.template_info.template_id
  1936. if (this.$store.getters.user.user.user_type == 2) {
  1937. this.isShowSign = true
  1938. }
  1939. this.modeOption = this.$store.getters.treatment_mode
  1940. delete this.modeOption['0']
  1941. var perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
  1942. this.perfusion_apparatus = perfusion_apparatus
  1943. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1944. this.bodyFluidOptions = this.$store.getters.body_fluid
  1945. this.specialMedicineOptions = this.$store.getters.special_medicine
  1946. this.displaceLiquiPartOptions = this.$store.getters.displace_liqui
  1947. this.bloodAccessOptions = this.$store.getters.blood_access
  1948. this.dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
  1949. this.replacementWays = getDataConfig('hemodialysis', 'replacement_ways')
  1950. this.patient = this.patient_prop
  1951. if (this.prescription_prop != null && typeof (this.prescription_prop.id) != 'undefined' && this.prescription_prop.id > 0) {
  1952. for (const key in this.prescription_prop) {
  1953. this.dialysisPrescription[key] = this.prescription_prop[key]
  1954. }
  1955. } else if (this.solution_prop != null && typeof this.solution_prop.id != 'undefined' && this.solution_prop.id) {
  1956. for (const key in this.solution_prop) {
  1957. if(key != "target_ultrafiltration") {
  1958. this.dialysisPrescription[key] = this.solution_prop[key]
  1959. }
  1960. }
  1961. } else if (this.last_prescription != null && typeof this.last_prescription.id != 'undefined' && this.last_prescription.id) {
  1962. for (const key in this.last_prescription) {
  1963. if(key != "target_ultrafiltration") {
  1964. this.dialysisPrescription[key] = this.last_prescription[key]
  1965. }
  1966. }
  1967. } else {
  1968. this.dialysisPrescription.mode_id = this.schedual.mode_id
  1969. }
  1970. if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
  1971. this.timeValue = ''
  1972. this.time = '03:00'
  1973. } else {
  1974. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  1975. 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)
  1976. }
  1977. this.dialyserList = this.machines_prop
  1978. // this.doctor = this.$store.getters.user.user.user_type;
  1979. var date = this.$route.query && this.$route.query.date
  1980. date *= 1000
  1981. var newDate = new Date(date)
  1982. var y = newDate.getFullYear()
  1983. var m = newDate.getMonth() + 1
  1984. var d = newDate.getDate()
  1985. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  1986. newDate = new Date()
  1987. y = newDate.getFullYear()
  1988. m = newDate.getMonth() + 1
  1989. d = newDate.getDate()
  1990. }
  1991. this.record_date =
  1992. y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
  1993. // this.patient.id = this.patient_prop.id
  1994. if (this.dialysisPrescription.prescription_doctor == '') {
  1995. this.isShowDesc = true
  1996. this.isShowDoctorSign = false
  1997. } else {
  1998. this.isShowDesc = false
  1999. this.isShowDoctorSign = true
  2000. for (let i = 0; i < this.operators.length; i++) {
  2001. if (this.operators[i].creator == this.dialysisPrescription.prescription_doctor) {
  2002. this.signUrl = this.operators[i].url
  2003. }
  2004. }
  2005. }
  2006. this.dialysisPrescription.kalium = this.getFloat(this.dialysisPrescription.kalium)
  2007. this.dialysisPrescription.sodium = this.getFloat(this.dialysisPrescription.sodium)
  2008. this.dialysisPrescription.calcium = this.getFloat(this.dialysisPrescription.calcium)
  2009. this.dialysisPrescription.ultrafiltration = this.getFloat(this.dialysisPrescription.ultrafiltration)
  2010. this.dialysisPrescription.target_ultrafiltration = this.getFloat(this.dialysisPrescription.target_ultrafiltration)
  2011. if(this.dialysisPrescription.anticoagulant_shouji == ''){
  2012. this.dialysisPrescription.anticoagulant_shouji = '0'
  2013. }
  2014. if(this.dialysisPrescription.anticoagulant_weichi == ''){
  2015. this.dialysisPrescription.anticoagulant_weichi = '0'
  2016. }
  2017. if(this.dialysisPrescription.anticoagulant_zongliang == ''){
  2018. this.dialysisPrescription.anticoagulant_weichi = '0'
  2019. }
  2020. },
  2021. components: {
  2022. LongAdviceSubMenu,
  2023. MultipleSubMenu,
  2024. MsgTip,
  2025. // MultipleSubMenu,
  2026. CheckBoxSubMenu
  2027. },
  2028. watch: {
  2029. "dialysisPrescription.dialysis_duration":function(){
  2030. console.log(this.dialysisPrescription.dialysis_duration)
  2031. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  2032. this.dialysisPrescription.anticoagulant_shouji,
  2033. this.dialysisPrescription.dialysis_duration,
  2034. this.dialysisPrescription.anticoagulant_weichi
  2035. );
  2036. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  2037. this.dialysisPrescription.anticoagulant_zongliang = ''
  2038. }
  2039. },
  2040. "dialysisPrescription.anticoagulant_shouji":function(){
  2041. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  2042. this.dialysisPrescription.anticoagulant_shouji,
  2043. this.dialysisPrescription.dialysis_duration,
  2044. this.dialysisPrescription.anticoagulant_weichi
  2045. );
  2046. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  2047. this.dialysisPrescription.anticoagulant_zongliang = ''
  2048. }
  2049. },
  2050. "dialysisPrescription.anticoagulant_weichi":function(){
  2051. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  2052. this.dialysisPrescription.anticoagulant_shouji,
  2053. this.dialysisPrescription.dialysis_duration,
  2054. this.dialysisPrescription.anticoagulant_weichi
  2055. );
  2056. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  2057. this.dialysisPrescription.anticoagulant_zongliang = ''
  2058. }
  2059. },
  2060. isShowDialog (val) {
  2061. if (val) {
  2062. this.advice_visibility = false
  2063. }
  2064. }
  2065. }
  2066. }
  2067. </script>
  2068. <style style="stylesheet/scss" lang="scss" scoped>
  2069. .DialogContent {
  2070. // padding-bottom:2rem !important;
  2071. .textarea {
  2072. width: 100%;
  2073. height: 2.4rem;
  2074. line-height: 0.6rem;
  2075. color: $pgh-color;
  2076. font-size: 0.45rem;
  2077. padding-left: 0.36rem;
  2078. border: none;
  2079. border-bottom: 1px #e5e5e5 solid;
  2080. }
  2081. }
  2082. .newButton {
  2083. background: #258ffc;
  2084. padding: 0 0.2rem;
  2085. height: 0.85rem;
  2086. line-height: 0.85rem;
  2087. border-radius: 5px;
  2088. color: #fff;
  2089. margin-right: -3.5rem;
  2090. }
  2091. .newName {
  2092. margin-right: -3rem;
  2093. }
  2094. .newDialogContent {
  2095. display: flex;
  2096. flex-direction: column;
  2097. height: 100%;
  2098. overflow: hidden;
  2099. > :first-child {
  2100. flex: 1;
  2101. overflow: auto;
  2102. }
  2103. }
  2104. </style>