From 9a1cd82a26b5911313a11c953c427997600ea701 Mon Sep 17 00:00:00 2001 From: xudan Date: Tue, 15 Jul 2025 15:49:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=82=B9=E4=BD=8D?= =?UTF-8?q?=E6=89=A9=E5=B1=95=E7=B1=BB=E5=9E=8B=E6=94=AF=E6=8C=81=EF=BC=8C?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E5=92=8C?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BB=A5=E5=A4=84=E7=90=86=E6=89=A9=E5=B1=95?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/map/constant.ts | 13 ++++++++++ src/apis/map/type.ts | 1 + src/apis/scene/type.ts | 1 + src/components/card/point-detail-card.vue | 4 +++ src/components/card/point-edit-card.vue | 30 ++++++++++++++++++++++- src/services/editor.service.ts | 7 +++--- 6 files changed, 52 insertions(+), 4 deletions(-) diff --git a/src/apis/map/constant.ts b/src/apis/map/constant.ts index 7b5d3c9..839ac36 100644 --- a/src/apis/map/constant.ts +++ b/src/apis/map/constant.ts @@ -18,6 +18,8 @@ export enum MapPointType { 临时避让点, /** 库区点 - 仓储作业区域 */ 库区点, + /** 密集库区点 - 密集库区点位 */ + 密集库区点, /** 电梯点 - 机器人乘坐电梯的专用点位 */ 电梯点 = 11, @@ -42,6 +44,17 @@ export const MAP_POINT_TYPES = Object.freeze( ); //#endregion +/** + * 点位扩展类型映射,用于UI显示和选择 + */ +export const MAP_POINT_EXTENSION_TYPES = Object.freeze({ + [MapPointType.等待点]: [MapPointType.临时避让点], + [MapPointType.库区点]: [MapPointType.临时避让点], + [MapPointType.临时避让点]: [MapPointType.等待点, MapPointType.库区点, MapPointType.密集库区点], + [MapPointType.密集库区点]: [MapPointType.动作点, MapPointType.临时避让点], + [MapPointType.动作点]: [MapPointType.密集库区点], +}); + /** * 地图路线类型枚举 * 定义了连接点位之间的路径类型 diff --git a/src/apis/map/type.ts b/src/apis/map/type.ts index ad284d8..54307c2 100644 --- a/src/apis/map/type.ts +++ b/src/apis/map/type.ts @@ -23,6 +23,7 @@ export interface MapPen extends Pen { //#region 点位 export interface MapPointInfo { type: MapPointType; // 点位类型 + extensionType?: MapPointType; // 扩展类型 robots?: Array; // 绑定机器人id集合 actions?: Array; // 绑定动作点id集合 isBlock?: boolean; // 是否禁行 diff --git a/src/apis/scene/type.ts b/src/apis/scene/type.ts index 46ecbb8..b6c3f71 100644 --- a/src/apis/scene/type.ts +++ b/src/apis/scene/type.ts @@ -38,6 +38,7 @@ export interface StandardScenePoint { x: number; y: number; type: number; // 点位类型 + extensionType?: number; // 扩展类型 robots?: Array; // 绑定机器人id集合 actions?: Array; // 绑定动作点id集合 associatedStorageLocations?: string[]; // 库位名称 diff --git a/src/components/card/point-detail-card.vue b/src/components/card/point-detail-card.vue index 73f101a..d5e4b38 100644 --- a/src/components/card/point-detail-card.vue +++ b/src/components/card/point-detail-card.vue @@ -76,6 +76,10 @@ const coArea2 = computed(() => mapAreas(MapAreaType.互斥区)); {{ $t('站点坐标') }} ({{ rect.x?.toFixed() }},{{ rect.y?.toFixed() }}) + + {{ $t('扩展类型') }} + {{ $t(MapPointType[point.extensionType]) }} + {{ $t('绑定机器人') }} diff --git a/src/components/card/point-edit-card.vue b/src/components/card/point-edit-card.vue index 7dc8b1b..7f06d1e 100644 --- a/src/components/card/point-edit-card.vue +++ b/src/components/card/point-edit-card.vue @@ -1,6 +1,14 @@