Browse Source

fix:低成本只有无线探头1

master
guoapeng 11 hours ago
parent
commit
90412902c4
  1. 285
      src/stores/homeStore.ts
  2. 6
      src/views/home/index.vue

285
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', type: 'Internal',
@ -24,143 +24,154 @@ const h2O2Data: Home.DisplayrelyMgrParams[] = [deviceTypeMap.PipeDM, deviceTypeM
rs: -1, rs: -1,
h2o2: -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 = { const initDisinfectState = {

6
src/views/home/index.vue

@ -190,11 +190,7 @@ const deviceType = computed(() => {
</div> </div>
<div v-if="deviceType !== deviceStore.deviceTypeMap.DrawBarDM" class="left-box"> <div v-if="deviceType !== deviceStore.deviceTypeMap.DrawBarDM" class="left-box">
<el-card <el-card
v-for="item in homeStore.h2O2SensorData
.filter(item => item.type === 'WirelessExtSensor')
.filter((item, index) =>
[deviceStore.deviceTypeMap.LargeSpaceDM_B].includes(deviceType) ? index > 1 : true,
)"
v-for="item in homeStore.h2O2SensorData.filter(item => item.type === 'WirelessExtSensor')"
:key="item.sensorId" :key="item.sensorId"
class="card" class="card"
> >

Loading…
Cancel
Save