From 0c44af67a0e6a10ab50dbd0e44402a8587e12be7 Mon Sep 17 00:00:00 2001 From: xudan Date: Wed, 20 Aug 2025 14:10:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E7=B1=BB=E5=9E=8B=E6=98=BE=E7=A4=BA=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E5=87=BD=E6=95=B0=EF=BC=8C=E7=9B=B4=E6=8E=A5=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=B1=BB=E5=9E=8B=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=AE=80=E6=B4=81?= =?UTF-8?q?=E6=80=A7=EF=BC=9B=E6=9B=B4=E6=96=B0=E7=BC=96=E8=BE=91=E5=99=A8?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BB=A5=E6=94=AF=E6=8C=81=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/card/point-detail-card.vue | 22 +-------------------- src/services/editor.service.ts | 24 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/components/card/point-detail-card.vue b/src/components/card/point-detail-card.vue index bd67a75..cbc8218 100644 --- a/src/components/card/point-detail-card.vue +++ b/src/components/card/point-detail-card.vue @@ -118,26 +118,6 @@ const getTaskOperations = (task: BinTaskItem) => { return operations; }; -// 获取操作类型的显示名称 -const getOperationDisplayName = (operationType: string): string => { - const operationNames: Record = { - Load: '装载', - JackLoad: '装载', - Unload: '卸载', - JackUnload: '卸载', - Move: '移动', - Pick: '拾取', - Place: '放置', - Scan: '扫描', - Check: '检查', - Wait: '等待', - Charge: '充电', - Clean: '清理', - }; - - return operationNames[operationType] || operationType || '未知操作'; -}; - // 获取当前动作点对应的库位任务数据 const binTaskData = computed(() => { try { @@ -302,7 +282,7 @@ const binTaskData = computed(() => { class="task-operation" > - {{ getOperationDisplayName(operationType) }} + {{ operationType }}
{{ operation.operation || '未知操作' }} diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index fb38d0e..b27c66a 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -236,7 +236,21 @@ export class EditorService extends Meta2d { if (!points?.length) return; await Promise.all( points.map(async (v) => { - const { id, name, desc, x, y, type, extensionType, robots, actions, properties, deviceId, enabled } = v; + const { + id, + name, + desc, + x, + y, + type, + extensionType, + robots, + actions, + associatedStorageLocations, + properties, + deviceId, + enabled, + } = v; // 只有在导入场景文件时才进行反向坐标转换 let finalX = x; let finalY = y; @@ -247,7 +261,13 @@ export class EditorService extends Meta2d { } await this.addPoint({ x: finalX, y: finalY }, type, id); this.setValue( - { id, label: name, desc, properties, point: { type, extensionType, robots, actions, deviceId, enabled } }, + { + id, + label: name, + desc, + properties, + point: { type, extensionType, robots, actions, associatedStorageLocations, deviceId, enabled }, + }, { render: false, history: false, doEvent: false }, ); }),