From 83bc7f6d33934f56fd1df80c7e8975e7c887d606 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期三, 23 十月 2024 22:12:05 +0800 Subject: [PATCH] 检查类型 字典移除,使用 本地存储 --- src/views/ecg/room/RoomSetting.vue | 18 +++++------------- 1 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/views/ecg/room/RoomSetting.vue b/src/views/ecg/room/RoomSetting.vue index 72de651..7e79a0c 100644 --- a/src/views/ecg/room/RoomSetting.vue +++ b/src/views/ecg/room/RoomSetting.vue @@ -18,7 +18,7 @@ <div>寮�璇婃椂闂达細{{ openingPeriod }} {{ monitorInfo.openingFlag }} </div> <div>宸ヤ綅姒傚喌锛� {{monitorInfo.queueNum}} {{monitorInfo.activeQueueNum}} {{monitorInfo.priorityQueueNum}} </div> <div v-for="(value, key) in monitorInfo.checkTypeBedInfo" :key="key"> - {{ mapCheckType.get(Number(key)) }} {{ value }} + {{ checkTypeStore.getCheckTypeName(Number(key)) }} {{ value }} </div> </el-aside> </el-container> @@ -29,12 +29,11 @@ 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"; +import {useCheckTypeStore} from "@/store/modules/checkType"; defineOptions({ name: 'RoomSetting' }) const bedMap = ref() // 鍒楄〃鐨勬暟鎹� -let mapCheckType: Map<number, string> = new Map(); const openingPeriod = ref<string>('') const monitorInfo = ref<MonitorInfo>({ @@ -42,8 +41,10 @@ activeQueueNum: 0, priorityQueueNum: 0, openingFlag: 0, - checkTypeBedInfo: undefined + checkTypeBedInfo: {} }) + +const checkTypeStore = useCheckTypeStore(); const getOpeningPeriod = async () => { const data = await getConfigKey('ecg.openingtime') @@ -86,18 +87,9 @@ 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