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 }, ); }),