| | |
| | | <div class=roomwrap v-for="(value, key) in bedMap" :key="key"> |
| | | <RoomBedSelect :title="key" :bedList="value" :curBed="curSel" @event-haveseat="haveSeat" @event-leaveseat="leaveSeat"/> |
| | | </div> |
| | | <div v-if="isEmptyOpeningBed">"工位没有开放"</div> |
| | | <el-empty v-if="isEmptyOpeningBed" description="工位没有开放"/> |
| | | </div> |
| | | <div> |
| | | <el-button @click="confirmCurSel">确认</el-button> |
| | |
| | | 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' }) |
| | |
| | | const route = useRoute(); |
| | | |
| | | const userStore = useUserStore() |
| | | const roomStore = useRoomStore() |
| | | const curUser = userStore.getUser |
| | | |
| | | const isEmptyOpeningBed = ref<boolean>(true); |
| | |
| | | bedNo: null, |
| | | status: null, |
| | | docId: null, |
| | | docName: null |
| | | docName: null, |
| | | ip: "", |
| | | checkTypes: [], |
| | | opType: 0 |
| | | }) |
| | | |
| | | /** 初始化 **/ |
| | |
| | | roomVOArray.forEach((roomVO) => { |
| | | if (roomVO.docId === curUser.id) { |
| | | curSel.value = roomVO |
| | | userStore.setRoomInfoAction(curSel.value) |
| | | roomStore.setRoomInfoAction(curSel.value) |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | if (isStringEmpty(route.redirectedFrom?.fullPath)) |
| | | push({ path: "/"}) |
| | | push({ path: "/ecg/doctor"}) |
| | | else if(route.redirectedFrom?.fullPath === "/roomselect" ) |
| | | push({ path: "/"}) |
| | | push({ path: "/ecg/doctor"}) |
| | | else if(route.redirectedFrom?.fullPath === "/ecg/roomselect" ) |
| | | push({ path: "/"}) |
| | | push({ path: "/ecg/doctor"}) |
| | | else |
| | | push({ path: route.redirectedFrom?.fullPath}) |
| | | } |
| | |
| | | } |
| | | |
| | | resetCurSel() |
| | | userStore.clearRoomInfoAction() |
| | | await roomStore.clearRoomInfoAction() |
| | | |
| | | const tempRoomVO = cloneDeep(newRoomVO) |
| | | tempRoomVO.docId = curUser.id |
| | |
| | | return |
| | | } |
| | | |
| | | userStore.setRoomInfoAction(tempRoomVO) |
| | | await roomStore.setRoomInfoAction(tempRoomVO) |
| | | newRoomVO.docId = curUser.id |
| | | newRoomVO.docName = curUser.nickname |
| | | curSel.value = newRoomVO; |
| | | } |
| | | |
| | | // curSel.value.opType 0 1 2 |
| | | if (isStringEmpty(route.redirectedFrom?.fullPath)) { |
| | | push({path: "/"}) |
| | | push({path: "/ecg/doctor"}) |
| | | } |
| | | else if(route.redirectedFrom?.fullPath === "/roomselect" ) { |
| | | push({path: "/"}) |
| | | push({path: "/ecg/doctor"}) |
| | | } |
| | | else if(route.redirectedFrom?.fullPath === "/ecg/roomselect" ) { |
| | | push({path: "/"}) |
| | | push({path: "/ecg/doctor"}) |
| | | } |
| | | else { |
| | | push({path: route.redirectedFrom?.fullPath}) |
| | |
| | | } |
| | | |
| | | resetCurSel() |
| | | userStore.clearRoomInfoAction() |
| | | await roomStore.clearRoomInfoAction() |
| | | getList() |
| | | } |
| | | |