血透系统pad前端

PrescriptionDialog.vue 65KB

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