From e8728d65a90b574c049d102cdb59e4afdb5b39c6 Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Tue, 15 Aug 2023 23:29:37 +0800
Subject: [PATCH] xiufu
---
src/components/Progress.vue | 20 ++++++++++++++++----
src/components/Setting/components/Device.vue | 28 ++++++++++++++++++++++++++++
2 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/src/components/Progress.vue b/src/components/Progress.vue
index e422979..e56ff09 100644
--- a/src/components/Progress.vue
+++ b/src/components/Progress.vue
@@ -46,7 +46,7 @@
@@ -80,12 +80,24 @@ import {
continueDisinfectionJSON,
pauseDisinfectionJSON,
} from '@/mock/command'
-import { onMounted, onUnmounted, ref } from 'vue'
+import { onMounted, onUnmounted, ref, computed } from 'vue'
import * as echarts from 'echarts'
import { storeToRefs } from 'pinia'
const echartsStore = useEchartsStore()
+const binLocal = computed(() => {
+ return localStorage.getItem('bin')
+})
+
+const envir1Local = computed(() => {
+ return localStorage.getItem('envir1')
+})
+
+const envir2Local = computed(() => {
+ return localStorage.getItem('envir2')
+})
+
const binOption = ref({
tooltip: {
trigger: 'axis',
diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue
index 1844239..29daee0 100644
--- a/src/components/Setting/components/Device.vue
+++ b/src/components/Setting/components/Device.vue
@@ -7,6 +7,7 @@
type="number"
v-model="addLiquidConfigVal"
:clickable="true"
+ :formatter="formatter2"
:maxlength="3"
readonly
@touchstart.stop="addLiquidConfigValShow = true"
@@ -21,6 +22,7 @@
type="number"
v-model="sprayLiquidConfigVal"
:clickable="true"
+ :formatter="formatter2"
:maxlength="3"
readonly
@touchstart.stop="sprayLiquidConfigValShow = true"
@@ -35,6 +37,7 @@
type="number"
v-model="stoped_gs"
:clickable="true"
+ :formatter="formatter3"
:maxlength="4"
readonly
@touchstart.stop="stoped_gsShow = true"
@@ -50,6 +53,7 @@
v-model="continued_gs"
:clickable="true"
:maxlength="4"
+ :formatter="formatter3"
readonly
@touchstart.stop="continued_gsShow = true"
/>
@@ -61,6 +65,7 @@
允许消毒最大湿度(%RH)
{
+ if (parseInt(value) > 100) {
+ return '100'
+ }
+ return value
+}
+
+const formatter2 = value => {
+ if (parseInt(value) > 500) {
+ return '500'
+ }
+ return value
+}
+
+const formatter3 = value => {
+ if (parseInt(value) > 1000) {
+ return '1000'
+ }
+ return value
+}
+
const setAddliquidVal = () => {
const val = parseInt(addLiquidConfigVal.value)
settingStore.changeAddLiquidConfigVal(val)