血透系统pad前端

PrescriptionDialog.vue 81KB

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