血透系统pad前端

LongDialog.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. <template>
  2. <div>
  3. <div class="Dialog" v-show="showObj.paden_show">
  4. <div class="DialogTit">
  5. <span class="iconfont" @click="$emit('closeLongDialog')">&#xe6e9;</span>
  6. <h1 class="name">长期处方</h1>
  7. <span @click="submitSolution" class="success">完成</span>
  8. </div>
  9. <div class="DialogContent">
  10. <div class="item" @click="showMenu(0)">
  11. <h2 class="name">透析模式</h2>
  12. <div class="content">
  13. <span class="text">{{dialysisSolution.mode_name}}</span>
  14. <span class="iconfont">&#xe6f9;</span>
  15. </div>
  16. </div>
  17. <div class="item">
  18. <h2 class="name">透析时长(h)</h2>
  19. <div class="content">
  20. <input type="number" v-model="dialysisSolution.dialysis_duration" />
  21. <!-- <span class="text">1</span> -->
  22. <!-- <span class="iconfont">&#xe6f9;</span> -->
  23. </div>
  24. </div>
  25. <div class="item" @click="showMenu(1)">
  26. <h2 class="name">透析器</h2>
  27. <div class="content">
  28. <span class="text">{{dialysisSolution.hemodialysis_machine_name}}</span>
  29. <span class="iconfont">&#xe6f9;</span>
  30. </div>
  31. </div>
  32. <div class="item">
  33. <h2 class="name">灌流器</h2>
  34. <div class="content" @click="showMenu(2)">
  35. <span class="text">{{dialysisSolution.perfusion_apparatus_name}}</span>
  36. <span class="iconfont">&#xe6f9;</span>
  37. </div>
  38. </div>
  39. <div class="item">
  40. <h2 class="name">血流量(ml/min)</h2>
  41. <div class="content">
  42. <input type="number" v-model="dialysisSolution.blood_flow_volume" />
  43. <!-- <span class="text">HD</span> -->
  44. <!-- <span class="iconfont">&#xe6f9;</span> -->
  45. </div>
  46. </div>
  47. <div class="item">
  48. <h2 class="name">脱水量(L)</h2>
  49. <div class="content">
  50. <input type="number" v-model="dialysisSolution.dewater" />
  51. <!-- <span class="text">HD</span> -->
  52. <!-- <span class="iconfont">&#xe6f9;</span> -->
  53. </div>
  54. </div>
  55. <div class="line"></div>
  56. <div class="item">
  57. <h2 class="name">置换液(L)</h2>
  58. <div class="content">
  59. <input type="number" v-model="dialysisSolution.displace_liqui" />
  60. <!-- <span class="text">HD</span> -->
  61. <!-- <span class="iconfont">&#xe6f9;</span> -->
  62. </div>
  63. </div>
  64. <div class="item">
  65. <h2 class="name">置换方式</h2>
  66. <div class="content" @click="showMenu(3)">
  67. <span class="text">{{dialysisSolution.replacement_way_name}}</span>
  68. <span class="iconfont">&#xe6f9;</span>
  69. </div>
  70. </div>
  71. <div class="item">
  72. <h2 class="name">抗疑剂</h2>
  73. <div class="content" @click="showMenu(4)">
  74. <span class="text">{{dialysisSolution.anticoagulant_name}}</span>
  75. <span class="iconfont">&#xe6f9;</span>
  76. </div>
  77. </div>
  78. <div class="item" v-show="anticoagulant.shouji != -1">
  79. <h2 class="name">首剂({{anticoagulant.shouji_unit}})</h2>
  80. <div class="content">
  81. <input
  82. type="text"
  83. v-model="dialysisSolution.anticoagulant_shouji"
  84. :disabled="anticoagulant.shouji==1?false:true"
  85. />
  86. </div>
  87. </div>
  88. <div class="item" v-show="anticoagulant.weichi != -1">
  89. <h2 class="name">维持({{anticoagulant.weichi_unit}})</h2>
  90. <div class="content">
  91. <input
  92. type="text"
  93. v-model="dialysisSolution.anticoagulant_weichi"
  94. :disabled="anticoagulant.weichi==1?false:true"
  95. />
  96. </div>
  97. </div>
  98. <div class="item" v-show="anticoagulant.zongliang != -1">
  99. <h2 class="name">总量({{anticoagulant.zongliang_unit}})</h2>
  100. <div class="content">
  101. <input
  102. type="text"
  103. v-model="dialysisSolution.anticoagulant_zongliang"
  104. :disabled="anticoagulant.zongliang==1?false:true"
  105. />
  106. </div>
  107. </div>
  108. <div class="item" v-show="anticoagulant.gaimingcheng != -1">
  109. <h2 class="name">钙({{anticoagulant.gaimingcheng_unit}})</h2>
  110. <div class="content">
  111. <input
  112. type="text"
  113. v-model="dialysisSolution.anticoagulant_gaimingcheng"
  114. :disabled="anticoagulant.gaimingcheng==1?false:true"
  115. />
  116. </div>
  117. </div>
  118. <div class="item" v-show="anticoagulant.gaijiliang != -1">
  119. <h2 class="name">钙剂量</h2>
  120. <div class="content">
  121. <input
  122. type="text"
  123. v-model="dialysisSolution.anticoagulant_gaijiliang"
  124. :disabled="anticoagulant.gaijiliang==1?false:true"
  125. />
  126. </div>
  127. </div>
  128. <div class="line"></div>
  129. <div class="item">
  130. <h2 class="name">钾(mmol/L)</h2>
  131. <div class="content">
  132. <input type="number" v-model="dialysisSolution.kalium" />
  133. <!-- <span class="text">HD</span> -->
  134. <!-- <span class="iconfont">&#xe6f9;</span> -->
  135. </div>
  136. </div>
  137. <div class="item">
  138. <h2 class="name">钠(mmol/L):</h2>
  139. <div class="content">
  140. <input type="number" v-model="dialysisSolution.sodium" />
  141. <!-- <span class="text">HD</span> -->
  142. <!-- <span class="iconfont">&#xe6f9;</span> -->
  143. </div>
  144. </div>
  145. <div class="item">
  146. <h2 class="name">钙(mmol/L)</h2>
  147. <div class="content">
  148. <input type="number" v-model="dialysisSolution.calcium" />
  149. <!-- <span class="text">HD</span> -->
  150. <!-- <span class="iconfont">&#xe6f9;</span> -->
  151. </div>
  152. </div>
  153. <div class="item">
  154. <h2 class="name">碳酸氢盐(mmol/L)</h2>
  155. <div class="content">
  156. <input type="number" v-model="dialysisSolution.bicarbonate" />
  157. <!-- <span class="text">HD</span> -->
  158. <!-- <span class="iconfont">&#xe6f9;</span> -->
  159. </div>
  160. </div>
  161. <div class="item">
  162. <h2 class="name">葡萄糖(mmol/L)</h2>
  163. <div class="content">
  164. <input type="number" v-model="dialysisSolution.glucose" />
  165. <!-- <span class="text">HD</span> -->
  166. <!-- <span class="iconfont">&#xe6f9;</span> -->
  167. </div>
  168. </div>
  169. <div class="item">
  170. <h2 class="name">干体重(kg)</h2>
  171. <div class="content">
  172. <input type="number" v-model="dialysisSolution.dry_weight" />
  173. <!-- <span class="text">HD</span> -->
  174. <!-- <span class="iconfont">&#xe6f9;</span> -->
  175. </div>
  176. </div>
  177. <div class="line"></div>
  178. <div class="item">
  179. <h2 class="name">透析液流量(ml/min)</h2>
  180. <div class="content">
  181. <input type="number" v-model="dialysisSolution.dialysate_flow" />
  182. <!-- <span class="text">HD</span> -->
  183. <!-- <span class="iconfont">&#xe6f9;</span> -->
  184. </div>
  185. </div>
  186. <div class="item">
  187. <h2 class="name">透析液温度(℃)</h2>
  188. <div class="content">
  189. <input type="number" v-model="dialysisSolution.dialysate_temperature" />
  190. <!-- <span class="text">HD</span> -->
  191. <!-- <span class="iconfont">&#xe6f9;</span> -->
  192. </div>
  193. </div>
  194. <div class="item">
  195. <h2 class="name">电导率(mS/cm)</h2>
  196. <div class="content">
  197. <input type="number" v-model="dialysisSolution.conductivity" />
  198. <!-- <span class="text">HD</span> -->
  199. <!-- <span class="iconfont">&#xe6f9;</span> -->
  200. </div>
  201. </div>
  202. <div class="line"></div>
  203. <div class="item">
  204. <h2 class="name">备注</h2>
  205. <div class="content">
  206. <span class="text"></span>
  207. </div>
  208. </div>
  209. <textarea class="textarea" placeholder="请输入内容" v-model="dialysisSolution.remark"></textarea>
  210. </div>
  211. <!--<div class="footer">-->
  212. <!--处方医生:{{doctor}}-->
  213. <!--</div>-->
  214. </div>
  215. <!-- <div class="Dialog" v-show="mode_show">
  216. <div class="DialogTit">
  217. <span class="iconfont" @click="paden_show=true;mode_show=false;">&#xe720; 返回</span>
  218. <h1 class="name">模式</h1>
  219. <span class="success"></span>
  220. </div>
  221. <div class="optionsBox">
  222. <div class="list">
  223. <ul>
  224. <li @click="handleMode(item)" v-for="item in modeOptions" :key="item.id" value="item.id" :class="dialysisSolution.mode_id == item.id? 'tick':'' ">{{item.name}}</li>
  225. </ul>
  226. </div>
  227. </div>
  228. </div>-->
  229. <long-dialog-menu
  230. title="模式"
  231. v-show="showObj.mode_show[0]"
  232. :show_index="0"
  233. :option_poro="modeList"
  234. :data_prop="dialysisSolution"
  235. :show_prop="showObj"
  236. data-_mode="mode"
  237. :index="dialysisSolution.mode_id"
  238. ></long-dialog-menu>
  239. <long-dialog-menu
  240. title="透析器"
  241. v-show="showObj.mode_show[1]"
  242. :show_index="1"
  243. :option_poro="dialyserList"
  244. :data_prop="dialysisSolution"
  245. :show_prop="showObj"
  246. data-_mode="hemodialysis_machine"
  247. :index="dialysisSolution.hemodialysis_machine"
  248. ></long-dialog-menu>
  249. <long-dialog-menu
  250. title="灌流器"
  251. v-show="showObj.mode_show[2]"
  252. :show_index="2"
  253. :option_poro="perfusion_apparatus"
  254. :data_prop="dialysisSolution"
  255. :show_prop="showObj"
  256. data-_mode="perfusion_apparatus"
  257. :index="dialysisSolution.perfusion_apparatus"
  258. ></long-dialog-menu>
  259. <long-dialog-menu
  260. title="置换方式"
  261. v-show="showObj.mode_show[3]"
  262. :show_index="3"
  263. :option_poro="replacementWays"
  264. :data_prop="dialysisSolution"
  265. :show_prop="showObj"
  266. data-_mode="replacement_way"
  267. :index="dialysisSolution.replacement_way"
  268. ></long-dialog-menu>
  269. <long-dialog-menu
  270. title="搞凝剂"
  271. v-show="showObj.mode_show[4]"
  272. :show_index="4"
  273. :option_poro="anticoagulantsConfitList"
  274. :data_prop="dialysisSolution"
  275. :show_prop="showObj"
  276. data-_mode="anticoagulant"
  277. :index="dialysisSolution.anticoagulant"
  278. ></long-dialog-menu>
  279. </div>
  280. </template>
  281. <script>
  282. import LongDialogMenu from "./subMenu/LongDialogMenu";
  283. import { createPatientDialysisSolution } from "@/api/patient";
  284. import { Toast } from "vant";
  285. export default {
  286. name: "LongDialog",
  287. components: {
  288. LongDialogMenu
  289. },
  290. methods: {
  291. handleDialyser(item) {
  292. this.showObj.paden_show = true;
  293. },
  294. showModel() {
  295. this.showObj.mode_show[0] = true;
  296. this.showObj.paden_show = false;
  297. },
  298. showQi() {
  299. this.showObj.mode_show[1] = true;
  300. this.showObj.paden_show = false;
  301. },
  302. showMenu(index) {
  303. this.showObj.mode_show[index] = true;
  304. this.showObj.paden_show = false;
  305. },
  306. submitSolution() {
  307. this.dialysisSolution.mode = this.dialysisSolution.mode_id;
  308. createPatientDialysisSolution(
  309. this.patient.id,
  310. this.dialysisSolution
  311. ).then(response => {
  312. if (response.data.state == 0) {
  313. Toast.fail(response.data.msg);
  314. // this.$toast({message: response.data.msg});
  315. return false;
  316. } else {
  317. Toast.success("创建成功");
  318. // this.$toast({message: "创建成功"});
  319. this.$emit("longSolution");
  320. for (const key in response.data.data.solution) {
  321. this.solution_prop[key] = response.data.data.solution[key];
  322. }
  323. // this.solution_prop = response.data.data.solution
  324. }
  325. });
  326. }
  327. },
  328. props: {
  329. patient_prop: {
  330. type: Object
  331. },
  332. solution_prop: {
  333. type: Object
  334. },
  335. machines_prop: {
  336. type: Array,
  337. default: function() {
  338. return new Array();
  339. }
  340. }
  341. },
  342. data() {
  343. return {
  344. doctor: "",
  345. showObj: {
  346. mode_show: {
  347. 0: false,
  348. 1: false,
  349. 2: false,
  350. 3: false
  351. },
  352. paden_show: true
  353. },
  354. patient: {
  355. id: 0
  356. },
  357. modeOptions: {},
  358. modeList: [],
  359. perfusion_apparatus: [],
  360. anticoagulantsConfit: {},
  361. anticoagulantsConfitList: [],
  362. replacementWays: [],
  363. dialyserList: [],
  364. anticoagulant: {
  365. id: 0,
  366. name: "",
  367. type: 1,
  368. shouji: 1,
  369. weichi: 1,
  370. zongliang: 1,
  371. gaimingcheng: -1,
  372. gaijiliang: -1,
  373. shouji_unit: "mg",
  374. weichi_unit: "mg/h",
  375. zongliang_unit: "mg",
  376. gaimingcheng_unit: "",
  377. gaijiliang_unit: ""
  378. },
  379. patient: {
  380. id: 0
  381. },
  382. dialysisSolution: {
  383. id: 0,
  384. mode: "",
  385. mode_id: "",
  386. mode_name: "",
  387. dialysis_duration: "",
  388. hemodialysis_machine: "",
  389. perfusion_apparatus: "",
  390. perfusion_apparatus_name: "",
  391. blood_flow_volume: "",
  392. dewater: "",
  393. displace_liqui: 0,
  394. replacement_way: "",
  395. replacement_way_name: "",
  396. anticoagulant: "",
  397. anticoagulant_name: "",
  398. anticoagulant_shouji: "",
  399. anticoagulant_weichi: "",
  400. anticoagulant_zongliang: "",
  401. anticoagulant_gaimingcheng: "",
  402. anticoagulant_gaijiliang: "",
  403. kalium: "",
  404. sodium: "",
  405. calcium: "",
  406. bicarbonate: "",
  407. glucose: "",
  408. dry_weight: "",
  409. dialysate_flow: "",
  410. dialysate_temperature: "",
  411. conductivity: "",
  412. doctor: "",
  413. remark: ""
  414. }
  415. };
  416. },
  417. watch: {
  418. "dialysisSolution.anticoagulant": function() {
  419. var thismode = parseInt(this.dialysisSolution.anticoagulant);
  420. if (isNaN(thismode) || thismode <= 0) {
  421. return false;
  422. }
  423. if (
  424. typeof this.anticoagulantsConfit[thismode] == "undefined" ||
  425. this.anticoagulantsConfit[thismode] == null
  426. ) {
  427. return false;
  428. }
  429. this.anticoagulant = this.anticoagulantsConfit[thismode];
  430. this.dialysisSolution.anticoagulant_name = this.anticoagulantsConfit[
  431. thismode
  432. ].name;
  433. },
  434. "dialysisSolution.hemodialysis_machine": function() {
  435. var machine = parseInt(this.dialysisSolution.hemodialysis_machine);
  436. if (isNaN(machine) || machine <= 0) {
  437. return;
  438. }
  439. for (let index = 0; index < this.dialyserList.length; index++) {
  440. if (machine == this.dialyserList[index].id) {
  441. this.dialysisSolution.hemodialysis_machine_name = this.dialyserList[
  442. index
  443. ].name;
  444. break;
  445. }
  446. }
  447. },
  448. "dialysisSolution.perfusion_apparatus": function() {
  449. var apparatus = parseInt(this.dialysisSolution.perfusion_apparatus);
  450. if (isNaN(apparatus) || apparatus <= 0) {
  451. return false;
  452. }
  453. for (let index = 0; index < this.perfusion_apparatus.length; index++) {
  454. if (apparatus == this.perfusion_apparatus[index].id) {
  455. this.dialysisSolution.perfusion_apparatus_name = this.perfusion_apparatus[
  456. index
  457. ].name;
  458. break;
  459. }
  460. }
  461. },
  462. "dialysisSolution.replacement_way": function() {
  463. var way = parseInt(this.dialysisSolution.replacement_way);
  464. if (isNaN(way) || way <= 0) {
  465. return false;
  466. }
  467. for (let index = 0; index < this.replacementWays.length; index++) {
  468. if (way == this.replacementWays[index].id) {
  469. this.dialysisSolution.replacement_way_name = this.replacementWays[
  470. index
  471. ].name;
  472. break;
  473. }
  474. }
  475. }
  476. },
  477. // computed:{
  478. // dialysisSolution:function(){
  479. // console.log("this.solution_prop",this.solution_prop);
  480. // console.log("this.solution_prop",this.solution_prop);
  481. // var solution = {};
  482. // if (this.solution_prop != null && this.solution_prop.id != '') {
  483. // for (const key in this.solution_prop) {
  484. // solution[key] = this.solution_prop[key];
  485. // }
  486. // return solution;
  487. // }else {
  488. // return {};
  489. // }
  490. // }
  491. // },
  492. created() {
  493. this.doctor = this.$store.getters.user.user.user_name;
  494. this.modeOptions = this.$store.getters.treatment_mode;
  495. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus;
  496. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  497. this.replacementWays = this.$store.getters.replacement_ways;
  498. for (var modeOne in this.modeOptions) {
  499. this.modeList.push(this.modeOptions[modeOne]);
  500. }
  501. for (var one in this.anticoagulantsConfit) {
  502. this.anticoagulantsConfitList.push(this.anticoagulantsConfit[one]);
  503. }
  504. this.patient = this.patient_prop;
  505. // console.log("this.solution_prop",this.solution_prop);
  506. if (this.solution_prop != null && this.solution_prop.id != "") {
  507. for (const key in this.solution_prop) {
  508. this.dialysisSolution[key] = this.solution_prop[key];
  509. }
  510. }
  511. this.dialyserList = this.machines_prop;
  512. }
  513. // data() {
  514. // return {
  515. // show_two_menu: false
  516. // };
  517. // },
  518. // methods: {
  519. // selectDialysisMode: function() {
  520. // var t = this;
  521. // this.$refs.two_menu.showSingleSelect(
  522. // [{ id: 1, name: "12e" }, { id: 2, name: "asdsadas" }],
  523. // 0,
  524. // "透析模式",
  525. // "name",
  526. // "id",
  527. // function() {
  528. // t.show_two_menu = false;
  529. // }
  530. // );
  531. // this.show_two_menu = true;
  532. // }
  533. // }
  534. };
  535. </script>
  536. <style style="stylesheet/scss" lang="scss" scoped>
  537. .textarea {
  538. width: 100%;
  539. height: 2.4rem;
  540. line-height: 0.6rem;
  541. color: $pgh-color;
  542. font-size: 0.28rem;
  543. padding-left: 0.36rem;
  544. border: none;
  545. }
  546. .optionsBox {
  547. background: #fff;
  548. max-height: 10.6rem;
  549. min-height: 5rem;
  550. overflow-y: scroll;
  551. @media only screen and (max-width: 812px) {
  552. min-height: 8rem !important;
  553. }
  554. ul {
  555. li {
  556. height: 1rem;
  557. line-height: 1rem;
  558. border-bottom: 1px #e5e5e5 solid;
  559. padding: 0 0.38rem;
  560. }
  561. .tick {
  562. position: relative;
  563. &::before {
  564. content: "";
  565. display: inline-block;
  566. border: 2px solid $main-color;
  567. border-top-width: 0;
  568. border-right-width: 0;
  569. width: 0.3rem;
  570. height: 0.15rem;
  571. -webkit-transform: rotate(-50deg);
  572. position: absolute;
  573. top: 0.38rem;
  574. right: 0.44rem;
  575. }
  576. }
  577. }
  578. }
  579. .CheckBox {
  580. background: #fff;
  581. max-height: 10.6rem;
  582. min-height: 5rem;
  583. overflow-y: scroll;
  584. ul {
  585. li {
  586. line-height: 1rem;
  587. }
  588. }
  589. }
  590. </style>