Compare commits
6 Commits
8e1b245ab6
...
f5071c57c7
Author | SHA1 | Date | |
---|---|---|---|
f5071c57c7 | |||
1fc89c6677 | |||
e2753c65a3 | |||
4405702381 | |||
5f75ca2fa2 | |||
318e69cfaf |
@ -18,6 +18,8 @@ export enum MapPointType {
|
||||
临时避让点,
|
||||
/** 库区点 - 仓储作业区域 */
|
||||
库区点,
|
||||
/** 不可避让点 - 机器人不可避让的点位 */
|
||||
不可避让点 = 7,
|
||||
/** 密集库区点 - 密集库区点位 */
|
||||
// 密集库区点,
|
||||
|
||||
|
@ -8,7 +8,8 @@
|
||||
"fill-2": "#69C6F5",
|
||||
"fill-3": "#E48B1D",
|
||||
"fill-4": "#E48B1D",
|
||||
"fill-5": "#a72b69"
|
||||
"fill-5": "#a72b69",
|
||||
"fill-6": "#E63A3A"
|
||||
},
|
||||
"point-l": {
|
||||
"stroke": "#595959",
|
||||
|
@ -8,7 +8,8 @@
|
||||
"fill-2": "#69C6F5",
|
||||
"fill-3": "#E48B1D",
|
||||
"fill-4": "#E48B1D",
|
||||
"fill-5": "#a72b69"
|
||||
"fill-5": "#a72b69",
|
||||
"fill-6": "#E63A3A"
|
||||
},
|
||||
"point-l": {
|
||||
"stroke": "#595959",
|
||||
|
@ -101,6 +101,7 @@ const updateActiveKeys = () => {
|
||||
{ key: '避让点', type: MapPointType.避让点 },
|
||||
{ key: '临时避让点', type: MapPointType.临时避让点 },
|
||||
{ key: '库区点', type: MapPointType.库区点 },
|
||||
{ key: '不可避让点', type: MapPointType.不可避让点 },
|
||||
{ key: '电梯点', type: MapPointType.电梯点 },
|
||||
{ key: '自动门点', type: MapPointType.自动门点 },
|
||||
{ key: '充电点', type: MapPointType.充电点 },
|
||||
@ -278,6 +279,21 @@ watch(keyword, updateActiveKeys);
|
||||
</a-list>
|
||||
</a-collapse-panel>
|
||||
|
||||
<a-collapse-panel :header="$t('不可避让点')" key="不可避让点">
|
||||
<a-list rowKey="id" :data-source="points.filter(({ point }) => point?.type === MapPointType.不可避让点)">
|
||||
<template #renderItem="{ item }">
|
||||
<a-list-item
|
||||
class="ph-16"
|
||||
:class="{ selected: item.id === current }"
|
||||
style="height: 36px"
|
||||
@click="select(item.id)"
|
||||
>
|
||||
<a-typography-text type="secondary">{{ item.label }}</a-typography-text>
|
||||
</a-list-item>
|
||||
</template>
|
||||
</a-list>
|
||||
</a-collapse-panel>
|
||||
|
||||
<a-collapse-panel :header="$t('电梯点')" key="电梯点">
|
||||
<a-list rowKey="id" :data-source="points.filter(({ point }) => point?.type === MapPointType.电梯点)">
|
||||
<template #renderItem="{ item }">
|
||||
|
@ -129,9 +129,11 @@ const monitorScene = async () => {
|
||||
const robotState: any = {};
|
||||
|
||||
// 2.1 处理路径并将其放入 robotState
|
||||
if (points?.length) {
|
||||
const cx = x || 37;
|
||||
const cy = y || 37;
|
||||
// 处理路径坐标转换,参考refreshRobot方法的逻辑
|
||||
if (points?.length && !isMonitorMode.value) {
|
||||
// 新路径:相对于机器人中心的坐标
|
||||
const cx = x || 37; // 机器人中心X坐标,默认37
|
||||
const cy = y || 37; // 机器人中心Y坐标,默认37
|
||||
robotState.path = points.map((p) => ({ x: p.x - cx, y: p.y - cy }));
|
||||
}
|
||||
|
||||
|
@ -2103,7 +2103,8 @@ function drawPoint(ctx: CanvasRenderingContext2D, pen: MapPen): void {
|
||||
case MapPointType.等待点:
|
||||
case MapPointType.避让点:
|
||||
case MapPointType.临时避让点:
|
||||
case MapPointType.库区点: {
|
||||
case MapPointType.库区点:
|
||||
case MapPointType.不可避让点: {
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(x + w / 2 - r, y + r);
|
||||
ctx.arcTo(x + w / 2, y, x + w - r, y + h / 2 - r, r);
|
||||
|
1672
地图互转工具.html
1672
地图互转工具.html
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user