|
|
@ -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 @@ |
|
|
|
<p class="num"> |
|
|
|
<van-field |
|
|
|
type="number" |
|
|
|
:formatter="formatter1" |
|
|
|
:formatter="formatter3" |
|
|
|
v-model="stoped_satur" |
|
|
|
:clickable="true" |
|
|
|
:maxlength="3" |
|
|
@ -80,7 +80,7 @@ |
|
|
|
<p class="num"> |
|
|
|
<van-field |
|
|
|
type="number" |
|
|
|
:formatter="formatter1" |
|
|
|
:formatter="formatter4" |
|
|
|
v-model="continued_satur" |
|
|
|
:clickable="true" |
|
|
|
:maxlength="3" |
|
|
@ -94,7 +94,7 @@ |
|
|
|
<p class="title">允许消毒最大湿度(%RH)</p> |
|
|
|
<p class="num"> |
|
|
|
<van-field |
|
|
|
:formatter="formatter1" |
|
|
|
:formatter="formatter5" |
|
|
|
type="number" |
|
|
|
v-model="max_humidity" |
|
|
|
:clickable="true" |
|
|
@ -108,13 +108,13 @@ |
|
|
|
<van-number-keyboard |
|
|
|
v-model="addLiquidConfigVal" |
|
|
|
:show="addLiquidConfigValShow" |
|
|
|
:maxlength="3" |
|
|
|
:maxlength="4" |
|
|
|
@blur="addLiquidConfigValShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
|
v-model="sprayLiquidConfigVal" |
|
|
|
:show="sprayLiquidConfigValShow" |
|
|
|
:maxlength="3" |
|
|
|
:maxlength="4" |
|
|
|
@blur="sprayLiquidConfigValShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
@ -167,6 +167,7 @@ const { |
|
|
|
stoped_gs, |
|
|
|
addLiquidConfigVal, |
|
|
|
sprayLiquidConfigVal, |
|
|
|
allSettingList, |
|
|
|
} = storeToRefs(settingStore) |
|
|
|
|
|
|
|
const addLiquidConfigValShow = ref(false) |
|
|
@ -178,22 +179,104 @@ const continued_saturShow = ref(false) |
|
|
|
const max_humidityShow = ref(false) |
|
|
|
|
|
|
|
const formatter1 = value => { |
|
|
|
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 |
|
|
|
} |
|
|
|