From 63243629f5a89c8a9a9c80add99c46c77bdc964c Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Fri, 13 Oct 2023 11:48:14 +0800 Subject: [PATCH] log val remain --- .env | 8 ++++---- src/components/Setting/components/History.vue | 7 ++++--- src/store/modules/device.js | 1 - src/store/modules/websocket.js | 4 ++++ 4 files changed, 12 insertions(+), 8 deletions(-) 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/Setting/components/History.vue b/src/components/Setting/components/History.vue index 50fd6cc..1f6682b 100644 --- a/src/components/Setting/components/History.vue +++ b/src/components/Setting/components/History.vue @@ -178,6 +178,7 @@ const showDetailModal = item => { height: 80px; background: #f6f6f6; padding: 0 90px; + padding-right: 110px; .title_text { font-family: Source Han Sans CN; font-size: 18px; @@ -228,7 +229,7 @@ const showDetailModal = item => { box-sizing: border-box; width: 766px; height: 80px; - padding: 0 64px 0 90px; + padding: 0 84px 0 90px; .title { font-size: 22px; overflow: hidden; @@ -305,7 +306,7 @@ const showDetailModal = item => { width: 40px; height: 40px; position: fixed; - right: 98px; + right: 126px; bottom: 111px; z-index: 4; } @@ -367,7 +368,7 @@ const showDetailModal = item => { display: flex; align-items: center; justify-content: flex-end; - padding: 20px 120px; + padding: 20px 174px; .return_btn { width: 91px; height: 40px; diff --git a/src/store/modules/device.js b/src/store/modules/device.js index 286886f..75dc50e 100644 --- a/src/store/modules/device.js +++ b/src/store/modules/device.js @@ -36,7 +36,6 @@ export const useDeviceStore = defineStore({ actions: { updateTargetLog(targetlog) { // 直接将cookie中logVal改变 - localStorage.setItem('logVal', targetlog) this.targetlog = targetlog }, updateNowLog(nowlog) { diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js index 03f063e..63a80c9 100644 --- a/src/store/modules/websocket.js +++ b/src/store/modules/websocket.js @@ -90,6 +90,10 @@ export const useWebSocketStore = defineStore({ } = sensor_data const { nowlog, targetlog } = disinfectionState || {} deviceStore.updateTargetLog(targetlog) + // 必须开始的时候才改变log 否则不懂 + if ([1, 2, 3, 4].includes(disinfectionWorkState)) { + localStorage.setItem('logVal', targetlog) + } deviceStore.updateNowLog(nowlog) if ([1, 2, 3, 4].includes(disinfectionWorkState)) { operatorStore.updateShowStartReady(false)