From 5db690d8028f64f205871cd265c92395d7583c30 Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Sun, 10 Sep 2023 22:54:30 +0800
Subject: [PATCH] =?UTF-8?q?=E9=94=AE=E7=9B=98=E5=8E=BB=E9=99=A4=E4=B8=AD?=
=?UTF-8?q?=E6=96=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Progress.vue | 6 +-
src/components/SimpleKeyboard.vue | 119 +++++---------------------------------
src/store/modules/echarts.js | 2 +-
src/store/modules/websocket.js | 4 +-
4 files changed, 24 insertions(+), 107 deletions(-)
diff --git a/src/components/Progress.vue b/src/components/Progress.vue
index 054340f..908bf69 100644
--- a/src/components/Progress.vue
+++ b/src/components/Progress.vue
@@ -95,7 +95,11 @@
>
- {{ deviceStore.targetlog - (deviceStore.nowlog?.toFixed(2) || 0) }}log
+ {{
+ Math.abs(
+ (deviceStore.targetlog - (deviceStore.nowlog || 0)).toFixed(2),
+ )
+ }}log
-
+
-
diff --git a/src/store/modules/echarts.js b/src/store/modules/echarts.js
index c9181c9..24bf48f 100644
--- a/src/store/modules/echarts.js
+++ b/src/store/modules/echarts.js
@@ -25,7 +25,7 @@ export const useEchartsStore = defineStore({
abscissaFormater(state) {
let arr = []
Object.keys(state.binCharts).map((item, index) => {
- arr.push(`${index}-${item}`)
+ arr.push(`${item}`)
})
return arr
},
diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js
index cf44e33..fa7ab11 100644
--- a/src/store/modules/websocket.js
+++ b/src/store/modules/websocket.js
@@ -137,7 +137,7 @@ export const useWebSocketStore = defineStore({
if ([1, 2, 3, 4].includes(operatorStore.disinfectStatus)) {
saveEchartsDataToLocal(
- moment(timeStamp).format('HH:mm'),
+ moment().utcOffset(8).format('HH:mm'),
[temp_1, humid_1, h2o2_1, saturation_1],
[temp_2, humid_2, h2o2_2, saturation_1],
[temp_3, humid_3, h2o2_3, saturation_1],
@@ -313,7 +313,7 @@ export const useWebSocketStore = defineStore({
// 对数据进行处理 并存入到localstorage中
if ([1, 2, 3, 4].includes(operatorStore.disinfectStatus)) {
saveEchartsDataToLocal(
- moment(timeStamp).format('HH:mm'),
+ moment().utcOffset(8).format('HH:mm'),
[temp_1, humid_1, h2o2_1, saturation_1],
[temp_2, humid_2, h2o2_2, saturation_1],
[temp_3, humid_3, h2o2_3, saturation_1],