DialysisRecord.vue 16KB

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