Browse Source

测试页面增加压力显示

master
sige 1 year ago
parent
commit
5e77c0b810
  1. 26
      src/components/Test.vue
  2. 5
      src/store/modules/test.js
  3. 3
      src/store/modules/websocket.js

26
src/components/Test.vue

@ -231,6 +231,17 @@
<p class="info">湿度 {{ deviceStore.envirHumidity2 }} </p>
<p class="info">过氧化氢浓度 {{ deviceStore.envirHP2 }} PPM</p>
</div>
<div class="common_set update_wrap pressure">
<p class="title">
气路压力计 <span>{{ testStore.allPressure[1] }}</span>
</p>
<p class="title">
加液压力计 <span>{{ testStore.allPressure[2] }}</span>
</p>
<p class="title">
喷液压力计 <span>{{ testStore.allPressure[3] }}</span>
</p>
</div>
<van-number-keyboard
v-model="addLiquidVal"
@input="val => handleInput(val, 1)"
@ -564,6 +575,21 @@ const changeDraughtStatus = 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;

5
src/store/modules/test.js

@ -21,10 +21,15 @@ export const useTestStore = defineStore({
heatingStripObj: {},
waterImmersionSensor1: false,
waterImmersionSensor2: false,
allPressure: [0, 0, 0, 0],
}
},
// actions
actions: {
updateAllPressure(allPressure) {
this.allPressure = allPressure
},
updateWaterImmersionSensor1(waterImmersionSensor1) {
this.waterImmersionSensor1 = waterImmersionSensor1
},

3
src/store/modules/websocket.js

@ -129,6 +129,7 @@ export const useWebSocketStore = defineStore({
chargingPumpRPM,
sprinklerPumpRPM,
sprinklerPumpGPM,
pressure,
} = sensor_data
const { nowlog, targetlog } = disinfectionState || {}
deviceStore.updateTargetLog(targetlog)
@ -149,6 +150,7 @@ export const useWebSocketStore = defineStore({
operatorStore.updateReplenishingFluidsWorkState(
replenishingFluidsWorkState,
)
testStore.updateWaterImmersionSensor1(
waterImmersionSensor1 == 0 ? false : true,
)
@ -161,6 +163,7 @@ export const useWebSocketStore = defineStore({
testStore.updateHeatingStripObj(heatingStrip)
testStore.updateSprinklerPump(sprinklerPump)
testStore.updateChargingPump(chargingPump)
testStore.updateAllPressure(pressure)
settingStore.updateDeviceIp('192.168.8.10')
deviceStore.updateDisinfectantCapacity(disinfectant_volume)
deviceStore.updateBinTemperature(temp_1)

Loading…
Cancel
Save