From 46bb64379310e457a19a785dd1e8513ba565c53e Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Fri, 25 Aug 2023 10:00:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E8=A1=8C=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 ++++---- src/components/Progress.vue | 24 +++++++++++++++++++++--- src/components/info/EnvironmentInfo.vue | 25 +++++++++++++++++++++++-- src/store/modules/device.js | 9 +++++++++ src/store/modules/echarts.js | 7 +++++++ src/store/modules/websocket.js | 16 ++++++++++------ 6 files changed, 74 insertions(+), 15 deletions(-) diff --git a/.env b/.env index c4ae906..fe3f0dd 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -# VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ -# VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ +VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ +VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ -VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ -VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file +# VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ +# VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file diff --git a/src/components/Progress.vue b/src/components/Progress.vue index fa69f1e..a8e393b 100644 --- a/src/components/Progress.vue +++ b/src/components/Progress.vue @@ -120,7 +120,7 @@ const binOption = ref({ trigger: 'axis', }, legend: { - data: ['温度', '湿度', '过氧化氢浓度'], + data: ['温度', '湿度', '过氧化氢浓度', '过氧化氢相对饱和度'], }, grid: { left: '3%', @@ -155,6 +155,12 @@ const binOption = ref({ stack: 'binHP', data: echartsStore.binHP, }, + { + name: '过氧化氢相对饱和度', + type: 'line', + stack: 'binSaturation', + data: echartsStore.binSaturation, + }, ], }) const envir1Option = ref({ @@ -287,7 +293,7 @@ onMounted(() => { trigger: 'axis', }, legend: { - data: ['温度', '湿度', '过氧化氢浓度'], + data: ['温度', '湿度', '过氧化氢浓度', '过氧化氢相对饱和度'], }, grid: { left: '3%', @@ -322,6 +328,12 @@ onMounted(() => { stack: 'binHP', data: echartsStore.binHP, }, + { + name: '过氧化氢相对饱和度', + type: 'line', + stack: 'binSaturation', + data: echartsStore.binSaturation, + }, ], }) envir1Charts.value?.setOption({ @@ -416,7 +428,7 @@ onMounted(() => { trigger: 'axis', }, legend: { - data: ['温度', '湿度', '过氧化氢浓度'], + data: ['温度', '湿度', '过氧化氢浓度', '过氧化氢相对饱和度'], }, grid: { left: '3%', @@ -451,6 +463,12 @@ onMounted(() => { stack: 'binHP', data: echartsStore.binHP, }, + { + name: '过氧化氢相对饱和度', + type: 'line', + stack: 'binSaturation', + data: echartsStore.binSaturation, + }, ], }) envir1Charts.value?.setOption({ diff --git a/src/components/info/EnvironmentInfo.vue b/src/components/info/EnvironmentInfo.vue index 5b04fbc..bf398a7 100644 --- a/src/components/info/EnvironmentInfo.vue +++ b/src/components/info/EnvironmentInfo.vue @@ -35,6 +35,12 @@

{{ getHP() }} PPM

+
+

+ {{ props.cardType == 1 ? '仓内' : '环境' }}过氧化氢相对饱和度 +

+

{{ getSaturation() }} {{ '%RS' }}

+
@@ -48,6 +54,7 @@ const { binTemperature, binHumidity, binHP, + binSaturation, envirTemperature1, envirHumidity1, envirHP1, @@ -109,6 +116,18 @@ const getHP = () => { return envirHP2 } } + +const getSaturation = () => { + if (props.cardType == 1) { + return binSaturation + } + if (props.cardType == 2) { + return 0 + } + if (props.cardType == 3) { + return 0 + } +}