eight
2024-10-10 e84705f4809b57509b8665f0b5db4fc435e08496
工位状态 动态查看
已修改3个文件
87 ■■■■ 文件已修改
src/components/RoomStatus/src/RoomStatus.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomForm.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ecg/room/RoomSetting.vue 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/RoomStatus/src/RoomStatus.vue
@@ -2,6 +2,7 @@
import { RoomApi, RoomVO } from '@/api/ecg/room'
import { QueueApi } from '@/api/ecg/queue'
import {PropType} from "vue";
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
const emit = defineEmits(['refresh'])
defineComponent({
@@ -19,6 +20,8 @@
  }
})
let mapCheckType: Map<number, string> = new Map();
const openBed = async (item) => {
    await QueueApi.bedOpen(item)
    emit('refresh')
@@ -28,6 +31,19 @@
    await QueueApi.bedClose(item)
    emit('refresh')
}
const getCheckTypeList = () => {
  const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)
  console.info( data )
  data.forEach((checkTypeItem) => {
    mapCheckType.set(checkTypeItem.value, checkTypeItem.label)
  })
}
/** 初始化 **/
onMounted(() => {
  getCheckTypeList()
})
</script>
@@ -55,6 +71,12 @@
            style="width: 100%"
        />
        {{bedItem.bedNo}} {{bedItem.docName}} {{bedItem.status === 30?"-暂停":""}}
        <div v-for="(checkType, subIndex) in bedItem.checkTypes" :key="subIndex">
          {{mapCheckType.get(checkType)}}
        </div>
        <div>
          {{bedItem.opType === 1?"领用":""}}
        </div>
      </div>
    </div>
  </el-card>
src/views/ecg/room/RoomForm.vue
@@ -30,6 +30,13 @@
        </el-checkbox-group>
      </el-form-item>
      <el-form-item label="作业类型" prop="opType">
        <el-radio-group v-model="formData.opType">
          <el-radio key="1" :label="0"> 检查 </el-radio>
          <el-radio key="0" :label="1"> 领用 </el-radio>
        </el-radio-group>
      </el-form-item>
    </el-form>
    <template #footer>
      <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
@@ -57,7 +64,8 @@
  roomName: undefined,
  bedNo: undefined,
  ip: undefined,
  checkTypes: undefined
  checkTypes: undefined,
  opType: undefined
})
const formRules = reactive({
  roomId: [{ required: true, message: '诊室编号不能为空', trigger: 'blur' }],
src/views/ecg/room/RoomSetting.vue
@@ -1,19 +1,26 @@
<template>
  <div style="display: flex; flex-direction: column; align-items: center;">
  <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"/>
    </div>
  </div>
  <div>
    <el-button @click="startBiz" > 手动开诊 </el-button>
    <el-button @click="closeBiz" > 手动闭诊 </el-button>
    <el-button @click="resetRoom" > 重置诊室 </el-button>
    <el-button @click="resetSchedule" > 重置定时任务 </el-button>
    <el-button @click="refresh" > 刷新 </el-button>
  </div>
  </div>
  <el-container>
    <el-main>
      <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"/>
        </div>
      </div>
      <div style="display: flex; flex-wrap: wrap; justify-content: center; margin-bottom: 20px">
        <el-button @click="startBiz" > 手动开诊 </el-button>
        <el-button @click="closeBiz" > 手动闭诊 </el-button>
        <el-button @click="resetRoom" > 重置诊室 </el-button>
        <el-button @click="resetSchedule" > 重置定时任务 </el-button>
        <el-button @click="refresh" > 刷新 </el-button>
      </div>
    </el-main>
    <el-aside width="250px">
      <div>开诊时间:{{ openingPeriod }}  {{ monitorInfo.openingFlag }} {{monitorInfo.queueNum}} {{monitorInfo.activeQueueNum}}</div>
      <div v-for="(value, key) in monitorInfo.checkTypeBedInfo" :key="key">
        {{ mapCheckType.get(Number(key)) }}  {{ value }}
      </div>
    </el-aside>
  </el-container>
</template>
<script setup lang="ts">
@@ -21,16 +28,19 @@
import { RoomApi, RoomVO, MonitorInfo } from '@/api/ecg/room'
import { QueueApi } from '@/api/ecg/queue'
import { getConfigKey } from '@/api/infra/config'
import {DICT_TYPE, getIntDictOptions} from "@/utils/dict";
defineOptions({ name: 'RoomSetting' })
const bedMap = ref() // 列表的数据
let mapCheckType: Map<number, string> = new Map();
const openingPeriod = ref<string>('')
const monitorInfo = ref<MonitorInfo>({
  queueNum : 0,
  activeQueueNum : 0,
  openingFlag : 0
  queueNum: 0,
  activeQueueNum: 0,
  openingFlag: 0,
  checkTypeBedInfo: undefined
})
const getOpeningPeriod = async () => {
@@ -74,9 +84,18 @@
  getMonitorInfo()
}
const getCheckTypeList = () => {
  const data = getIntDictOptions(DICT_TYPE.ECG_CHECK_TYPE)
  console.info( data )
  data.forEach((checkTypeItem) => {
    mapCheckType.set(checkTypeItem.value, checkTypeItem.label)
  })
}
/** 初始化 **/
onMounted(() => {
  getList()
  getCheckTypeList()
  getOpeningPeriod()
  getMonitorInfo()
})