|
|
@ -225,7 +225,10 @@ import { ref } from 'vue' |
|
|
|
import { showSuccessToast, showFailToast } from 'vant' |
|
|
|
import { useSettingStore, useWebSocketStore, useOperatorStore } from '@/store' |
|
|
|
import { storeToRefs } from 'pinia' |
|
|
|
import { setSettingValJSON } from '@/mock/command' |
|
|
|
import { |
|
|
|
setSettingValJSON, |
|
|
|
changeDisinfectionParameterJSON, |
|
|
|
} from '@/mock/command' |
|
|
|
|
|
|
|
const settingStore = useSettingStore() |
|
|
|
const webSocketStore = useWebSocketStore() |
|
|
@ -244,6 +247,12 @@ const { |
|
|
|
pre_heat_time_s, |
|
|
|
} = storeToRefs(settingStore) |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
runInfection: { |
|
|
|
type: Boolean, |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
const pre_heat_time_sShow = ref(false) |
|
|
|
const addLiquidConfigValShow = ref(false) |
|
|
|
const sprayLiquidConfigValShow = ref(false) |
|
|
@ -541,8 +550,24 @@ const setAddliquidVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} |
|
|
|
if (props.runInfection) { |
|
|
|
// 运行中消毒 |
|
|
|
settingStore.changeAddLiquidConfigVal(val) |
|
|
|
console.log(settingStore.sprayLiquidConfigVal) |
|
|
|
const data = { |
|
|
|
injection_pump_speed: settingStore.sprayLiquidConfigVal.value, |
|
|
|
stoped_gs: stoped_gs, |
|
|
|
continued_gs: continued_gs.value, |
|
|
|
stoped_satur: settingStore.stoped_satur.value, |
|
|
|
continued_satur: settingStore.continued_satur.value, |
|
|
|
stoped_humi: settingStore.stoped_humi.value, |
|
|
|
continued_humi: settingStore.continued_humi.value, |
|
|
|
} |
|
|
|
webSocketStore.sendCommandMsg(changeDisinfectionParameterJSON(data)) |
|
|
|
} else { |
|
|
|
settingStore.changeAddLiquidConfigVal(val) |
|
|
|
webSocketStore.sendCommandMsg(setSettingValJSON('drainage_pump_speed', val)) |
|
|
|
} |
|
|
|
showSuccessToast('设置成功') |
|
|
|
} |
|
|
|
|
|
|
@ -552,10 +577,24 @@ const setStopedGsVal = () => { |
|
|
|
showFailToast('设置失败,请填写正确参数') |
|
|
|
return |
|
|
|
} |
|
|
|
if (props.runInfection) { |
|
|
|
settingStore.changeAddLiquidConfigVal(val) |
|
|
|
const data = { |
|
|
|
injection_pump_speed: sprayLiquidConfigVal, |
|
|
|
stoped_gs, |
|
|
|
continued_gs, |
|
|
|
stoped_satur, |
|
|
|
continued_satur, |
|
|
|
stoped_humi, |
|
|
|
continued_humi, |
|
|
|
} |
|
|
|
webSocketStore.sendCommandMsg(changeDisinfectionParameterJSON(data)) |
|
|
|
} else { |
|
|
|
settingStore.updateStopedGs(val) |
|
|
|
webSocketStore.sendCommandMsg(setSettingValJSON('stoped_gs', val)) |
|
|
|
showSuccessToast('设置成功') |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const setcontinuedGsVal = () => { |
|
|
|
const val = parseInt(continued_gs.value) |
|
|
|