LongDialysis.vue 19KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. <template>
  2. <div class="longDialysis">
  3. <div>
  4. <div class="toolBox">
  5. <div class="toolOne" @click="startShow = true">
  6. <div style="display: flex;align-items: center;">
  7. {{ startTime }}
  8. <van-icon name="arrow-down" />
  9. </div>
  10. </div>
  11. <div class="toolOne" @click="endShow = true">
  12. <div style="display: flex;align-items: center;">
  13. {{ endTime }}
  14. <van-icon name="arrow-down" />
  15. </div>
  16. </div>
  17. </div>
  18. <div class="adviceBox" v-if="dialysisrecord.length > 0">
  19. <van-list
  20. v-model="loading"
  21. :finished="finished"
  22. finished-text="没有更多了"
  23. @load="onLoad"
  24. >
  25. <div class="adviceMain">
  26. <div
  27. class="adviceOne"
  28. v-for="(item, index) in dialysisrecord"
  29. :key="index"
  30. >
  31. <div class="adviceTitle">
  32. <p>{{ getTime(item.created_time) }}</p>
  33. <van-icon
  34. class="ellipsis"
  35. name="ellipsis"
  36. @click="toLongDialysis(item.id, index)"
  37. />
  38. </div>
  39. <div class="orderContent" @click="toLongDialysisDetail(item.id)">
  40. <p>透析模式:{{ item.mode_id }}</p>
  41. <p>
  42. 透析时长:{{ item.dialysis_duration_hour }}h{{
  43. item.dialysis_duration_minute
  44. }}min
  45. </p>
  46. <p>血流量(ml/min):{{ item.blood_flow_volume }}</p>
  47. <p>目标超滤量(ml):{{ item.target_ultrafiltration }}</p>
  48. <p>透析液配方(mmol/L):{{ item.dialysate_formulation }}</p>
  49. <p>
  50. 抗凝剂:
  51. <span v-if="item.anticoagulant == 1">无肝素</span>
  52. <span v-if="item.anticoagulant == 2">普通肝素</span>
  53. <span v-if="item.anticoagulant == 3">低分子肝素</span>
  54. <span v-if="item.anticoagulant == 4">阿加曲班</span>
  55. <span v-if="item.anticoagulant == 5">枸橼酸钠</span>
  56. </p>
  57. <p>
  58. 首剂:
  59. <span>{{ item.anticoagulant_shouji }}</span>
  60. <span v-if="item.anticoagulant == 1">mg</span>
  61. <span v-if="item.anticoagulant == 2">mg</span>
  62. <span v-if="item.anticoagulant == 3">iu</span>
  63. <span v-if="item.anticoagulant == 4">iu</span>
  64. <span v-if="item.anticoagulant == 5">mg</span>
  65. </p>
  66. <p>
  67. 维持:
  68. <span>{{ item.anticoagulant_weichi }}</span>
  69. <span v-if="item.anticoagulant == 1">ml</span>
  70. <span v-if="item.anticoagulant == 2">iu</span>
  71. <span v-if="item.anticoagulant == 3">iu</span>
  72. <span v-if="item.anticoagulant == 4">mg</span>
  73. <span v-if="item.anticoagulant == 5">ml</span>
  74. </p>
  75. <p>
  76. 总量:
  77. <span>{{ item.anticoagulant_zongliang }}</span>
  78. <span v-if="item.anticoagulant == 1">mg</span>
  79. <span v-if="item.anticoagulant == 2">iu</span>
  80. <span v-if="item.anticoagulant == 3">iu</span>
  81. <span v-if="item.anticoagulant == 4">mg</span>
  82. <span v-if="item.anticoagulant == 5">mg</span>
  83. </p>
  84. <p>置换量(L):{{ item.replacement_total }}</p>
  85. <p>钾(mmol/L):{{ item.kalium }}</p>
  86. <p>钠(mmol/L):{{ item.sodium }}</p>
  87. <p>钙(mmol/L):{{ item.calcium }}</p>
  88. <p>透析器/灌流器:{{ item.dialyzer_perfusion_apparatus }}</p>
  89. <p>碳酸氢盐(mmol/L):{{ item.bicarbonate }}</p>
  90. <p>葡萄糖(mmol/L):{{ item.glucose }}</p>
  91. <p>透析液流量(ml/min):{{ item.dialysate_flow }}</p>
  92. <p>透析液温度(℃):{{ item.dialysate_temperature }}</p>
  93. <p>
  94. 体液过多症状:
  95. <span v-if="item.body_fluid == 1">无</span>
  96. <span v-if="item.body_fluid == 2">下肢水肿+</span>
  97. <span v-if="item.body_fluid == 3">下肢水肿++</span>
  98. <span v-if="item.body_fluid == 4">下肢水肿+++</span>
  99. </p>
  100. <p>体液过多其他症状:{{ item.body_fluid_other }}</p>
  101. <p>
  102. 透析前使用特殊药物:{{
  103. getSpecialMedicine(item.special_medicine)
  104. }}
  105. </p>
  106. <p>使用其他特殊药物:{{ item.special_medicine_other }}</p>
  107. <p>置换液:{{ item.displace_liqui_part }}</p>
  108. <p>置换液总量(L):{{ item.displace_liqui_value }}</p>
  109. <p>血管通路:{{ getBloodAccessOption(item.blood_access) }}</p>
  110. <p>实际超滤量(L):{{ item.ultrafiltration }}</p>
  111. <div>备注:{{ item.remark }}</div>
  112. </div>
  113. <div class="all" @click="toLongDialysisDetail(item.id)">全部</div>
  114. </div>
  115. </div>
  116. </van-list>
  117. </div>
  118. <div class="noimgBox" v-else>
  119. <img src="../../../assets/images/none.png" alt />
  120. </div>
  121. </div>
  122. <!-- <div class="add">
  123. <div style="display: flex;align-items: center;">
  124. <van-icon class="addIcon" name="add" />新增
  125. </div>
  126. </div>-->
  127. <!-- 弹出层 -->
  128. <div>
  129. <van-popup
  130. v-model="typeShow"
  131. position="bottom"
  132. :style="{ height: '40%' }"
  133. >
  134. <van-picker
  135. show-toolbar
  136. :columns="columns"
  137. @cancel="onCancel"
  138. @confirm="onConfirm"
  139. />
  140. </van-popup>
  141. <van-popup
  142. v-model="startShow"
  143. position="bottom"
  144. :style="{ height: '40%' }"
  145. >
  146. <van-datetime-picker
  147. v-model="currentDate"
  148. type="date"
  149. :min-date="minDate"
  150. :max-date="maxDate"
  151. @confirm="getstartTime"
  152. @cancel="startShow = false"
  153. />
  154. </van-popup>
  155. <van-popup v-model="endShow" position="bottom" :style="{ height: '40%' }">
  156. <van-datetime-picker
  157. v-model="currentDate"
  158. type="date"
  159. :min-date="minDate"
  160. :max-date="maxDate"
  161. @confirm="getstartTime2"
  162. @cancel="endShow = false"
  163. />
  164. </van-popup>
  165. <van-action-sheet
  166. v-model="newShow"
  167. :actions="actions"
  168. cancel-text="取消"
  169. @cancel="onCancel"
  170. @select="toDelete"
  171. />
  172. </div>
  173. </div>
  174. </template>
  175. <script>
  176. import {
  177. GetLongDialysisRecord,
  178. getPatientDetail,
  179. DeleteLongDialysis
  180. } from '@/api/patient/patient'
  181. import { uParseTime } from '@/utils/tools'
  182. import Vue from 'vue'
  183. import { Dialog } from 'vant'
  184. const moment = require('moment')
  185. export default {
  186. props: {
  187. active: Number
  188. },
  189. data () {
  190. return {
  191. newShow: false,
  192. typeShow: false,
  193. startShow: false,
  194. endShow: false,
  195. type: '请选择',
  196. columns: [
  197. '杭州',
  198. '宁波',
  199. '温州',
  200. '嘉兴',
  201. '湖州',
  202. '杭州',
  203. '宁波',
  204. '温州',
  205. '嘉兴',
  206. '湖州'
  207. ],
  208. startTime: '请选择',
  209. endTime: '请选择',
  210. endTimes: '',
  211. minDate: new Date(1970, 0, 1),
  212. maxDate: new Date(2025, 10, 1),
  213. currentDate: new Date(),
  214. actions: [{ name: '查看全部' }, { name: '全部删除' }],
  215. loading: false,
  216. finished: false,
  217. limit: 10,
  218. page: 1,
  219. total: 0,
  220. anticoagulantsSet: {
  221. type: 1
  222. },
  223. replacementWays: null,
  224. anticoagulantsConfit: null,
  225. dialysate_formulation: [],
  226. body_fluid_option: [],
  227. special_medicine_option: [],
  228. displace_liqui_part_option: [],
  229. blood_access_option: [],
  230. dialysisrecord: [],
  231. list: [],
  232. patient_id: '',
  233. showOne: true,
  234. showTwo: false,
  235. id: 0,
  236. index: 0
  237. }
  238. },
  239. methods: {
  240. onCancel () {
  241. this.typeShow = false
  242. },
  243. onConfirm (value) {
  244. this.type = value
  245. this.typeShow = false
  246. },
  247. getstartTime (value) {
  248. this.page = 1
  249. let year = value.getFullYear()
  250. let month = value.getMonth() + 1
  251. let day = value.getDate()
  252. if (month >= 1 && month <= 9) {
  253. month = `0${month}`
  254. }
  255. if (day >= 1 && day <= 9) {
  256. day = `0${day}`
  257. }
  258. this.startTime = `${year}-${month}-${day}`
  259. this.dialysisrecord = []
  260. this.GetLongDialysisRecord(
  261. this.patient_id,
  262. this.limit,
  263. this.page,
  264. this.startTime,
  265. this.endTime
  266. )
  267. this.startShow = false
  268. },
  269. getstartTime2 (value) {
  270. this.page = 1
  271. let year = value.getFullYear()
  272. let month = value.getMonth() + 1
  273. let day = value.getDate()
  274. if (month >= 1 && month <= 9) {
  275. month = `0${month}`
  276. }
  277. if (day >= 1 && day <= 9) {
  278. day = `0${day}`
  279. }
  280. this.endTime = `${year}-${month}-${day}`
  281. this.dialysisrecord = []
  282. this.GetLongDialysisRecord(
  283. this.patient_id,
  284. this.limit,
  285. this.page,
  286. this.startTime,
  287. this.endTime
  288. )
  289. this.endShow = false
  290. },
  291. GetLongDialysisRecord (id, limit, page, startime, endtime) {
  292. GetLongDialysisRecord(
  293. id,
  294. this.limit,
  295. this.page,
  296. this.startTime,
  297. this.endTimes
  298. ).then(response => {
  299. if (response.data.state === 1) {
  300. var dialysis = response.data.data.dialysisrecord
  301. for (let index = 0; index < dialysis.length; index++) {
  302. if (dialysis[index].mode_id === 1) {
  303. dialysis[index].mode_id = 'HD'
  304. }
  305. if (dialysis[index].mode_id === 2) {
  306. dialysis[index].mode_id = 'HDF'
  307. }
  308. if (dialysis[index].mode_id === 3) {
  309. dialysis[index].mode_id = 'HD+HP'
  310. }
  311. if (dialysis[index].mode_id === 4) {
  312. dialysis[index].mode_id = 'HP'
  313. }
  314. if (dialysis[index].mode_id === 5) {
  315. dialysis[index].mode_id = 'HF'
  316. }
  317. if (dialysis[index].mode_id === 6) {
  318. dialysis[index].mode_id = 'SCUF'
  319. }
  320. if (dialysis[index].mode_id === 7) {
  321. dialysis[index].mode_id = 'IUF'
  322. }
  323. if (dialysis[index].mode_id === 8) {
  324. dialysis[index].mode_id = 'HFHD'
  325. }
  326. if (dialysis[index].mode_id === 9) {
  327. dialysis[index].mode_id = 'HFHD+HP'
  328. }
  329. if (dialysis[index].mode_id === 10) {
  330. dialysis[index].mode_id = 'PHF'
  331. }
  332. if (dialysis[index].mode_id === 11) {
  333. dialysis[index].mode_id = 'HFR'
  334. }
  335. if (dialysis[index].mode_id === 12) {
  336. dialysis[index].mode_id = 'HDF+HP'
  337. }
  338. if (dialysis[index].mode_id === 13) {
  339. dialysis[index].mode_id = 'CRRT'
  340. }
  341. if (dialysis[index].mode_id === 14) {
  342. dialysis[index].mode_id = '腹水回输'
  343. }
  344. if (dialysis[index].mode_id === 15) {
  345. dialysis[index].mode_id = 'HD前置换'
  346. }
  347. if (dialysis[index].mode_id === 16) {
  348. dialysis[index].mode_id = 'HD后置换'
  349. }
  350. if (dialysis[index].mode_id === 17) {
  351. dialysis[index].mode_id = 'HDF前置换'
  352. }
  353. if (dialysis[index].mode_id === 18) {
  354. dialysis[index].mode_id = 'HDF后置换'
  355. }
  356. if (dialysis[index].dialysate_formulation === 1) {
  357. dialysis[index].dialysate_formulation = '常规'
  358. }
  359. if (dialysis[index].dialysate_formulation === 2) {
  360. dialysis[index].dialysate_formulation = '低钙'
  361. }
  362. if (dialysis[index].dialysate_formulation === 1) {
  363. dialysis[index].dialysate_formulation = '高钙'
  364. }
  365. if (dialysis[index].dialysate_formulation === 1) {
  366. dialysis[index].dialysate_formulation = '低钠'
  367. }
  368. if (dialysis[index].dialysate_formulation === 1) {
  369. dialysis[index].dialysate_formulation = '高钠'
  370. }
  371. if (dialysis[index].displace_liqui_part === 0) {
  372. dialysis[index].displace_liqui_part = ''
  373. }
  374. if (dialysis[index].displace_liqui_part === 1) {
  375. dialysis[index].displace_liqui_part = '前稀释'
  376. }
  377. if (dialysis[index].displace_liqui_part === 2) {
  378. dialysis[index].displace_liqui_part = '后稀释'
  379. }
  380. }
  381. let arr = this.dialysisrecord
  382. arr.push(...dialysis)
  383. this.dialysisrecord = arr
  384. // console.log("长期透析处方", dialysis);
  385. var total = response.data.data.total
  386. // console.log("total", total);
  387. this.loading = false
  388. }
  389. })
  390. },
  391. onLoad () {
  392. setTimeout(() => {
  393. this.page++
  394. if (this.page <= Math.ceil(this.total / 10)) {
  395. this.GetLongDialysisRecord(
  396. this.patient_id,
  397. this.limit,
  398. this.page,
  399. this.startTime,
  400. this.endTimes
  401. )
  402. } else {
  403. this.loading = false
  404. this.finished = true
  405. }
  406. }, 1000)
  407. },
  408. getTime (time) {
  409. // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
  410. return uParseTime(time, '{y}-{m}-{d}')
  411. },
  412. getBloodAccessOption (id) {
  413. for (let i = 0; i < this.blood_access_option.length; i++) {
  414. if ((this.blood_access_option[i].id = id)) {
  415. return this.blood_access_option[i].name
  416. }
  417. }
  418. },
  419. getSpecialMedicine (id) {
  420. for (let i = 0; i < this.special_medicine_option.length; i++) {
  421. if ((this.special_medicine_option[i].id = id)) {
  422. return this.special_medicine_option[i].name
  423. }
  424. }
  425. },
  426. getPatientDetail (patientid) {
  427. getPatientDetail(patientid).then(response => {
  428. if (response.data.state === 1) {
  429. var patientDetail = response.data.data.patientDetail
  430. if (patientDetail.blood_patients == 0) {
  431. this.dialysisrecord = []
  432. this.showOne = false
  433. this.showTwo = true
  434. }
  435. if (patientDetail.blood_patients == 1) {
  436. this.showOne = true
  437. this.showTwo = false
  438. }
  439. this.patientName = patientDetail.name
  440. }
  441. })
  442. },
  443. toLongDialysisDetail (id) {
  444. var patientid = this.$route.query.patientid
  445. this.$router.push(
  446. '/alllongdialysis?id=' +
  447. id +
  448. '&patientid=' +
  449. patientid +
  450. '&active=' +
  451. this.active
  452. )
  453. },
  454. toLongDialysis (id, index) {
  455. this.id = id
  456. this.index = index
  457. this.newShow = true
  458. },
  459. toDelete (value) {
  460. if (value.name == '查看全部') {
  461. var patientid = this.$route.query.patientid
  462. this.$router.push(
  463. '/alllongdialysis?id=' +
  464. this.id +
  465. '&patientid=' +
  466. patientid +
  467. '&active=' +
  468. this.active
  469. )
  470. }
  471. if (value.name == '全部删除') {
  472. this.DeleteLongDialysis(this.id, this.index)
  473. }
  474. },
  475. DeleteLongDialysis (id, index) {
  476. Dialog.confirm({
  477. title: '删除提示!',
  478. message: '确认删除该条信息吗?,删除后将无法恢复!'
  479. }).then(() => {
  480. DeleteLongDialysis(id).then(response => {
  481. if (response.data.state === 1) {
  482. var msg = response.data.data.msg
  483. this.dialysisrecord.splice(index, 1)
  484. this.newShow = false
  485. }
  486. })
  487. })
  488. }
  489. },
  490. created () {
  491. var patientid = this.$route.query.patientid
  492. this.patient_id = patientid
  493. this.GetLongDialysisRecord(patientid)
  494. this.getPatientDetail(patientid)
  495. this.blood_access_option = this.$store.getters.blood_access
  496. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  497. this.replacementWays = this.$store.getters.replacement_ways
  498. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  499. this.blood_filters = this.$store.getters.blood_filters
  500. this.dialysate_formulation = this.$store.getters.dialysate_formulation
  501. this.body_fluid_option = this.$store.getters.body_fluid
  502. this.special_medicine_option = this.$store.getters.special_medicine
  503. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  504. }
  505. }
  506. </script>
  507. <style lang="scss" scoped>
  508. .longDialysis {
  509. height: 100%;
  510. overflow-y: auto;
  511. background: #fff;
  512. .toolBox {
  513. display: flex;
  514. height: 3.125rem;
  515. align-items: center;
  516. .toolOne {
  517. width: 6.25rem;
  518. height: 1.875rem;
  519. background: rgba(246, 246, 246, 1);
  520. border-radius: 5px;
  521. text-align: center;
  522. font-size: 0.8125rem;
  523. color: #8d8d8d;
  524. display: flex;
  525. align-items: center;
  526. justify-content: space-around;
  527. margin-left: 0.8125rem;
  528. }
  529. }
  530. .adviceBox {
  531. padding: 0 1.125rem;
  532. margin-bottom: 3.125rem;
  533. }
  534. .adviceMain {
  535. > div:last-child {
  536. border: none;
  537. }
  538. }
  539. .adviceOne {
  540. // box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
  541. border-bottom: 1px solid #e5e5e5;
  542. padding-bottom: 0.625rem;
  543. }
  544. .adviceTitle {
  545. padding-top: 0.625rem;
  546. display: flex;
  547. align-items: center;
  548. justify-content: space-between;
  549. p {
  550. color: #000000;
  551. font-weight: bold;
  552. font-size: 0.9375rem;
  553. }
  554. .ellipsis {
  555. font-size: 1.25rem;
  556. color: #cccccc;
  557. }
  558. }
  559. .orderContent {
  560. font-size: 0.875rem;
  561. color: rgba(49, 50, 52, 1);
  562. margin-top: 0.625rem;
  563. display: flex;
  564. flex-wrap: wrap;
  565. p {
  566. line-height: 1.5rem;
  567. width: 50%;
  568. }
  569. }
  570. .doctorBox {
  571. font-size: 0.75rem;
  572. color: rgba(152, 152, 152, 1);
  573. line-height: 1.125rem;
  574. display: flex;
  575. align-items: center;
  576. justify-content: space-between;
  577. margin-top: 0.625rem;
  578. }
  579. .all {
  580. font-size: 0.8125rem;
  581. color: #5b98ff;
  582. margin-top: 0.625rem;
  583. }
  584. .noimgBox {
  585. margin-top: 40%;
  586. img {
  587. width: 9.375rem;
  588. height: 9.375rem;
  589. margin: 0 auto;
  590. display: block;
  591. }
  592. }
  593. .add {
  594. position: fixed;
  595. bottom: 0;
  596. left: 0;
  597. width: 100%;
  598. height: 2.75rem;
  599. background: rgba(255, 255, 255, 1);
  600. box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
  601. display: flex;
  602. align-items: center;
  603. justify-content: space-around;
  604. font-size: 0.9375rem;
  605. color: #979798;
  606. .addIcon {
  607. color: #5b98ff;
  608. font-size: 1.25rem;
  609. margin-right: 0.25rem;
  610. }
  611. }
  612. }
  613. ::-webkit-scrollbar {
  614. width: 0;
  615. }
  616. </style>