血透系统pad前端

PrescriptionDialog.vue 74KB

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