From ff05ffe7f250bda96627d62b4bf1979fc6141e0b Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期日, 01 九月 2024 12:51:46 +0800
Subject: [PATCH] error tips

---
 src/views/ecg/doctor/index.vue |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue
index 2b0eb5b..bde628d 100644
--- a/src/views/ecg/doctor/index.vue
+++ b/src/views/ecg/doctor/index.vue
@@ -4,7 +4,7 @@
 import {DoctorApi, PatientStatisticVO, RoomBedVO} from '@/api/ecg/doctor';
 import {useUserStore} from "@/store/modules/user";
 import {QueueVO} from "@/api/ecg/queue";
-import {ElMessage} from "element-plus";
+import {ElMessage, ElNotification} from "element-plus";
 
 const userStore = useUserStore();
 
@@ -51,6 +51,15 @@
 }
 
 const initLoad = async () => {
+  if (roomBedVO.roomId == null) {
+    ElNotification.error({
+      message: '璇烽噸鏂板氨搴�!',
+      type: 'info',
+      duration: 3000 // 鑷姩鍏抽棴鏃堕棿锛岄粯璁や负3000ms
+    })
+    return
+  }
+
   patientList.value = await DoctorApi.getPatientList(roomBedVO)
   patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
   const queueVO2 = await DoctorApi.bedDoctorGet(roomBedVO)
@@ -99,12 +108,6 @@
   } else {
     roomBedVO.roomId = null
     roomBedVO.bedNo = null
-
-    ElMessage({
-      message: '璇峰厛鍏ュ骇!',
-      type: 'info',
-      duration: 3000 // 鑷姩鍏抽棴鏃堕棿锛岄粯璁や负3000ms
-    })
   }
 
   bedControlFlag.value = false

--
Gitblit v1.9.3