From 01ee694a3bb8048372fc793a8de314d70b688b35 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 18 十月 2026 22:36:21 +0800
Subject: [PATCH] 修改了工位

---
 src/views/ecg/doctor/Routine.vue |   28 +++++++++++++++++++++-------
 1 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/src/views/ecg/doctor/Routine.vue b/src/views/ecg/doctor/Routine.vue
index 5545c0b..a0baaba 100644
--- a/src/views/ecg/doctor/Routine.vue
+++ b/src/views/ecg/doctor/Routine.vue
@@ -9,8 +9,9 @@
 import QueuePanel from '@/views/ecg/doctor/components/QueuePanel.vue'
 import DoctorPageLayout from '@/components/DoctorPageLayout/src/DoctorPageLayout.vue'
 import { DoctorApi, PatientStatisticVO, RoomBedVO, } from '@/api/ecg/doctor'
+import { notifySeatInvalidOnce, isSeatInvalidError, resetSeatInvalidNotify } from '@/utils/seatGuard'
 import { QueueVO } from '@/api/ecg/queue'
-import { ElMessage, ElMessageBox, ElNotification } from 'element-plus'
+import { ElMessage, ElMessageBox } from 'element-plus'
 import RoutinePanel from '@/views/ecg/doctor/components/RoutinePanel.vue'
 import { useRoomStore } from '@/store/modules/room'
 
@@ -303,11 +304,9 @@
 
 const initLoad = async () => {
   if (roomBedVO.roomId == null) {
-    ElNotification.error({
-      message: '璇烽噸鏂板氨搴�!',
-      type: 'info',
-      duration: 3000 // 鑷姩鍏抽棴鏃堕棿锛岄粯璁や负3000ms
-    })
+    // 銆愭湰闇�姹傘�戞病鏈夊伐浣嶏細**鍋滄帀杞**骞跺彧鎻愮ず涓�娆★紙鍘熸潵姣� 5 绉掑脊涓�娆★紝鐜板満琛ㄧ幇灏辨槸"涓�鐩磋烦"锛�
+    timerRunFlag = false
+    notifySeatInvalidOnce()
     return
   }
 
@@ -318,7 +317,19 @@
   loadRoomWaitingList()
   getOnstagePatient()
   patientStat.value = await DoctorApi.getPatientStatistic(roomBedVO)
-  const queueVO2 = await DoctorApi.bedDoctorGet(roomBedVO)
+  // 銆愭湰闇�姹傘�慴ed-doctor-get 鏄�"鎴戞槸鍚﹁繕鍧愬湪杩欓噷"鐨勫垽瀹氾細澶辫触璇存槑宸ヤ綅宸茶閲婃斁 / 浠栦汉鎺ユ墜锛�
+  // 姝ゆ椂鍋滄帀杞骞朵竴娆℃�ф彁绀猴紝閬垮厤姣� 5 绉掑埛涓�娆�"璇烽噸鏂板氨搴�"銆�
+  let queueVO2: any
+  try {
+    queueVO2 = await DoctorApi.bedDoctorGet(roomBedVO)
+  } catch (e: any) {
+    if (isSeatInvalidError(e)) {
+      timerRunFlag = false
+      notifySeatInvalidOnce()
+      return
+    }
+    throw e
+  }
   // 銆愬姞鍥恒�戞帴鍙e彲鑳借繑鍥� null锛屽師鏉ョ洿鎺ュ彇 .status 浼氭姏寮傚父銆佷腑鏂湰杞悗缁楠�
   if (queueVO2 && queueVO2.status === 20) state.value = true
   else if (queueVO2 && queueVO2.status === 30) state.value = false
@@ -366,6 +377,8 @@
     roomBedVO.bedNo = roomStore.room.bedNo
     roomBedVO.checkTypes = roomStore.room.checkTypes
     roomBedVO.opType = roomStore.room.opType
+    // 銆愭湰闇�姹傘�戦噸鏂版嬁鍒板伐浣� -> 澶嶄綅銆愬伐浣嶅け鏁堛�戞彁绀猴紝鍏佽涓嬫鍐嶆彁绀轰竴娆�
+    resetSeatInvalidNotify()
     // 銆愭湰娆¢渶姹傘�戞崲宸ヤ綅鍚�**鏁撮〉鏁版嵁閮芥崲鎴愭柊宸ヤ綅鐨�**锛�
     // 鈶� 鍏堟竻绌哄乏渚�"鎮h�呬俊鎭�"锛堥伩鍏嶈繕鏄剧ず涓婁竴涓伐浣嶇殑鎮h�咃級
     routimePanelRef.value?.setPatient?.(undefined)
@@ -394,6 +407,7 @@
     roomBedVO.bedNo = roomStore.room!.bedNo
     roomBedVO.checkTypes = roomStore.room!.checkTypes
     roomBedVO.opType = roomStore.room!.opType
+    resetSeatInvalidNotify()
 
     timerRunFlag = true
     doctorTimer()

--
Gitblit v1.9.3