血透系统pad前端

PrescriptionDialog.vue 79KB

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