From 2a40a0da9640af2aa532a78719e97b68794e5f9b Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Mon, 4 Sep 2023 22:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=A7=8B=E6=B6=88=E6=AF=92=E9=92=B1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=80=89=E6=8B=A9=E9=A2=84=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 +- src/components/Operator.vue | 30 ++++++- src/components/dialogs/PreInstallPicker.vue | 134 ++++++++++++++++++++++++++++ 3 files changed, 166 insertions(+), 6 deletions(-) create mode 100644 src/components/dialogs/PreInstallPicker.vue diff --git a/.env b/.env index fe3f0dd..c4ae906 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ -VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ +# VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ +# VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ -# VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ -# VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file +VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ +VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file diff --git a/src/components/Operator.vue b/src/components/Operator.vue index 36c327d..aecd436 100644 --- a/src/components/Operator.vue +++ b/src/components/Operator.vue @@ -409,7 +409,9 @@
{{ - operatorStore.estimatedRemainingTimeS == 0 + operatorStore.disinfection_id == '' + ? '未开始' + : operatorStore.estimatedRemainingTimeS == 0 ? '已结束' : `${time_To_hhmmss(operatorStore.estimatedRemainingTimeS)}` }} @@ -423,6 +425,13 @@ :changeLogVal="changeLogVal" :logVal="logVal" /> + import LogPicker from 'cpns/dialogs/LogPicker' +import PreInstallPicker from 'cpns/dialogs/PreInstallPicker' import DisinfectModal from 'cpns/dialogs/DisinfectModal' import WarnModal from 'cpns/dialogs/WarnModal' import DisinfectantLiquidInfo from 'cpns/info/DisinfectantLiquidInfo' @@ -446,6 +456,14 @@ const operatorStore = useOperatorStore() const webSocketStore = useWebSocketStore() const disinfectWarnVisible = ref(false) +const preVisible = ref(false) + +const preVal = ref('2') + +const hiddenPreVisible = () => { + preVisible.value = false +} + // 结束消毒 const stopDisinfectStatus = () => { disinfectWarnVisible.value = true @@ -493,9 +511,18 @@ const changeLogVal = val => { logVal.value = val logVisible.value = false } +const changePreVal = val => { + preVal.value = val + preVisible.value = false +} const startDisinfect = () => { // 改变开始消毒状态 如果已经开始则不可点击 + // 选择预设 而后开始消毒 + preVisible.value = true +} + +const realStart = () => { localStorage.setItem('logVal', logVal.value) if (![1, 2].includes(operatorStore.disinfectStatus)) { localStorage.removeItem('bin') @@ -505,7 +532,6 @@ const startDisinfect = () => { startDisinfectionJSON(parseInt(logVal.value), parseInt(roomSize.value)), ) props.changeShowOperator(false) - // 存储当前的log } } diff --git a/src/components/dialogs/PreInstallPicker.vue b/src/components/dialogs/PreInstallPicker.vue new file mode 100644 index 0000000..9cb6cf0 --- /dev/null +++ b/src/components/dialogs/PreInstallPicker.vue @@ -0,0 +1,134 @@ + + + + +