diff --git a/README.md b/README.md index b90a4d0..2f6c1c6 100644 --- a/README.md +++ b/README.md @@ -102,10 +102,14 @@ interface MapPen { interface MapPointInfo { type: MapPointType; // 点位类型 robots?: Array; // 绑定机器人id集合 + actions?: Array; // 绑定动作点id集合 + isBlock?: boolean; // 是否禁行 + isForbidAvoid?: boolean; // 是否禁止避让 } interface MapRouteInfo { type: MapRouteType; // 线路类型 - direction?: -1 | 1; // 线路方向 + direction?: -1 | 1; // 方向 + pass?: MapRoutePassType; // 可通行类型 } interface MapAreaInfo { type: MapAreaType; // 区域类型 @@ -128,10 +132,20 @@ enum MapPointType { 障碍点 = 99, // 待优化,后续将单独抽离 } + enum MapRouteType { 直线 = 'line', 三阶贝塞尔曲线 = 'bezier3', } +enum MapRoutePassType { + 无, + + 仅空载可通行, + 仅载货可通行, + + 禁行 = 10, +} + enum MapAreaType { 库区 = 1, diff --git a/src/_ant.scss b/src/_ant.scss index 31347ab..aee3eea 100644 --- a/src/_ant.scss +++ b/src/_ant.scss @@ -650,6 +650,11 @@ color: get-color(text4); } + &.card-title { + font-size: 20px; + line-height: 28px; + } + & > strong { font: 500 16px/22px Roboto; } diff --git a/src/apis/map/constant.ts b/src/apis/map/constant.ts index aefe14b..fff7027 100644 --- a/src/apis/map/constant.ts +++ b/src/apis/map/constant.ts @@ -27,6 +27,13 @@ export enum MapRouteType { 三阶贝塞尔曲线 = 'bezier3', } export const MAP_ROUTE_TYPES = Object.freeze(<[string, MapRouteType][]>Object.entries(MapRouteType)); + +export enum MapRoutePassType { + 无, + 仅空载可通行, + 仅载货可通行, + 禁行 = 10, +} //#endregion //#region 区域 diff --git a/src/apis/map/type.ts b/src/apis/map/type.ts index 46ea61b..cc61976 100644 --- a/src/apis/map/type.ts +++ b/src/apis/map/type.ts @@ -1,7 +1,7 @@ import type { RobotInfo } from '@api/robot'; import type { Pen } from '@meta2d/core'; -import type { MapAreaType, MapPointType, MapRouteType } from './constant'; +import type { MapAreaType, MapPointType, MapRoutePassType, MapRouteType } from './constant'; export interface MapPen extends Pen { label?: string; // 展示名称 @@ -19,13 +19,17 @@ export interface MapPen extends Pen { export interface MapPointInfo { type: MapPointType; // 点位类型 robots?: Array; // 绑定机器人id集合 + actions?: Array; // 绑定动作点id集合 + isBlock?: boolean; // 是否禁行 + isForbidAvoid?: boolean; // 是否禁止避让 } //#endregion //#region 线路 export interface MapRouteInfo { type: MapRouteType; // 线路类型 - direction?: -1 | 1; // 线路方向 + direction?: -1 | 1; // 方向 + pass?: MapRoutePassType; // 可通行类型 } //#endregion diff --git a/src/assets/icons/_icon.scss b/src/assets/icons/_icon.scss index 6c12269..c37388e 100644 --- a/src/assets/icons/_icon.scss +++ b/src/assets/icons/_icon.scss @@ -1,10 +1,13 @@ $icons: ( area1-active, + area1-detail, area1, - area2-active, - area2, - area3-active, - area3, + area11-active, + area11-detail, + area11, + area12-active, + area12-detail, + area12, battery_charge, battery, connect_off, @@ -17,6 +20,7 @@ $icons: ( exit, pen, plus, + point, redo, register, robot, diff --git a/src/assets/icons/dark/area1-detail.png b/src/assets/icons/dark/area1-detail.png new file mode 100644 index 0000000..ecb5c79 Binary files /dev/null and b/src/assets/icons/dark/area1-detail.png differ diff --git a/src/assets/icons/dark/area2-active.png b/src/assets/icons/dark/area11-active.png similarity index 100% rename from src/assets/icons/dark/area2-active.png rename to src/assets/icons/dark/area11-active.png diff --git a/src/assets/icons/dark/area11-detail.png b/src/assets/icons/dark/area11-detail.png new file mode 100644 index 0000000..a2b547b Binary files /dev/null and b/src/assets/icons/dark/area11-detail.png differ diff --git a/src/assets/icons/dark/area2.png b/src/assets/icons/dark/area11.png similarity index 100% rename from src/assets/icons/dark/area2.png rename to src/assets/icons/dark/area11.png diff --git a/src/assets/icons/dark/area3-active.png b/src/assets/icons/dark/area12-active.png similarity index 100% rename from src/assets/icons/dark/area3-active.png rename to src/assets/icons/dark/area12-active.png diff --git a/src/assets/icons/dark/area12-detail.png b/src/assets/icons/dark/area12-detail.png new file mode 100644 index 0000000..8f365eb Binary files /dev/null and b/src/assets/icons/dark/area12-detail.png differ diff --git a/src/assets/icons/dark/area3.png b/src/assets/icons/dark/area12.png similarity index 100% rename from src/assets/icons/dark/area3.png rename to src/assets/icons/dark/area12.png diff --git a/src/assets/icons/dark/point.png b/src/assets/icons/dark/point.png new file mode 100644 index 0000000..f15007e Binary files /dev/null and b/src/assets/icons/dark/point.png differ diff --git a/src/assets/themes/editor-dark.json b/src/assets/themes/editor-dark.json index 3dd99c0..e379b6f 100644 --- a/src/assets/themes/editor-dark.json +++ b/src/assets/themes/editor-dark.json @@ -13,5 +13,14 @@ "stroke": "#595959", "strokeActive": "#FCC947" }, + "area": { + "stroke-1": "#9ACDFF99", + "fill-1": "#9ACDFF33", + "stroke-11": "#FF535399", + "fill-11": "#FF9A9A33", + "stroke-12": "#0DBB8A99", + "fill-12": "#0DBB8A33", + "strokeActive": "#FCC947" + }, "line": "#8C8C8C" } diff --git a/src/components/card/area-detail-card.vue b/src/components/card/area-detail-card.vue new file mode 100644 index 0000000..a78b728 --- /dev/null +++ b/src/components/card/area-detail-card.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/components/card/point-detail-card.vue b/src/components/card/point-detail-card.vue new file mode 100644 index 0000000..cd1d2dc --- /dev/null +++ b/src/components/card/point-detail-card.vue @@ -0,0 +1,115 @@ + + + diff --git a/src/components/card/robot-detail-card.vue b/src/components/card/robot-detail-card.vue index 24fec2a..f9f4030 100644 --- a/src/components/card/robot-detail-card.vue +++ b/src/components/card/robot-detail-card.vue @@ -22,13 +22,13 @@ const stateDot = computed(() => `state-${robot.value?.state}`);