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, 19 insertions(+), 26 deletions(-) diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue index a19d272..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,40 +19,33 @@ queuingNum: 0 }) -let state: 'normal' | 'paused' = "normal"; +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 - - const data2 = await DoctorApi.getPatientStatistic(roomBedVO) - patientStat.value = data2 + list.value = await DoctorApi.getPatientList(roomBedVO) + patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO) } -const pause = async () => { - state = 'paused' +const pauseQueue = async () => { + state.value = false + queueApi.bedDoctorPause(roomBedVO) } -const resume = async () => { - state = 'normal' +const resumeQueue = async () => { + state.value = true + queueApi.bedDoctorResume(roomBedVO) } /** 鍒濆鍖� **/ @@ -75,11 +68,11 @@ <QueuePanel :queue="list"/> </el-aside> </el-container> - <el-container style="justify-content: center;"> + <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==='normal'" type="primary" @click="pause">鏆傚仠</el-button> - <el-button v-else type="primary" @click="resume">鎭㈠</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