From ede6fa043d5bb75b80fcbb90a2c0fa42b453db8f Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Tue, 5 Sep 2023 14:17:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 ++++---- src/components/Test.vue | 8 ++++---- src/mock/command.js | 8 ++++---- src/store/modules/setting.js | 8 ++++++++ src/store/modules/websocket.js | 4 ++++ 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.env b/.env index c4ae906..fe3f0dd 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/Test.vue b/src/components/Test.vue index d89fc67..1460bf7 100644 --- a/src/components/Test.vue +++ b/src/components/Test.vue @@ -17,7 +17,7 @@
{ export const test_replenishingFluidsPumpCtrJSON = (ctrl, speed) => { return { - command: 'test_replenishingFluidsPumpCtr', - messageId: 'test_replenishingFluidsPumpCtr', + command: 'test_replenishingFluidsPumpCtrl', + messageId: 'test_replenishingFluidsPumpCtrl', ctrl, speed, } @@ -151,8 +151,8 @@ export const test_replenishingFluidsPumpCtrJSON = (ctrl, speed) => { export const sprayLiquidPump_open_for_testJSON = (ctrl, speed) => { return { - command: 'sprayLiquidPump_open_for_test', - messageId: 'sprayLiquidPump_open_for_test', + command: 'test_sprayLiquidPumpCtrl', + messageId: 'test_sprayLiquidPumpCtrl', ctrl, speed, } diff --git a/src/store/modules/setting.js b/src/store/modules/setting.js index 592ba26..f87ceeb 100644 --- a/src/store/modules/setting.js +++ b/src/store/modules/setting.js @@ -28,10 +28,18 @@ export const useSettingStore = defineStore({ // 所有setting的对象数据 allSettingList: [], deviceIp: '127.0.0.1', + chargingPumpRPM: 0, + sprinklerPumpRPM: 0, } }, // actions actions: { + updateChargingPumpRPM(chargingPumpRPM) { + this.chargingPumpRPM = chargingPumpRPM + }, + updateSprinklerPumpRPM(sprinklerPumpRPM) { + this.sprinklerPumpRPM = sprinklerPumpRPM + }, updateStopedHumi(stoped_humi) { this.stoped_humi = stoped_humi }, diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js index 96de680..d8d07f8 100644 --- a/src/store/modules/websocket.js +++ b/src/store/modules/websocket.js @@ -75,12 +75,16 @@ export const useWebSocketStore = defineStore({ chargingPump, waterImmersionSensor1, waterImmersionSensor2, + chargingPumpRPM, + sprinklerPumpRPM, } = sensor_data if ([1, 2, 3, 4].includes(disinfectionWorkState)) { operatorStore.updateShowStartReady(false) } else { operatorStore.updateStopReady(false) } + settingStore.updateChargingPumpRPM(chargingPumpRPM) + settingStore.updateSprinklerPumpRPM(sprinklerPumpRPM) operatorStore.updateDrainingWorkState(drainingWorkState) operatorStore.updateReplenishingFluidsWorkState( replenishingFluidsWorkState,