From 5f0f6340e98888c2c3e4b8bd2bf19aee513af84c Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Fri, 10 Nov 2023 15:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=8B=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SealTest.vue | 3 +++ src/components/Test.vue | 38 +++++++++++++++++++++++++++++++------- src/store/modules/seal.js | 4 ++++ src/store/modules/websocket.js | 1 + 4 files changed, 39 insertions(+), 7 deletions(-) diff --git a/src/components/SealTest.vue b/src/components/SealTest.vue index 4da5a9c..a56c85d 100644 --- a/src/components/SealTest.vue +++ b/src/components/SealTest.vue @@ -250,6 +250,7 @@ const changeAirStatus = flag => { websocketStore.sendCommandMsg( AirOutletProportionalValve_setStateJSON([0]), ) + websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1])) websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) testStore.updateAirCompressor(true) } @@ -264,6 +265,8 @@ const handleStartTest = flag => { timerFunc() // 关闭空压机通道 websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) + websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0])) + websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0])) // 停止冲入空气,即关闭空压机 websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) testStore.updateAirCompressor(false) diff --git a/src/components/Test.vue b/src/components/Test.vue index 400260d..6fe9e6e 100644 --- a/src/components/Test.vue +++ b/src/components/Test.vue @@ -215,18 +215,25 @@
-

水浸1

+

水浸

{{ testStore.waterImmersionSensor1 ? '有水' : '没水' }}

更新读取水浸状态
-
-

水浸2

-

{{ testStore.waterImmersionSensor2 ? '有水' : '没水' }}

-
- 更新读取水浸状态 -
+
+

+ 压力1 {{ sealStore.allPressure[0] }} +

+

+ 压力2 {{ sealStore.allPressure[1] }} +

+

+ 压力3 {{ sealStore.allPressure[2] }} +

+

+ 压力4 {{ sealStore.allPressure[3] }} +

液位

@@ -294,6 +301,7 @@ import { useDeviceStore, useWebSocketStore, useSettingStore, + useSealStore, } from '@/store' import { someAirSwitchJSON, @@ -309,6 +317,7 @@ const testStore = useTestStore() const deviceStore = useDeviceStore() const websocketStore = useWebSocketStore() const settingStore = useSettingStore() +const sealStore = useSealStore() const addLiquidVal = ref(settingStore.addLiquidConfigVal) const addLiquidPower = ref(25) @@ -604,6 +613,21 @@ const changeChannel = flag => { } } } + .pressure { + display: flex; + align-items: center; + justify-content: space-evenly !important; + .title { + display: flex; + line-height: 30px; + justify-content: center !important; + flex-direction: column; + align-items: center; + span { + font-size: 26px; + } + } + } .switch_wrap { padding: 0 17px 0 17px; justify-content: space-between; diff --git a/src/store/modules/seal.js b/src/store/modules/seal.js index ef83976..989e4c9 100644 --- a/src/store/modules/seal.js +++ b/src/store/modules/seal.js @@ -13,10 +13,14 @@ export const useSealStore = defineStore({ // 初始化的机器阀门信息 airInletProportionalInitVal: 0, airOutletProportionalInitVal: 0, + allPressure: [0, 0, 0, 0], } }, // actions actions: { + updateAllPressure(allPressure) { + this.allPressure = allPressure + }, updateAirInletProportionalInitVal(airInletProportionalInitVal) { this.airInletProportionalInitVal = airInletProportionalInitVal }, diff --git a/src/store/modules/websocket.js b/src/store/modules/websocket.js index 758507c..c7307a6 100644 --- a/src/store/modules/websocket.js +++ b/src/store/modules/websocket.js @@ -107,6 +107,7 @@ export const useWebSocketStore = defineStore({ } else { operatorStore.updateStopReady(false) } + sealStore.updateAllPressure(pressure) sealStore.updateCurrentAirPressure(pressure[1]) settingStore.updateSprinklerPumpGPM(sprinklerPumpGPM) settingStore.updateChargingPumpRPM(chargingPumpRPM)