|
@ -65,7 +65,7 @@ const styles = ref<any>({ |
|
|
|
|
|
|
|
|
const computedStyle = () => { |
|
|
const computedStyle = () => { |
|
|
// console.log('homeStore.h2O2SensorData', homeStore.h2O2SensorData.length) |
|
|
// console.log('homeStore.h2O2SensorData', homeStore.h2O2SensorData.length) |
|
|
if (deviceStore.isLowCost) { |
|
|
|
|
|
|
|
|
if (deviceStore.deviceInfo.deviceType === deviceStore.deviceTypeMap.LargeSpaceDM_B) { |
|
|
if (homeStore.h2O2SensorData.length === 1) { |
|
|
if (homeStore.h2O2SensorData.length === 1) { |
|
|
return { |
|
|
return { |
|
|
gridTemplateColumns: 'repeat(1, 1fr)', |
|
|
gridTemplateColumns: 'repeat(1, 1fr)', |
|
@ -152,11 +152,11 @@ const computedStyle = () => { |
|
|
<div v-if="route.path === '/home'" class="home-grid-container"> |
|
|
<div v-if="route.path === '/home'" class="home-grid-container"> |
|
|
<div class="home-left" :style="styles"> |
|
|
<div class="home-left" :style="styles"> |
|
|
<el-card |
|
|
<el-card |
|
|
v-if="!deviceStore.isLowCost" |
|
|
|
|
|
|
|
|
v-if="deviceStore.deviceInfo.deviceType !== deviceStore.deviceTypeMap.LargeSpaceDM_B" |
|
|
class="card" |
|
|
class="card" |
|
|
:class="{ |
|
|
:class="{ |
|
|
'card-center-1': !deviceStore.isLowCost && homeStore.h2O2SensorData.length === 2, |
|
|
|
|
|
'card-center-2': !deviceStore.isLowCost && homeStore.h2O2SensorData.length === 4, |
|
|
|
|
|
|
|
|
'card-center-1': deviceStore.deviceInfo.deviceType !== deviceStore.deviceTypeMap.LargeSpaceDM_B && homeStore.h2O2SensorData.length === 2, |
|
|
|
|
|
'card-center-2': deviceStore.deviceInfo.deviceType !== deviceStore.deviceTypeMap.LargeSpaceDM_B && homeStore.h2O2SensorData.length === 4, |
|
|
}" |
|
|
}" |
|
|
> |
|
|
> |
|
|
<template #default> |
|
|
<template #default> |
|
@ -179,8 +179,8 @@ const computedStyle = () => { |
|
|
:key="item.sensorId" |
|
|
:key="item.sensorId" |
|
|
class="card" |
|
|
class="card" |
|
|
:class="{ |
|
|
:class="{ |
|
|
'card-center-1': index === 0 && deviceStore.isLowCost && homeStore.h2O2SensorData.length === 3, |
|
|
|
|
|
'card-center-2': index === 0 && deviceStore.isLowCost && homeStore.h2O2SensorData.length === 5, |
|
|
|
|
|
|
|
|
'card-center-1': index === 0 && deviceStore.deviceInfo.deviceType === deviceStore.deviceTypeMap.LargeSpaceDM_B && homeStore.h2O2SensorData.length === 3, |
|
|
|
|
|
'card-center-2': index === 0 && deviceStore.deviceInfo.deviceType !== deviceStore.deviceTypeMap.LargeSpaceDM_B && homeStore.h2O2SensorData.length === 5, |
|
|
}" |
|
|
}" |
|
|
> |
|
|
> |
|
|
<Environment :env-params="item" /> |
|
|
<Environment :env-params="item" /> |
|
|