diff --git a/src/components/Setting/components/Device.vue b/src/components/Setting/components/Device.vue
index 29daee0..57d72ad 100644
--- a/src/components/Setting/components/Device.vue
+++ b/src/components/Setting/components/Device.vue
@@ -7,8 +7,8 @@
type="number"
v-model="addLiquidConfigVal"
:clickable="true"
- :formatter="formatter2"
- :maxlength="3"
+ :formatter="formatter6"
+ :maxlength="4"
readonly
@touchstart.stop="addLiquidConfigValShow = true"
/>
@@ -22,8 +22,8 @@
type="number"
v-model="sprayLiquidConfigVal"
:clickable="true"
- :formatter="formatter2"
- :maxlength="3"
+ :formatter="formatter7"
+ :maxlength="4"
readonly
@touchstart.stop="sprayLiquidConfigValShow = true"
/>
@@ -37,7 +37,7 @@
type="number"
v-model="stoped_gs"
:clickable="true"
- :formatter="formatter3"
+ :formatter="formatter1"
:maxlength="4"
readonly
@touchstart.stop="stoped_gsShow = true"
@@ -53,7 +53,7 @@
v-model="continued_gs"
:clickable="true"
:maxlength="4"
- :formatter="formatter3"
+ :formatter="formatter2"
readonly
@touchstart.stop="continued_gsShow = true"
/>
@@ -65,7 +65,7 @@
允许消毒最大湿度(%RH)
{
- if (parseInt(value) > 100) {
- return '100'
+ let arr = settingStore.allSettingList.filter(item => item.name == 'stoped_gs')
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
}
return value
}
const formatter2 = value => {
- if (parseInt(value) > 500) {
- return '500'
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'continued_gs',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
}
return value
}
const formatter3 = value => {
- if (parseInt(value) > 1000) {
- return '1000'
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'stoped_satur',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
+ }
+ return value
+}
+
+const formatter4 = value => {
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'continued_satur',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
+ }
+ return value
+}
+
+const formatter5 = value => {
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'max_humidity',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
+ }
+ return value
+}
+
+const formatter6 = value => {
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'drainage_pump_speed',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
+ }
+ return value
+}
+
+const formatter7 = value => {
+ let arr = settingStore.allSettingList.filter(
+ item => item.name == 'injection_pump_speed',
+ )
+ if (arr && arr.length > 0) {
+ if (parseInt(value) > arr[0].val_upper_limit) {
+ return arr[0].val_upper_limit + ''
+ }
+ if (parseInt(value) < arr[0].val_lower_limit) {
+ return arr[0].val_lower_limit + ''
+ }
}
return value
}
diff --git a/src/components/Test.vue b/src/components/Test.vue
index 7675dbd..6565b09 100644
--- a/src/components/Test.vue
+++ b/src/components/Test.vue
@@ -56,7 +56,7 @@
风机
-
{{ testStore?.airBlowerObj?.currentVal }} RPM
+
{{ testStore?.airBlowerObj?.currentVal }} A
加热片
-
{{ testStore?.heatingStripObj?.currentVal }} ℃
+
{{ testStore?.heatingStripObj?.currentVal }} A