Browse Source

xiugai

master
maochaoying 2 years ago
parent
commit
a896c9132b
  1. 5
      src/components/AddPreSetting.vue
  2. 64
      src/components/UpdatePreSetting.vue

5
src/components/AddPreSetting.vue

@ -449,6 +449,11 @@ const handleInput = (value, index) => {
continued_humi.value = value + ''
})
}
if (index == 12) {
setTimeout(() => {
draughtFanValue.value = value + ''
})
}
isFirstClick.value = false
}
}

64
src/components/UpdatePreSetting.vue

@ -98,6 +98,20 @@
/>
</p>
</div>
<div class="row_wrap">
<p class="title">风机速度(%)</p>
<p class="num">
<van-field
type="number"
class="field_font"
:formatter="formatter12"
v-model="draughtFanValue"
:clickable="true"
readonly
@click.stop="hideClickKey(12)"
/>
</p>
</div>
<div class="row_wrap" @click="showLogPicker">
<p class="title">Log等级</p>
<div class="num">
@ -217,6 +231,16 @@
:show="continued_humiShow"
@blur="continued_humiShow = false"
/>
<van-number-keyboard
theme="custom"
@input="val => handleInput(val, 12)"
close-button-text="配置"
@close="setDraughtFanValue"
v-model="draughtFanValue"
:title="draughtFanValue"
:show="draughtFanShow"
@blur="draughtFanShow = false"
/>
<LogPicker
v-if="logVisible"
:hiddenLogVisible="hiddenLogVisible"
@ -272,6 +296,7 @@ const sprayLiquidConfigVal = ref(props.formulaInfo.injection_pump_speed)
const stoped_humi = ref(props.formulaInfo.stoped_humi)
const continued_humi = ref(props.formulaInfo.continued_humi)
const pre_heat_time_s = ref('0')
const draughtFanValue = ref('0')
const pre_heat_time_sShow = ref(false)
const addLiquidConfigValShow = ref(false)
@ -283,6 +308,7 @@ const continued_saturShow = ref(false)
const max_humidityShow = ref(false)
const stoped_humiShow = ref(false)
const continued_humiShow = ref(false)
const draughtFanShow = ref(false)
const logVisible = ref(false)
const logVal = ref(props.formulaInfo.loglevel)
@ -318,6 +344,7 @@ const save = () => {
continued_satur: parseInt(continued_satur.value),
stoped_humi: parseInt(stoped_humi.value),
continued_humi: parseInt(continued_humi.value),
draughtFanValue: parseInt(draughtFanValue.value),
}
console.log(data)
webSocketStore.sendCommandMsg(updateAllFormulaJSON(data))
@ -397,6 +424,9 @@ const hideClickKey = flag => {
if (flag == 10) {
continued_humiShow.value = true
}
if (flag == 12) {
draughtFanShow.value = true
}
}
const handleInput = (value, index) => {
@ -451,6 +481,11 @@ const handleInput = (value, index) => {
continued_humi.value = value + ''
})
}
if (index == 12) {
setTimeout(() => {
draughtFanValue.value = value + ''
})
}
isFirstClick.value = false
}
}
@ -579,6 +614,27 @@ const formatter6 = value => {
return value.replace(/^0+/gi, '')
}
const formatter12 = value => {
if (parseInt(value) == 0) {
return '0'
}
let arr = settingStore.allSettingList.filter(
item => item.name == 'draughtFanValue',
)
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 + ''
}
}
if (value == '') {
return '0'
}
return value.replace(/^0+/gi, '')
}
const formatter7 = value => {
if (parseInt(value) == 0) {
return '0'
@ -671,6 +727,14 @@ const setAddliquidVal = () => {
}
}
const setDraughtFanValue = () => {
const val = parseInt(draughtFanValue.value)
if (isNaN(val)) {
showFailToast('设置失败,请填写正确参数')
return
}
}
const setStopedGsVal = () => {
const val = parseInt(stoped_gs.value)
if (isNaN(val)) {

Loading…
Cancel
Save