eight
2024-11-18 adecd142412454acbd8f729c7230e9a90b3dcddc
src/views/ecg/room/RoomLoginSelect.vue
@@ -21,6 +21,7 @@
import {isStringEmpty} from "@/utils/stringUtil";
import {cloneDeep} from "lodash-es";
import {DoctorApi} from "@/api/ecg/doctor";
import {useRoomStore} from "@/store/modules/room";
const {  push } = useRouter()
defineOptions({ name: 'RoomLoginSelect' })
@@ -28,6 +29,7 @@
const route = useRoute();
const userStore = useUserStore()
const roomStore = useRoomStore()
const curUser = userStore.getUser
const isEmptyOpeningBed = ref<boolean>(true);
@@ -39,7 +41,10 @@
  bedNo: null,
  status: null,
  docId: null,
  docName: null
  docName: null,
  ip: "",
  checkTypes: [],
  opType: 0
})
/** 初始化 **/
@@ -73,7 +78,7 @@
      roomVOArray.forEach((roomVO) => {
        if (roomVO.docId === curUser.id) {
          curSel.value = roomVO
          userStore.setRoomInfoAction(curSel.value)
          roomStore.setRoomInfoAction(curSel.value)
        }
      })
  }
@@ -115,7 +120,7 @@
    }
    resetCurSel()
    userStore.clearRoomInfoAction()
    await roomStore.clearRoomInfoAction()
    const tempRoomVO = cloneDeep(newRoomVO)
    tempRoomVO.docId = curUser.id
@@ -130,7 +135,7 @@
      return
    }
    userStore.setRoomInfoAction(tempRoomVO)
    await roomStore.setRoomInfoAction(tempRoomVO)
    newRoomVO.docId = curUser.id
    newRoomVO.docName = curUser.nickname
    curSel.value = newRoomVO;
@@ -165,7 +170,7 @@
  }
  resetCurSel()
  userStore.clearRoomInfoAction()
  await roomStore.clearRoomInfoAction()
  getList()
}