|
|
@ -2,7 +2,7 @@ |
|
|
|
<div class="test_container"> |
|
|
|
<div class="common_set switch_wrap"> |
|
|
|
<p class="title">加液蠕动泵</p> |
|
|
|
<p class="num">000 RPM</p> |
|
|
|
<p class="num">{{ Math.abs(testStore.chargingPump) }} RPM</p> |
|
|
|
<div class="btn_wrap"> |
|
|
|
<div |
|
|
|
:class="testStore.feedingPeristalticPumpStatus ? 'close' : 'open'" |
|
|
@ -20,7 +20,7 @@ |
|
|
|
</div> |
|
|
|
<div class="common_set switch_wrap"> |
|
|
|
<p class="title">喷液蠕动泵</p> |
|
|
|
<p class="num">000 RPM</p> |
|
|
|
<p class="num">{{ testStore.sprinklerPump }} RPM</p> |
|
|
|
<div class="btn_wrap"> |
|
|
|
<div |
|
|
|
:class="testStore.sprayPeristalticPump ? 'close' : 'open'" |
|
|
@ -38,7 +38,7 @@ |
|
|
|
</div> |
|
|
|
<div class="common_set switch_wrap"> |
|
|
|
<p class="title">空压机</p> |
|
|
|
<p class="num">000 A</p> |
|
|
|
<p class="num">{{ testStore?.airCompressorObj?.currentVal }} A</p> |
|
|
|
<div class="btn_wrap"> |
|
|
|
<div |
|
|
|
:class="testStore.airCompressor ? 'close' : 'open'" |
|
|
@ -56,7 +56,7 @@ |
|
|
|
</div> |
|
|
|
<div class="common_set switch_wrap"> |
|
|
|
<p class="title">风机</p> |
|
|
|
<p class="num">000 RPM</p> |
|
|
|
<p class="num">{{ testStore?.airBlowerObj?.currentVal }} RPM</p> |
|
|
|
<div class="btn_wrap"> |
|
|
|
<div |
|
|
|
:class="testStore.draughtFan ? 'close' : 'open'" |
|
|
@ -72,6 +72,24 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="common_set switch_wrap"> |
|
|
|
<p class="title">加热片</p> |
|
|
|
<p class="num">{{ testStore?.heatingStripObj?.currentVal }} ℃</p> |
|
|
|
<div class="btn_wrap"> |
|
|
|
<div |
|
|
|
:class="testStore.heatingStrip ? 'close' : 'open'" |
|
|
|
@click="changeHeatingStatus(1)" |
|
|
|
> |
|
|
|
打开 |
|
|
|
</div> |
|
|
|
<div |
|
|
|
:class="!testStore.heatingStrip ? 'close' : 'open'" |
|
|
|
@click="changeHeatingStatus(2)" |
|
|
|
> |
|
|
|
关闭 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="common_set update_wrap"> |
|
|
|
<p class="title">水浸</p> |
|
|
|
<p class="num">有水</p> |
|
|
@ -105,18 +123,31 @@ |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import { ref } from 'vue' |
|
|
|
import { useTestStore, useDeviceStore } from '@/store' |
|
|
|
import { |
|
|
|
useTestStore, |
|
|
|
useDeviceStore, |
|
|
|
useWebSocketStore, |
|
|
|
useSettingStore, |
|
|
|
} from '@/store' |
|
|
|
import { someAirSwitchJSON, liquidpumpctrlJSON } from '@/mock/command' |
|
|
|
|
|
|
|
const testStore = useTestStore() |
|
|
|
const deviceStore = useDeviceStore() |
|
|
|
const websocketStore = useWebSocketStore() |
|
|
|
const settingStore = useSettingStore() |
|
|
|
|
|
|
|
const changeFeedingStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.feedingPeristalticPumpStatus) { |
|
|
|
// 发送打开指令 |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
liquidpumpctrlJSON(1, settingStore.addLiquidConfigVal), |
|
|
|
) |
|
|
|
testStore.updateFeedingPeristalticPumpStatus(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.feedingPeristalticPumpStatus) { |
|
|
|
websocketStore.sendCommandMsg(liquidpumpctrlJSON(1, 0)) |
|
|
|
testStore.updateFeedingPeristalticPumpStatus(false) |
|
|
|
} |
|
|
|
} |
|
|
@ -125,22 +156,46 @@ const changeFeedingStatus = flag => { |
|
|
|
const changeSprayStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.sprayPeristalticPump) { |
|
|
|
websocketStore.sendCommandMsg( |
|
|
|
liquidpumpctrlJSON(2, settingStore.sprayLiquidConfigVal), |
|
|
|
) |
|
|
|
testStore.updateSprayPeristalticPump(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.sprayPeristalticPump) { |
|
|
|
websocketStore.sendCommandMsg(liquidpumpctrlJSON(2, 0)) |
|
|
|
testStore.updateSprayPeristalticPump(false) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const changeHeatingStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.heatingStrip) { |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(4, 1)) |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(5, 1)) |
|
|
|
testStore.updateHeatingStrip(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.heatingStrip) { |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(4, 0)) |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(5, 0)) |
|
|
|
testStore.updateHeatingStrip(false) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const changeAirStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.airCompressor) { |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(0, 1)) |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(1, 1)) |
|
|
|
testStore.updateAirCompressor(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.airCompressor) { |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(0, 0)) |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(1, 0)) |
|
|
|
testStore.updateAirCompressor(false) |
|
|
|
} |
|
|
|
} |
|
|
@ -149,10 +204,14 @@ const changeAirStatus = flag => { |
|
|
|
const changeDraughtStatus = flag => { |
|
|
|
if (flag == 1) { |
|
|
|
if (!testStore.draughtFan) { |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(2, 1)) |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(3, 1)) |
|
|
|
testStore.updateDraughtFan(true) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (testStore.draughtFan) { |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(2, 0)) |
|
|
|
websocketStore.sendCommandMsg(someAirSwitchJSON(3, 0)) |
|
|
|
testStore.updateDraughtFan(false) |
|
|
|
} |
|
|
|
} |
|
|
|