From a4ab42cd00e588511d139344b65cdc6a669a312a Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 18 十一月 2024 18:25:10 +0800
Subject: [PATCH] 多工位 逻辑
---
src/views/ecg/room/RoomLoginSelect.vue | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/src/views/ecg/room/RoomLoginSelect.vue b/src/views/ecg/room/RoomLoginSelect.vue
index f29fa56..2e6bdfb 100644
--- a/src/views/ecg/room/RoomLoginSelect.vue
+++ b/src/views/ecg/room/RoomLoginSelect.vue
@@ -18,7 +18,6 @@
import { RoomApi, RoomVO } from '@/api/ecg/room'
import {useUserStore} from "@/store/modules/user";
import {ElMessage, ElMessageBox} from "element-plus";
-import {isStringEmpty} from "@/utils/stringUtil";
import {cloneDeep} from "lodash-es";
import {DoctorApi} from "@/api/ecg/doctor";
import {useRoomStore} from "@/store/modules/room";
@@ -74,13 +73,18 @@
isEmptyOpeningBed.value = true
for (const key in data) {
isEmptyOpeningBed.value = false
- const roomVOArray = data[key] as RoomVO[];
- roomVOArray.forEach((roomVO) => {
- if (roomVO.docId === curUser.id) {
- curSel.value = roomVO
- roomStore.setRoomInfoAction(curSel.value)
- }
- })
+
+ if (roomStore.getIsSetRoom) {
+ const roomVOArray = data[key] as RoomVO[];
+ roomVOArray.forEach((roomVO) => {
+ if (roomVO.docId === curUser.id
+ && roomVO.roomId === roomStore.room!.roomId
+ && roomVO.bedNo === roomStore.room!.bedNo) {
+ curSel.value = roomVO
+ roomStore.setRoomInfoAction(curSel.value)
+ }
+ })
+ }
}
}
@@ -190,9 +194,9 @@
*/
}
-const leaveSeatConfirm = async () => {
- if (curSel.value.docId !== null) {
- let data = await DoctorApi.bedDoctorOff(curSel.value)
+const leaveSeatConfirm = async (roomVO: RoomVO) => {
+ if (roomVO.docId !== null) {
+ let data = await DoctorApi.bedDoctorOff(roomVO)
if (data !== 0) {
ElMessage({
message: '鍐呴儴閿欒!' + data,
@@ -233,7 +237,7 @@
type: 'warning'
}
).then(() => {
- leaveSeatConfirm()
+ leaveSeatConfirm(roomVO)
}).catch(() => {
});
}
--
Gitblit v1.9.3