From e84705f4809b57509b8665f0b5db4fc435e08496 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期四, 10 十月 2024 16:36:59 +0800 Subject: [PATCH] 工位状态 动态查看 --- src/views/ecg/room/RoomSetting.vue | 55 ++++++++++++++++++--------- src/views/ecg/room/RoomForm.vue | 10 ++++ src/components/RoomStatus/src/RoomStatus.vue | 22 +++++++++++ 3 files changed, 68 insertions(+), 19 deletions(-) diff --git a/src/components/RoomStatus/src/RoomStatus.vue b/src/components/RoomStatus/src/RoomStatus.vue index 7ec1a71..417a93b 100644 --- a/src/components/RoomStatus/src/RoomStatus.vue +++ b/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> diff --git a/src/views/ecg/room/RoomForm.vue b/src/views/ecg/room/RoomForm.vue index 6853f74..f7afe68 100644 --- a/src/views/ecg/room/RoomForm.vue +++ b/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' }], diff --git a/src/views/ecg/room/RoomSetting.vue b/src/views/ecg/room/RoomSetting.vue index f95e1bc..cf36c6e 100644 --- a/src/views/ecg/room/RoomSetting.vue +++ b/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() }) -- Gitblit v1.9.3