From 90412902c476a6fa9a4780471eac51700170c4a2 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Fri, 18 Jul 2025 14:48:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BD=8E=E6=88=90=E6=9C=AC=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E6=97=A0=E7=BA=BF=E6=8E=A2=E5=A4=B41?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/homeStore.ts | 285 ++++++++++++++++++++++++----------------------- src/views/home/index.vue | 6 +- 2 files changed, 149 insertions(+), 142 deletions(-) diff --git a/src/stores/homeStore.ts b/src/stores/homeStore.ts index 5e4c311..cf0c6a1 100644 --- a/src/stores/homeStore.ts +++ b/src/stores/homeStore.ts @@ -14,7 +14,7 @@ const deviceTypeMap = { } // 传感器数据初始值 -const h2O2Data: Home.DisplayrelyMgrParams[] = [deviceTypeMap.PipeDM, deviceTypeMap.DrawBarDM].includes(__DEVICE_TYPE__) +const h2O2Data: Home.DisplayrelyMgrParams[] = [deviceTypeMap.DrawBarDM].includes(__DEVICE_TYPE__) ? [ { type: 'Internal', @@ -24,143 +24,154 @@ const h2O2Data: Home.DisplayrelyMgrParams[] = [deviceTypeMap.PipeDM, deviceTypeM rs: -1, h2o2: -1, }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 1, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 2, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 3, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 4, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 5, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 6, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - ] - : [ - { - type: 'Internal', - isOnline: true, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WiredExtSensor', - isOnline: false, - id: 1, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WiredExtSensor', - isOnline: false, - id: 2, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - temp: -1, - id: 1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 2, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 3, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 4, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 5, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, - { - type: 'WirelessExtSensor', - isOnline: false, - id: 6, - temp: -1, - rh: -1, - rs: -1, - h2o2: -1, - }, ] + : [deviceTypeMap.LargeSpaceDM_B].includes(__DEVICE_TYPE__) + ? [ + { + type: 'Internal', + isOnline: true, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 1, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 2, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 3, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 4, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 5, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 6, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + ] + : [ + { + type: 'Internal', + isOnline: true, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WiredExtSensor', + isOnline: false, + id: 1, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WiredExtSensor', + isOnline: false, + id: 2, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + temp: -1, + id: 1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 2, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 3, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 4, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 5, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + { + type: 'WirelessExtSensor', + isOnline: false, + id: 6, + temp: -1, + rh: -1, + rs: -1, + h2o2: -1, + }, + ] // 消毒状态初始值 const initDisinfectState = { diff --git a/src/views/home/index.vue b/src/views/home/index.vue index 8abdb58..18cfe77 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -190,11 +190,7 @@ const deviceType = computed(() => {