血透系统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. }
  1000. }
  1001. }
  1002. return treatment_mode_name
  1003. },
  1004. GetDialysateFormulationById: function (val) {
  1005. let name = ''
  1006. let dfl = this.dialysateFormulationOptions.length
  1007. for (let index = 0; index < dfl; index++) {
  1008. if (this.dialysateFormulationOptions[index].id == val) {
  1009. name = this.dialysateFormulationOptions[index].name
  1010. break
  1011. }
  1012. }
  1013. return name
  1014. },
  1015. GetDialyzerById: function (val) {
  1016. let dialyzer_name = ''
  1017. let machines = this.machines_prop
  1018. for (let i = 0; i < machines.length; i++) {
  1019. if (machines[i].id == val) {
  1020. dialyzer_name = machines[i].name
  1021. }
  1022. }
  1023. return dialyzer_name
  1024. },
  1025. GetPerfusionApparatusById: function (val) {
  1026. let perfusion_apparatus_name = ''
  1027. let perfusion_apparatus = this.perfusion_apparatus
  1028. for (let i = 0; i < perfusion_apparatus.length; i++) {
  1029. if (perfusion_apparatus[i].id == val) {
  1030. perfusion_apparatus_name = perfusion_apparatus[i].name
  1031. }
  1032. }
  1033. return perfusion_apparatus_name
  1034. },
  1035. GetReplacementWayById: function (val) {
  1036. let replacement_ways_name = ''
  1037. let replacement_ways = this.replacementWays
  1038. for (let i = 0; i < replacement_ways.length; i++) {
  1039. if (replacement_ways[i].id == val) {
  1040. replacement_ways_name = replacement_ways[i].name
  1041. }
  1042. }
  1043. return replacement_ways_name
  1044. },
  1045. GetAnticoagulantById: function (val) {
  1046. let anticoagulan_name = ''
  1047. let anticoagulant = this.anticoagulantsConfit
  1048. for (let keys in anticoagulant) {
  1049. if (anticoagulant[keys].id == val) {
  1050. anticoagulan_name = anticoagulant[keys].name
  1051. }
  1052. }
  1053. return anticoagulan_name
  1054. },
  1055. commitInfo: function () {
  1056. if(this.dialysisPrescription.anticoagulant == 1){
  1057. this.dialysisPrescription.anticoagulant_weichi = '0'
  1058. this.dialysisPrescription.anticoagulant_shouji = '0'
  1059. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1060. }
  1061. if (this.$store.getters.user.template_info.template_id == 6) {
  1062. if (this.dialysisPrescription.mode_id == 2) {
  1063. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1064. Toast.fail('HDF模式下置换方式和置换液总量不能为空!')
  1065. return
  1066. }
  1067. }
  1068. }
  1069. this.is_pre = 1
  1070. if (this.prescription_prop.id == '') {
  1071. if (this.is_open == 0) {
  1072. Toast.loading({forbidClick: true, duration: 0})
  1073. let ParamsQuery = this.dialysisPrescription
  1074. ParamsQuery['patient'] = this.$route.query.patient_id
  1075. ParamsQuery['record_date'] = this.record_date
  1076. commitDialysisPrescription(ParamsQuery).then(response => {
  1077. if (response.data.state == 0) {
  1078. Toast.fail(response.data.msg)
  1079. return false
  1080. } else {
  1081. Toast.success('提交成功')
  1082. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1083. this.finish()
  1084. }
  1085. })
  1086. } else if (this.is_open == 1) {
  1087. if (this.targetAdvices.length > 0) {
  1088. //弹框推送提醒
  1089. this.advicePropForm.list = this.targetAdvices
  1090. this.advicePropForm.operators = this.admin_users_prop
  1091. this.advice_visibility = true
  1092. this.isShowDialog = false
  1093. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1094. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1095. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1096. }
  1097. }
  1098. } else {
  1099. Toast.loading({forbidClick: true, duration: 0})
  1100. let ParamsQuery = this.dialysisPrescription
  1101. ParamsQuery['patient'] = this.$route.query.patient_id
  1102. ParamsQuery['record_date'] = this.record_date
  1103. commitDialysisPrescription(ParamsQuery).then(response => {
  1104. if (response.data.state == 0) {
  1105. Toast.fail(response.data.msg)
  1106. return false
  1107. } else {
  1108. Toast.success('提交成功')
  1109. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1110. this.finish()
  1111. }
  1112. })
  1113. }
  1114. } else if (this.is_open == 2) {
  1115. if (this.waitUploadAdvices.length > 0) {
  1116. Toast.loading({forbidClick: true, duration: 0})
  1117. let ParamsQuery = this.dialysisPrescription
  1118. ParamsQuery['patient'] = this.$route.query.patient_id
  1119. ParamsQuery['record_date'] = this.record_date
  1120. commitDialysisPrescription(ParamsQuery).then(response => {
  1121. if (response.data.state == 0) {
  1122. Toast.fail(response.data.msg)
  1123. return false
  1124. } else {
  1125. Toast.success('提交成功')
  1126. var date = new Date();
  1127. var year = date.getFullYear();
  1128. var month = date.getMonth() + 1;
  1129. var day = date.getDate();
  1130. var hours = date.getHours();
  1131. var minites = date.getMinutes();
  1132. if (month < 10) {
  1133. month = "0" + month;
  1134. }
  1135. if (day < 10) {
  1136. day = "0" + day;
  1137. }
  1138. if (hours < 10) {
  1139. hours = "0" + hours;
  1140. }
  1141. if (minites < 10) {
  1142. minites = "0" + minites;
  1143. }
  1144. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1145. let params = {
  1146. advices: this.waitUploadAdvices,
  1147. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1148. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1149. advice_type: this.waitUploadAdvices[0].advice_type,
  1150. parent_id: this.$route.query.patient_id,
  1151. start_time: nowDate,
  1152. remark: '',
  1153. }
  1154. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1155. var resp = rs.data
  1156. if (resp.state == 1) {
  1157. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1158. } else {
  1159. }
  1160. })
  1161. this.finish()
  1162. }
  1163. })
  1164. } else {
  1165. Toast.loading({forbidClick: true, duration: 0})
  1166. let ParamsQuery = this.dialysisPrescription
  1167. ParamsQuery['patient'] = this.$route.query.patient_id
  1168. ParamsQuery['record_date'] = this.record_date
  1169. commitDialysisPrescription(ParamsQuery).then(response => {
  1170. if (response.data.state == 0) {
  1171. Toast.fail(response.data.msg)
  1172. return false
  1173. } else {
  1174. this.advice_visibility = false
  1175. Toast.success('提交成功')
  1176. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1177. this.finish()
  1178. }
  1179. })
  1180. }
  1181. }
  1182. } else {
  1183. if (this.prescription_prop.creater == 0) {
  1184. if (this.is_open == 0) {
  1185. Toast.loading({forbidClick: true, duration: 0})
  1186. let ParamsQuery = this.dialysisPrescription
  1187. ParamsQuery['patient'] = this.$route.query.patient_id
  1188. ParamsQuery['record_date'] = this.record_date
  1189. commitDialysisPrescription(ParamsQuery).then(response => {
  1190. if (response.data.state == 0) {
  1191. Toast.fail(response.data.msg)
  1192. return false
  1193. } else {
  1194. Toast.success('提交成功')
  1195. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1196. this.finish()
  1197. }
  1198. })
  1199. } else if (this.is_open == 1) {
  1200. if (this.targetAdvices.length > 0) {
  1201. //弹框推送提醒
  1202. this.advicePropForm.list = this.targetAdvices
  1203. this.advicePropForm.operators = this.admin_users_prop
  1204. this.advice_visibility = true
  1205. this.isShowDialog = false
  1206. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1207. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1208. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1209. }
  1210. }
  1211. } else {
  1212. Toast.loading({forbidClick: true, duration: 0})
  1213. let ParamsQuery = this.dialysisPrescription
  1214. ParamsQuery['patient'] = this.$route.query.patient_id
  1215. ParamsQuery['record_date'] = this.record_date
  1216. commitDialysisPrescription(ParamsQuery).then(response => {
  1217. if (response.data.state == 0) {
  1218. Toast.fail(response.data.msg)
  1219. return false
  1220. } else {
  1221. Toast.success('提交成功')
  1222. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1223. this.finish()
  1224. }
  1225. })
  1226. }
  1227. } else if (this.is_open == 2) {
  1228. if (this.waitUploadAdvices.length > 0) {
  1229. Toast.loading({forbidClick: true, duration: 0})
  1230. let ParamsQuery = this.dialysisPrescription
  1231. ParamsQuery['patient'] = this.$route.query.patient_id
  1232. ParamsQuery['record_date'] = this.record_date
  1233. commitDialysisPrescription(ParamsQuery).then(response => {
  1234. if (response.data.state == 0) {
  1235. Toast.fail(response.data.msg)
  1236. return false
  1237. } else {
  1238. var date = new Date();
  1239. var year = date.getFullYear();
  1240. var month = date.getMonth() + 1;
  1241. var day = date.getDate();
  1242. var hours = date.getHours();
  1243. var minites = date.getMinutes();
  1244. if (month < 10) {
  1245. month = "0" + month;
  1246. }
  1247. if (day < 10) {
  1248. day = "0" + day;
  1249. }
  1250. if (hours < 10) {
  1251. hours = "0" + hours;
  1252. }
  1253. if (minites < 10) {
  1254. minites = "0" + minites;
  1255. }
  1256. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1257. let params = {
  1258. advices: this.waitUploadAdvices,
  1259. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1260. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1261. advice_type: this.waitUploadAdvices[0].advice_type,
  1262. parent_id: this.$route.query.patient_id,
  1263. start_time: nowDate,
  1264. remark: '',
  1265. }
  1266. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1267. var resp = rs.data
  1268. if (resp.state == 1) {
  1269. this.doctorAdvices = resp.data.advices
  1270. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1271. } else {
  1272. }
  1273. })
  1274. Toast.success('提交成功')
  1275. this.finish()
  1276. }
  1277. })
  1278. } else {
  1279. Toast.loading({forbidClick: true, duration: 0})
  1280. let ParamsQuery = this.dialysisPrescription
  1281. ParamsQuery['patient'] = this.$route.query.patient_id
  1282. ParamsQuery['record_date'] = this.record_date
  1283. commitDialysisPrescription(ParamsQuery).then(response => {
  1284. if (response.data.state == 0) {
  1285. Toast.fail(response.data.msg)
  1286. return false
  1287. } else {
  1288. Toast.success('提交成功')
  1289. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1290. this.finish()
  1291. }
  1292. })
  1293. }
  1294. }
  1295. } else {
  1296. Toast.loading({forbidClick: true, duration: 0})
  1297. let ParamsQuery = this.dialysisPrescription
  1298. ParamsQuery['patient'] = this.$route.query.patient_id
  1299. ParamsQuery['record_date'] = this.record_date
  1300. commitDialysisPrescription(ParamsQuery).then(response => {
  1301. if (response.data.state == 0) {
  1302. Toast.fail(response.data.msg)
  1303. return false
  1304. } else {
  1305. Toast.success('提交成功')
  1306. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1307. this.finish()
  1308. }
  1309. })
  1310. }
  1311. }
  1312. }, commitSolutionInfo: function () {
  1313. if (this.$store.getters.user.template_info.template_id == 6) {
  1314. if (this.dialysisPrescription.mode_id == 2) {
  1315. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1316. Toast.fail('HDF模式下置换方式和置换液总量不能为空!')
  1317. return
  1318. }
  1319. }
  1320. }
  1321. this.is_pre = 2
  1322. if (this.prescription_prop.id == '') {
  1323. if (this.is_open == 0) {
  1324. Toast.loading({forbidClick: true, duration: 0})
  1325. let ParamsQuery = this.dialysisPrescription
  1326. ParamsQuery['patient'] = this.$route.query.patient_id
  1327. ParamsQuery['record_date'] = this.record_date
  1328. postSolution(ParamsQuery).then(response => {
  1329. if (response.data.state == 0) {
  1330. Toast.fail(response.data.msg)
  1331. return false
  1332. } else {
  1333. Toast.success('提交成功')
  1334. this.$emit('advice')
  1335. this.$emit('longSolution', response.data.data.solution)
  1336. this.$emit('prescription', response.data.data.prescription)
  1337. this.finish()
  1338. }
  1339. })
  1340. } else if (this.is_open == 1) {
  1341. if (this.targetAdvices.length > 0) {
  1342. //弹框推送提醒
  1343. this.advicePropForm.list = this.targetAdvices
  1344. this.advicePropForm.operators = this.admin_users_prop
  1345. this.advice_visibility = true
  1346. this.isShowDialog = false
  1347. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1348. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1349. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1350. }
  1351. }
  1352. } else {
  1353. Toast.loading({forbidClick: true, duration: 0})
  1354. let ParamsQuery = this.dialysisPrescription
  1355. ParamsQuery['patient'] = this.$route.query.patient_id
  1356. ParamsQuery['record_date'] = this.record_date
  1357. postSolution(ParamsQuery).then(response => {
  1358. if (response.data.state == 0) {
  1359. Toast.fail(response.data.msg)
  1360. return false
  1361. } else {
  1362. Toast.success('提交成功')
  1363. this.$emit('advice')
  1364. this.$emit('longSolution', response.data.data.solution)
  1365. this.$emit('prescription', response.data.data.prescription)
  1366. this.finish()
  1367. }
  1368. })
  1369. }
  1370. } else if (this.is_open == 2) {
  1371. if (this.waitUploadAdvices.length > 0) {
  1372. Toast.loading({forbidClick: true, duration: 0})
  1373. let ParamsQuery = this.dialysisPrescription
  1374. ParamsQuery['patient'] = this.$route.query.patient_id
  1375. ParamsQuery['record_date'] = this.record_date
  1376. postSolution(ParamsQuery).then(response => {
  1377. if (response.data.state == 0) {
  1378. Toast.fail(response.data.msg)
  1379. return false
  1380. } else {
  1381. Toast.success('提交成功')
  1382. var date = new Date();
  1383. var year = date.getFullYear();
  1384. var month = date.getMonth() + 1;
  1385. var day = date.getDate();
  1386. var hours = date.getHours();
  1387. var minites = date.getMinutes();
  1388. if (month < 10) {
  1389. month = "0" + month;
  1390. }
  1391. if (day < 10) {
  1392. day = "0" + day;
  1393. }
  1394. if (hours < 10) {
  1395. hours = "0" + hours;
  1396. }
  1397. if (minites < 10) {
  1398. minites = "0" + minites;
  1399. }
  1400. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1401. let params = {
  1402. advices: this.waitUploadAdvices,
  1403. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1404. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1405. advice_type: this.waitUploadAdvices[0].advice_type,
  1406. parent_id: this.$route.query.patient_id,
  1407. start_time: nowDate,
  1408. remark: '',
  1409. }
  1410. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1411. var resp = rs.data
  1412. if (resp.state == 1) {
  1413. this.doctorAdvices = resp.data.advices
  1414. this.$emit('longSolution', response.data.data.solution, resp.data.advices)
  1415. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1416. } else {
  1417. }
  1418. })
  1419. this.finish()
  1420. }
  1421. })
  1422. } else {
  1423. Toast.loading({forbidClick: true, duration: 0})
  1424. let ParamsQuery = this.dialysisPrescription
  1425. ParamsQuery['patient'] = this.$route.query.patient_id
  1426. ParamsQuery['record_date'] = this.record_date
  1427. postSolution(ParamsQuery).then(response => {
  1428. if (response.data.state == 0) {
  1429. Toast.fail(response.data.msg)
  1430. return false
  1431. } else {
  1432. Toast.success('提交成功')
  1433. this.$emit('longSolution', response.data.data.solution)
  1434. this.$emit('prescription', response.data.data.prescription)
  1435. this.finish()
  1436. }
  1437. })
  1438. }
  1439. }
  1440. } else {
  1441. if (this.prescription_prop.creater == 0) {
  1442. if (this.is_open == 0) {
  1443. Toast.loading({forbidClick: true, duration: 0})
  1444. let ParamsQuery = this.dialysisPrescription
  1445. ParamsQuery['patient'] = this.$route.query.patient_id
  1446. ParamsQuery['record_date'] = this.record_date
  1447. postSolution(ParamsQuery).then(response => {
  1448. if (response.data.state == 0) {
  1449. Toast.fail(response.data.msg)
  1450. return false
  1451. } else {
  1452. Toast.success('提交成功')
  1453. this.$emit('longSolution', response.data.data.solution)
  1454. this.$emit('prescription', response.data.data.prescription)
  1455. this.finish()
  1456. }
  1457. })
  1458. } else if (this.is_open == 1) {
  1459. if (this.targetAdvices.length > 0) {
  1460. //弹框推送提醒
  1461. this.advicePropForm.list = this.targetAdvices
  1462. this.advicePropForm.operators = this.admin_users_prop
  1463. this.advice_visibility = true
  1464. this.isShowDialog = false
  1465. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1466. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1467. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1468. }
  1469. }
  1470. } else {
  1471. Toast.loading({forbidClick: true, duration: 0})
  1472. let ParamsQuery = this.dialysisPrescription
  1473. ParamsQuery['patient'] = this.$route.query.patient_id
  1474. ParamsQuery['record_date'] = this.record_date
  1475. postSolution(ParamsQuery).then(response => {
  1476. if (response.data.state == 0) {
  1477. Toast.fail(response.data.msg)
  1478. return false
  1479. } else {
  1480. Toast.success('提交成功')
  1481. this.$emit('longSolution', response.data.data.solution)
  1482. this.$emit('prescription', response.data.data.prescription)
  1483. this.finish()
  1484. }
  1485. })
  1486. }
  1487. } else if (this.is_open == 2) {
  1488. if (this.waitUploadAdvices.length > 0) {
  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. postSolution(ParamsQuery).then(response => {
  1494. if (response.data.state == 0) {
  1495. Toast.fail(response.data.msg)
  1496. return false
  1497. } else {
  1498. this.advice_visibility = false
  1499. var date = new Date();
  1500. var year = date.getFullYear();
  1501. var month = date.getMonth() + 1;
  1502. var day = date.getDate();
  1503. var hours = date.getHours();
  1504. var minites = date.getMinutes();
  1505. if (month < 10) {
  1506. month = "0" + month;
  1507. }
  1508. if (day < 10) {
  1509. day = "0" + day;
  1510. }
  1511. if (hours < 10) {
  1512. hours = "0" + hours;
  1513. }
  1514. if (minites < 10) {
  1515. minites = "0" + minites;
  1516. }
  1517. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1518. let params = {
  1519. advices: this.waitUploadAdvices,
  1520. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1521. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1522. advice_type: this.waitUploadAdvices[0].advice_type,
  1523. parent_id: this.$route.query.patient_id,
  1524. start_time: nowDate,
  1525. remark: '',
  1526. }
  1527. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1528. var resp = rs.data
  1529. if (resp.state == 1) {
  1530. this.doctorAdvices = resp.data.advices
  1531. this.$emit('longSolution', response.data.data.solution,resp.data.advices)
  1532. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  1533. } else {
  1534. }
  1535. })
  1536. Toast.success('提交成功')
  1537. this.finish()
  1538. }
  1539. })
  1540. } else {
  1541. Toast.loading({forbidClick: true, duration: 0})
  1542. let ParamsQuery = this.dialysisPrescription
  1543. ParamsQuery['patient'] = this.$route.query.patient_id
  1544. ParamsQuery['record_date'] = this.record_date
  1545. postSolution(ParamsQuery).then(response => {
  1546. if (response.data.state == 0) {
  1547. Toast.fail(response.data.msg)
  1548. return false
  1549. } else {
  1550. Toast.success('提交成功')
  1551. this.$emit('advice')
  1552. this.$emit('longSolution', response.data.data.solution)
  1553. this.$emit('prescription', response.data.data.prescription)
  1554. this.finish()
  1555. }
  1556. })
  1557. }
  1558. }
  1559. } else {
  1560. Toast.loading({forbidClick: true, duration: 0})
  1561. let ParamsQuery = this.dialysisPrescription
  1562. ParamsQuery['patient'] = this.$route.query.patient_id
  1563. ParamsQuery['record_date'] = this.record_date
  1564. postSolution(ParamsQuery).then(response => {
  1565. if (response.data.state == 0) {
  1566. Toast.fail(response.data.msg)
  1567. return false
  1568. } else {
  1569. Toast.success('提交成功')
  1570. this.$emit('longSolution', response.data.data.solution)
  1571. this.$emit('prescription', response.data.data.prescription)
  1572. this.finish()
  1573. }
  1574. })
  1575. }
  1576. }
  1577. }, finish: function () {
  1578. this.$emit('finish')
  1579. }, close: function () {
  1580. this.$emit('close')
  1581. }, open: function () {
  1582. this.isShowDialog = true
  1583. this.visibility = false
  1584. this.$refs.picker.close()
  1585. var dialogTop = document.querySelector('#dialogTop')
  1586. if (dialogTop != null) {
  1587. this.$nextTick(() => {
  1588. dialogTop.scrollTop = 0
  1589. })
  1590. }
  1591. }, sign: function () {
  1592. let params = {
  1593. patient_id: this.$route.query.patient_id,
  1594. date: this.record_date,
  1595. }
  1596. postSign(params).then(response => {
  1597. if (response.data.state == 0) {
  1598. Toast.fail(response.data.msg)
  1599. return false
  1600. } else {
  1601. this.isShowDesc = false
  1602. this.isShowDoctorSign = true
  1603. this.dialysisPrescription.prescription_doctor = response.data.data.doctor_id
  1604. for (let i = 0; i < this.operators.length; i++) {
  1605. if (this.operators[i].creator == response.data.data.doctor_id) {
  1606. console.log(this.operators[i].url)
  1607. this.signUrl = this.operators[i].url
  1608. }
  1609. }
  1610. Toast.success('签名成功')
  1611. }
  1612. })
  1613. }, getBodyFluid: function (val) {
  1614. let body_fluid_name = ''
  1615. let body_fluid = this.bodyFluidOptions
  1616. for (let i = 0; i < body_fluid.length; i++) {
  1617. if (body_fluid[i].id == val) {
  1618. body_fluid_name = body_fluid[i].name
  1619. }
  1620. }
  1621. return body_fluid_name
  1622. }, getSpecialMedicine: function (val) {
  1623. let special_medicine_name = ''
  1624. let special_medicine = this.specialMedicineOptions
  1625. for (let i = 0; i < special_medicine.length; i++) {
  1626. if (special_medicine[i].id == val) {
  1627. special_medicine_name = special_medicine[i].name
  1628. }
  1629. }
  1630. return special_medicine_name
  1631. }, getDisplaceLiquiPart: function (val) {
  1632. let displace_liqui_part_name = ''
  1633. let displace_liqui_part = this.displaceLiquiPartOptions
  1634. for (let i = 0; i < displace_liqui_part.length; i++) {
  1635. if (displace_liqui_part[i].id == val) {
  1636. displace_liqui_part_name = displace_liqui_part[i].name
  1637. }
  1638. }
  1639. return displace_liqui_part_name
  1640. }, getBloodAccess: function (val) {
  1641. let blood_access_name = ''
  1642. let blood_access = this.bloodAccessOptions
  1643. for (let i = 0; i < blood_access.length; i++) {
  1644. if (blood_access[i].id == val) {
  1645. blood_access_name = blood_access[i].name
  1646. }
  1647. }
  1648. return blood_access_name
  1649. }, menuEmpty: function (val) {
  1650. this.visibility = false
  1651. this.isShowDialog = true
  1652. switch (val.type) {
  1653. case 1:
  1654. this.dialysisPrescription.mode_id = ''
  1655. break
  1656. case 2:
  1657. this.dialysisPrescription.dialyzer = ''
  1658. break
  1659. case 3:
  1660. this.dialysisPrescription.perfusion_apparatus = ''
  1661. break
  1662. case 4:
  1663. this.dialysisPrescription.replacement_way = ''
  1664. break
  1665. case 5:
  1666. this.anticoagulant = ''
  1667. break
  1668. case 6:
  1669. this.dialysisPrescription.dialysate_formulation = ''
  1670. break
  1671. case 7:
  1672. this.dialysisPrescription.body_fluid = ''
  1673. break
  1674. case 8:
  1675. this.dialysisPrescription.special_medicine = ''
  1676. break
  1677. case 9:
  1678. this.dialysisPrescription.displace_liqui_part = ''
  1679. break
  1680. case 10:
  1681. this.dialysisPrescription.blood_access = ''
  1682. break
  1683. }
  1684. }, getFloat: function (x) {
  1685. if (x != '.') {
  1686. var f = Math.round(x * 100) / 100
  1687. var s = f.toString()
  1688. var rs = s.indexOf('.')
  1689. if (rs <= 0) {
  1690. rs = s.length
  1691. s += '.'
  1692. }
  1693. while (s.length <= rs + 1) {
  1694. s += '0'
  1695. }
  1696. return s
  1697. } else {
  1698. return '0.0'
  1699. }
  1700. }, dialysisGoodsClick: function () {
  1701. this.isShowDialog = false
  1702. this.is_show = true
  1703. }, menuCancleTwo: function () {
  1704. this.isShowDialog = true
  1705. this.is_show = false
  1706. }, menuComfirmTwo: function (dialysisPrescription) {
  1707. this.isShowDialog = true
  1708. this.is_show = false
  1709. this.dialysisPrescription.niprocart = dialysisPrescription.niprocart
  1710. this.dialysisPrescription.jms = dialysisPrescription.jms
  1711. this.dialysisPrescription.fistula_needle_set = dialysisPrescription.fistula_needle_set
  1712. this.dialysisPrescription.fistula_needle_set_16 = dialysisPrescription.fistula_needle_set_16
  1713. this.dialysisPrescription.hemoperfusion = dialysisPrescription.hemoperfusion
  1714. this.dialysisPrescription.dialyser_sterilised = dialysisPrescription.dialyser_sterilised
  1715. this.dialysisPrescription.filtryzer = dialysisPrescription.filtryzer
  1716. this.dialysisPrescription.dialyzers = dialysisPrescription.dialyzers
  1717. this.dialysisPrescription.injector = dialysisPrescription.injector
  1718. this.dialysisPrescription.bloodlines = dialysisPrescription.bloodlines
  1719. this.dialysisPrescription.tubing_hemodialysis = dialysisPrescription.tubing_hemodialysis
  1720. this.dialysisPrescription.package = dialysisPrescription.package
  1721. this.dialysisPrescription.a_liquid = dialysisPrescription.a_liquid
  1722. }
  1723. },
  1724. created () {
  1725. this.template_id = this.$store.getters.user.template_info.template_id
  1726. if (this.$store.getters.user.user.user_type == 2) {
  1727. this.isShowSign = true
  1728. }
  1729. this.modeOption = this.$store.getters.treatment_mode
  1730. delete this.modeOption['0']
  1731. var perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
  1732. this.perfusion_apparatus = perfusion_apparatus
  1733. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1734. this.bodyFluidOptions = this.$store.getters.body_fluid
  1735. this.specialMedicineOptions = this.$store.getters.special_medicine
  1736. this.displaceLiquiPartOptions = this.$store.getters.displace_liqui
  1737. this.bloodAccessOptions = this.$store.getters.blood_access
  1738. this.dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
  1739. this.replacementWays = getDataConfig('hemodialysis', 'replacement_ways')
  1740. this.patient = this.patient_prop
  1741. if (this.prescription_prop != null && typeof (this.prescription_prop.id) != 'undefined' && this.prescription_prop.id > 0) {
  1742. for (const key in this.prescription_prop) {
  1743. this.dialysisPrescription[key] = this.prescription_prop[key]
  1744. }
  1745. } else if (this.solution_prop != null && typeof this.solution_prop.id != 'undefined' && this.solution_prop.id) {
  1746. for (const key in this.solution_prop) {
  1747. if(key != "target_ultrafiltration") {
  1748. this.dialysisPrescription[key] = this.solution_prop[key]
  1749. }
  1750. }
  1751. } else if (this.last_prescription != null && typeof this.last_prescription.id != 'undefined' && this.last_prescription.id) {
  1752. for (const key in this.last_prescription) {
  1753. if(key != "target_ultrafiltration") {
  1754. this.dialysisPrescription[key] = this.last_prescription[key]
  1755. }
  1756. }
  1757. } else {
  1758. this.dialysisPrescription.mode_id = this.schedual.mode_id
  1759. }
  1760. if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
  1761. this.timeValue = ''
  1762. this.time = '03:00'
  1763. } else {
  1764. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  1765. 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)
  1766. }
  1767. this.dialyserList = this.machines_prop
  1768. // this.doctor = this.$store.getters.user.user.user_type;
  1769. var date = this.$route.query && this.$route.query.date
  1770. date *= 1000
  1771. var newDate = new Date(date)
  1772. var y = newDate.getFullYear()
  1773. var m = newDate.getMonth() + 1
  1774. var d = newDate.getDate()
  1775. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  1776. newDate = new Date()
  1777. y = newDate.getFullYear()
  1778. m = newDate.getMonth() + 1
  1779. d = newDate.getDate()
  1780. }
  1781. this.record_date =
  1782. y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
  1783. // this.patient.id = this.patient_prop.id
  1784. if (this.dialysisPrescription.prescription_doctor == '') {
  1785. this.isShowDesc = true
  1786. this.isShowDoctorSign = false
  1787. } else {
  1788. this.isShowDesc = false
  1789. this.isShowDoctorSign = true
  1790. for (let i = 0; i < this.operators.length; i++) {
  1791. if (this.operators[i].creator == this.dialysisPrescription.prescription_doctor) {
  1792. this.signUrl = this.operators[i].url
  1793. }
  1794. }
  1795. }
  1796. this.dialysisPrescription.kalium = this.getFloat(this.dialysisPrescription.kalium)
  1797. this.dialysisPrescription.sodium = this.getFloat(this.dialysisPrescription.sodium)
  1798. this.dialysisPrescription.calcium = this.getFloat(this.dialysisPrescription.calcium)
  1799. this.dialysisPrescription.ultrafiltration = this.getFloat(this.dialysisPrescription.ultrafiltration)
  1800. this.dialysisPrescription.target_ultrafiltration = this.getFloat(this.dialysisPrescription.target_ultrafiltration)
  1801. if(this.dialysisPrescription.anticoagulant_shouji == ''){
  1802. this.dialysisPrescription.anticoagulant_shouji = '0'
  1803. }
  1804. if(this.dialysisPrescription.anticoagulant_weichi == ''){
  1805. this.dialysisPrescription.anticoagulant_weichi = '0'
  1806. }
  1807. if(this.dialysisPrescription.anticoagulant_zongliang == ''){
  1808. this.dialysisPrescription.anticoagulant_weichi = '0'
  1809. }
  1810. },
  1811. components: {
  1812. LongAdviceSubMenu,
  1813. MultipleSubMenu,
  1814. MsgTip,
  1815. // MultipleSubMenu,
  1816. CheckBoxSubMenu
  1817. },
  1818. watch: {
  1819. "dialysisPrescription.dialysis_duration":function(){
  1820. console.log(this.dialysisPrescription.dialysis_duration)
  1821. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1822. this.dialysisPrescription.anticoagulant_shouji,
  1823. this.dialysisPrescription.dialysis_duration,
  1824. this.dialysisPrescription.anticoagulant_weichi
  1825. );
  1826. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1827. this.dialysisPrescription.anticoagulant_zongliang = ''
  1828. }
  1829. },
  1830. "dialysisPrescription.anticoagulant_shouji":function(){
  1831. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1832. this.dialysisPrescription.anticoagulant_shouji,
  1833. this.dialysisPrescription.dialysis_duration,
  1834. this.dialysisPrescription.anticoagulant_weichi
  1835. );
  1836. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1837. this.dialysisPrescription.anticoagulant_zongliang = ''
  1838. }
  1839. },
  1840. "dialysisPrescription.anticoagulant_weichi":function(){
  1841. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1842. this.dialysisPrescription.anticoagulant_shouji,
  1843. this.dialysisPrescription.dialysis_duration,
  1844. this.dialysisPrescription.anticoagulant_weichi
  1845. );
  1846. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1847. this.dialysisPrescription.anticoagulant_zongliang = ''
  1848. }
  1849. },
  1850. isShowDialog (val) {
  1851. if (val) {
  1852. this.advice_visibility = false
  1853. }
  1854. }
  1855. }
  1856. }
  1857. </script>
  1858. <style style="stylesheet/scss" lang="scss" scoped>
  1859. .DialogContent {
  1860. // padding-bottom:2rem !important;
  1861. .textarea {
  1862. width: 100%;
  1863. height: 2.4rem;
  1864. line-height: 0.6rem;
  1865. color: $pgh-color;
  1866. font-size: 0.45rem;
  1867. padding-left: 0.36rem;
  1868. border: none;
  1869. border-bottom: 1px #e5e5e5 solid;
  1870. }
  1871. }
  1872. .newButton{
  1873. background: #258ffc;
  1874. padding: 0 0.2rem;
  1875. height: 0.85rem;
  1876. line-height: 0.85rem;
  1877. border-radius:5px;
  1878. color: #fff;
  1879. margin-right: -3.5rem;
  1880. }
  1881. .newName{
  1882. margin-right: -3rem;
  1883. }
  1884. .newDialogContent{
  1885. display: flex;
  1886. flex-direction: column;
  1887. height: 100%;
  1888. overflow: hidden;
  1889. >:first-child{
  1890. flex: 1;
  1891. overflow: auto;
  1892. }
  1893. }
  1894. </style>