From 11cdde454cee0222cefa431279cb4d08a1c5061f Mon Sep 17 00:00:00 2001 From: xudan Date: Tue, 21 Oct 2025 10:30:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(auto-door):=20=E6=96=B0=E5=A2=9E=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E9=97=A8=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81=E6=A8=A1?= =?UTF-8?q?=E6=8B=9F=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E9=97=A8?= =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E4=B8=8E=E8=B7=AF=E6=AE=B5=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=90=8C=E6=AD=A5=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/card/area-detail-card.vue | 31 ++++- src/pages/movement-supervision.vue | 72 +++++++++- src/pages/scene-editor.vue | 36 ++--- src/services/auto-door-simulation.service.ts | 135 ++++++++++++------- 4 files changed, 195 insertions(+), 79 deletions(-) diff --git a/src/components/card/area-detail-card.vue b/src/components/card/area-detail-card.vue index eeae83e..70825e3 100644 --- a/src/components/card/area-detail-card.vue +++ b/src/components/card/area-detail-card.vue @@ -12,7 +12,18 @@ type Props = { const props = defineProps(); const editor = inject(props.token)!; -const pen = computed(() => editor.value.getPenById(props.current)); +// 订阅区域集合变化(含设备状态/连接状态),用于触发详情面板的响应式刷新 +const areasTick = computed(() => + editor.value.areas.value + .map((v: any) => `${v.id}:${v?.area?.deviceStatus ?? ''}:${v?.area?.isConnected ?? ''}`) + .join('|'), +); + +const pen = computed(() => { + // 引用 areasTick 以建立依赖关系 + void areasTick.value; + return editor.value.getPenById(props.current); +}); const area = computed(() => { const v = pen.value?.area; if (!v?.type) return null; @@ -61,6 +72,8 @@ const ruleText = computed(() => { if (area.value?.inoutflag === 2) return '后进先出'; return ''; }); + +// 无日志版:不输出调试信息