DialysisRecord.vue 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  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" @click="toDialysisRecordDetail(item.patient_id, item.dialysis_date)">
  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 class="all" @click="toDialysisRecordDetail(item.patient_id, item.dialysis_date)">
  136. 全部
  137. </div>
  138. </div>
  139. </div>
  140. </van-list>
  141. </div>
  142. <div class="noimgBox" v-else>
  143. <img src="../../../assets/images/none.png" alt />
  144. </div>
  145. </div>
  146. <!-- <div class="add">
  147. <div style="display: flex;align-items: center;">
  148. <van-icon class="addIcon" name="add" />新增
  149. </div>
  150. </div>-->
  151. <!-- 弹出层 -->
  152. <div>
  153. <van-popup
  154. v-model="typeShow"
  155. position="bottom"
  156. :style="{ height: '40%' }"
  157. >
  158. <van-picker
  159. show-toolbar
  160. :columns="columns"
  161. @cancel="onCancel"
  162. @confirm="onConfirm"
  163. />
  164. </van-popup>
  165. <van-popup
  166. v-model="startShow"
  167. position="bottom"
  168. :style="{ height: '40%' }"
  169. >
  170. <van-datetime-picker
  171. v-model="currentDate"
  172. type="date"
  173. :min-date="minDate"
  174. :max-date="maxDate"
  175. @confirm="getstartTime"
  176. @cancel="startShow = false"
  177. />
  178. </van-popup>
  179. <van-popup v-model="endShow" position="bottom" :style="{ height: '40%' }">
  180. <van-datetime-picker
  181. v-model="currentDate"
  182. type="date"
  183. :min-date="minDate"
  184. :max-date="maxDate"
  185. @confirm="getstartTime2"
  186. @cancel="endShow = false"
  187. />
  188. </van-popup>
  189. <van-action-sheet
  190. v-model="newShow"
  191. :actions="actions"
  192. cancel-text="取消"
  193. @cancel="onCancel"
  194. @select="toDelete"
  195. />
  196. </div>
  197. </div>
  198. </template>
  199. <script>
  200. import { getPatientDetail, getDialysisRecord } from '@/api/patient/patient'
  201. import { uParseTime } from '@/utils/tools'
  202. import Vue from 'vue'
  203. import { Dialog } from 'vant'
  204. const moment = require('moment')
  205. export default {
  206. props: {
  207. active: Number
  208. },
  209. data () {
  210. return {
  211. newShow: false,
  212. typeShow: false,
  213. startShow: false,
  214. endShow: false,
  215. type: '全部',
  216. types: 0,
  217. loading: false,
  218. finished: false,
  219. columns: [
  220. 'HD',
  221. 'HDF',
  222. 'HD+HP',
  223. 'HP',
  224. 'HF',
  225. 'SCUF',
  226. 'IUF',
  227. 'HFHD',
  228. 'HFHD+HP',
  229. 'PHF',
  230. 'HFR',
  231. 'HDF+HP',
  232. 'CRRT',
  233. '腹水回输'
  234. ],
  235. startTime: '请选择',
  236. endTime: '请选择',
  237. minDate: new Date(1970, 0, 1),
  238. maxDate: new Date(2025, 10, 1),
  239. currentDate: new Date(),
  240. actions: [{ name: '删除' }],
  241. showOne: true,
  242. showTwo: false,
  243. limit: 10,
  244. page: 1,
  245. dialysisRecord: [],
  246. doctor: [],
  247. patient_name: '',
  248. index: 0,
  249. id: 0,
  250. patient_id: 0
  251. }
  252. },
  253. methods: {
  254. onCancel () {
  255. this.typeShow = false
  256. },
  257. onConfirm (value) {
  258. if (value === '全部') {
  259. this.types = 0
  260. }
  261. if (value === 'HD') {
  262. this.types = 1
  263. }
  264. if (value === 'HDF') {
  265. this.types = 2
  266. }
  267. if (value === 'HD+HP') {
  268. this.types = 3
  269. }
  270. if (value === 'HP') {
  271. this.types = 4
  272. }
  273. if (value === 'HF') {
  274. this.types = 5
  275. }
  276. if (value === 'SCUF') {
  277. this.types = 6
  278. }
  279. if (value === 'IUF') {
  280. this.types = 7
  281. }
  282. if (value === 'HFHD') {
  283. this.types = 8
  284. }
  285. if (value === 'HFHD+HP') {
  286. this.types = 9
  287. }
  288. if (value === 'PHF') {
  289. this.types = 10
  290. }
  291. if (value === 'HFR') {
  292. this.types = 11
  293. }
  294. if (value === 'HDF+HP') {
  295. this.types = 12
  296. }
  297. if (value === 'CRRT') {
  298. this.types = 13
  299. }
  300. if (value === '腹水回输') {
  301. this.types = 14
  302. }
  303. this.page = 1
  304. this.dialysisRecord = []
  305. this.getDialysisRecord(
  306. this.patient_id,
  307. this.limit,
  308. this.page,
  309. this.startTime,
  310. this.endTime,
  311. this.types
  312. )
  313. this.typeShow = false
  314. },
  315. getstartTime (value) {
  316. this.page = 1
  317. let year = value.getFullYear()
  318. let month = value.getMonth() + 1
  319. let day = value.getDate()
  320. if (month >= 1 && month <= 9) {
  321. month = `0${month}`
  322. }
  323. if (day >= 1 && day <= 9) {
  324. day = `0${day}`
  325. }
  326. this.startTime = `${year}-${month}-${day}`
  327. this.dialysisRecord = []
  328. this.getDialysisRecord(
  329. this.patient_id,
  330. this.limit,
  331. this.page,
  332. this.startTime,
  333. this.endTime,
  334. this.types
  335. )
  336. this.startShow = false
  337. },
  338. getstartTime2 (value) {
  339. this.page = 1
  340. let year = value.getFullYear()
  341. let month = value.getMonth() + 1
  342. let day = value.getDate()
  343. if (month >= 1 && month <= 9) {
  344. month = `0${month}`
  345. }
  346. if (day >= 1 && day <= 9) {
  347. day = `0${day}`
  348. }
  349. this.endTime = `${year}-${month}-${day}`
  350. this.dialysisRecord = []
  351. this.getDialysisRecord(
  352. this.patient_id,
  353. this.limit,
  354. this.page,
  355. this.startTime,
  356. this.endTime,
  357. this.types
  358. )
  359. this.endShow = false
  360. },
  361. getPatientDetail (patientid) {
  362. getPatientDetail(patientid).then(response => {
  363. if (response.data.state === 1) {
  364. var patientDetail = response.data.data.patientDetail
  365. this.patient_name = patientDetail.name
  366. if (patientDetail.blood_patients == 0) {
  367. this.showOne = false
  368. this.showTwo = true
  369. }
  370. if (patientDetail.blood_patients == 1) {
  371. this.showOne = true
  372. this.showTwo = false
  373. }
  374. this.patientName = patientDetail.name
  375. }
  376. })
  377. },
  378. getDialysisRecord (id) {
  379. getDialysisRecord(
  380. id,
  381. this.limit,
  382. this.page,
  383. this.startTime,
  384. this.endTime,
  385. this.types
  386. ).then(response => {
  387. if (response.data.state === 1) {
  388. var dialysisrecord = response.data.data.dialysisrecord
  389. let arr = this.dialysisRecord
  390. arr.push(...dialysisrecord)
  391. this.dialysisRecord = arr
  392. var total = response.data.data.total
  393. var doctor = response.data.data.doctor
  394. this.doctor = doctor
  395. this.loading = false
  396. }
  397. })
  398. },
  399. onLoad () {
  400. setTimeout(() => {
  401. this.page++
  402. // console.log(this.page)
  403. if (this.page <= Math.ceil(this.total / 10)) {
  404. this.getDialysisRecord(this.patient_id)
  405. } else {
  406. this.loading = false
  407. this.finished = true
  408. }
  409. }, 3000)
  410. },
  411. getTime (time) {
  412. // return uParseTime(time, "{y}-{m}-{d} {h}:{i}:{s}");
  413. return uParseTime(time, '{y}-{m}-{d}')
  414. },
  415. getNurse (id) {
  416. for (let i = 0; i < this.doctor.length; i++) {
  417. if (this.doctor[i].admin_user_id === id) {
  418. return this.doctor[i].user_name
  419. }
  420. }
  421. },
  422. toDialysisRecordDetail (id, date) {
  423. this.$router.push(
  424. '/details?patient_id=' +
  425. id +
  426. '&date=' +
  427. date +
  428. '&patient_name=' +
  429. this.patient_name
  430. )
  431. },
  432. Delete (id, index) {
  433. this.id = id
  434. this.index = index
  435. this.newShow = true
  436. },
  437. toDelete (value) {
  438. if ((value.name = '删除')) {
  439. this.DeleteDialysisRecord(this.id, this.index)
  440. }
  441. },
  442. DeleteDialysisRecord (id, index) {
  443. Dialog.confirm({
  444. title: '删除提示!',
  445. message: '确认删除该条信息吗?,删除后将无法恢复!'
  446. }).then(() => {
  447. DeleteDialysisRecord(id).then(response => {
  448. if (response.data.state === 1) {
  449. var msg = response.data.data.msg
  450. // console.log("msg", msg);
  451. this.dialysisRecord.splice(index, 1)
  452. this.newShow = false
  453. }
  454. })
  455. })
  456. }
  457. },
  458. created () {
  459. var patientid = this.$route.query.patientid
  460. this.getPatientDetail(patientid)
  461. this.getDialysisRecord(patientid)
  462. this.patient_id = patientid
  463. }
  464. }
  465. </script>
  466. <style lang="scss" scoped>
  467. .DialysisRecord {
  468. height: 100%;
  469. overflow-y: auto;
  470. .toolBox {
  471. display: flex;
  472. height: 3.125rem;
  473. justify-content: space-around;
  474. align-items: center;
  475. .toolOne {
  476. width: 6.25rem;
  477. height: 1.875rem;
  478. background: rgba(246, 246, 246, 1);
  479. border-radius: 5px;
  480. text-align: center;
  481. font-size: 0.8125rem;
  482. color: #8d8d8d;
  483. display: flex;
  484. align-items: center;
  485. justify-content: space-around;
  486. }
  487. }
  488. .adviceBox {
  489. padding: 0 1.125rem;
  490. margin-bottom: 3.125rem;
  491. }
  492. .adviceOne {
  493. box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
  494. padding-bottom: 0.625rem;
  495. }
  496. .adviceTitle {
  497. padding-top: 0.625rem;
  498. display: flex;
  499. align-items: center;
  500. justify-content: space-between;
  501. p {
  502. color: #000000;
  503. font-weight: bold;
  504. font-size: 0.9375rem;
  505. }
  506. .ellipsis {
  507. font-size: 1.25rem;
  508. color: #cccccc;
  509. }
  510. }
  511. .orderContent {
  512. font-size: 0.875rem;
  513. color: rgba(49, 50, 52, 1);
  514. margin-top: 0.625rem;
  515. display: flex;
  516. flex-wrap: wrap;
  517. p {
  518. line-height: 1.5rem;
  519. width: 50%;
  520. }
  521. }
  522. .doctorBox {
  523. font-size: 0.75rem;
  524. color: rgba(152, 152, 152, 1);
  525. line-height: 1.125rem;
  526. display: flex;
  527. align-items: center;
  528. justify-content: space-between;
  529. margin-top: 0.625rem;
  530. }
  531. .all {
  532. font-size: 0.8125rem;
  533. color: #5b98ff;
  534. margin-top: 0.625rem;
  535. }
  536. .noimgBox {
  537. margin-top: 40%;
  538. img {
  539. width: 9.375rem;
  540. height: 9.375rem;
  541. margin: 0 auto;
  542. display: block;
  543. }
  544. }
  545. .add {
  546. position: fixed;
  547. bottom: 0;
  548. left: 0;
  549. width: 100%;
  550. height: 2.75rem;
  551. background: rgba(255, 255, 255, 1);
  552. box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.1);
  553. display: flex;
  554. align-items: center;
  555. justify-content: space-around;
  556. font-size: 0.9375rem;
  557. color: #979798;
  558. .addIcon {
  559. color: #5b98ff;
  560. font-size: 1.25rem;
  561. margin-right: 0.25rem;
  562. }
  563. }
  564. }
  565. ::-webkit-scrollbar {
  566. width: 0;
  567. }
  568. </style>