|
@ -2,16 +2,17 @@ |
|
|
import { sendCmd } from 'apis/system' |
|
|
import { sendCmd } from 'apis/system' |
|
|
import { roundNumber } from 'libs/utils' |
|
|
import { roundNumber } from 'libs/utils' |
|
|
import { useHomeStore } from 'stores/homeStore' |
|
|
import { useHomeStore } from 'stores/homeStore' |
|
|
import { ref, watch } from 'vue' |
|
|
|
|
|
|
|
|
import { ref, watchEffect } from 'vue' |
|
|
|
|
|
|
|
|
const homeStore = useHomeStore() |
|
|
const homeStore = useHomeStore() |
|
|
const h2O2SensorData = ref<Home.DisplayrelyMgrParams[]>(homeStore.h2O2SensorData) |
|
|
const h2O2SensorData = ref<Home.DisplayrelyMgrParams[]>(homeStore.h2O2SensorData) |
|
|
|
|
|
|
|
|
watch(() => homeStore.h2O2SensorData, (newVal) => { |
|
|
|
|
|
if (newVal && newVal.length) { |
|
|
|
|
|
h2O2SensorData.value = newVal |
|
|
|
|
|
|
|
|
watchEffect(() => { |
|
|
|
|
|
const hdData = homeStore.h2O2SensorData |
|
|
|
|
|
if (hdData && hdData.length) { |
|
|
|
|
|
h2O2SensorData.value = [...hdData] |
|
|
} |
|
|
} |
|
|
}, { deep: true }) |
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 加液 |
|
|
// 加液 |
|
|
const onAddLiquid = async () => { |
|
|
const onAddLiquid = async () => { |
|
@ -85,22 +86,24 @@ const onBottomState = () => {} |
|
|
<div class="dashboard-container"> |
|
|
<div class="dashboard-container"> |
|
|
<main class="main-content"> |
|
|
<main class="main-content"> |
|
|
<!-- 上下布局 --> |
|
|
<!-- 上下布局 --> |
|
|
<section> |
|
|
|
|
|
<div v-for="(item, index) in h2O2SensorData" :key="index" class="debug-left-lh"> |
|
|
|
|
|
<div class="debug-label" style="text-align: center;"> |
|
|
|
|
|
{{ index === 0 ? '仓内环境' : item.title }} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span>温度</span> |
|
|
|
|
|
<span class="debug-text">{{ roundNumber(item.temp, 2) }}</span>°C |
|
|
|
|
|
</div> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span>湿度</span> |
|
|
|
|
|
<span class="debug-text">{{ roundNumber(item.rh, 2) }}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span>过氧化氢浓度</span> |
|
|
|
|
|
<span class="debug-text">{{ roundNumber(item.h2o2, 2) }}</span>PPM |
|
|
|
|
|
|
|
|
<section class="debug-env"> |
|
|
|
|
|
<div v-for="(item, index) in h2O2SensorData" :key="index" class="debug-left-lh env-lh"> |
|
|
|
|
|
<div class="debug-env-content"> |
|
|
|
|
|
<div class="debug-label env-content-p" style="text-align: center;width: 8rem"> |
|
|
|
|
|
{{ index === 0 ? '仓内环境' : item.title || `探头${index}` }} |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="env-content-p"> |
|
|
|
|
|
<span>温度</span> |
|
|
|
|
|
<span class="debug-text">{{ roundNumber(item.temp, 2) }}</span>°C |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="env-content-p"> |
|
|
|
|
|
<span>湿度</span> |
|
|
|
|
|
<span class="debug-text">{{ roundNumber(item.rh, 2) }}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="env-content-p"> |
|
|
|
|
|
<span>H202浓度</span> |
|
|
|
|
|
<span class="debug-text">{{ roundNumber(item.h2o2, 2) }}</span>PPM |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</section> |
|
|
</section> |
|
@ -267,7 +270,7 @@ const onBottomState = () => {} |
|
|
height: $main-container-height; |
|
|
height: $main-container-height; |
|
|
overflow: hidden; |
|
|
overflow: hidden; |
|
|
background: $gradient-color; |
|
|
background: $gradient-color; |
|
|
padding-top: 50px; |
|
|
|
|
|
|
|
|
padding-top: 4vh; |
|
|
padding-left: 30px; |
|
|
padding-left: 30px; |
|
|
font-size: 20px; |
|
|
font-size: 20px; |
|
|
.debug-upper{ |
|
|
.debug-upper{ |
|
@ -286,11 +289,23 @@ const onBottomState = () => {} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.debug-env { |
|
|
|
|
|
display: grid; |
|
|
|
|
|
grid-template-columns: repeat(2, 1fr); |
|
|
|
|
|
} |
|
|
.debug-left-lh{ |
|
|
.debug-left-lh{ |
|
|
display: flex; |
|
|
display: flex; |
|
|
gap: 1rem; |
|
|
gap: 1rem; |
|
|
height: $lineHeight; |
|
|
height: $lineHeight; |
|
|
|
|
|
.debug-env-content{ |
|
|
|
|
|
display: flex; |
|
|
|
|
|
.env-content-p{ |
|
|
|
|
|
padding: 5px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
.env-lh{ |
|
|
|
|
|
height: 10vh; |
|
|
} |
|
|
} |
|
|
.debug-bw{ |
|
|
.debug-bw{ |
|
|
width: 8vw; |
|
|
width: 8vw; |
|
|