From a2346b299c8537318fbc245e3325b7a499ecce4e Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 21 八月 2024 18:32:33 +0800 Subject: [PATCH] update --- src/views/ecg/doctor/components/TitlePanel.vue | 20 ++++++-------------- src/views/ecg/doctor/index.vue | 20 ++++++++++++++++++-- src/views/ecg/doctor/components/QueuePanel.vue | 1 - src/api/ecg/doctor/index.ts | 12 ++++++++++++ 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/api/ecg/doctor/index.ts b/src/api/ecg/doctor/index.ts index a2fdb31..53ae9a0 100644 --- a/src/api/ecg/doctor/index.ts +++ b/src/api/ecg/doctor/index.ts @@ -5,6 +5,13 @@ bedNo: string // 璇婄枟搴婄紪鍙� } +export interface PatientStatisticVO { + finishedNum: number + readyNum: number + passedNum: number + queuingNum: number +} + // 鍖荤敓 API export const DoctorApi = { @@ -21,6 +28,11 @@ // 鍙栧垵濮嬫偅鑰呭垪琛� getPatientList: async (params: RoomBedVO) => { return await request.get({ url: `/ecg/doctor/get-patient-list`, params }) + }, + + // 鍙栨偅鑰呯粺璁� + getPatientStatistic: async (params: RoomBedVO) => { + return await request.get({ url: `/ecg/doctor/get-patient-statistic`, params }) } } diff --git a/src/views/ecg/doctor/components/QueuePanel.vue b/src/views/ecg/doctor/components/QueuePanel.vue index de30b75..cf06b0c 100644 --- a/src/views/ecg/doctor/components/QueuePanel.vue +++ b/src/views/ecg/doctor/components/QueuePanel.vue @@ -26,7 +26,6 @@ <div v-for="(item, index) in queue" :key="index"> {{item.patName}} <dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="item.patGender" /> - {{item.roomId}} {{item.roomName}} {{item.bedNo}} <dict-tag :type="DICT_TYPE.ECG_CHECK_TYPE" :value="item.bookCheckType" /> diff --git a/src/views/ecg/doctor/components/TitlePanel.vue b/src/views/ecg/doctor/components/TitlePanel.vue index aab19ad..00def2a 100644 --- a/src/views/ecg/doctor/components/TitlePanel.vue +++ b/src/views/ecg/doctor/components/TitlePanel.vue @@ -1,7 +1,7 @@ <script setup lang="ts"> import {defineComponent, PropType} from "vue"; import {useUserStore} from "@/store/modules/user"; -import {RoomBedVO} from "@/api/ecg/doctor"; +import {PatientStatisticVO, RoomBedVO} from "@/api/ecg/doctor"; const userStore = useUserStore(); @@ -15,26 +15,18 @@ } const props = defineProps({ - room: { - type: String, + patientStatistic: { + type: Object as PropType<PatientStatisticVO>, required: true } - /*, - bedList: { - type: Array as PropType<RoomVO[]>, - required: true - }, - modelValue: { - type: Object as PropType<RoomVO>, - required: true - } -*/ }) </script> <template> -宸插氨璇妠{10}} 鍑嗗涓瓄{3}} 杩囧彿{{2}} 鎺掗槦涓瓄{100}} 璇婂{{roomBedVO.roomId}} 宸ヤ綅{{roomBedVO.bedNo}} +宸插氨璇妠{patientStatistic.finishedNum}} 鍑嗗涓瓄{patientStatistic.readyNum}} + 杩囧彿{{patientStatistic.passedNum}} 鎺掗槦涓瓄{patientStatistic.queuingNum}} + 璇婂{{roomBedVO.roomId}} 宸ヤ綅{{roomBedVO.bedNo}} </template> <style scoped lang="scss"> diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue index a62554d..47ee8de 100644 --- a/src/views/ecg/doctor/index.vue +++ b/src/views/ecg/doctor/index.vue @@ -1,7 +1,7 @@ <script setup lang="ts"> import TitlePanel from "@/views/ecg/doctor/components/TitlePanel.vue"; import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue"; -import { DoctorApi, RoomBedVO } from '@/api/ecg/doctor'; +import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor'; import {useUserStore} from "@/store/modules/user"; import {queueVO} from "@/api/ecg/queue"; @@ -12,21 +12,37 @@ bedNo: userStore.room.bedNo } +const patientStat = ref<PatientStatisticVO>({ + finishedNum: 0, + readyNum: 0, + passedNum: 0, + queuingNum: 0 +}) + const list = ref<queueVO[]>([]) const finishNextPatient = async () => { const data = await DoctorApi.finishNextPatient(roomBedVO) list.value = data + + const data2 = await DoctorApi.getPatientStatistic(roomBedVO) + patientStat.value = data2 } const passNextPatient = async () => { const data = await DoctorApi.passNextPatient(roomBedVO) list.value = data + + const data2 = await DoctorApi.getPatientStatistic(roomBedVO) + patientStat.value = data2 } const getPatientList = async () => { const data = await DoctorApi.getPatientList(roomBedVO) list.value = data + + const data2 = await DoctorApi.getPatientStatistic(roomBedVO) + patientStat.value = data2 } /** 鍒濆鍖� **/ @@ -39,7 +55,7 @@ <template> <el-container> <el-header style="background-color: var(--el-color-primary-light-7); font-size: 24px"> - <TitlePanel room="A208"/> + <TitlePanel :patientStatistic="patientStat" /> </el-header> <el-container> <el-main> -- Gitblit v1.9.3