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(() => {