血透系统pad前端

PrescriptionDialog.vue 27KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  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. <span @click="commitInfo" class="success">完成</span>
  8. </div>
  9. <div class="DialogContent" id="dialogTop">
  10. <div @click="showSubMenu('mode')" class="item" ref="mode">
  11. <label class="name" for="txms">透析模式</label>
  12. <div class="content">
  13. <span class="text" id="txms">{{GetModeByModeId(dialysisPrescription.mode_id)}}</span>
  14. <span class="iconfont">&#xe6f9;</span>
  15. </div>
  16. </div>
  17. <div class="item" @click="openPicker">
  18. <label class="name" for="txsc">透析时长</label>
  19. <div class="content">
  20. <span class="text" style="width: 100px">{{timeValue}}</span>
  21. <span class="iconfont">&#xe6f9;</span>
  22. </div>
  23. </div>
  24. <div class="item">
  25. <label class="name" for="xll">血流量(ml/min)</label>
  26. <div class="content">
  27. <input type="tel" @focus="inputFocus" id="xll" v-model="dialysisPrescription.blood_flow_volume"/>
  28. </div>
  29. </div>
  30. <div class="item">
  31. <label class="name" for="mbcll">目标超滤量(ml)</label>
  32. <div class="content">
  33. <input type="tel" @focus="inputFocus" id="mbcll" v-model="dialysisPrescription.target_ultrafiltration"/>
  34. </div>
  35. </div>
  36. <div @click="showSubMenu('dialysate_formulation')" class="item" ref="dialysate_formulation">
  37. <label class="name" for="txypf">透析液配方</label>
  38. <div class="content">
  39. <span class="text"
  40. id="txypf">{{GetDialysateFormulationById(dialysisPrescription.dialysate_formulation)}}</span>
  41. <span class="iconfont">&#xe6f9;</span>
  42. </div>
  43. </div>
  44. <div @click="showSubMenu('anticoagulant')" class="item" ref="anticoagulant">
  45. <label class="name" for="knj">抗疑剂</label>
  46. <div class="content">
  47. <span class="text" id="knj">{{GetAnticoagulantById(dialysisPrescription.anticoagulant)}}</span>
  48. <span class="iconfont">&#xe6f9;</span>
  49. </div>
  50. </div>
  51. <div class="item" v-if="anticoagulant.shouji != -1">
  52. <label class="name" for="sj">首剂({{anticoagulant.shouji_unit}})</label>
  53. <div class="content">
  54. <input type="tel" @focus="inputFocus" id="sj" v-model="dialysisPrescription.anticoagulant_shouji"
  55. :disabled="anticoagulant.shouji==1?false:true"/>
  56. </div>
  57. </div>
  58. <div class="item" v-if="anticoagulant.weichi != -1">
  59. <label class="name" for="wz">维持({{anticoagulant.weichi_unit}})</label>
  60. <div class="content">
  61. <input type="tel" @focus="inputFocus" id="wz" class="inputBox"
  62. v-model="dialysisPrescription.anticoagulant_weichi"
  63. :disabled="anticoagulant.weichi==1?false:true">
  64. </div>
  65. </div>
  66. <div class="item" v-if="anticoagulant.zongliang != -1">
  67. <label class="name" for="zl">总量(mg)</label>
  68. <div class="content">
  69. <input type="tel" @focus="inputFocus" id="zl" class="inputBox"
  70. v-model="dialysisPrescription.anticoagulant_zongliang"
  71. :disabled="anticoagulant.zongliang==1?false:true">
  72. </div>
  73. </div>
  74. <div class="item" v-if="anticoagulant.gaimingcheng != -1">
  75. <label class="name" for="g">钙名称({{anticoagulant.gaimingcheng_unit}})</label>
  76. <div class="content">
  77. <input type="text" id="g" class="inputBox" v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  78. :disabled="anticoagulant.gaimingcheng==1?false:true">
  79. </div>
  80. </div>
  81. <div class="item" v-if="anticoagulant.gaijiliang != -1">
  82. <label class="name" for="gjl">钙剂量</label>
  83. <div class="content">
  84. <input type="text" id="gjl" class="inputBox" v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  85. :disabled="anticoagulant.gaimingcheng==1?false:true">
  86. </div>
  87. </div>
  88. <!-- <div class="item">
  89. <label class="name" for="gtz">干体重(kg)</label>
  90. <div class="content">
  91. <input type="tel" @focus="inputFocus" id="gtz" v-model="dialysisPrescription.dry_weight"/>
  92. </div>
  93. </div> -->
  94. <div class="line"></div>
  95. <div class="item">
  96. <label class="name" for="zhy">置换量(L)</label>
  97. <div class="content">
  98. <input type="tel" @focus="inputFocus" id="zhy" v-model="dialysisPrescription.replacement_total"/>
  99. </div>
  100. </div>
  101. <!-- <div class="line"></div> -->
  102. <div class="item">
  103. <label class="name" for="j">钾(mmol/L)</label>
  104. <div class="content">
  105. <input type="tel" @focus="inputFocus" id="j" v-model="dialysisPrescription.kalium"/>
  106. </div>
  107. </div>
  108. <div class="item">
  109. <label class="name" for="n">钠(mmol/L):</label>
  110. <div class="content">
  111. <input type="tel" @focus="inputFocus" id="n" v-model="dialysisPrescription.sodium"/>
  112. </div>
  113. </div>
  114. <div class="item">
  115. <label class="name" for="gg">钙(mmol/L)</label>
  116. <div class="content">
  117. <input type="tel" @focus="inputFocus" id="gg" v-model="dialysisPrescription.calcium"/>
  118. </div>
  119. </div>
  120. <div class="item">
  121. <label class="name" for="tsqy">碳酸氢盐(mmol/L)</label>
  122. <div class="content">
  123. <input type="tel" @focus="inputFocus" id="tsqy" v-model="dialysisPrescription.bicarbonate"/>
  124. </div>
  125. </div>
  126. <div class="item">
  127. <label class="name" for="ptt">葡萄糖(mmol/L)</label>
  128. <div class="content">
  129. <input type="tel" @focus="inputFocus" id="ptt" v-model="dialysisPrescription.glucose"/>
  130. </div>
  131. </div>
  132. <div class="line"></div>
  133. <div class="item">
  134. <label class="name" for="txyll">透析液流量(ml/min)</label>
  135. <div class="content">
  136. <input type="tel" @focus="inputFocus" id="txyll" v-model="dialysisPrescription.dialysate_flow"/>
  137. </div>
  138. </div>
  139. <div class="item">
  140. <label class="name" for="txywd">透析液温度(℃)</label>
  141. <div class="content">
  142. <!--<span class="text">HD</span>-->
  143. <!--<span class="iconfont">&#xe6f9;</span>-->
  144. <input type="tel" @focus="inputFocus" id="txywd" v-model="dialysisPrescription.dialysate_temperature"/>
  145. </div>
  146. </div>
  147. <div class="item">
  148. <label class="name" for="dtl">电导率(mS/cm)</label>
  149. <div class="content">
  150. <input type="tel" @focus="inputFocus" id="dtl" v-model="dialysisPrescription.conductivity"/>
  151. </div>
  152. </div>
  153. <div class="item">
  154. <label class="name" for="dtl">透析器/灌流器</label>
  155. <div class="content">
  156. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.dialyzer_perfusion_apparatus"/>
  157. </div>
  158. </div>
  159. <div class="item">
  160. <label class="name" for="dtl">医生签名</label>
  161. <div class="content">
  162. <div v-if="isShowDesc">医生尚未签名</div>
  163. <img v-if="isShowDoctorSign" style="width: 100px;height: 30px" :src="signUrl"
  164. alt="" srcset="">
  165. </div>
  166. </div>
  167. <div class="line"></div>
  168. <div>
  169. <div class="item">
  170. <label class="name" for="bz">备注</label>
  171. <div class="content">
  172. <span class="text"></span>
  173. </div>
  174. </div>
  175. <textarea class="textarea" id="bz" placeholder="请输入内容" v-model="dialysisPrescription.remark"
  176. @focus="lastInputFocus" @blur="lastInputBlur"></textarea>
  177. </div>
  178. <!--<div class="footer">-->
  179. <!--处方医生:刘小军 医生-->
  180. <!--</div>-->
  181. <div class="PrescSubmit">
  182. <button v-if="isShowSign" class="tj" @click="sign()">医生签名</button>
  183. <button class="tjcq" @click="commitSolutionInfo">保存并设为长期处方</button>
  184. <button class="tj" @click="commitInfo">保存</button>
  185. </div>
  186. </div>
  187. </div>
  188. <!--<two-menu title="二级菜单" v-show="isShowModeSubMenu"></two-menu>-->
  189. <check-box-sub-menu :visibility="visibility" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm"
  190. :propsForm="propForm"></check-box-sub-menu>
  191. <mt-datetime-picker
  192. ref="picker"
  193. type="time"
  194. hourFormat="{value}小时"
  195. minuteFormat="{value}分钟"
  196. @confirm="handleTimeConfirm"
  197. v-model="time">
  198. </mt-datetime-picker>
  199. </div>
  200. </template>
  201. <script>
  202. import CheckBoxSubMenu from "./subMenu/checkBoxSubMenu";
  203. import {commitDialysisPrescription, postSign, postSolution} from "@/api/dialysis";
  204. import {Toast} from 'vant';
  205. import {getDataConfig} from '@/utils/data';
  206. export default {
  207. name: "PrescriptionDialog",
  208. props: {
  209. patient_prop: {
  210. type: Object
  211. },
  212. solution_prop: {
  213. type: Object
  214. },
  215. operators:{
  216. type:Array,
  217. default: function () {
  218. return new Array();
  219. }
  220. },
  221. prescription_prop: {
  222. type: Object,
  223. },
  224. machines_prop: {
  225. type: Array,
  226. default: function () {
  227. return new Array();
  228. }
  229. }
  230. },
  231. data() {
  232. return {
  233. signUrl:"",
  234. isShowDesc:true,
  235. time: '03:00',
  236. timeValue: '',
  237. isShowSign: false,
  238. anticoagulantsConfit: {},
  239. dialysateFormulationOptions: [],
  240. perfusion_apparatus: {},
  241. replacementWays: [],
  242. dialyserList: [],
  243. modeOption: [],
  244. isShowDoctorBtn: true,
  245. isShowDoctorSign: false,
  246. visibility: false,
  247. isShowDialog: true,
  248. isShowModeSubMenu: false,
  249. dialysisPrescription: {
  250. mode_id: "",
  251. dialysis_duration: "",
  252. dialysis_duration_hour: "",
  253. dialysis_duration_minute: "",
  254. mode_name: "",
  255. dialyzer: "",
  256. perfusion_apparatus: "",
  257. blood_flow_volume: "",
  258. dewater_amount: "",
  259. displace_liqui: "",
  260. replacement_total: '',
  261. replacement_way: "",
  262. anticoagulant: "",
  263. anticoagulant_shouji: "",
  264. anticoagulant_weichi: "",
  265. anticoagulant_zongliang: "",
  266. anticoagulant_gaimingcheng: "",
  267. anticoagulant_gaijiliang: "",
  268. dialyzer_perfusion_apparatus:"",
  269. kalium: "",
  270. sodium: "",
  271. calcium: "",
  272. bicarbonate: "",
  273. glucose: "",
  274. prescription_doctor: "",
  275. // dry_weight: "",
  276. dialysate_flow: "",
  277. dialysate_temperature: "",
  278. target_ultrafiltration: "",
  279. dialysate_formulation: "",
  280. conductivity: "",
  281. doctor: "",
  282. remark: ""
  283. },
  284. anticoagulant: {
  285. id: 0,
  286. name: "",
  287. type: 1,
  288. shouji: 1,
  289. weichi: 1,
  290. zongliang: 1,
  291. gaimingcheng: -1,
  292. gaijiliang: -1,
  293. shouji_unit: "mg",
  294. weichi_unit: "mg/h",
  295. zongliang_unit: "mg",
  296. gaimingcheng_unit: "",
  297. gaijiliang_unit: ""
  298. },
  299. propForm: {
  300. title: "",
  301. list: [],
  302. optionList: [],
  303. isMultiple: 2,
  304. result: [], //选中的值
  305. type: 1, //用来区分不同子菜单,方便对返回值进行赋值
  306. selectId: 0
  307. }
  308. };
  309. },
  310. methods: {
  311. openPicker: function () {
  312. this.$refs.picker.open();
  313. },
  314. handleTimeConfirm: function (val) {
  315. val = val.replace("小时")
  316. val = val.replace("分钟")
  317. let timeArray = val.split(":")
  318. if (parseInt(timeArray[0].substring(0, 1)) == 0) {
  319. this.dialysisPrescription.dialysis_duration_hour = timeArray[0].charAt(timeArray[0].length - 1)
  320. } else {
  321. this.dialysisPrescription.dialysis_duration_hour = timeArray[0]
  322. }
  323. if (parseInt(timeArray[1].substring(0, 1)) == 0) {
  324. this.dialysisPrescription.dialysis_duration_minute = timeArray[1].charAt(timeArray[1].length - 1)
  325. } else {
  326. this.dialysisPrescription.dialysis_duration_minute = timeArray[1]
  327. }
  328. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + "小时" + this.dialysisPrescription.dialysis_duration_minute + "分钟"
  329. this.dialysisPrescription.dialysis_duration = this.dialysisPrescription.dialysis_duration_hour + "." + this.dialysisPrescription.dialysis_duration_minute
  330. },
  331. inputFocus: function (event) {
  332. var input = event.target
  333. setTimeout(function () {
  334. input.scrollIntoView()
  335. }, 0);
  336. if (input.setSelectionRange) {
  337. setTimeout(function () {
  338. input.setSelectionRange(0, input.value.length);
  339. }, 0);
  340. } else if (input.createTextRange) {
  341. var rng = input.createTextRange();
  342. rng.move('character', input.value.length);
  343. rng.select();
  344. }
  345. },
  346. lastInputFocus: function (event) {
  347. var input = event.target
  348. setTimeout(function () {
  349. input.style.marginBottom = "2rem"
  350. input.parentNode.scrollIntoView()
  351. }, 0);
  352. },
  353. lastInputBlur: function (event) {
  354. var input = event.target
  355. setTimeout(function () {
  356. input.style.marginBottom = ""
  357. }, 0);
  358. },
  359. showSubMenu: function (val) {
  360. switch (val) {
  361. case "mode":
  362. this.propForm.type = 1;
  363. this.isShowDialog = false;
  364. this.propForm.title = "透析模式";
  365. this.visibility = true;
  366. this.propForm.list = [];
  367. this.propForm.optionList = this.modeOption;
  368. this.propForm.isMultiple = 1;
  369. this.propForm.selectId = this.dialysisPrescription.mode_id;
  370. this.propForm.click_ref = "mode"
  371. break;
  372. case "dialyzer":
  373. this.propForm.type = 2;
  374. this.isShowDialog = false;
  375. this.propForm.title = "透析器";
  376. this.visibility = true;
  377. this.propForm.list = [];
  378. this.propForm.optionList = this.machines_prop;
  379. this.propForm.isMultiple = 1;
  380. this.propForm.selectId = this.dialysisPrescription.dialyzer;
  381. this.propForm.click_ref = "dialyzer"
  382. break;
  383. case "perfusion_apparatus":
  384. this.propForm.type = 3;
  385. this.isShowDialog = false;
  386. this.propForm.title = "灌流器";
  387. this.visibility = true;
  388. this.propForm.list = [];
  389. this.propForm.optionList = this.perfusion_apparatus;
  390. this.propForm.isMultiple = 1;
  391. this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus;
  392. this.propForm.click_ref = "perfusion_apparatus"
  393. break;
  394. case "replacement_way":
  395. this.propForm.type = 4;
  396. this.isShowDialog = false;
  397. this.propForm.title = "置换方式";
  398. this.visibility = true;
  399. this.propForm.list = [];
  400. this.propForm.optionList = this.replacementWays;
  401. this.propForm.isMultiple = 1;
  402. this.propForm.selectId = this.dialysisPrescription.replacement_way;
  403. this.propForm.click_ref = "replacement_way"
  404. break;
  405. case "anticoagulant":
  406. this.propForm.type = 5;
  407. this.isShowDialog = false;
  408. this.propForm.title = "抗疑剂";
  409. this.visibility = true;
  410. this.propForm.list = [];
  411. this.propForm.optionList = this.anticoagulantsConfit;
  412. this.propForm.isMultiple = 1;
  413. this.propForm.selectId = this.dialysisPrescription.anticoagulant;
  414. this.propForm.click_ref = "anticoagulant"
  415. break;
  416. case "dialysate_formulation":
  417. this.propForm.type = 6;
  418. this.isShowDialog = false;
  419. this.propForm.title = "透析液配方";
  420. this.visibility = true;
  421. this.propForm.list = [];
  422. this.propForm.optionList = this.dialysateFormulationOptions;
  423. this.propForm.isMultiple = 1;
  424. this.propForm.selectId = this.dialysisPrescription.dialysate_formulation;
  425. this.propForm.click_ref = "dialysate_formulation"
  426. break;
  427. }
  428. },
  429. menuCancle: function () {
  430. this.visibility = false;
  431. this.isShowDialog = true;
  432. this.$nextTick(() => {
  433. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  434. this.$refs[this.propForm.click_ref].scrollIntoView()
  435. }
  436. })
  437. },
  438. menuComfirm: function (val) {
  439. this.visibility = false;
  440. this.isShowDialog = true;
  441. this.$nextTick(() => {
  442. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  443. this.$refs[this.propForm.click_ref].scrollIntoView()
  444. }
  445. })
  446. switch (val.type) {
  447. case 1:
  448. this.dialysisPrescription.mode_id = val.selectId;
  449. break;
  450. case 2:
  451. this.dialysisPrescription.dialyzer = val.selectId;
  452. break;
  453. case 3:
  454. this.dialysisPrescription.perfusion_apparatus = val.selectId;
  455. break;
  456. case 4:
  457. this.dialysisPrescription.replacement_way = val.selectId;
  458. // this.$nextTick( () => {
  459. // this.$refs.replacement_way.scrollIntoView()
  460. // })
  461. break;
  462. case 5:
  463. this.dialysisPrescription.anticoagulant = val.selectId;
  464. if (typeof this.anticoagulantsConfit[val.selectId] == "undefined" || this.anticoagulantsConfit[val.selectId] == null) {
  465. return;
  466. }
  467. this.anticoagulant = this.anticoagulantsConfit[val.selectId];
  468. // this.$nextTick( () => {
  469. // this.$refs.anticoagulant.scrollIntoView()
  470. // })
  471. break;
  472. case 6:
  473. this.dialysisPrescription.dialysate_formulation = val.selectId;
  474. break;
  475. }
  476. },
  477. GetModeByModeId: function (val) {
  478. let treatment_mode_name = "";
  479. let treatment_mode = this.modeOption;
  480. for (let keys in treatment_mode) {
  481. if (treatment_mode[keys].id == val) {
  482. treatment_mode_name = treatment_mode[keys].name;
  483. }
  484. }
  485. return treatment_mode_name;
  486. },
  487. GetDialysateFormulationById: function (val) {
  488. let name = "";
  489. let dfl = this.dialysateFormulationOptions.length;
  490. for (let index = 0; index < dfl; index++) {
  491. if (this.dialysateFormulationOptions[index].id == val) {
  492. name = this.dialysateFormulationOptions[index].name;
  493. break;
  494. }
  495. }
  496. return name;
  497. },
  498. GetDialyzerById: function (val) {
  499. let dialyzer_name = "";
  500. let machines = this.machines_prop;
  501. for (let i = 0; i < machines.length; i++) {
  502. if (machines[i].id == val) {
  503. dialyzer_name = machines[i].name;
  504. }
  505. }
  506. return dialyzer_name;
  507. },
  508. GetPerfusionApparatusById: function (val) {
  509. let perfusion_apparatus_name = "";
  510. let perfusion_apparatus = this.perfusion_apparatus;
  511. for (let i = 0; i < perfusion_apparatus.length; i++) {
  512. if (perfusion_apparatus[i].id == val) {
  513. perfusion_apparatus_name = perfusion_apparatus[i].name;
  514. }
  515. }
  516. return perfusion_apparatus_name;
  517. },
  518. GetReplacementWayById: function (val) {
  519. let replacement_ways_name = "";
  520. let replacement_ways = this.replacementWays;
  521. for (let i = 0; i < replacement_ways.length; i++) {
  522. if (replacement_ways[i].id == val) {
  523. replacement_ways_name = replacement_ways[i].name;
  524. }
  525. }
  526. return replacement_ways_name;
  527. },
  528. GetAnticoagulantById: function (val) {
  529. let anticoagulan_name = "";
  530. let anticoagulant = this.anticoagulantsConfit;
  531. for (let keys in anticoagulant) {
  532. if (anticoagulant[keys].id == val) {
  533. anticoagulan_name = anticoagulant[keys].name;
  534. }
  535. }
  536. return anticoagulan_name;
  537. },
  538. commitInfo: function () {
  539. Toast.loading({forbidClick: true, duration: 0})
  540. let ParamsQuery = this.dialysisPrescription;
  541. ParamsQuery["patient"] = this.$route.query.patient_id;
  542. ParamsQuery["record_date"] = this.record_date;
  543. commitDialysisPrescription(ParamsQuery).then(response => {
  544. if (response.data.state == 0) {
  545. Toast.fail(response.data.msg);
  546. return false;
  547. } else {
  548. Toast.success("提交成功");
  549. this.$emit("prescription", response.data.data.prescription);
  550. for (const key in response.data.data.prescription) {
  551. this.prescription_prop[key] = response.data.data.prescription[key];
  552. }
  553. this.finish();
  554. }
  555. });
  556. }, commitSolutionInfo: function () {
  557. // plus.runtime.openURL("http://www.baidu.com");
  558. Toast.loading({forbidClick: true, duration: 0})
  559. let ParamsQuery = this.dialysisPrescription;
  560. ParamsQuery["patient"] = this.$route.query.patient_id;
  561. ParamsQuery["record_date"] = this.record_date;
  562. postSolution(ParamsQuery).then(response => {
  563. if (response.data.state == 0) {
  564. Toast.fail(response.data.msg);
  565. return false;
  566. } else {
  567. Toast.success("提交成功");
  568. for (const key in response.data.data.solution) {
  569. this.solution_prop[key] = response.data.data.solution[key];
  570. }
  571. for (const key in response.data.data.prescription) {
  572. this.prescription_prop[key] = response.data.data.prescription[key];
  573. }
  574. this.$emit("longSolution", response.data.data.solution);
  575. this.$emit("prescription", response.data.data.prescription);
  576. this.finish();
  577. }
  578. });
  579. }, finish: function () {
  580. this.$emit("finish")
  581. }, close: function () {
  582. this.$emit("close")
  583. }, open: function () {
  584. this.isShowDialog = true;
  585. this.visibility = false;
  586. this.$refs.picker.close();
  587. var dialogTop = document.querySelector('#dialogTop');
  588. if (dialogTop != null) {
  589. this.$nextTick(() => {
  590. dialogTop.scrollTop = 0;
  591. });
  592. }
  593. }, sign: function () {
  594. let params = {
  595. patient_id: this.$route.query.patient_id,
  596. date: this.record_date,
  597. }
  598. postSign(params).then(response => {
  599. if (response.data.state == 0) {
  600. Toast.fail(response.data.msg);
  601. return false;
  602. } else {
  603. this.isShowDesc = false
  604. this.isShowDoctorSign = true
  605. this.dialysisPrescription.prescription_doctor = response.data.data.doctor_id
  606. for(let i = 0; i < this.operators.length; i++){
  607. if(this.operators[i].creator == response.data.data.doctor_id){
  608. console.log(this.operators[i].url)
  609. this.signUrl = this.operators[i].url
  610. }
  611. }
  612. Toast.success("签名成功");
  613. }
  614. });
  615. }
  616. },
  617. created() {
  618. if (this.$store.getters.user.user.user_type == 2) {
  619. this.isShowSign = true;
  620. }
  621. this.modeOption = this.$store.getters.treatment_mode;
  622. delete this.modeOption['0']
  623. var perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
  624. this.perfusion_apparatus = perfusion_apparatus;
  625. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  626. this.dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation');
  627. this.replacementWays = getDataConfig('hemodialysis', 'replacement_ways');
  628. this.patient = this.patient_prop;
  629. if (this.prescription_prop != null && typeof (this.prescription_prop.id) != 'undefined' && this.prescription_prop.id > 0) {
  630. for (const key in this.prescription_prop) {
  631. this.dialysisPrescription[key] = this.prescription_prop[key];
  632. }
  633. } else if (this.solution_prop != null && typeof this.solution_prop.id != 'undefined' && this.solution_prop.id) {
  634. for (const key in this.solution_prop) {
  635. this.dialysisPrescription[key] = this.solution_prop[key];
  636. }
  637. }
  638. if (this.dialysisPrescription.dialysis_duration_hour == '' || this.dialysisPrescription.dialysis_duration_minute == '') {
  639. this.timeValue = '';
  640. this.time = '03:00';
  641. } else {
  642. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + "小时" + this.dialysisPrescription.dialysis_duration_minute + "分钟"
  643. 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)
  644. }
  645. this.dialyserList = this.machines_prop;
  646. // this.doctor = this.$store.getters.user.user.user_type;
  647. var date = this.$route.query && this.$route.query.date;
  648. date *= 1000;
  649. var newDate = new Date(date);
  650. var y = newDate.getFullYear();
  651. var m = newDate.getMonth() + 1;
  652. var d = newDate.getDate();
  653. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  654. newDate = new Date();
  655. y = newDate.getFullYear();
  656. m = newDate.getMonth() + 1;
  657. d = newDate.getDate();
  658. }
  659. this.record_date =
  660. y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  661. // this.patient.id = this.patient_prop.id
  662. if(this.dialysisPrescription.prescription_doctor == ''){
  663. this.isShowDesc = true
  664. this.isShowDoctorSign = false
  665. }else{
  666. this.isShowDesc = false
  667. this.isShowDoctorSign = true
  668. for(let i = 0; i < this.operators.length; i++){
  669. if(this.operators[i].creator == this.dialysisPrescription.prescription_doctor){
  670. this.signUrl = this.operators[i].url
  671. }
  672. }
  673. }
  674. },
  675. components: {
  676. CheckBoxSubMenu
  677. }
  678. };
  679. </script>
  680. <style style="stylesheet/scss" lang="scss" scoped>
  681. .DialogContent {
  682. // padding-bottom:2rem !important;
  683. .textarea {
  684. width: 100%;
  685. height: 2.4rem;
  686. line-height: 0.6rem;
  687. color: $pgh-color;
  688. font-size: 0.28rem;
  689. padding-left: 0.36rem;
  690. border: none;
  691. border-bottom: 1px #e5e5e5 solid;
  692. }
  693. }
  694. </style>