From 660f9e6478056aff8a52149c1bc1a0491d53ac71 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 30 十月 2024 18:12:58 +0800 Subject: [PATCH] 标记当前工作 是否 允许当前页面操作 --- src/store/modules/user.ts | 41 +++++++++++++++++++++++++++++++---------- 1 files changed, 31 insertions(+), 10 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 8fd7e8d..a857eb2 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -23,7 +23,7 @@ // 鍖荤敓璇婂閫夋嫨 isSetRoom: boolean - room: RoomVO | null + room: RoomVO } export const useUserStore = defineStore('admin-user', { @@ -40,11 +40,15 @@ // 鍖荤敓璇婂閫夋嫨 isSetRoom: false, room: { - id: 0, - roomId: 0, - roomName: "", - bedNo: "", - onstage: true + id: null, + roomId: null, + roomName: null, + bedNo: null, + status: null, + docId: null, + docName: null, + checkTypes: null, + opType: null } }), getters: { @@ -64,7 +68,7 @@ getIsSetRoom(): boolean { return this.isSetRoom }, - getRoom(): RoomVO { + getRoom(): RoomVO | null { return this.room } }, @@ -88,7 +92,15 @@ // 鍖荤敓鍏ュ骇 async setRoomInfoAction(room: RoomVO) { // 鏇存柊 store - this.room = room + this.room!.id = room.id + this.room!.roomId = room.roomId + this.room!.roomName = room.roomName + this.room!.bedNo = room.bedNo + this.room!.status = room.status + this.room!.docId = room.docId + this.room!.docName = room.docName + this.room!.checkTypes = room.checkTypes + this.room!.opType = room.opType this.isSetRoom = true // 鏇存柊 cache @@ -102,7 +114,14 @@ // 鍖荤敓绂诲骇 async clearRoomInfoAction() { // 娓� store - this.room = null + this.room.id = null + this.room.roomId = null + this.room.roomName = null + this.room.bedNo = null + this.room.status = null + this.room.docId = null + this.room.docName = null + this.isSetRoom = false // 鏇存柊 cache @@ -151,7 +170,9 @@ roomId: 0, roomName: "", bedNo: "", - onstage: true + status: null, + docId: null, + docName: null } } } -- Gitblit v1.9.3