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/index.vue | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/src/views/ecg/doctor/index.vue b/src/views/ecg/doctor/index.vue
index 1091031..2c3ddeb 100644
--- a/src/views/ecg/doctor/index.vue
+++ b/src/views/ecg/doctor/index.vue
@@ -10,8 +10,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 DevReadyPanel from "@/views/ecg/doctor/components/DevReadyPanel.vue";
import {useRoomStore} from "@/store/modules/room";
@@ -243,11 +244,9 @@
const initLoad = async () => {
if (roomBedVO.roomId == null) {
- ElNotification.error({
- message: '璇烽噸鏂板氨搴�!',
- type: 'info',
- duration: 3000 // 鑷姩鍏抽棴鏃堕棿锛岄粯璁や负3000ms
- })
+ // 銆愭湰闇�姹傘�戞病鏈夊伐浣嶏細鍋滄帀杞骞跺彧鎻愮ず涓�娆★紙鍘熸潵姣� 5 绉掑脊涓�娆★紝鐜板満琛ㄧ幇灏辨槸涓�鐩磋烦锛�
+ timerRunFlag = false
+ notifySeatInvalidOnce()
return
}
@@ -258,7 +257,19 @@
loadRoomWaitingList()
getOnstagePatient()
patientStat.value = await DoctorApi.getDevReadyStatistic(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
@@ -305,6 +316,8 @@
roomBedVO.bedNo = roomStore.room.bedNo
roomBedVO.checkTypes = roomStore.room.checkTypes
roomBedVO.opType = roomStore.room.opType
+ // 銆愭湰闇�姹傘�戦噸鏂版嬁鍒板伐浣� -> 澶嶄綅銆愬伐浣嶅け鏁堛�戞彁绀猴紝鍏佽涓嬫鍐嶆彁绀轰竴娆�
+ resetSeatInvalidNotify()
// 銆愭湰娆¢渶姹傘�戞崲宸ヤ綅鍚�**鏁撮〉鏁版嵁閮芥崲鎴愭柊宸ヤ綅鐨�**锛�
// 鈶� 鍏堟竻绌哄乏渚�"鎮h�呬俊鎭�"锛堥伩鍏嶈繕鏄剧ず涓婁竴涓伐浣嶇殑鎮h�咃級
devReadyPanelRef.value?.setPatient?.(undefined)
@@ -333,6 +346,7 @@
roomBedVO.bedNo = roomStore.room!.bedNo
roomBedVO.checkTypes = roomStore.room!.checkTypes
roomBedVO.opType = roomStore.room!.opType
+ resetSeatInvalidNotify()
timerRunFlag = true
doctorTimer()
--
Gitblit v1.9.3