diff --git a/src/components/Operator.vue b/src/components/Operator.vue index 10d693c..9213a3d 100644 --- a/src/components/Operator.vue +++ b/src/components/Operator.vue @@ -445,6 +445,12 @@ :changeLogVal="changeLogVal" :logVal="logVal" /> + import LogPicker from 'cpns/dialogs/LogPicker' +import EnvirPicker from 'cpns/dialogs/EnvirPicker' import PreInstallPicker from 'cpns/dialogs/PreInstallPicker' import DisinfectModal from 'cpns/dialogs/DisinfectModal' import WarnModal from 'cpns/dialogs/WarnModal' @@ -537,6 +544,7 @@ const toDetail = () => { } const logVisible = ref(false) +const envirVisible = ref(false) const logVal = ref(localStorage.getItem('logVal') || '6') const roomSize = ref(0) @@ -553,6 +561,19 @@ const changeLogVal = val => { localStorage.setItem('logVal', val) logVisible.value = false } +const envirVal = ref('1') +const changeEnvirVal = val => { + envirVal.value = val + envirVisible.value = false + + //执行开始消毒逻辑 + operatorStore.updateShowStartReady(true) + // 十秒以后隐藏遮罩 + setTimeout(() => { + operatorStore.updateShowStartReady(false) + }, 10000) + realStart() +} const changePreVal = val => { preVal.value = val preVisible.value = false @@ -562,12 +583,13 @@ const startDisinfect = () => { // 改变开始消毒状态 如果已经开始则不可点击 // 选择预设 而后开始消毒 // preVisible.value = true - operatorStore.updateShowStartReady(true) - // 十秒以后隐藏遮罩 - setTimeout(() => { - operatorStore.updateShowStartReady(false) - }, 10000) - realStart() + // operatorStore.updateShowStartReady(true) + // // 十秒以后隐藏遮罩 + // setTimeout(() => { + // operatorStore.updateShowStartReady(false) + // }, 10000) + // realStart() + envirVisible.value = true } const realStart = () => { @@ -580,7 +602,11 @@ const realStart = () => { localStorage.removeItem('envir1') localStorage.removeItem('envir2') webSocketStore.sendCommandMsg( - startDisinfectionJSON(parseInt(logVal.value), parseInt(roomSize.value)), + startDisinfectionJSON( + parseInt(logVal.value), + parseInt(roomSize.value), + parseInt(envirVal.value), + ), ) props.changeShowOperator(false) } @@ -602,6 +628,9 @@ onMounted(() => { const hiddenLogVisible = () => { logVisible.value = false } +const hiddenEnvirVisible = () => { + envirVisible.value = false +} onUnmounted(() => { timer.value = null }) diff --git a/src/components/dialogs/EnvirPicker.vue b/src/components/dialogs/EnvirPicker.vue new file mode 100644 index 0000000..a73d3eb --- /dev/null +++ b/src/components/dialogs/EnvirPicker.vue @@ -0,0 +1,130 @@ + + + + + diff --git a/src/mock/command.js b/src/mock/command.js index de2b1ea..42b4fe8 100644 --- a/src/mock/command.js +++ b/src/mock/command.js @@ -33,12 +33,13 @@ export const shutdownJSON = { } // 开始消毒 -export const startDisinfectionJSON = (loglevel, roomVolume) => { +export const startDisinfectionJSON = (loglevel, roomVolume, envirVal) => { return { command: 'startDisinfection', messageId: 'startDisinfection', loglevel, roomVolume, + envirVal, } }