|
|
@ -6,16 +6,15 @@ import { useSystemStore } from 'stores/useSystemStore' |
|
|
|
import { h, ref } from 'vue' |
|
|
|
|
|
|
|
const systemStore = useSystemStore() // 使用 systemStore |
|
|
|
const clearSpeed = ref() |
|
|
|
|
|
|
|
// 注射器管路清洗开始 |
|
|
|
const syringePipelineWashRef = ref() |
|
|
|
const syringePipelineWash = () => { |
|
|
|
if (!clearSpeed.value) { |
|
|
|
FtMessage.error('请输入清洗速度') |
|
|
|
if (!syringeSpeed.value) { |
|
|
|
FtMessage.error('请输入移动速度') |
|
|
|
return |
|
|
|
} |
|
|
|
if (clearSpeed.value > 100) { |
|
|
|
FtMessage.error('清洗速度最大为100 uL/min') |
|
|
|
if (syringeSpeed.value > 100) { |
|
|
|
FtMessage.error('移动速度最大为100 uL/min') |
|
|
|
return |
|
|
|
} |
|
|
|
ElMessageBox({ |
|
|
@ -34,7 +33,7 @@ const syringePipelineWash = () => { |
|
|
|
cmdCode: 'syringe_pipeline_wash', |
|
|
|
cmdId: '', |
|
|
|
params: { |
|
|
|
speed: clearSpeed.value, |
|
|
|
speed: syringeSpeed.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
try { |
|
|
@ -45,17 +44,9 @@ const syringePipelineWash = () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 喷嘴管路清洗开始 |
|
|
|
const nozzlePipelineWashRef = ref() |
|
|
|
const nozzlePipelineWash = () => { |
|
|
|
if (!clearSpeed.value) { |
|
|
|
FtMessage.error('请输入清洗速度') |
|
|
|
return |
|
|
|
} |
|
|
|
if (clearSpeed.value > 100) { |
|
|
|
FtMessage.error('清洗速度最大为100 uL/min') |
|
|
|
return |
|
|
|
} |
|
|
|
ElMessageBox({ |
|
|
|
title: '提示', |
|
|
|
message: h('div', null, [ |
|
|
@ -72,7 +63,6 @@ const nozzlePipelineWash = () => { |
|
|
|
cmdCode: 'nozzle_pipeline_wash', |
|
|
|
cmdId: '', |
|
|
|
params: { |
|
|
|
speed: clearSpeed.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
try { |
|
|
@ -83,44 +73,7 @@ const nozzlePipelineWash = () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(nozzlePipelineWash) |
|
|
|
const valvesWashRef = ref() |
|
|
|
const valvesWash = () => { |
|
|
|
if (!clearSpeed.value) { |
|
|
|
FtMessage.error('请输入清洗速度') |
|
|
|
return |
|
|
|
} |
|
|
|
if (clearSpeed.value > 100) { |
|
|
|
FtMessage.error('清洗速度最大为100 uL/min') |
|
|
|
return |
|
|
|
} |
|
|
|
ElMessageBox({ |
|
|
|
title: '提示', |
|
|
|
message: h('div', null, [ |
|
|
|
h('p', null, '请检查废液瓶是否已满 '), |
|
|
|
h('p', null, '请检查设备内是否有异物'), |
|
|
|
]), |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
showCancelButton: true, |
|
|
|
showClose: false, |
|
|
|
}).then(async () => { |
|
|
|
valvesWashRef.value.setLoading(true) |
|
|
|
const params = { |
|
|
|
cmdCode: 'valves_wash', |
|
|
|
cmdId: '', |
|
|
|
params: { |
|
|
|
speed: clearSpeed.value, |
|
|
|
}, |
|
|
|
} |
|
|
|
try { |
|
|
|
await sendControl(params) |
|
|
|
} |
|
|
|
finally { |
|
|
|
valvesWashRef.value.setLoading(false) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// 注射器管路清洗结束 |
|
|
|
const syringePipelineWashStop = async () => { |
|
|
|
const params = { |
|
|
|
cmdCode: 'syringe_pipeline_wash_stop', |
|
|
@ -129,43 +82,16 @@ const syringePipelineWashStop = async () => { |
|
|
|
} |
|
|
|
await sendControl(params) |
|
|
|
} |
|
|
|
|
|
|
|
const form = ref({ |
|
|
|
speed: undefined, |
|
|
|
direction: 'forward', |
|
|
|
}) |
|
|
|
|
|
|
|
const pumpStart = ref(false) |
|
|
|
|
|
|
|
const syringePumpInjectionVolumeSet = async () => { |
|
|
|
if (!form.value.speed) { |
|
|
|
FtMessage.error('请输入注射泵速度') |
|
|
|
return |
|
|
|
} |
|
|
|
if (form.value.speed > 100) { |
|
|
|
FtMessage.error('清洗速度最大为100 uL/min') |
|
|
|
return |
|
|
|
} |
|
|
|
const params = { |
|
|
|
cmdCode: 'syringe_pump_start', |
|
|
|
cmdId: '', |
|
|
|
params: { |
|
|
|
direction: form.value.direction, |
|
|
|
speed: form.value.speed, |
|
|
|
}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
pumpStart.value = true |
|
|
|
} |
|
|
|
|
|
|
|
const syringePumpStop = async () => { |
|
|
|
// 喷嘴管路清洗结束 |
|
|
|
const nozzlePipelineWashStop = async () => { |
|
|
|
const params = { |
|
|
|
cmdCode: 'syringe_pump_stop', |
|
|
|
cmdCode: 'nozzle_pipeline_wash_stop', |
|
|
|
cmdId: '', |
|
|
|
params: {}, |
|
|
|
} |
|
|
|
await sendControl(params, 'debug') |
|
|
|
pumpStart.value = false |
|
|
|
await sendControl(params) |
|
|
|
} |
|
|
|
const syringeSpeed = ref(0) |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
@ -173,38 +99,26 @@ const syringePumpStop = async () => { |
|
|
|
<el-row> |
|
|
|
<el-col :span="12"> |
|
|
|
<p class="title"> |
|
|
|
注射泵控制 |
|
|
|
清洗注射器管路 |
|
|
|
</p> |
|
|
|
<el-form label-width="auto"> |
|
|
|
<el-form-item label="移动速度"> |
|
|
|
<el-input v-model="form.speed" type="number" style="width: 100px;margin:0 10px" /> |
|
|
|
<span class="unit-text">ul/min</span> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="移动方向"> |
|
|
|
<el-radio-group v-model="form.direction" style="margin: 10px"> |
|
|
|
<div style="display: flex"> |
|
|
|
<el-radio value="forward"> |
|
|
|
前进 |
|
|
|
</el-radio> |
|
|
|
<el-radio value="backward"> |
|
|
|
后退 |
|
|
|
</el-radio> |
|
|
|
</div> |
|
|
|
</el-radio-group> |
|
|
|
<el-input v-model="syringeSpeed" type="number" style="width: 100px;margin:0 10px" /> |
|
|
|
<span class="unit-text">uL/min</span> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<ft-button |
|
|
|
class="button-style" type="primary" style="margin-left: 10px" :disabled="systemStore.systemStatus.spraying |
|
|
|
ref="syringePipelineWashRef" class="button-style" type="primary" style="margin-left: 10px" :disabled="systemStore.systemStatus.spraying |
|
|
|
|| systemStore.systemStatus.cleaningSyringePipeline |
|
|
|
|| systemStore.systemStatus.cleaningNozzlePipeline |
|
|
|
|| systemStore.systemStatus.prefilling || pumpStart" :click-handle="syringePumpInjectionVolumeSet" |
|
|
|
|| systemStore.systemStatus.prefilling" :click-handle="syringePipelineWash" |
|
|
|
> |
|
|
|
开始移动 |
|
|
|
开始清洗 |
|
|
|
</ft-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<ft-button :disabled="!pumpStart" :click-handle="syringePumpStop" class="button-style"> |
|
|
|
停止移动 |
|
|
|
<ft-button :disabled="!systemStore.systemStatus.cleaningSyringePipeline" :click-handle="syringePipelineWashStop" class="button-style"> |
|
|
|
停止清洗 |
|
|
|
</ft-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
@ -212,48 +126,28 @@ const syringePumpStop = async () => { |
|
|
|
|
|
|
|
<el-col :span="12"> |
|
|
|
<p class="title"> |
|
|
|
清洗控制 |
|
|
|
清洗喷嘴管路 |
|
|
|
</p> |
|
|
|
<el-form> |
|
|
|
<el-form-item label="清洗速度"> |
|
|
|
<!-- <el-form-item label="清洗速度"> |
|
|
|
<el-input v-model="clearSpeed" type="number" style="width: 100px;margin:0 10px" /> |
|
|
|
<span class="unit-text">uL/min</span> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<ft-button |
|
|
|
ref="syringePipelineWashRef" class="button-style" type="primary" :disabled="systemStore.systemStatus.spraying |
|
|
|
|| systemStore.systemStatus.cleaningSyringePipeline |
|
|
|
|| systemStore.systemStatus.cleaningNozzlePipeline |
|
|
|
|| systemStore.systemStatus.prefilling" @click="syringePipelineWash" |
|
|
|
> |
|
|
|
清洗注射器管路 |
|
|
|
</ft-button> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-form-item> --> |
|
|
|
<!-- <ft-button --> |
|
|
|
<!-- ref="nozzlePipelineWashRef" class="button-style" type="primary" :disabled="systemStore.systemStatus.spraying --> |
|
|
|
<!-- || systemStore.systemStatus.cleaningSyringePipeline --> |
|
|
|
<!-- || systemStore.systemStatus.cleaningNozzlePipeline --> |
|
|
|
<!-- || systemStore.systemStatus.prefilling" @click="nozzlePipelineWash" --> |
|
|
|
<!-- > --> |
|
|
|
<!-- 清洗喷嘴管路 --> |
|
|
|
<!-- </ft-button> --> |
|
|
|
<!-- </el-form-item> --> |
|
|
|
</el-form-item> --> |
|
|
|
<el-form-item> |
|
|
|
<ft-button |
|
|
|
ref="valvesWashRef" class="button-style" type="primary" :disabled="systemStore.systemStatus.spraying |
|
|
|
ref="nozzlePipelineWashRef" class="button-style" type="primary" :disabled="systemStore.systemStatus.spraying |
|
|
|
|| systemStore.systemStatus.cleaningSyringePipeline |
|
|
|
|| systemStore.systemStatus.cleaningNozzlePipeline |
|
|
|
|| systemStore.systemStatus.prefilling" @click="valvesWash" |
|
|
|
|| systemStore.systemStatus.prefilling" @click="nozzlePipelineWash" |
|
|
|
> |
|
|
|
清洗三通阀 |
|
|
|
开始清洗 |
|
|
|
</ft-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<ft-button |
|
|
|
class="button-style" |
|
|
|
:click-handle="syringePipelineWashStop" |
|
|
|
:disabled="!systemStore.systemStatus.cleaningSyringePipeline && !systemStore.systemStatus.cleaningNozzlePipeline" |
|
|
|
:click-handle="nozzlePipelineWashStop" |
|
|
|
:disabled="!systemStore.systemStatus.cleaningNozzlePipeline" |
|
|
|
> |
|
|
|
结束清洗 |
|
|
|
</ft-button> |
|
|
|