| | |
| | | <template> |
| | | <div style="display: flex; flex-direction: column; align-items: center;"> |
| | | <div>开诊时间:{{ openingPeriod }} 开诊标记:{{ openingFlag }}</div> |
| | | <div>开诊时间:{{ openingPeriod }} 监控信息: {{ monitorInfo.openingFlag }} {{ monitorInfo.queueNum }} {{ monitorInfo.activeQueueNum }}</div> |
| | | <div style="display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 20px"> |
| | | <div class=wrap v-for="(value, key) in bedMap" :key="key"> |
| | | <RoomStatus :title="key" :bedList="value" @refresh="getList"/> |
| | |
| | | |
| | | <script setup lang="ts"> |
| | | import {RoomStatus} from "@/components/RoomStatus" |
| | | import { RoomApi, RoomVO } from '@/api/ecg/room' |
| | | import { RoomApi, RoomVO, MonitorInfo } from '@/api/ecg/room' |
| | | import { QueueApi } from '@/api/ecg/queue' |
| | | import { getConfigKey } from '@/api/infra/config' |
| | | |
| | |
| | | const bedMap = ref() // 列表的数据 |
| | | |
| | | const openingPeriod = ref<string>('') |
| | | const openingFlag = ref<number>(0) |
| | | const monitorInfo = ref<MonitorInfo>({ |
| | | queueNum : 0, |
| | | activeQueueNum : 0, |
| | | openingFlag : 0 |
| | | }) |
| | | |
| | | const getOpeningPeriod = async () => { |
| | | const data = await getConfigKey('ecg.openingtime') |
| | | openingPeriod.value = data |
| | | } |
| | | |
| | | const getOpeningFlag = async () => { |
| | | const data = await RoomApi.getOpeningFlag() |
| | | openingFlag.value = data |
| | | const getMonitorInfo = async () => { |
| | | const data = await RoomApi.getMonitorInfo() |
| | | monitorInfo.value = data as MonitorInfo |
| | | } |
| | | |
| | | /** 查询列表 */ |
| | |
| | | |
| | | const startBiz = async () => { |
| | | await RoomApi.startBiz(); |
| | | getOpeningFlag() |
| | | getMonitorInfo() |
| | | } |
| | | |
| | | const closeBiz = async () => { |
| | | await RoomApi.closeBiz(); |
| | | getOpeningFlag() |
| | | getMonitorInfo() |
| | | } |
| | | |
| | | const resetRoom = async () => { |
| | |
| | | const refresh = () => { |
| | | getList() |
| | | getOpeningPeriod() |
| | | getOpeningFlag() |
| | | getMonitorInfo() |
| | | } |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(() => { |
| | | getList() |
| | | getOpeningPeriod() |
| | | getOpeningFlag() |
| | | getMonitorInfo() |
| | | }) |
| | | |
| | | </script> |