From 753a3c354637bef76ba0d44a0ee75d8937d166f3 Mon Sep 17 00:00:00 2001
From: maochaoying <925670706@qq.com>
Date: Wed, 8 Nov 2023 19:14:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=AD=A3=E5=8E=8B=E8=B4=9F=E5=8E=8B=E7=8E=AF?=
=?UTF-8?q?=E5=A2=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Operator.vue | 43 +++++++++--
src/components/dialogs/EnvirPicker.vue | 130 +++++++++++++++++++++++++++++++++
src/mock/command.js | 3 +-
3 files changed, 168 insertions(+), 8 deletions(-)
create mode 100644 src/components/dialogs/EnvirPicker.vue
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,
}
}