|
|
@ -116,7 +116,7 @@ |
|
|
|
:show="addLiquidConfigValShow" |
|
|
|
@input="val => handleInput(val, 1)" |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@close="setAddliquidVal" |
|
|
|
@blur="addLiquidConfigValShow = false" |
|
|
|
/> |
|
|
@ -127,7 +127,7 @@ |
|
|
|
:show="sprayLiquidConfigValShow" |
|
|
|
theme="custom" |
|
|
|
@close="setSprayLiquidVal" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@blur="sprayLiquidConfigValShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
@ -137,7 +137,7 @@ |
|
|
|
:show="stoped_gsShow" |
|
|
|
theme="custom" |
|
|
|
@close="setStopedGsVal" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@blur="stoped_gsShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
@ -147,7 +147,7 @@ |
|
|
|
@close="setcontinuedGsVal" |
|
|
|
:show="continued_gsShow" |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@blur="continued_gsShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
@ -157,7 +157,7 @@ |
|
|
|
@close="setstopedSaturVal" |
|
|
|
:show="stoped_saturShow" |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@blur="stoped_saturShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
@ -167,7 +167,7 @@ |
|
|
|
@close="setContinuedSaturVal" |
|
|
|
:show="continued_saturShow" |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@blur="continued_saturShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
@ -177,12 +177,12 @@ |
|
|
|
@close="setMaxHumidityVal" |
|
|
|
:show="max_humidityShow" |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@blur="max_humidityShow = false" |
|
|
|
/> |
|
|
|
<van-number-keyboard |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@input="val => handleInput(val, 8)" |
|
|
|
@close="setHeat_timeVal" |
|
|
|
v-model="pre_heat_time_s" |
|
|
@ -193,7 +193,7 @@ |
|
|
|
<van-number-keyboard |
|
|
|
@input="val => handleInput(val, 9)" |
|
|
|
theme="custom" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@close="setstoped_humiVal" |
|
|
|
v-model="stoped_humi" |
|
|
|
:title="stoped_humi" |
|
|
@ -203,7 +203,7 @@ |
|
|
|
<van-number-keyboard |
|
|
|
theme="custom" |
|
|
|
@input="val => handleInput(val, 10)" |
|
|
|
close-button-text="配置" |
|
|
|
close-button-text="确定" |
|
|
|
@close="setcontinued_humiVal" |
|
|
|
v-model="continued_humi" |
|
|
|
:title="continued_humi" |
|
|
@ -217,7 +217,7 @@ |
|
|
|
:logVal="logVal" |
|
|
|
/> |
|
|
|
<div class="btns"> |
|
|
|
<!-- <div class="btn" @click="save">保存</div> --> |
|
|
|
<div class="btn" @click="save">修改</div> |
|
|
|
<div class="btn ml" @click="hiddleSettingModal">返回</div> |
|
|
|
</div> |
|
|
|
<div class="key_wrap" v-show="showkeyboard" id="keyboard_formula"> |
|
|
@ -241,6 +241,7 @@ import { |
|
|
|
setSettingValJSON, |
|
|
|
addFormulaJSON, |
|
|
|
getAllFormulaJSON, |
|
|
|
updateAllFormulaJSON, |
|
|
|
updateFormulaJSON, |
|
|
|
} from '@/mock/command' |
|
|
|
import LogPicker from 'cpns/dialogs/LogPicker' |
|
|
@ -278,9 +279,9 @@ const formula_id = ref(props.formulaInfo.formula_id) |
|
|
|
|
|
|
|
watch(formula_id, (newValue, oldValue) => { |
|
|
|
if (newValue != '') { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('formula_id', newValue, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('formula_id', newValue, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
@ -289,29 +290,29 @@ const save = () => { |
|
|
|
showFailToast('配方名称不能为空') |
|
|
|
return |
|
|
|
} |
|
|
|
// const data = { |
|
|
|
// formula_id: formula_id.value, |
|
|
|
// loglevel: logVal.value, |
|
|
|
// injection_pump_speed: sprayLiquidConfigVal.value, |
|
|
|
// stoped_gs: stoped_gs.value, |
|
|
|
// continued_gs: continued_gs.value, |
|
|
|
// stoped_satur: stoped_satur.value, |
|
|
|
// continued_satur: continued_satur.value, |
|
|
|
// stoped_humi: stoped_humi.value, |
|
|
|
// continued_humi: continued_humi.value, |
|
|
|
// } |
|
|
|
// console.log(data) |
|
|
|
// webSocketStore.sendCommandMsg(addFormulaJSON(data)) |
|
|
|
// webSocketStore.sendCommandMsg(getAllFormulaJSON) |
|
|
|
const data = { |
|
|
|
formula_id: formula_id.value, |
|
|
|
loglevel: parseInt(logVal.value), |
|
|
|
injection_pump_speed: parseInt(sprayLiquidConfigVal.value), |
|
|
|
stoped_gs: parseInt(stoped_gs.value), |
|
|
|
continued_gs: parseInt(continued_gs.value), |
|
|
|
stoped_satur: parseInt(stoped_satur.value), |
|
|
|
continued_satur: parseInt(continued_satur.value), |
|
|
|
stoped_humi: parseInt(stoped_humi.value), |
|
|
|
continued_humi: parseInt(continued_humi.value), |
|
|
|
} |
|
|
|
console.log(data) |
|
|
|
webSocketStore.sendCommandMsg(updateAllFormulaJSON(data)) |
|
|
|
webSocketStore.sendCommandMsg(getAllFormulaJSON) |
|
|
|
props.hideSettingModal() |
|
|
|
} |
|
|
|
|
|
|
|
const changeLogVal = val => { |
|
|
|
logVal.value = val |
|
|
|
logVisible.value = false |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('loglevel', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('loglevel', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
const hiddenLogVisible = () => { |
|
|
|
logVisible.value = false |
|
|
@ -658,9 +659,9 @@ const setStopedGsVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('stoped_gs', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('stoped_gs', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -670,9 +671,9 @@ const setcontinuedGsVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('continued_gs', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('continued_gs', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -682,9 +683,9 @@ const setstopedSaturVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('stoped_satur', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('stoped_satur', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -694,9 +695,9 @@ const setContinuedSaturVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('continued_satur', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('continued_satur', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -722,9 +723,9 @@ const setstoped_humiVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('stoped_humi', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('stoped_humi', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -734,9 +735,9 @@ const setcontinued_humiVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('continued_humi', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('continued_humi', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -746,15 +747,14 @@ const setSprayLiquidVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} else { |
|
|
|
webSocketStore.sendCommandMsg( |
|
|
|
updateFormulaJSON('injection_pump_speed', val, props.formulaInfo.id), |
|
|
|
) |
|
|
|
// webSocketStore.sendCommandMsg( |
|
|
|
// updateFormulaJSON('injection_pump_speed', val, props.formulaInfo.id), |
|
|
|
// ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const showkeyboard = ref(false) |
|
|
|
const onChange = a => { |
|
|
|
console.log(a) |
|
|
|
formula_id.value = a |
|
|
|
} |
|
|
|
const handleShowKeyBoard = () => { |
|
|
|