diff --git a/src/components/Operator.vue b/src/components/Operator.vue index 1be7d72..ac47640 100644 --- a/src/components/Operator.vue +++ b/src/components/Operator.vue @@ -410,6 +410,10 @@ ? '未开始' : operatorStore.estimatedRemainingTimeS == 0 ? '已结束' + : operatorStore.disinfectStatus == 1 + ? `${time_To_hhmmss(operatorStore.estimatedRemainingTimeS)}` + : operatorStore.estimatedRemainingTimeS < 0 + ? '评估中' : `${time_To_hhmmss(operatorStore.estimatedRemainingTimeS)}` }} diff --git a/src/components/Progress.vue b/src/components/Progress.vue index 4be7942..054340f 100644 --- a/src/components/Progress.vue +++ b/src/components/Progress.vue @@ -6,6 +6,10 @@ {{ operatorStore.estimatedRemainingTimeS == 0 ? '已结束' + : operatorStore.disinfectStatus == 1 + ? `${time_To_hhmmss(operatorStore.estimatedRemainingTimeS)}` + : operatorStore.estimatedRemainingTimeS < 0 + ? '评估中' : `${time_To_hhmmss(operatorStore.estimatedRemainingTimeS)}` }}

diff --git a/src/components/Setting/components/User.vue b/src/components/Setting/components/User.vue index 1799de7..a5acf8c 100644 --- a/src/components/Setting/components/User.vue +++ b/src/components/Setting/components/User.vue @@ -149,7 +149,6 @@ :input="newUserUserName" /> -
{ } const showAddPasswordKey = () => { + newUserUserName.value = '' showkeyboard3.value = false showkeyboard2.value = true } @@ -243,6 +243,7 @@ const onChange2 = a => { } const showAddMewPasswordKey = () => { + newUserPassword.value = '' showkeyboard2.value = false showkeyboard3.value = true } diff --git a/src/components/Test.vue b/src/components/Test.vue index c19376e..0eb6ac1 100644 --- a/src/components/Test.vue +++ b/src/components/Test.vue @@ -211,7 +211,7 @@ ? 0 : deviceStore.disinfectantCapacity }} - kPa/100g + g

更新读取液位状态 diff --git a/src/components/UpdatePreSetting.vue b/src/components/UpdatePreSetting.vue index 706f65b..7243e9e 100644 --- a/src/components/UpdatePreSetting.vue +++ b/src/components/UpdatePreSetting.vue @@ -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" />
- +
修改
返回
@@ -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 = () => { diff --git a/src/mock/command.js b/src/mock/command.js index 7b87a0f..54d3e6e 100644 --- a/src/mock/command.js +++ b/src/mock/command.js @@ -294,3 +294,11 @@ export const getDisinfectionConfigJSON = { command: 'getDisinfectionConfig', messageId: 'getDisinfectionConfig', } + +export const updateAllFormulaJSON = data => { + return { + command: 'updateFormula2', + messageId: 'updateFormula2', + ...data, + } +}