血透系统pad前端

PrescriptionDialog.vue 81KB

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