LongDialysis.vue 18KB

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