From 46c604e44679808441771cc08a9be09770f5cc5c Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 30 八月 2024 18:00:59 +0800
Subject: [PATCH] update

---
 src/views/ecg/doctor/index.vue |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue
index c91c40f..cb9d6e6 100644
--- a/src/views/ecg/doctor/index.vue
+++ b/src/views/ecg/doctor/index.vue
@@ -3,13 +3,14 @@
 import QueuePanel from "@/views/ecg/doctor/components/QueuePanel.vue";
 import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
 import {useUserStore} from "@/store/modules/user";
-import {QueueApi, QueueVO} from "@/api/ecg/queue";
+import {QueueVO} from "@/api/ecg/queue";
 
 const userStore = useUserStore();
 
 const roomBedVO: RoomBedVO = {
-    roomId: userStore.room!.roomId,
-    bedNo: userStore.room!.bedNo
+    roomId: null,
+    roomName: null,
+    bedNo: null
 }
 
 const patientStat = ref<PatientStatisticVO>({
@@ -45,7 +46,7 @@
 const initLoad = async () => {
   list.value = await DoctorApi.getPatientList(roomBedVO)
   patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
-  const queueVO2 = await QueueApi.bedDoctorGet(roomBedVO)
+  const queueVO2 = await DoctorApi.bedDoctorGet(roomBedVO)
   if (queueVO2.status === 20)
     state.value = true
   else if (queueVO2.status === 30)
@@ -55,10 +56,10 @@
 const bedControl = async () => {
   bedControlFlag.value = true
   if (state.value) {
-    await QueueApi.bedDoctorPause(roomBedVO)
+    await DoctorApi.bedDoctorPause(roomBedVO)
     state.value = false
   } else {
-    await QueueApi.bedDoctorResume(roomBedVO)
+    await DoctorApi.bedDoctorResume(roomBedVO)
     state.value = true
   }
   bedControlFlag.value = false
@@ -73,10 +74,19 @@
 
 /** 鍒濆鍖� **/
 onMounted(() => {
-  console.info("onMounted - doctor")
+  console.info("onMounted - doctor " + userStore.isSetRoom)
   bedControlFlag.value = true
   finishFlag.value = true
   passFlag.value = true
+
+  if (userStore.isSetRoom) {
+    roomBedVO.roomId = userStore.room!.roomId
+    roomBedVO.roomName = userStore.room!.roomName
+    roomBedVO.bedNo = userStore.room!.bedNo
+  } else {
+    roomBedVO.roomId = null
+    roomBedVO.bedNo = null
+  }
 
   timerRunFlag = true
   doctorTimer()
@@ -96,7 +106,7 @@
 <template>
   <el-container>
     <el-header style="background-color: var(--el-color-primary-light-7); font-size: 24px">
-      <TitlePanel :patientStatistic="patientStat" />
+      <TitlePanel :room="roomBedVO" :patientStatistic="patientStat" />
     </el-header>
     <el-container>
       <el-main>

--
Gitblit v1.9.3