From bd32d8b406d90e72ba97273c0862adeb67d39073 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 28 八月 2024 11:38:07 +0800 Subject: [PATCH] update --- src/views/ecg/doctor/index.vue | 45 +++++++++++++++++++++++++-------------------- 1 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue index 47ee8de..85f55e8 100644 --- a/src/views/ecg/doctor/index.vue +++ b/src/views/ecg/doctor/index.vue @@ -3,13 +3,13 @@ import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue"; import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor'; import {useUserStore} from "@/store/modules/user"; -import {queueVO} from "@/api/ecg/queue"; +import {queueApi, queueVO} from "@/api/ecg/queue"; const userStore = useUserStore(); const roomBedVO: RoomBedVO = { - roomId: userStore.room.roomId, - bedNo: userStore.room.bedNo + roomId: userStore.room!.roomId, + bedNo: userStore.room!.bedNo } const patientStat = ref<PatientStatisticVO>({ @@ -19,30 +19,33 @@ queuingNum: 0 }) +const state = ref<boolean>(true) + 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 + list.value = await DoctorApi.finishNextPatient(roomBedVO) + patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) } const passNextPatient = async () => { - const data = await DoctorApi.passNextPatient(roomBedVO) - list.value = data - - const data2 = await DoctorApi.getPatientStatistic(roomBedVO) - patientStat.value = data2 + list.value = await DoctorApi.passNextPatient(roomBedVO) + patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) } const getPatientList = async () => { - const data = await DoctorApi.getPatientList(roomBedVO) - list.value = data + list.value = await DoctorApi.getPatientList(roomBedVO) + patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) +} - const data2 = await DoctorApi.getPatientStatistic(roomBedVO) - patientStat.value = data2 +const pauseQueue = async () => { + state.value = false + queueApi.bedDoctorPause(roomBedVO) +} + +const resumeQueue = async () => { + state.value = true + queueApi.bedDoctorResume(roomBedVO) } /** 鍒濆鍖� **/ @@ -65,9 +68,11 @@ <QueuePanel :queue="list"/> </el-aside> </el-container> - <el-container style="justify-content: center;"> - <el-button type="primary" @click="finishNextPatient">瀹屾垚涓嬩竴浣�</el-button> - <el-button type="primary" @click="passNextPatient">杩囧彿涓嬩竴浣�</el-button> + <el-container style="justify-content: center; margin-top: 30px"> + <el-button type="primary" @click="finishNextPatient">鍙彿</el-button> + <el-button type="primary" @click="passNextPatient">杩囧彿</el-button> + <el-button v-if="state" type="primary" @click="pauseQueue">鏆傚仠</el-button> + <el-button v-else type="primary" @click="resumeQueue">鎭㈠</el-button> </el-container> </el-container> </template> -- Gitblit v1.9.3