Browse Source

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

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

13
src/stores/homeStore.ts

@ -14,7 +14,18 @@ const deviceTypeMap = {
} }
// 传感器数据初始值 // 传感器数据初始值
const h2O2Data: Home.DisplayrelyMgrParams[] = [deviceTypeMap.PipeDM, deviceTypeMap.DrawBarDM].includes(__DEVICE_TYPE__)
const h2O2Data: Home.DisplayrelyMgrParams[] = [deviceTypeMap.DrawBarDM].includes(__DEVICE_TYPE__)
? [
{
type: 'Internal',
isOnline: true,
temp: -1,
rh: -1,
rs: -1,
h2o2: -1,
},
]
: [deviceTypeMap.LargeSpaceDM_B].includes(__DEVICE_TYPE__)
? [ ? [
{ {
type: 'Internal', type: 'Internal',

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