|
|
@ -1,6 +1,7 @@ |
|
|
|
<script setup lang="ts"> |
|
|
|
import { list as listMatrix } from 'apis/matrix' |
|
|
|
import { getListByMatrixId, update } from 'apis/matrixCraft' |
|
|
|
import { getDeviceStatus, getSprayStatus } from 'apis/system' |
|
|
|
import route from 'assets/images/route.png' |
|
|
|
import route_active from 'assets/images/route_active.png' |
|
|
|
import route_horizontal_active from 'assets/images/route_horizontal2.png' |
|
|
@ -47,204 +48,16 @@ const submitParam = async () => { |
|
|
|
|
|
|
|
const infoVisible = ref(false) |
|
|
|
|
|
|
|
const data = { |
|
|
|
cmdId: '1742650987568', |
|
|
|
cmdCode: 'matrix_spray_start', |
|
|
|
sprayTaskSprayedList: [ |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 20, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 23, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 23, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 26, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 26, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 29, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 29, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 32, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 32, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 35, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 35, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 38, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 38, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 41, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 41, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 44, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 44, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 21, |
|
|
|
y: 47, |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
index: 0, |
|
|
|
number: 1, |
|
|
|
sprayedPoints: { |
|
|
|
x: 4, |
|
|
|
y: 47, |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
sprayParams: { |
|
|
|
matrixId: 1, |
|
|
|
matrixCraftId: 1, |
|
|
|
matrixPathType: 'horizontal', |
|
|
|
motorZHeight: 60, |
|
|
|
gasPressure: 3, |
|
|
|
volume: 20, |
|
|
|
highVoltage: true, |
|
|
|
highVoltageValue: 4000, |
|
|
|
spacing: 3, |
|
|
|
movingSpeed: 10, |
|
|
|
times: 2, |
|
|
|
position: [ |
|
|
|
{ |
|
|
|
select: true, |
|
|
|
x1: 4, |
|
|
|
y1: 20, |
|
|
|
x2: 21, |
|
|
|
y2: 60, |
|
|
|
index: 0, |
|
|
|
}, |
|
|
|
], |
|
|
|
id: 1, |
|
|
|
createTime: '2025-03-18 19:33:46', |
|
|
|
updateTime: '2025-03-18 19:33:46', |
|
|
|
name: '工艺1', |
|
|
|
createUser: null, |
|
|
|
}, |
|
|
|
} |
|
|
|
onMounted(async () => { |
|
|
|
socket.init(sprayPointReceiveMessage, 'spray_point') |
|
|
|
socket.init(finishMessage, 'cmd_response') |
|
|
|
await getMatrixList() |
|
|
|
console.log(222, systemStore.systemStatus.spraying) |
|
|
|
// await getDeviceStatus().then((res: any) => { |
|
|
|
// systemStore.updateSystemStatus(res) |
|
|
|
// if (systemStore.systemStatus.spraying) { |
|
|
|
// getSpraying() |
|
|
|
// } |
|
|
|
// }) |
|
|
|
await getDeviceStatus().then((res: any) => { |
|
|
|
systemStore.updateSystemStatus(res) |
|
|
|
if (systemStore.systemStatus.spraying) { |
|
|
|
getSpraying() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
const isActive = true |
|
|
@ -256,10 +69,10 @@ onUnmounted(() => { |
|
|
|
}) |
|
|
|
|
|
|
|
const getSpraying = async () => { |
|
|
|
const res: any = data |
|
|
|
// const res: any = await getSprayStatus() |
|
|
|
const res: any = await getSprayStatus() |
|
|
|
const sprayTaskSprayedList = res.sprayTaskSprayedList |
|
|
|
cmdId = res.cmdId |
|
|
|
|
|
|
|
form.value = { |
|
|
|
...res.sprayParams, |
|
|
|
position: [{ select: false }, { select: false }, { select: false }, { select: false }], |
|
|
|