From 26f256406fcf3a99c2614e06dd78590b3b209240 Mon Sep 17 00:00:00 2001 From: guoapeng Date: Tue, 15 Jul 2025 20:03:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BC=93=E5=AD=98=E5=96=B7=E6=B6=82?= =?UTF-8?q?=E7=8E=BB=E7=89=87=E6=9C=AA=E9=80=89=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/spray/index.vue | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/views/spray/index.vue b/src/views/spray/index.vue index 4f5dc15..534057d 100644 --- a/src/views/spray/index.vue +++ b/src/views/spray/index.vue @@ -43,14 +43,13 @@ const getSpraying = async () => { const res: any = await getSprayStatus() cmdId = res.cmdId res.sprayTaskParams.forEach((item: any) => { - sprayStore.updateSprayForm(item, item.index) + sprayStore.updateSprayForm({ ...item, select: true }, item.index) }) - res.sprayTaskSprayedList - .forEach((task: any) => { - nextTick(() => { - drawLine(task.index, { x: task.sprayedPoints.x * 5, y: task.sprayedPoints.y * 5 }, task.number) - }) + res.sprayTaskSprayedList.forEach((task: any) => { + nextTick(() => { + drawLine(task.index, { x: task.sprayedPoints.x * 5, y: task.sprayedPoints.y * 5 }, task.number) }) + }) } const sprayRefs = ref([]) @@ -83,8 +82,7 @@ const startWork = async () => { const params = { cmdCode: 'matrix_spray_start', cmdId, - params: { - }, + params: {}, } await sendControl(params) @@ -104,8 +102,7 @@ const continueWork = async () => { const params = { cmdCode: 'matrix_spray_continue', cmdId: '', - params: { - }, + params: {}, } await sendControl(params) // currentSpeed = Number(form.value.movingSpeed) @@ -167,7 +164,6 @@ const sprayPointReceiveMessage = (data: any) => { } const finishMessage = (data: any) => { - console.log(data, cmdId) if (data.cmdId === cmdId) { if (data.status === 'fail') { FtMessage.error(data.title) @@ -176,6 +172,7 @@ const finishMessage = (data: any) => { FtMessage.success('喷涂执行成功') } if (data.status === 'spray_task_finish') { + console.log('------------------', data, cmdId, sprayStore.sprayTaskParams) sprayStore.sprayTaskParams.forEach((item, index) => { if (item.select) { sprayRefs.value[index].clearLines() @@ -236,19 +233,23 @@ const viewParams = (index: number) => {