Browse Source

feat: 清洗管道中增加注射泵移动

master
guoapeng 4 months ago
parent
commit
8d8b77fc58
  1. 166
      src/views/clean/index.vue
  2. 2
      src/views/login/index.vue
  3. 1
      src/views/point/index.vue

166
src/views/clean/index.vue

@ -92,38 +92,128 @@ const syringePipelineWashStop = async () => {
} }
await sendControl(params) 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 params = {
cmdCode: 'syringe_pump_stop',
cmdId: '',
}
await sendControl(params, 'debug')
pumpStart.value = false
}
</script> </script>
<template> <template>
<div class="clear-main"> <div class="clear-main">
<div style="display: flex;align-items: center;width: fit-content;margin: 20px">
<span>清洗速度</span>
<el-input v-model="clearSpeed" type="number" style="width: 100px;margin:0 10px" />
<span>uL/min</span>
</div>
<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>
<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>
<ft-button
class="button-style"
:click-handle="syringePipelineWashStop"
:disabled="!systemStore.systemStatus.cleaningSyringePipeline && !systemStore.systemStatus.cleaningNozzlePipeline"
>
结束清洗
</ft-button>
<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-form-item>
<el-form-item>
<ft-button
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"
>
开始移动
</ft-button>
</el-form-item>
<el-form-item>
<ft-button :disabled="!pumpStart" :click-handle="syringePumpStop" class="button-style">
停止移动
</ft-button>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<p class="title">
清洗控制
</p>
<el-form>
<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>
<ft-button
class="button-style"
:click-handle="syringePipelineWashStop"
:disabled="!systemStore.systemStatus.cleaningSyringePipeline && !systemStore.systemStatus.cleaningNozzlePipeline"
>
结束清洗
</ft-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div> </div>
</template> </template>
@ -145,4 +235,24 @@ const syringePipelineWashStop = async () => {
justify-content: center; justify-content: center;
} }
} }
.el-row {
width: 100%;
}
.el-col {
width: 100%;
display: flex;
flex-direction: column;
//justify-content: center;
align-items: center;
}
.el-col:first-child {
border-right: 1px solid #ccc;
}
.unit-text {
font-size: 35px;
}
.title {
margin: 80px 0;
//text-decoration: underline;
}
</style> </style>

2
src/views/login/index.vue

@ -46,7 +46,7 @@ onBeforeUnmount(() => {
<div class="progress-container"> <div class="progress-container">
<div class="progress-bar" :style="{ width: `${progress}%` }" /> <div class="progress-bar" :style="{ width: `${progress}%` }" />
<div class="progress-text"> <div class="progress-text">
v1.0系统初始化中 {{ progress }}%
v1.0.1系统初始化中 {{ progress }}%
</div> </div>
</div> </div>
</div> </div>

1
src/views/point/index.vue

@ -1,5 +1,4 @@
<script setup lang="ts"> <script setup lang="ts">
import type { MatrixQuery } from 'apis/matrix'
import { list, reset } from 'apis/point' import { list, reset } from 'apis/point'
import FtButton from 'components/common/FTButton/index.vue' import FtButton from 'components/common/FTButton/index.vue'
import Edit from 'components/point/Edit/index.vue' import Edit from 'components/point/Edit/index.vue'

Loading…
Cancel
Save