From 0285b5992786a9e4ebc7ff065ab990ad7a827731 Mon Sep 17 00:00:00 2001 From: xudan Date: Mon, 7 Jul 2025 16:38:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=A8=E9=80=89=E6=8B=A9=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=BA=E6=97=B6=E8=81=9A=E7=84=A6=E5=88=B0=E6=9C=BA?= =?UTF-8?q?=E5=99=A8=E4=BA=BA=E4=BD=8D=E7=BD=AE=EF=BC=8C=E5=B9=B6=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=E6=9C=BA=E5=99=A8=E4=BA=BA=E5=8F=AF?= =?UTF-8?q?=E8=A7=81=E6=80=A7=E7=9A=84=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/movement-supervision.vue | 2 ++ src/services/editor.service.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/pages/movement-supervision.vue b/src/pages/movement-supervision.vue index 449767e..1286708 100644 --- a/src/pages/movement-supervision.vue +++ b/src/pages/movement-supervision.vue @@ -89,6 +89,8 @@ const isArea = computed(() => current.value?.type === 'area'); const selectRobot = (id: string) => { current.value = { type: 'robot', id }; editor.value?.inactive(); + // 聚焦到机器人位置 + editor.value?.gotoById(id); }; // 视图状态管理 diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index 04b5614..8c6b10a 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -527,6 +527,8 @@ export class EditorService extends Meta2d { public gotoById(id: string): void { const pen = this.getPenById(id); if (isNil(pen)) return; + // 判断机器人是否可见,如果不可见直接返回 + if (pen.visible === false && pen.tags?.includes('robot')) return; this.gotoView(pen); }