Browse Source

log val remain

master
maochaoying 2 years ago
parent
commit
63243629f5
  1. 8
      .env
  2. 7
      src/components/Setting/components/History.vue
  3. 1
      src/store/modules/device.js
  4. 4
      src/store/modules/websocket.js

8
.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/
VITE_BASE_WS1_URL=ws://127.0.0.1:19001/
VITE_BASE_WS2_URL=ws://127.0.0.1:19002/

7
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;

1
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) {

4
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)

Loading…
Cancel
Save