| | |
| | | </div> |
| | | </div> |
| | | <el-button type="primary" @click="roomConfirm">确认</el-button> |
| | | <el-button type="primary" @click="test">TEST</el-button> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import {RoomBedSelect} from "@/components/RoomBedSelect" |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import {useUserStore} from "@/store/modules/user"; |
| | | import {CACHE_KEY, useCache} from "@/hooks/web/useCache"; |
| | | const { currentRoute, push } = useRouter() |
| | | const { wsCache } = useCache() |
| | | |
| | | defineOptions({ name: 'RoomLoginSelect' }) |
| | | |
| | | const userStore = useUserStore() |
| | | |
| | | const bedMap = ref<Map<String, RoomVO[]>>() // 列表的数据 |
| | | |
| | |
| | | |
| | | const roomConfirm = () => { |
| | | console.info(curSel.value) |
| | | userStore.setRoomInfoAction(curSel.value) |
| | | push({ path: "/"}) |
| | | } |
| | | |
| | | const test = () => { |
| | | userStore.getRoom; |
| | | console.info(userStore.getRoom); |
| | | |
| | | const userInfo = wsCache.get(CACHE_KEY.USER) |
| | | console.info(userInfo); |
| | | } |
| | | |
| | | /** 初始化 **/ |