血透系统pad前端

PrescriptionDialog.vue 85KB

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