From 09dc74e264b6262cbe41c9c8476e24705871d4a6 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:31:17 +0800
Subject: [PATCH] yxh
---
src/views/ecg/doctor/Routine.vue | 35 ++++++++++++++++++++++++++---------
1 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/src/views/ecg/doctor/Routine.vue b/src/views/ecg/doctor/Routine.vue
index 5545c0b..e52cfe8 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'
@@ -73,8 +74,11 @@
// ==================== 闇�姹�3锛氬仠姝㈠�欒瘖寮�鍏� ====================
// 璇箟锛氬紑鍚悗銆愬凡鏈夊�欒瘖鐥呬汉缁х画鍙彿锛屼絾涓嶅啀鏂板鍊欒瘖鐥呬汉銆戯紱鍏抽棴鍚庢仮澶嶃��
-// 涓庝笂闈㈢殑"鏆傚仠/鎭㈠"鏄�**涓や釜鐙珛姒傚康**锛氭殏鍋滀細鎶婂氨璇婁腑鎮h�呭己鍒跺畬鎴愩��
-// 骞舵妸鍊欒瘖鎮h�呰涪鍑哄伐浣嶏紱鏈紑鍏冲彧鎷︽埅"鏂板"锛屼笉鍔ㄥ凡鏈夋偅鑰呫��
+// 涓庝笂闈㈢殑"鏆傚仠/鎭㈠"鏄�**涓や釜鐙珛姒傚康**锛堟敞鎰忥細涓よ�呴兘鍙嫤鎴�"鏂板"锛岄兘涓嶅姩宸叉湁鎮h�咃級锛�
+// 路 鏆傚仠锛氬伐浣嶇姸鎬� 20銆屽湪搴с�嶁啋 30銆屾殏鍋溿�嶏紙绠$悊绔�/鐩戞帶椤靛彲瑙侊級锛屽悓鏃舵憳鍑哄垎娴侀槦鍒楋紱
+// 路 鍋滄鍊欒瘖锛氬伐浣嶇姸鎬佷粛鏄� 20銆屽湪搴с�嶏紝鍙啓 clinic_room.stop_ready 骞舵憳鍑哄垎娴侀槦鍒椼��
+// 涓よ�呴兘**涓嶄細**寮哄埗瀹屾垚銆屽氨璇婁腑銆嶆偅鑰呫�佷篃**涓嶄細**娓呯┖銆屽�欒瘖涓�嶆偅鑰咃紱
+// 鍙彿鎺ュ彛锛坣extPatient锛変笉妫�鏌ヨ繖涓や釜鐘舵�侊紝鎵�浠ュ凡鏈夊�欒瘖浠嶅彲姝e父鍙彿銆�
const stopReady = ref<boolean>(false)
const stopReadyFlag = ref<boolean>(true) // 闃茶繛鐐�
@@ -303,11 +307,9 @@
const initLoad = async () => {
if (roomBedVO.roomId == null) {
- ElNotification.error({
- message: '璇烽噸鏂板氨搴�!',
- type: 'info',
- duration: 3000 // 鑷姩鍏抽棴鏃堕棿锛岄粯璁や负3000ms
- })
+ // 銆愭湰闇�姹傘�戞病鏈夊伐浣嶏細**鍋滄帀杞**骞跺彧鎻愮ず涓�娆★紙鍘熸潵姣� 5 绉掑脊涓�娆★紝鐜板満琛ㄧ幇灏辨槸"涓�鐩磋烦"锛�
+ timerRunFlag = false
+ notifySeatInvalidOnce()
return
}
@@ -318,7 +320,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 +380,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 +410,7 @@
roomBedVO.bedNo = roomStore.room!.bedNo
roomBedVO.checkTypes = roomStore.room!.checkTypes
roomBedVO.opType = roomStore.room!.opType
+ resetSeatInvalidNotify()
timerRunFlag = true
doctorTimer()
--
Gitblit v1.9.3