| | |
| | | <div style="display: flex; flex-direction: column; align-items: center;"> |
| | | <div style="display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 20px"> |
| | | <div class=roomwrap v-for="(value, key) in bedMap" :key="key"> |
| | | <RoomBedSelect :title="key" :bedList="value" :curBed="curSel" @haveSeat="haveSeat" @leaveSeat="leaveSeat"/> |
| | | <RoomBedSelect :title="key" :bedList="value" :curBed="curSel" @event-haveseat="haveSeat" @event-leaveseat="leaveSeat"/> |
| | | </div> |
| | | </div> |
| | | <el-button @click="confirmCurSel">确认</el-button> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | roomVO.docId = curUser.id |
| | | roomVO.docName = curUser.nickname |
| | | curSel.value = roomVO |
| | | |
| | | |
| | | haveSeatConfirm() |
| | | }).catch(() => { |
| | | console.log('取消'); |
| | |
| | | }); |
| | | } |
| | | |
| | | const confirmCurSel = () => { |
| | | if (curSel.value.docId === null ) { |
| | | ElMessage({ |
| | | message: '请先选择工作的位置!', |
| | | type: 'info', |
| | | duration: 3000 // 自动关闭时间,默认为3000ms |
| | | }); |
| | | return |
| | | } |
| | | |
| | | userStore.setRoomInfoAction(curSel.value) |
| | | if (isStringEmpty(route.redirectedFrom?.fullPath)) |
| | | push({ path: "/"}) |
| | | else if(route.redirectedFrom?.fullPath === "/roomselect" ) |
| | | push({ path: "/"}) |
| | | else |
| | | push({ path: route.redirectedFrom?.fullPath}) |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(() => { |
| | | getList() |