血透系统pad前端

LongDialog.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  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[thismode].name
  431. },
  432. 'dialysisSolution.hemodialysis_machine': function () {
  433. var machine = parseInt(this.dialysisSolution.hemodialysis_machine)
  434. if (isNaN(machine) || machine <= 0) {
  435. return
  436. }
  437. for (let index = 0; index < this.dialyserList.length; index++) {
  438. if (machine == this.dialyserList[index].id) {
  439. this.dialysisSolution.hemodialysis_machine_name = this.dialyserList[index].name
  440. break
  441. }
  442. }
  443. },
  444. 'dialysisSolution.perfusion_apparatus': function () {
  445. var apparatus = parseInt(this.dialysisSolution.perfusion_apparatus)
  446. if (isNaN(apparatus) || apparatus <= 0) {
  447. return false
  448. }
  449. for (let index = 0; index < this.perfusion_apparatus.length; index++) {
  450. if (apparatus == this.perfusion_apparatus[index].id) {
  451. this.dialysisSolution.perfusion_apparatus_name = this.perfusion_apparatus[index].name
  452. break
  453. }
  454. }
  455. },
  456. 'dialysisSolution.replacement_way': function () {
  457. var way = parseInt(this.dialysisSolution.replacement_way)
  458. if (isNaN(way) || way <= 0) {
  459. return false
  460. }
  461. for (let index = 0; index < this.replacementWays.length; index++) {
  462. if (way == this.replacementWays[index].id) {
  463. this.dialysisSolution.replacement_way_name = this.replacementWays[index].name
  464. break
  465. }
  466. }
  467. }
  468. },
  469. // computed:{
  470. // dialysisSolution:function(){
  471. // console.log("this.solution_prop",this.solution_prop);
  472. // console.log("this.solution_prop",this.solution_prop);
  473. // var solution = {};
  474. // if (this.solution_prop != null && this.solution_prop.id != '') {
  475. // for (const key in this.solution_prop) {
  476. // solution[key] = this.solution_prop[key];
  477. // }
  478. // return solution;
  479. // }else {
  480. // return {};
  481. // }
  482. // }
  483. // },
  484. created () {
  485. this.doctor = this.$store.getters.user.user.user_name
  486. this.modeOptions = this.$store.getters.treatment_mode
  487. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  488. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  489. this.replacementWays = this.$store.getters.replacement_ways
  490. for (var modeOne in this.modeOptions) {
  491. this.modeList.push(this.modeOptions[modeOne])
  492. }
  493. for (var one in this.anticoagulantsConfit) {
  494. this.anticoagulantsConfitList.push(this.anticoagulantsConfit[one])
  495. }
  496. this.patient = this.patient_prop
  497. // console.log("this.solution_prop",this.solution_prop);
  498. if (this.solution_prop != null && this.solution_prop.id != '') {
  499. for (const key in this.solution_prop) {
  500. this.dialysisSolution[key] = this.solution_prop[key]
  501. }
  502. }
  503. this.dialyserList = this.machines_prop
  504. }
  505. // data() {
  506. // return {
  507. // show_two_menu: false
  508. // };
  509. // },
  510. // methods: {
  511. // selectDialysisMode: function() {
  512. // var t = this;
  513. // this.$refs.two_menu.showSingleSelect(
  514. // [{ id: 1, name: "12e" }, { id: 2, name: "asdsadas" }],
  515. // 0,
  516. // "透析模式",
  517. // "name",
  518. // "id",
  519. // function() {
  520. // t.show_two_menu = false;
  521. // }
  522. // );
  523. // this.show_two_menu = true;
  524. // }
  525. // }
  526. }
  527. </script>
  528. <style style="stylesheet/scss" lang="scss" scoped>
  529. .textarea {
  530. width: 100%;
  531. height: 2.4rem;
  532. line-height: 0.6rem;
  533. color: $pgh-color;
  534. font-size: 0.28rem;
  535. padding-left: 0.36rem;
  536. border: none;
  537. }
  538. .optionsBox {
  539. background: #fff;
  540. max-height: 10.6rem;
  541. min-height: 5rem;
  542. overflow-y: scroll;
  543. @media only screen and (max-width: 812px) {
  544. min-height: 8rem !important;
  545. }
  546. ul {
  547. li {
  548. height: 1rem;
  549. line-height: 1rem;
  550. border-bottom: 1px #e5e5e5 solid;
  551. padding: 0 0.38rem;
  552. }
  553. .tick {
  554. position: relative;
  555. &::before {
  556. content: "";
  557. display: inline-block;
  558. border: 2px solid $main-color;
  559. border-top-width: 0;
  560. border-right-width: 0;
  561. width: 0.3rem;
  562. height: 0.15rem;
  563. -webkit-transform: rotate(-50deg);
  564. position: absolute;
  565. top: 0.38rem;
  566. right: 0.44rem;
  567. }
  568. }
  569. }
  570. }
  571. .CheckBox {
  572. background: #fff;
  573. max-height: 10.6rem;
  574. min-height: 5rem;
  575. overflow-y: scroll;
  576. ul {
  577. li {
  578. line-height: 1rem;
  579. }
  580. }
  581. }
  582. </style>