eight
2024-09-02 a8ed4654962dc8ac13bfd36436b79f25ba2e05de
monitor info function
已修改2个文件
34 ■■■■■ 文件已修改
src/api/ecg/room/index.ts 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomStatusSetting.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/ecg/room/index.ts
@@ -11,6 +11,12 @@
  docName: string | null
}
export interface MonitorInfo {
  queueNum : number
  activeQueueNum : number
  openingFlag : number
}
// 诊室和诊疗床 API
export const RoomApi = {
  // 查询诊室和诊疗床分页
@@ -64,8 +70,8 @@
  },
  //
  getOpeningFlag: async () => {
    return await request.get({ url: `/clinic/room/get-opening-flag` })
  getMonitorInfo: async () => {
    return await request.get({ url: `/clinic/room/monitor` })
  },
  // 手动开诊
src/views/ecg/room/RoomStatusSetting.vue
@@ -1,6 +1,6 @@
<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"/>
@@ -18,7 +18,7 @@
<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'
@@ -27,16 +27,20 @@
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
}
/** 查询列表 */
@@ -47,12 +51,12 @@
const startBiz = async () => {
  await RoomApi.startBiz();
  getOpeningFlag()
  getMonitorInfo()
}
const closeBiz = async () => {
  await RoomApi.closeBiz();
  getOpeningFlag()
  getMonitorInfo()
}
const resetRoom = async () => {
@@ -67,14 +71,14 @@
const refresh = () => {
  getList()
  getOpeningPeriod()
  getOpeningFlag()
  getMonitorInfo()
}
/** 初始化 **/
onMounted(() => {
  getList()
  getOpeningPeriod()
  getOpeningFlag()
  getMonitorInfo()
})
</script>