eight
2024-10-30 660f9e6478056aff8a52149c1bc1a0491d53ac71
src/store/modules/user.ts
@@ -23,7 +23,7 @@
  // 医生诊室选择
  isSetRoom: boolean
  room: RoomVO | null
  room: RoomVO
}
export const useUserStore = defineStore('admin-user', {
@@ -40,13 +40,15 @@
    // 医生诊室选择
    isSetRoom: false,
    room: {
      id: 0,
      roomId: 0,
      roomName: "",
      bedNo: "",
      id: null,
      roomId: null,
      roomName: null,
      bedNo: null,
      status: null,
      docId: null,
      docName: null
      docName: null,
      checkTypes: null,
      opType: null
    }
  }),
  getters: {
@@ -97,6 +99,8 @@
      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
@@ -110,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