Browse Source

去除加夜排液

master
maochaoying 2 years ago
parent
commit
fb7a1c11b5
  1. 8
      .env
  2. 47
      src/components/SealTest.vue
  3. 52
      src/pages/Home.vue
  4. 14
      src/store/modules/setting.js
  5. 9
      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/

47
src/components/SealTest.vue

@ -73,6 +73,14 @@
</div>
</div>
</div>
<van-overlay :show="testOverlayVisible" z-index="3">
<div class="wrapper" @click.stop>
<div class="block">
<van-loading />
<p class="shutdown_text">正在测试压力中...</p>
</div>
</div>
</van-overlay>
</div>
</template>
@ -105,6 +113,8 @@ const sealStore = useSealStore()
const testStore = useTestStore()
const websocketStore = useWebSocketStore()
const testOverlayVisible = ref(false)
const { airInletProportionalInitVal, airOutletProportionalInitVal } =
storeToRefs(sealStore)
@ -114,7 +124,7 @@ const sealOptions = ref({
{
type: 'gauge',
min: 0,
max: 30,
max: 10,
progress: {
show: true,
width: 18,
@ -254,13 +264,15 @@ const waitAirFinish = async () => {
})
}
const sleepVal1 = ref(3)
const sleepVal1 = ref(1)
const sleepVal2 = ref(60)
const newStartTest = async flag => {
if (flag == 1) {
//
//
// loading 1min
testOverlayVisible.value = true
timerFunc()
sealStore.updateIsStartTest(true)
// 2
@ -276,7 +288,6 @@ const newStartTest = async flag => {
await waitAirFinish()
//
websocketStore.sendCommandMsg(airCompressor_setStateJSON([1]))
// 1s
await wait(sleepVal1.value * 1000)
//
websocketStore.sendCommandMsg(airCompressor_setStateJSON([0]))
@ -288,6 +299,8 @@ const newStartTest = async flag => {
// 5s
await wait(sleepVal2.value * 1000)
//
// 1min
testOverlayVisible.value = false
websocketStore.sendCommandMsg(airCompressorGetPressureDirectJSON)
}
if (flag == 2) {
@ -336,7 +349,7 @@ onMounted(() => {
{
type: 'gauge',
min: 0,
max: 30,
max: 10,
progress: {
show: true,
width: 18,
@ -606,4 +619,30 @@ onMounted(() => {
// width: 50px;
// height: 100px;
// }
.wrapper {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.block {
width: 120px;
height: 120px;
display: flex;
flex-direction: column;
padding: 16px;
align-items: center;
justify-content: center;
.shutdown_text {
margin-top: 24px;
font-family: Source Han Sans CN;
font-size: 18px;
font-weight: normal;
line-height: normal;
letter-spacing: 0.06em;
color: #fff;
white-space: nowrap;
}
}
</style>

52
src/pages/Home.vue

@ -28,58 +28,6 @@
</div>
<div
:class="
activeTab == 2 ? 'tab_btn style-btn active_btn' : 'style-btn tab_btn'
"
@click="changeTab(2)"
v-if="[0, 5].includes(operatorStore.disinfectStatus)"
>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="20"
height="20"
viewBox="0 0 20 20"
>
<g>
<path
d="M10.0113,0Q12.0725,0,13.8958,0.782313Q15.7191,1.56463,17.0781,2.92517Q18.4371,4.28571,19.2186,6.11111Q20,7.93651,20,10Q20,12.0862,19.2186,13.9002Q18.4371,15.7143,17.0781,17.0748Q15.7191,18.4354,13.8958,19.2177Q12.0725,20,10.0113,20Q7.92752,20,6.10419,19.2177Q4.28086,18.4354,2.92186,17.0748Q1.56285,15.7143,0.781427,13.9002Q-2.53134e-7,12.0862,0,10Q0,7.93651,0.781427,6.11111Q1.56285,4.28571,2.92186,2.92517Q4.28086,1.56463,6.10419,0.782313Q7.92752,-5.91316e-7,10.0113,0ZM15.7191,11.3832Q16.308,11.3832,16.7157,10.9637Q17.1234,10.5442,17.1234,9.95465Q17.1234,9.36508,16.7157,8.95692Q16.308,8.54875,15.7191,8.54875L11.4609,8.54875L11.4609,4.28571Q11.4609,3.69615,11.0419,3.27664Q10.6229,2.85714,10.034,2.85714Q9.44507,2.85714,9.03737,3.27664Q8.62967,3.69615,8.62967,4.28571L8.62967,8.54875L4.37146,8.54875Q3.78256,8.54875,3.37486,8.95692Q2.96716,9.36508,2.96716,9.95465Q2.96716,10.5442,3.37486,10.9637Q3.78256,11.3832,4.37146,11.3832L8.62967,11.3832L8.62967,15.6236Q8.62967,16.2132,9.03737,16.6327Q9.44507,17.0522,10.034,17.0522Q10.6229,17.0522,11.0419,16.6327Q11.4609,16.2132,11.4609,15.6236L11.4609,11.3832L15.7191,11.3832Z"
:fill="activeTab == 2 ? '#FFFFFF' : '#3D3D3D'"
fill-opacity="1"
/>
</g>
</svg>
<p class="text">加液</p>
</div>
<div
:class="
activeTab == 3 ? 'tab_btn style-btn active_btn' : 'style-btn tab_btn'
"
@click="changeTab(3)"
v-if="[0, 5].includes(operatorStore.disinfectStatus)"
>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="20"
height="20"
viewBox="0 0 20 20"
>
<g>
<path
d="M9.98885,0Q12.0624,0,13.8907,0.791527Q15.7191,1.58305,17.068,2.932Q18.4169,4.28094,19.2085,6.0981Q20,7.91527,20,9.98885Q20,12.0624,19.2085,13.8907Q18.4169,15.7191,17.068,17.068Q15.7191,18.4169,13.8907,19.2085Q12.0624,20,9.98885,20Q7.91527,20,6.0981,19.2085Q4.28094,18.4169,2.932,17.068Q1.58305,15.7191,0.791527,13.8907Q0.00000290714,12.0624,0,9.98885Q-0.00000290714,7.91527,0.791527,6.0981Q1.58306,4.28094,2.932,2.932Q4.28093,1.58305,6.0981,0.791528Q7.91528,0.00000332244,9.98885,0ZM14.961,11.3489Q15.6299,11.3489,16.165,11.0033Q16.7001,10.6577,16.7001,9.96655Q16.7001,9.29766,16.165,8.97436Q15.6299,8.65106,14.961,8.65106L5.10591,8.65106Q4.43701,8.65106,3.8796,8.97436Q3.32218,9.29766,3.32218,9.96655Q3.32218,10.6577,3.8796,11.0033Q4.43701,11.3489,5.10591,11.3489L14.961,11.3489Z"
:fill="activeTab == 3 ? '#FFFFFF' : '#3D3D3D'"
fill-opacity="1"
/>
</g>
</svg>
<p class="text">排液</p>
</div>
<div
:class="
activeTab == 8 ? 'tab_btn style-btn active_btn' : 'style-btn tab_btn'
"
v-if="[0, 5].includes(operatorStore.disinfectStatus)"

14
src/store/modules/setting.js

@ -114,13 +114,13 @@ export const useSettingStore = defineStore({
const proportionalValveDefaultValueObj = allSettingList.filter(
item => item.name == 'proportional_valve_default_value',
)[0]
this.proportionalValveDefaultValue = proportionalValveDefaultValueObj.val
this.pre_heat_time_s = pre_heat_time_sOBj.val
this.max_humidity = max_humidityObj.val
this.continued_satur = continued_saturObj.val
this.stoped_satur = stoped_saturObj.val
this.continued_gs = continued_gsObj.val
this.stoped_gs = stoped_gsObj.val
this.proportionalValveDefaultValue = proportionalValveDefaultValueObj?.val
this.pre_heat_time_s = pre_heat_time_sOBj?.val
this.max_humidity = max_humidityObj?.val
this.continued_satur = continued_saturObj?.val
this.stoped_satur = stoped_saturObj?.val
this.continued_gs = continued_gsObj?.val
this.stoped_gs = stoped_gsObj?.val
// 对当前数组进行处理 赋予给泵参数
const addLiquid = allSettingList.filter(
item => item.name == 'drainage_pump_speed',

9
src/store/modules/websocket.js

@ -198,7 +198,8 @@ export const useWebSocketStore = defineStore({
if (getPressureInterCode == 0) {
// 值初始化
sealStore.updateCurrentAirPressure(
pressureIntervalAck[0].toFixed(1) || 0,
(pressureIntervalAck && pressureIntervalAck[0]?.toFixed(1)) ||
0,
)
}
break
@ -208,13 +209,9 @@ export const useWebSocketStore = defineStore({
ack: airProportionalValveAck,
} = JSON.parse(ev.data)
if (airProportionalValveCode == 0) {
console.log(
'airProportionalValveAck[0]',
airProportionalValveAck[0],
)
// 比例阀当前是否到位
sealStore.updateAirProportionalValveIsBusy(
airProportionalValveAck[0],
airProportionalValveAck && airProportionalValveAck[0],
)
}
break

Loading…
Cancel
Save