Browse Source

压力

master
maochaoying 2 years ago
parent
commit
5f0f6340e9
  1. 3
      src/components/SealTest.vue
  2. 38
      src/components/Test.vue
  3. 4
      src/store/modules/seal.js
  4. 1
      src/store/modules/websocket.js

3
src/components/SealTest.vue

@ -250,6 +250,7 @@ const changeAirStatus = flag => {
websocketStore.sendCommandMsg( websocketStore.sendCommandMsg(
AirOutletProportionalValve_setStateJSON([0]), AirOutletProportionalValve_setStateJSON([0]),
) )
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([1]))
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1])) websocketStore.sendCommandMsg(airCompressor_setStateJSON([1]))
testStore.updateAirCompressor(true) testStore.updateAirCompressor(true)
} }
@ -264,6 +265,8 @@ const handleStartTest = flag => {
timerFunc() timerFunc()
// //
websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0])) websocketStore.sendCommandMsg(airCompressor_channelCtrlJSON([0]))
websocketStore.sendCommandMsg(AirInletProportionalValve_setStateJSON([0]))
websocketStore.sendCommandMsg(AirOutletProportionalValve_setStateJSON([0]))
// //
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0])) websocketStore.sendCommandMsg(airCompressor_setStateJSON([0]))
testStore.updateAirCompressor(false) testStore.updateAirCompressor(false)

38
src/components/Test.vue

@ -215,18 +215,25 @@
</div> </div>
</div> </div>
<div class="common_set update_wrap"> <div class="common_set update_wrap">
<p class="title">水浸1</p>
<p class="title">水浸</p>
<p class="num">{{ testStore.waterImmersionSensor1 ? '有水' : '没水' }}</p> <p class="num">{{ testStore.waterImmersionSensor1 ? '有水' : '没水' }}</p>
<div class="btn_wrap style-btn" @click="handleUpdate" style="opacity: 0"> <div class="btn_wrap style-btn" @click="handleUpdate" style="opacity: 0">
更新读取水浸状态 更新读取水浸状态
</div> </div>
</div> </div>
<div class="common_set update_wrap">
<p class="title">水浸2</p>
<p class="num">{{ testStore.waterImmersionSensor2 ? '有水' : '没水' }}</p>
<div class="btn_wrap style-btn" @click="handleUpdate" style="opacity: 0">
更新读取水浸状态
</div>
<div class="common_set update_wrap pressure">
<p class="title">
压力1 <span>{{ sealStore.allPressure[0] }}</span>
</p>
<p class="title">
压力2 <span>{{ sealStore.allPressure[1] }}</span>
</p>
<p class="title">
压力3 <span>{{ sealStore.allPressure[2] }}</span>
</p>
<p class="title">
压力4 <span>{{ sealStore.allPressure[3] }}</span>
</p>
</div> </div>
<div class="common_set update_wrap"> <div class="common_set update_wrap">
<p class="title">液位</p> <p class="title">液位</p>
@ -294,6 +301,7 @@ import {
useDeviceStore, useDeviceStore,
useWebSocketStore, useWebSocketStore,
useSettingStore, useSettingStore,
useSealStore,
} from '@/store' } from '@/store'
import { import {
someAirSwitchJSON, someAirSwitchJSON,
@ -309,6 +317,7 @@ const testStore = useTestStore()
const deviceStore = useDeviceStore() const deviceStore = useDeviceStore()
const websocketStore = useWebSocketStore() const websocketStore = useWebSocketStore()
const settingStore = useSettingStore() const settingStore = useSettingStore()
const sealStore = useSealStore()
const addLiquidVal = ref(settingStore.addLiquidConfigVal) const addLiquidVal = ref(settingStore.addLiquidConfigVal)
const addLiquidPower = ref(25) 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 { .switch_wrap {
padding: 0 17px 0 17px; padding: 0 17px 0 17px;
justify-content: space-between; justify-content: space-between;

4
src/store/modules/seal.js

@ -13,10 +13,14 @@ export const useSealStore = defineStore({
// 初始化的机器阀门信息 // 初始化的机器阀门信息
airInletProportionalInitVal: 0, airInletProportionalInitVal: 0,
airOutletProportionalInitVal: 0, airOutletProportionalInitVal: 0,
allPressure: [0, 0, 0, 0],
} }
}, },
// actions // actions
actions: { actions: {
updateAllPressure(allPressure) {
this.allPressure = allPressure
},
updateAirInletProportionalInitVal(airInletProportionalInitVal) { updateAirInletProportionalInitVal(airInletProportionalInitVal) {
this.airInletProportionalInitVal = airInletProportionalInitVal this.airInletProportionalInitVal = airInletProportionalInitVal
}, },

1
src/store/modules/websocket.js

@ -107,6 +107,7 @@ export const useWebSocketStore = defineStore({
} else { } else {
operatorStore.updateStopReady(false) operatorStore.updateStopReady(false)
} }
sealStore.updateAllPressure(pressure)
sealStore.updateCurrentAirPressure(pressure[1]) sealStore.updateCurrentAirPressure(pressure[1])
settingStore.updateSprinklerPumpGPM(sprinklerPumpGPM) settingStore.updateSprinklerPumpGPM(sprinklerPumpGPM)
settingStore.updateChargingPumpRPM(chargingPumpRPM) settingStore.updateChargingPumpRPM(chargingPumpRPM)

Loading…
Cancel
Save