14 changed files with 1021 additions and 62 deletions
-
2.env.dev
-
5package.json
-
73server/index.js
-
9src/apis/system.ts
-
2src/assets/styles/element.scss
-
2src/components/common/FTButton/index.vue
-
31src/components/common/FTStream/index.vue
-
4src/layouts/default.vue
-
2src/libs/http.ts
-
58src/libs/utils.ts
-
64src/stores/debugStore.ts
-
2src/stores/systemStore.ts
-
787src/views/debug/index.vue
@ -0,0 +1,73 @@ |
|||
// const express = require('express')
|
|||
import express from 'express' |
|||
import { WebSocketServer } from 'ws' |
|||
|
|||
const app = express() |
|||
|
|||
const PORT = 8080 // 可根据需要更改端口号
|
|||
app.listen(PORT, () => { |
|||
console.log(`服务器已启动,正在监听端口 ${PORT}`) |
|||
}) |
|||
app.use(express.json()) |
|||
|
|||
const levels = ['info', 'warn', 'success', 'error', 'finish'] |
|||
|
|||
app.post('/api/debug/cmd', (req, res) => { |
|||
const { commandId, command, params } = req.body |
|||
console.log('收到命令:', command, '参数:', params) |
|||
|
|||
// 模拟返回数据
|
|||
const mockResponse = { |
|||
code: '0', |
|||
msg: '成功', |
|||
data: null, |
|||
} |
|||
|
|||
let messageNum = 0 |
|||
|
|||
// 异步广播消息
|
|||
setTimeout(() => { |
|||
res.json(mockResponse) |
|||
const poll = setInterval(() => { |
|||
if (messageNum === 10) { |
|||
clearInterval(poll) |
|||
} |
|||
broadcast({ |
|||
type: 'notification', |
|||
data: { |
|||
commandId, |
|||
command, |
|||
level: levels[Math.floor(Math.random() * levels.length)], |
|||
title: `步骤${messageNum}执行完成`, |
|||
content: `具体信息${messageNum}`, |
|||
dateTime: new Date().toLocaleString(), |
|||
}, |
|||
}) |
|||
messageNum++ |
|||
}, Math.floor(Math.random() * (1000 - 500 + 1)) + 500) |
|||
}, 1000) |
|||
}) |
|||
|
|||
const wss = new WebSocketServer({ port: 9527 }) |
|||
|
|||
const clients = new Set() |
|||
wss.on('connection', (ws) => { |
|||
clients.add(ws) |
|||
ws.on('close', () => { |
|||
console.log('客户端断开') |
|||
}) |
|||
}) |
|||
|
|||
function broadcast(message) { |
|||
try { |
|||
const jsonMessage = JSON.stringify(message) |
|||
clients.forEach((client) => { |
|||
if (client.readyState === WebSocket.OPEN) { |
|||
client.send(jsonMessage) |
|||
} |
|||
}) |
|||
} |
|||
catch (e) { |
|||
console.log('广播发送失败:', e, message) |
|||
} |
|||
} |
@ -0,0 +1,9 @@ |
|||
import http from 'libs/http' |
|||
|
|||
export interface Params { |
|||
commandId: string |
|||
command: string |
|||
params: any |
|||
} |
|||
export const debugControl = (params: Params): Promise<any> => http.post('/debug/cmd', params) |
|||
export const control = (params: Params): Promise<any> => http.post('/cmd', params) |
@ -0,0 +1,64 @@ |
|||
import { defineStore } from 'pinia' |
|||
|
|||
export const useDebugStore = defineStore('debug', { |
|||
state: () => ({ |
|||
formData: { |
|||
// 加液机械臂
|
|||
liquidArmData: { |
|||
largeArmAngle: 10, |
|||
smallArmAngle: 20, |
|||
largeArmRotationRate: 10, |
|||
smallArmRotationRate: 10, |
|||
}, |
|||
// 加液泵
|
|||
liquidPumpData: { |
|||
index: 1, |
|||
rate: 3, |
|||
}, |
|||
// 摇匀速度
|
|||
shakeSpeed: { |
|||
rate: 10, |
|||
}, |
|||
// 加热区
|
|||
heatArea: { |
|||
index: 1, |
|||
heatMotorData: { |
|||
distance: 1, |
|||
rate: 10, |
|||
}, |
|||
heatTemperature: { |
|||
temperature: 20, |
|||
}, |
|||
}, |
|||
// 转运模组
|
|||
transferModule: { |
|||
// X轴
|
|||
xMotorData: { |
|||
xDimDistance: 1, |
|||
xDimRate: 10, |
|||
}, |
|||
// y轴
|
|||
yMotorData: { |
|||
yDimDistance: 1, |
|||
yDimRate: 10, |
|||
}, |
|||
// z轴
|
|||
zMotorData: { |
|||
zDimDistance: 1, |
|||
zDimRate: 10, |
|||
}, |
|||
// 夹爪
|
|||
JawData: { |
|||
rate: 10, |
|||
}, |
|||
}, |
|||
// 拍子模组
|
|||
lidData: { |
|||
rate: 10, |
|||
distance: 19, |
|||
}, |
|||
}, |
|||
}), |
|||
actions: { |
|||
}, |
|||
}) |
@ -1,3 +1,788 @@ |
|||
<script lang="ts" setup> |
|||
import { socket } from 'libs/socket' |
|||
import { sendControl } from 'libs/utils' |
|||
import { useDebugStore } from 'stores/debugStore' |
|||
import { useSystemStore } from 'stores/systemStore' |
|||
import { onMounted, onUnmounted } from 'vue' |
|||
|
|||
const systemStore = useSystemStore() |
|||
|
|||
const debugStore = useDebugStore() |
|||
|
|||
onMounted(() => { |
|||
socket.init(receiveMessage, 'notification') |
|||
}) |
|||
|
|||
onUnmounted(() => { |
|||
socket.unregisterCallback(receiveMessage, 'notification') |
|||
}) |
|||
|
|||
const receiveMessage = (data: any) => { |
|||
systemStore.pushSystemList(data) |
|||
} |
|||
|
|||
const pallet_elevator_lift_up = async () => { |
|||
const params = { |
|||
command: 'pallet_elevator_lift_up', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
...debugStore.formData.heatArea.heatMotorData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const pallet_elevator_lift_down = async () => { |
|||
const params = { |
|||
command: 'pallet_elevator_lift_down', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
...debugStore.formData.heatArea.heatMotorData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const pallet_elevator_stop = async () => { |
|||
const params = { |
|||
command: 'pallet_elevator_stop', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const heater_start = async () => { |
|||
const params = { |
|||
command: 'heater_start', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
...debugStore.formData.heatArea.heatTemperature, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
const heater_stop = async () => { |
|||
const params = { |
|||
command: 'heater_stop', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_heater_start_heat_maintaining = async () => { |
|||
const params = { |
|||
command: 'debug_heater_start_heat_maintaining', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
...debugStore.formData.heatArea.heatTemperature, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_heater_stop_heat_maintaining = async () => { |
|||
const params = { |
|||
command: 'debug_heater_stop_heat_maintaining', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_fan_start = async () => { |
|||
const params = { |
|||
command: 'debug_fan_start', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_fan_stop = async () => { |
|||
const params = { |
|||
command: 'debug_fan_stop', |
|||
params: { |
|||
index: debugStore.formData.heatArea.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_cover_elvator_lift_up = async () => { |
|||
const params = { |
|||
command: 'debug_cover_elvator_lift_up', |
|||
params: { |
|||
...debugStore.formData.lidData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_cover_elvator_lift_down = async () => { |
|||
const params = { |
|||
command: 'debug_cover_elvator_lift_down', |
|||
params: { |
|||
...debugStore.formData.lidData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_cover_elvator_reset = async () => { |
|||
const params = { |
|||
command: 'debug_cover_elvator_reset', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_cover_elvator_stop = async () => { |
|||
const params = { |
|||
command: 'debug_cover_elvator_stop', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_arm_reset = async () => { |
|||
const params = { |
|||
command: 'liquid_arm_reset', |
|||
params: { |
|||
target: ['largeArm', 'smallArm'], |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_arm_rotation = async () => { |
|||
const params = { |
|||
command: 'liquid_arm_rotation', |
|||
params: { |
|||
...debugStore.formData.liquidArmData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_arm_stop = async () => { |
|||
const params = { |
|||
command: 'liquid_arm_stop', |
|||
params: { |
|||
target: ['largeArm', 'smallArm'], |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_pump_pre_filling = async () => { |
|||
const params = { |
|||
command: 'liquid_pump_pre_filling', |
|||
params: { |
|||
index: debugStore.formData.liquidPumpData.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_pump_pre_evacuation = async () => { |
|||
const params = { |
|||
command: 'liquid_pump_pre_evacuation', |
|||
params: { |
|||
index: debugStore.formData.liquidPumpData.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_pump_start = async () => { |
|||
const params = { |
|||
command: 'liquid_pump_start', |
|||
params: { |
|||
...debugStore.formData.liquidPumpData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const liquid_pump_stop = async () => { |
|||
const params = { |
|||
command: 'liquid_pump_stop', |
|||
params: { |
|||
index: debugStore.formData.liquidPumpData.index, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const shaker_start = async () => { |
|||
const params = { |
|||
command: 'shaker_start', |
|||
params: { |
|||
...debugStore.formData.shakeSpeed, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const shaker_stop = async () => { |
|||
const params = { |
|||
command: 'shaker_stop', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_transportation_arm_reset = async (motor: 'x' | 'y' | 'z') => { |
|||
const params = { |
|||
command: 'debug_transportation_arm_reset', |
|||
params: { |
|||
dim: [motor], |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_transportation_arm_move = async (motor: 'x' | 'y' | 'z') => { |
|||
const params = { |
|||
command: 'debug_transportation_arm_move', |
|||
params: { |
|||
...debugStore.formData.transferModule[`${motor}MotorData`], |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_transportation_arm_stop = async (motor: 'x' | 'y' | 'z') => { |
|||
const params = { |
|||
command: 'debug_transportation_arm_stop', |
|||
params: { |
|||
dim: [motor], |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_holding_jaw_open = async () => { |
|||
const params = { |
|||
command: 'debug_holding_jaw_open', |
|||
params: { |
|||
...debugStore.formData.transferModule.JawData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_holding_jaw_close = async () => { |
|||
const params = { |
|||
command: 'debug_holding_jaw_close', |
|||
params: { |
|||
...debugStore.formData.transferModule.JawData, |
|||
}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const debug_holding_jaw_pause = async () => { |
|||
const params = { |
|||
command: 'debug_holding_jaw_pause', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const door_open = async () => { |
|||
const params = { |
|||
command: 'door_open', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const door_close = async () => { |
|||
const params = { |
|||
command: 'door_close', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
|
|||
const door_stop = async () => { |
|||
const params = { |
|||
command: 'door_stop', |
|||
params: {}, |
|||
} |
|||
await sendControl(params, 'debug') |
|||
} |
|||
</script> |
|||
|
|||
<template> |
|||
调试 |
|||
<div class="debug-content"> |
|||
<el-row :gutter="10"> |
|||
<el-col :span="8"> |
|||
<el-card> |
|||
<template #header> |
|||
<div class="card-header"> |
|||
<span>加热模组</span> |
|||
<div> |
|||
<el-select v-model="debugStore.formData.heatArea.index" style="width: 150px" placeholder="请选择区域"> |
|||
<el-option v-for="item in 6" :key="item" :label="`A${item}`" :value="item" /> |
|||
</el-select> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
<el-divider>升降电机</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="距离"> |
|||
<el-input v-model="debugStore.formData.heatArea.heatMotorData.distance"> |
|||
<template #append> |
|||
mm |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="速度"> |
|||
<el-input v-model="debugStore.formData.heatArea.heatMotorData.rate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<ft-button type="primary" :click-handle="pallet_elevator_lift_up"> |
|||
上升 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="pallet_elevator_lift_down"> |
|||
下降 |
|||
</ft-button> |
|||
<ft-button :click-handle="pallet_elevator_stop"> |
|||
停止 |
|||
</ft-button> |
|||
</div> |
|||
<el-divider>加热棒</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="温度"> |
|||
<el-input v-model="debugStore.formData.heatArea.heatTemperature.temperature"> |
|||
<template #append> |
|||
℃ |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="heater_start"> |
|||
开始加热 |
|||
</ft-button> |
|||
<ft-button :click-handle="heater_stop"> |
|||
停止加热 |
|||
</ft-button> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="debug_heater_start_heat_maintaining"> |
|||
开始恒温 |
|||
</ft-button> |
|||
<ft-button :click-handle="debug_heater_stop_heat_maintaining"> |
|||
停止恒温 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-divider>拍子</el-divider> |
|||
<div class="card-box"> |
|||
<ft-button type="primary"> |
|||
启动吸附 |
|||
</ft-button> |
|||
<ft-button> |
|||
停止吸附 |
|||
</ft-button> |
|||
</div> |
|||
<el-divider>风扇</el-divider> |
|||
<div class="card-box"> |
|||
<ft-button type="primary" :click-handle="debug_fan_start"> |
|||
打开风扇 |
|||
</ft-button> |
|||
<ft-button :click-handle="debug_fan_stop"> |
|||
关闭风扇 |
|||
</ft-button> |
|||
</div> |
|||
</el-card> |
|||
<el-card> |
|||
<template #header> |
|||
<div class="card-header"> |
|||
<span>拍子存放模组</span> |
|||
</div> |
|||
</template> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="速度"> |
|||
<el-input v-model="debugStore.formData.lidData.rate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="距离"> |
|||
<el-input v-model="debugStore.formData.lidData.distance"> |
|||
<template #append> |
|||
mm |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="debug_cover_elvator_lift_up"> |
|||
抬升 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="debug_cover_elvator_lift_down"> |
|||
下降 |
|||
</ft-button> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="debug_cover_elvator_reset"> |
|||
复位 |
|||
</ft-button> |
|||
<ft-button :click-handle="debug_cover_elvator_stop"> |
|||
停止 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
</el-card> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-card> |
|||
<template #header> |
|||
<div class="card-header"> |
|||
<span>加液模组</span> |
|||
</div> |
|||
</template> |
|||
<el-divider>加液臂</el-divider> |
|||
<div class="card-box"> |
|||
<el-form inline> |
|||
<el-form-item label="大臂速度"> |
|||
<el-input v-model="debugStore.formData.liquidArmData.largeArmRotationRate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="大臂角度"> |
|||
<el-input v-model="debugStore.formData.liquidArmData.largeArmAngle"> |
|||
<template #append> |
|||
° |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="小臂速度"> |
|||
<el-input v-model="debugStore.formData.liquidArmData.smallArmRotationRate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="小臂角度"> |
|||
<el-input v-model="debugStore.formData.liquidArmData.smallArmAngle"> |
|||
<template #append> |
|||
° |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<ft-button type="primary" :click-handle="liquid_arm_reset"> |
|||
复位 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="liquid_arm_rotation"> |
|||
开始 |
|||
</ft-button> |
|||
<ft-button :click-handle="liquid_arm_stop"> |
|||
停止 |
|||
</ft-button> |
|||
</div> |
|||
<el-divider>加液泵</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="加液速度"> |
|||
<el-input v-model="debugStore.formData.liquidPumpData.rate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="加液泵头"> |
|||
<el-select v-model="debugStore.formData.liquidPumpData.index" aria-placeholder="请选择泵头"> |
|||
<el-option v-for="item in 8" :key="item" :label="item" :value="item" /> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="liquid_pump_pre_filling"> |
|||
预充 |
|||
</ft-button> |
|||
<ft-button :click-handle="liquid_pump_pre_evacuation"> |
|||
排空 |
|||
</ft-button> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="liquid_pump_start"> |
|||
启动 |
|||
</ft-button> |
|||
<ft-button :click-handle="liquid_pump_stop"> |
|||
停止 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-divider>摇匀</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="摇匀速度"> |
|||
<el-input v-model="debugStore.formData.shakeSpeed.rate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
</el-form> |
|||
<ft-button type="primary" :click-handle="shaker_start"> |
|||
开始 |
|||
</ft-button> |
|||
<ft-button :click-handle="shaker_stop"> |
|||
停止 |
|||
</ft-button> |
|||
</div> |
|||
</el-card> |
|||
<el-card> |
|||
<template #header> |
|||
<div class="card-header"> |
|||
<span>相机模组</span> |
|||
</div> |
|||
</template> |
|||
<div class="card-box"> |
|||
<!-- <el-form> --> |
|||
<!-- <el-form-item label="速度"> --> |
|||
<!-- <el-input> --> |
|||
<!-- <template #append> --> |
|||
<!-- mm/s --> |
|||
<!-- </template> --> |
|||
<!-- </el-input> --> |
|||
<!-- </el-form-item> --> |
|||
<!-- <el-form-item label="距离"> --> |
|||
<!-- <el-input> --> |
|||
<!-- <template #append> --> |
|||
<!-- ° --> |
|||
<!-- </template> --> |
|||
<!-- </el-input> --> |
|||
<!-- </el-form-item> --> |
|||
<!-- <el-form-item> --> |
|||
<!-- <ft-button type="primary"> --> |
|||
<!-- 抬升 --> |
|||
<!-- </ft-button> --> |
|||
<!-- <ft-button type="primary"> --> |
|||
<!-- 下降 --> |
|||
<!-- </ft-button> --> |
|||
<!-- </el-form-item> --> |
|||
<!-- <el-form-item> --> |
|||
<!-- <ft-button type="primary"> --> |
|||
<!-- 复位 --> |
|||
<!-- </ft-button> --> |
|||
<!-- <ft-button> --> |
|||
<!-- 停止 --> |
|||
<!-- </ft-button> --> |
|||
<!-- </el-form-item> --> |
|||
<!-- </el-form> --> |
|||
</div> |
|||
</el-card> |
|||
</el-col> |
|||
<el-col :span="8"> |
|||
<el-card> |
|||
<template #header> |
|||
<div class="card-header"> |
|||
<span>转运模组</span> |
|||
</div> |
|||
</template> |
|||
<el-divider>X轴电机</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="距离"> |
|||
<el-input v-model="debugStore.formData.transferModule.xMotorData.xDimDistance"> |
|||
<template #append> |
|||
mm |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="速度"> |
|||
<el-input v-model="debugStore.formData.transferModule.xMotorData.xDimRate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="() => debug_transportation_arm_reset('x')"> |
|||
回原点 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="() => debug_transportation_arm_move('x')"> |
|||
开始 |
|||
</ft-button> |
|||
<ft-button :click-handle="() => debug_transportation_arm_stop('x')"> |
|||
停止 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-divider>Y轴电机</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="距离"> |
|||
<el-input v-model="debugStore.formData.transferModule.yMotorData.yDimDistance"> |
|||
<template #append> |
|||
mm |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="速度"> |
|||
<el-input v-model="debugStore.formData.transferModule.yMotorData.yDimRate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="() => debug_transportation_arm_reset('y')"> |
|||
回原点 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="() => debug_transportation_arm_move('y')"> |
|||
开始 |
|||
</ft-button> |
|||
<ft-button :click-handle="() => debug_transportation_arm_stop('y')"> |
|||
停止 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-divider>Z轴电机</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="距离"> |
|||
<el-input v-model="debugStore.formData.transferModule.zMotorData.zDimDistance"> |
|||
<template #append> |
|||
mm |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item label="速度"> |
|||
<el-input v-model="debugStore.formData.transferModule.zMotorData.zDimRate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="() => debug_transportation_arm_reset('z')"> |
|||
回原点 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="() => debug_transportation_arm_move('z')"> |
|||
开始 |
|||
</ft-button> |
|||
<ft-button :click-handle="() => debug_transportation_arm_stop('z')"> |
|||
停止 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
<el-divider>夹爪舵机</el-divider> |
|||
<div class="card-box"> |
|||
<el-form> |
|||
<el-form-item label="速度"> |
|||
<el-input v-model="debugStore.formData.transferModule.JawData.rate"> |
|||
<template #append> |
|||
mm/s |
|||
</template> |
|||
</el-input> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<ft-button type="primary" :click-handle="debug_holding_jaw_open"> |
|||
打开 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="debug_holding_jaw_close"> |
|||
闭合 |
|||
</ft-button> |
|||
<ft-button :click-handle="debug_holding_jaw_pause"> |
|||
停止 |
|||
</ft-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</div> |
|||
</el-card> |
|||
<el-card> |
|||
<template #header> |
|||
<div class="card-header"> |
|||
<span>门</span> |
|||
</div> |
|||
</template> |
|||
<div class="card-box"> |
|||
<ft-button type="primary" :click-handle="door_open"> |
|||
开门 |
|||
</ft-button> |
|||
<ft-button type="primary" :click-handle="door_close"> |
|||
关门 |
|||
</ft-button> |
|||
<ft-button :click-handle="door_stop"> |
|||
停止 |
|||
</ft-button> |
|||
</div> |
|||
</el-card> |
|||
</el-col> |
|||
</el-row> |
|||
</div> |
|||
</template> |
|||
|
|||
<style lang="scss" scoped> |
|||
.debug-content { |
|||
overflow: auto; |
|||
max-height: 100%; |
|||
} |
|||
|
|||
.el-card { |
|||
margin-bottom: 10px; |
|||
} |
|||
|
|||
:deep(.el-card__header) { |
|||
padding: 5px 10px; |
|||
} |
|||
|
|||
.el-input, .el-select { |
|||
width: 100%; |
|||
} |
|||
|
|||
.el-form-item { |
|||
margin-bottom: 10px; |
|||
margin-right: 10px; |
|||
} |
|||
|
|||
.card-box { |
|||
//display: flex; |
|||
//align-items: center; |
|||
} |
|||
|
|||
:deep(.el-input-group__append) { |
|||
padding: 0 10px; |
|||
} |
|||
|
|||
.card-header { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.select-label { |
|||
margin-right: 10px; |
|||
} |
|||
:deep(.el-card__body) { |
|||
padding: 10px; |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue