|
|
@ -10,7 +10,7 @@ |
|
|
|
<div class="debug_axis"> |
|
|
|
<div class="axis"> |
|
|
|
<div>X轴:</div> |
|
|
|
<input v-model="machineryForm.X" type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[80px]" /> |
|
|
|
<input v-model="machineryForm.X" type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[80px]" /> |
|
|
|
<div class="ml-[10px]">毫米</div> |
|
|
|
<div class="ml-[10px]"> |
|
|
|
<el-button type="primary" @click="onMoveMachinery('X')">移动</el-button> |
|
|
@ -18,7 +18,7 @@ |
|
|
|
</div> |
|
|
|
<div class="axis ml-[100px]"> |
|
|
|
Y轴: |
|
|
|
<input v-model="machineryForm.Y" type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[80px]" /> |
|
|
|
<input v-model="machineryForm.Y" type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[80px]" /> |
|
|
|
<div class="ml-[10px]">毫米</div> |
|
|
|
<div class="ml-[10px]"> |
|
|
|
<el-button type="primary" @click="onMoveMachinery('Y')">移动</el-button> |
|
|
@ -26,7 +26,7 @@ |
|
|
|
</div> |
|
|
|
<div class="axis ml-[100px]"> |
|
|
|
Z轴: |
|
|
|
<input v-model="machineryForm.Z" type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[80px]" /> |
|
|
|
<input v-model="machineryForm.Z" type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[80px]" /> |
|
|
|
<div class="ml-[10px]">毫米</div> |
|
|
|
<div class="ml-[10px]"> |
|
|
|
<el-button type="primary" @click="onMoveMachinery('Z')">移动</el-button> |
|
|
@ -42,7 +42,7 @@ |
|
|
|
电压控制器: |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" class="ml-[20px]"> |
|
|
|
<input v-model="voltageValue" placeholder='0~5000v' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="voltageValue" placeholder='0~5000v' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-button type="primary" @click="onTurnOnHighVoltage">开启</el-button> |
|
|
@ -56,10 +56,10 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<div class="ml-[20px]"> |
|
|
|
<input v-model="syringeForm.rotationSpeed" placeholder='转速' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />毫米/秒杀 |
|
|
|
<input v-model="syringeForm.rotationSpeed" placeholder='转速' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />毫米/秒杀 |
|
|
|
</div> |
|
|
|
<div class="mt-[10px] ml-[20px]"> |
|
|
|
<input v-model="syringeForm.time" placeholder='时间' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />秒 |
|
|
|
<input v-model="syringeForm.time" placeholder='时间' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />秒 |
|
|
|
</div> |
|
|
|
<div class="ml-[20px] mt-[10px]"> |
|
|
|
方向: |
|
|
@ -76,44 +76,42 @@ |
|
|
|
湿度: |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" class="ml-[20px]"> |
|
|
|
<input placeholder='湿度' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input placeholder='湿度' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-button type="primary">确定</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-divider /> |
|
|
|
|
|
|
|
<el-row class="mt-[10px]"> |
|
|
|
<el-col :span="6" class="text-right"> |
|
|
|
电机速度: |
|
|
|
</el-col> |
|
|
|
<el-col :span="7" class="ml-[20px]"> |
|
|
|
<input placeholder='速度' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
毫米 |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="ml-[10px]"> |
|
|
|
<el-button type="primary">确定</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row class="mt-[10px]"> |
|
|
|
<el-col :span="6" class="text-right"> |
|
|
|
电机移动时间: |
|
|
|
</el-col> |
|
|
|
<el-col :span="7" class="ml-[20px]"> |
|
|
|
<input placeholder='时间' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
秒 |
|
|
|
<el-col :span="4" class="text-right"> |
|
|
|
|
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="ml-[10px]"> |
|
|
|
<el-button type="primary">确定</el-button> |
|
|
|
<el-col :span="18"> |
|
|
|
<div>指定转速 指定时间:</div> |
|
|
|
<el-radio-group v-model="rotateForm.axis"> |
|
|
|
<el-radio value="X">X</el-radio> |
|
|
|
<el-radio value="Y">Y</el-radio> |
|
|
|
<el-radio value="Z">Z</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
<div> |
|
|
|
转速:<input type="number" v-model="rotateForm.rotationSpeed" placeholder='' class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />转 |
|
|
|
时间:<input type="number" v-model="rotateForm.time" placeholder='' class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />毫秒 |
|
|
|
</div> |
|
|
|
<div class="mt-[20px]"> |
|
|
|
<el-button type="primary" @click="onRotate">确定</el-button> |
|
|
|
<el-button type="primary" @click="onStopRotate">停止</el-button> |
|
|
|
</div> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-divider /> |
|
|
|
<el-row class="mt-[10px]"> |
|
|
|
|
|
|
|
<!-- <el-row class="mt-[10px]"> |
|
|
|
<el-col :span="6" class="text-right"> |
|
|
|
推基质容量: |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" class="ml-[20px]"> |
|
|
|
<input placeholder='容量' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />ml |
|
|
|
<input placeholder='容量' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />ml |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="ml-[10px]"> |
|
|
|
<el-button type="primary">确定</el-button> |
|
|
@ -124,12 +122,12 @@ |
|
|
|
预充基质: |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" class="ml-[20px]"> |
|
|
|
<input placeholder='容量' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />ml |
|
|
|
<input placeholder='容量' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />ml |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="ml-[10px]"> |
|
|
|
<el-button type="primary">确定</el-button> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-row> --> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -140,8 +138,8 @@ |
|
|
|
<el-divider /> |
|
|
|
<div> |
|
|
|
<div>切换三通</div> |
|
|
|
<el-button type="primary" @cick="onSwitchThreeWayValve('clean')">管路切换到基质</el-button> |
|
|
|
<el-button type="primary" @cick="onSwitchThreeWayValve('spray')">管路切换到清洗</el-button> |
|
|
|
<el-button type="primary" @click="onSwitchThreeWayValve('clean')">管路切换到基质</el-button> |
|
|
|
<el-button type="primary" @click="onSwitchThreeWayValve('spray')">管路切换到清洗</el-button> |
|
|
|
</div> |
|
|
|
<el-divider /> |
|
|
|
<div> |
|
|
@ -157,6 +155,7 @@ |
|
|
|
<el-divider /> |
|
|
|
<div class="h-[13rem] bg-[#f4f4f4] p-[10px]"> |
|
|
|
<div>状态反馈区</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -179,49 +178,49 @@ |
|
|
|
|
|
|
|
<div class="mt-[20px]"> |
|
|
|
行间距: |
|
|
|
<input v-model="workForm.space" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="workForm.space" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
毫米 |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mt-[20px]"> |
|
|
|
氮气流速: |
|
|
|
<input v-model="workForm.nitrogenFlowVelocity" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="workForm.nitrogenFlowVelocity" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
毫米/秒 |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mt-[20px]"> |
|
|
|
氮气气压: |
|
|
|
<input v-model="workForm.matrixFlowVelocity" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="workForm.matrixFlowVelocity" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
Mp |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mt-[20px]"> |
|
|
|
电压: |
|
|
|
<input v-model="workForm.voltage " placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="workForm.voltage " placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
V |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mt-[20px]"> |
|
|
|
喷针距离玻片高度: |
|
|
|
<input v-model="workForm.height " placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="workForm.height " placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
毫米 |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mt-[20px]"> |
|
|
|
移速: |
|
|
|
<input v-model="workForm.movementSpeed" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
<input v-model="workForm.movementSpeed" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
毫米/秒 |
|
|
|
</div> |
|
|
|
|
|
|
|
<div>起始坐标:</div> |
|
|
|
<div> |
|
|
|
X:<input v-model="startAxis.x" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
Y:<input v-model="startAxis.y" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
X:<input v-model="startAxis.x" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
Y:<input v-model="startAxis.y" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
</div> |
|
|
|
<div class="mt-[10px]">结束坐标:</div> |
|
|
|
<div class="flex"> |
|
|
|
X:<input v-model="endAxis.x" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
Y:<input v-model="endAxis.y" placeholder='' type="text" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
X:<input v-model="endAxis.x" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
Y:<input v-model="endAxis.y" placeholder='' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="mt-[20px] text-center"> |
|
|
@ -236,7 +235,13 @@ |
|
|
|
<script lang="ts" setup> |
|
|
|
import { ref, onMounted, onUnmounted } from 'vue' |
|
|
|
import { createWebSocket, sharedWsUrl } from "@/services/socket"; |
|
|
|
import type { ControlNitrogen, MachineryType, SyringeType } from './type' |
|
|
|
import type { |
|
|
|
ControlNitrogen, |
|
|
|
MachineryType, |
|
|
|
SyringeType, |
|
|
|
VoltageType, |
|
|
|
ControlValueType |
|
|
|
} from '@/services/globalCmd/cmdTypes' |
|
|
|
import { |
|
|
|
moveMotorToPosition, |
|
|
|
switchThreeWayValve, |
|
|
@ -245,14 +250,20 @@ import { |
|
|
|
turnOffHighVoltage, |
|
|
|
turnOnSyringePump, |
|
|
|
turnOffSyringePump, |
|
|
|
startWork |
|
|
|
startWork, |
|
|
|
rotate |
|
|
|
} from "@/services/globalCmd/globalCmd"; |
|
|
|
const activeName = ref('debug') |
|
|
|
const voltageValue = ref() |
|
|
|
const syringeForm = ref<Partial<SyringeType>>({}) |
|
|
|
const syringeForm = ref<Record<string, string>>({}) |
|
|
|
const workForm = ref<Record<string, string>>({}) |
|
|
|
const startAxis = ref<any>({}) |
|
|
|
const endAxis = ref<any>({}) |
|
|
|
|
|
|
|
const axis = ref() |
|
|
|
const rotationSpeed = ref() |
|
|
|
const time = ref() |
|
|
|
const rotateForm = ref<Record<string, string>>({}) |
|
|
|
let subscription:any |
|
|
|
onMounted(()=>{ |
|
|
|
//连接websocket |
|
|
@ -283,16 +294,21 @@ import { |
|
|
|
} |
|
|
|
|
|
|
|
const onSwitchThreeWayValve = (type:string) => { |
|
|
|
switchThreeWayValve({type}).then(res => { |
|
|
|
const params = <any>{ |
|
|
|
params:{type} |
|
|
|
} |
|
|
|
switchThreeWayValve(params).then(res => { |
|
|
|
console.log('---onSwitchThreeWayValve---res---', res) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const onControlValve = (type:ControlNitrogen) => { |
|
|
|
const params = { |
|
|
|
const params = <ControlValueType>{ |
|
|
|
params:{ |
|
|
|
valveType:type, |
|
|
|
isOpen:true |
|
|
|
} |
|
|
|
} |
|
|
|
controlValve(params).then(res => { |
|
|
|
console.log('---onControlValve---res---', res) |
|
|
|
}) |
|
|
@ -300,7 +316,10 @@ import { |
|
|
|
|
|
|
|
//电压控制 开启 |
|
|
|
const onTurnOnHighVoltage = () => { |
|
|
|
turnOnHighVoltage({voltage: voltageValue.value}).then(res => { |
|
|
|
const params = <VoltageType>{ |
|
|
|
params:{voltage: +voltageValue.value} |
|
|
|
} |
|
|
|
turnOnHighVoltage(params).then(res => { |
|
|
|
console.log('---onTurnOnHighVoltage- 电压控制 on --res---', res) |
|
|
|
}) |
|
|
|
} |
|
|
@ -316,10 +335,14 @@ import { |
|
|
|
const onTurnOnSyringePump = () => { |
|
|
|
// SyringeType |
|
|
|
const params = <SyringeType>{ |
|
|
|
...syringeForm.value |
|
|
|
params:{ |
|
|
|
rotationSpeed: 1, |
|
|
|
direction: 2, |
|
|
|
time: 3 |
|
|
|
} |
|
|
|
} |
|
|
|
turnOnSyringePump(params).then(res => { |
|
|
|
console.log('---onTurnOffHighVoltage- 电压控制 off--res---', res) |
|
|
|
console.log('---onTurnOffHighVoltage- 电泵开启--res---', res) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
@ -331,18 +354,35 @@ import { |
|
|
|
|
|
|
|
const onStartWork = () => { |
|
|
|
const params = <any>{ |
|
|
|
params:{ |
|
|
|
...workForm.value, |
|
|
|
position:<any>[ |
|
|
|
startAxis.value, |
|
|
|
endAxis.value |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('params---', params) |
|
|
|
startWork(params).then(res => { |
|
|
|
console.log('startWork-----', startWork) |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const onRotate = () => { |
|
|
|
const params = { |
|
|
|
params : { |
|
|
|
...rotateForm.value |
|
|
|
} |
|
|
|
} |
|
|
|
rotate(params).then(res => { |
|
|
|
|
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const onStopRotate = () => { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
|
|
div{ |
|
|
|