|
|
@ -1,11 +1,15 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
import { sendCmd } from 'apis/system' |
|
|
|
import { roundNumber } from 'libs/utils' |
|
|
|
import { useDebugStore } from 'stores/debugStore' |
|
|
|
import { useHomeStore } from 'stores/homeStore' |
|
|
|
import { ref, watchEffect } from 'vue' |
|
|
|
|
|
|
|
const homeStore = useHomeStore() |
|
|
|
const debugStore = useDebugStore() |
|
|
|
const h2O2SensorData = ref<Home.DisplayrelyMgrParams[]>(homeStore.h2O2SensorData) |
|
|
|
const sprayPumpGpmValue = ref<number>(5) |
|
|
|
const airLeakDetectTestMode = ref<string>('disinfection') |
|
|
|
|
|
|
|
watchEffect(() => { |
|
|
|
const hdData = homeStore.h2O2SensorData |
|
|
@ -15,71 +19,144 @@ watchEffect(() => { |
|
|
|
}) |
|
|
|
|
|
|
|
// 加液 |
|
|
|
const onAddLiquid = async () => { |
|
|
|
const params = { |
|
|
|
className: 'AddLiquidService', |
|
|
|
fnName: 'start', |
|
|
|
params: { |
|
|
|
stopatg: 100, |
|
|
|
}, |
|
|
|
const liquidFillingPumpDoLiquidFilling = async () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'liquidFillingPumpDoLiquidFilling', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendCmd(params) |
|
|
|
await sendCmd(data) |
|
|
|
} |
|
|
|
// 排液 |
|
|
|
const onDisLiquid = async () => { |
|
|
|
const params = { |
|
|
|
className: 'DrainLiquidService', |
|
|
|
fnName: 'start', |
|
|
|
const liquidFillingPumpDoLiquidDischarge = async () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'liquidFillingPumpDoLiquidDischarge', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(params) |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
// 停止加液 或 排液。停止电机 |
|
|
|
const onOffLiquidMotor = () => { |
|
|
|
const stopAddparams = { |
|
|
|
className: 'AddLiquidService', |
|
|
|
fnName: 'stop', |
|
|
|
const liquidFillingPumpDoStop = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'liquidFillingPumpDoStop', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(stopAddparams) |
|
|
|
|
|
|
|
const params = { |
|
|
|
className: 'DrainLiquidService', |
|
|
|
fnName: 'stop', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(params) |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 打开空压机 |
|
|
|
const onOpenAirPump = () => { |
|
|
|
const airCompressorDoOpen = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'airCompressorDoOpen', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 关闭空压机 |
|
|
|
const onCloseAirPump = () => { |
|
|
|
const airCompressorDoClose = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'airCompressorDoClose', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 打开加热 |
|
|
|
const onOpenHeat = () => { |
|
|
|
const heatingDoOpen = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'heatingDoOpen', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
// 关闭加热 |
|
|
|
const onCloseHeat = () => {} |
|
|
|
const heatingDoClose = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'heatingDoClose', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 喷液泵控制 喷液(gpm) |
|
|
|
const sprayPumpDoForward = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'sprayPumpDoForward', |
|
|
|
params: { |
|
|
|
gpm: sprayPumpGpmValue.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
// 喷液泵控制 回流(gpm) |
|
|
|
const sprayPumpDoBackward = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'sprayPumpDoBackward', |
|
|
|
params: { |
|
|
|
gpm: sprayPumpGpmValue.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
// 喷液泵控制 停止 |
|
|
|
const onClosePump = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'sprayPumpDoStop', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 读取蒸发仓状态 |
|
|
|
const queryEvaporationState = () => {} |
|
|
|
// 注射蠕动泵喷射 |
|
|
|
const onSprayMetor = () => {} |
|
|
|
// 注射蠕动泵回流 |
|
|
|
const onRefluxMetor = () => {} |
|
|
|
// 关闭蠕动泵 |
|
|
|
const onClosePump = () => {} |
|
|
|
// 打开风机 |
|
|
|
const blowerDoOpen = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'blowerDoOpen', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
// 关闭风机 |
|
|
|
const blowerDoClose = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'blowerDoClose', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 气密性测试模式切换 |
|
|
|
const airLeakDetectTestModeDoSetMode = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'airLeakDetectTestModeDoSetMode', |
|
|
|
params: { |
|
|
|
mode: airLeakDetectTestMode.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
|
|
|
|
// 打开风扇 |
|
|
|
const onOpenFan = () => {} |
|
|
|
// 关闭风扇 |
|
|
|
const onCloseFan = () => {} |
|
|
|
// 底部水浸 |
|
|
|
const onBottomState = () => {} |
|
|
|
// 打印测试 |
|
|
|
const printerDoTest = () => { |
|
|
|
const data = { |
|
|
|
className: 'TestPageCtrlService', |
|
|
|
fnName: 'printerDoTest', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
sendCmd(data) |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
@ -107,88 +184,94 @@ const onBottomState = () => {} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</section> |
|
|
|
<hr class="divider"> |
|
|
|
<div class="debug-lower"> |
|
|
|
<section> |
|
|
|
<div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
加液蠕动泵: |
|
|
|
加液泵控制: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="加液" |
|
|
|
@click="onAddLiquid" |
|
|
|
@click="liquidFillingPumpDoLiquidFilling" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="排液" |
|
|
|
@click="onDisLiquid" |
|
|
|
button-text="排空" |
|
|
|
@click="liquidFillingPumpDoLiquidDischarge" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
button-text="关闭" |
|
|
|
@click="onOffLiquidMotor" |
|
|
|
button-text="停止" |
|
|
|
@click="liquidFillingPumpDoStop" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
空压机: |
|
|
|
空压机控制: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<span class="debug-text">0.00A</span> |
|
|
|
<span class="debug-text">{{ debugStore.debugPageState?.airCompressorCurrent }} A</span> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="打开" |
|
|
|
@click="onOpenAirPump" |
|
|
|
@click="airCompressorDoOpen" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
button-text="关闭" |
|
|
|
@click="onCloseAirPump" |
|
|
|
@click="airCompressorDoClose" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
加热片: |
|
|
|
加热片控制: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<span class="debug-text">0.00A</span> |
|
|
|
<span class="debug-text">{{ debugStore.debugPageState?.heaterCurrent }} A</span> |
|
|
|
<span class="debug-text">{{ debugStore.debugPageState?.heaterTemperature }} ℃</span> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="打开" |
|
|
|
@click="onOpenHeat" |
|
|
|
@click="heatingDoOpen" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
button-text="关闭" |
|
|
|
@click="onCloseHeat" |
|
|
|
@click="heatingDoClose" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
蒸发仓水浸: |
|
|
|
气密性阀门模式: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<span class="debug-text">没水</span> |
|
|
|
<el-select v-model="airLeakDetectTestMode" placeholder="请选择模式" style="width: 100%;" > |
|
|
|
<el-option label="消毒模式" value="disinfection" /> |
|
|
|
<el-option label="加压模式" value="inflation" /> |
|
|
|
<el-option label="泄露测试模式" value="leakTest" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="读取状态" |
|
|
|
@click="queryEvaporationState" |
|
|
|
button-text="切换" |
|
|
|
@click="airLeakDetectTestModeDoSetMode" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -198,62 +281,64 @@ const onBottomState = () => {} |
|
|
|
<div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
注射蠕动泵: |
|
|
|
喷液泵控制: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<el-select v-model="sprayPumpGpmValue" placeholder="请选择加液量" style="width: 100%;"> |
|
|
|
<el-option v-for="opt in [2, 5, 8, 10, 15]" :key="opt" :label="`${opt} gpm`" :value="opt" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="喷射" |
|
|
|
@click="onSprayMetor" |
|
|
|
button-text="喷液" |
|
|
|
@click="sprayPumpDoForward" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="回流" |
|
|
|
@click="onRefluxMetor" |
|
|
|
@click="sprayPumpDoBackward" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
button-text="关闭" |
|
|
|
button-text="停止" |
|
|
|
@click="onClosePump" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
风机: |
|
|
|
风机控制: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<span class="debug-text">0.00A</span> |
|
|
|
<span class="debug-text">{{ debugStore.debugPageState?.blowerCurrent }} A</span> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="打开" |
|
|
|
@click="onOpenFan" |
|
|
|
@click="blowerDoOpen" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
button-text="关闭" |
|
|
|
@click="onCloseFan" |
|
|
|
@click="blowerDoClose" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="debug-left-lh"> |
|
|
|
<div class="debug-label"> |
|
|
|
设备底部水浸: |
|
|
|
</div> |
|
|
|
<div class="debug-bw"> |
|
|
|
<span class="debug-text">没水</span> |
|
|
|
打印机测试: |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<bt-button |
|
|
|
type="primary" |
|
|
|
button-text="读取状态" |
|
|
|
@click="onBottomState" |
|
|
|
button-text="测试" |
|
|
|
@click="printerDoTest" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -270,8 +355,7 @@ const onBottomState = () => {} |
|
|
|
height: $main-container-height; |
|
|
|
overflow: hidden; |
|
|
|
background: $gradient-color; |
|
|
|
padding-top: 4vh; |
|
|
|
padding-left: 30px; |
|
|
|
padding: 4vh; |
|
|
|
font-size: 20px; |
|
|
|
.debug-upper{ |
|
|
|
display: grid; |
|
|
@ -289,6 +373,10 @@ const onBottomState = () => {} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.divider{ |
|
|
|
margin-top: 4vh; |
|
|
|
margin-bottom: 4vh; |
|
|
|
} |
|
|
|
.debug-env { |
|
|
|
display: grid; |
|
|
|
grid-template-columns: repeat(2, 1fr); |
|
|
@ -308,10 +396,10 @@ const onBottomState = () => {} |
|
|
|
height: 10vh; |
|
|
|
} |
|
|
|
.debug-bw{ |
|
|
|
width: 13vw; |
|
|
|
width: 10vw; |
|
|
|
} |
|
|
|
.debug-label{ |
|
|
|
width: 13vw; |
|
|
|
width: 18vw; |
|
|
|
text-align: end; |
|
|
|
} |
|
|
|
.debug-text{ |
|
|
|