From e3c9b82a7dd900e7d5efdf528d8f2fc64a100c96 Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Sun, 10 Sep 2023 09:01:00 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=A9=E4=BD=99log?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Progress.vue | 4 +++-
src/store/modules/device.js | 5 +++++
src/store/modules/websocket.js | 3 +++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/components/Progress.vue b/src/components/Progress.vue
index d32c941..c1fc738 100644
--- a/src/components/Progress.vue
+++ b/src/components/Progress.vue
@@ -87,7 +87,7 @@
当前剩余
-
12log
+
{{ deviceStore.nowlog || 0 }}log
{
return echartsStore?.binCharts || localStorage.getItem('bin')
diff --git a/src/store/modules/device.js b/src/store/modules/device.js
index e697191..5e5e16f 100644
--- a/src/store/modules/device.js
+++ b/src/store/modules/device.js
@@ -27,10 +27,15 @@ export const useDeviceStore = defineStore({
envirHP2: 0,
// 仓内过氧化氢相对饱和度
binSaturation: 0,
+ // 剩余log
+ nowlog: 0,
}
},
// actions
actions: {
+ updateNowLog(nowlog) {
+ this.nowlog = nowlog
+ },
updateBinSaturation(binSaturation) {
if (binSaturation < 0) {
this.binSaturation = 0
diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js
index a7015f9..c806edd 100644
--- a/src/store/modules/websocket.js
+++ b/src/store/modules/websocket.js
@@ -42,6 +42,7 @@ export const useWebSocketStore = defineStore({
const { state } = JSON.parse(ev.data)
const {
disinfectionWorkState,
+ disinfectionState,
preHeat,
preHeatRaminTimeS,
estimatedRemainingTimeS,
@@ -79,6 +80,8 @@ export const useWebSocketStore = defineStore({
sprinklerPumpRPM,
sprinklerPumpGPM,
} = sensor_data
+ const { nowlog } = disinfectionState || {}
+ deviceStore.updateNowLog(nowlog)
if ([1, 2, 3, 4].includes(disinfectionWorkState)) {
operatorStore.updateShowStartReady(false)
} else {