From edee9c4445340eda1e1d01a33fbbcab341a66276 Mon Sep 17 00:00:00 2001 From: ywb <347742090@qq.com> Date: Sat, 16 May 2026 23:50:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=AE=9E=E6=97=B6=E6=98=BE?= =?UTF-8?q?=E7=A4=BAAGV=E4=BD=8D=E7=BD=AE=20+=20=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE=E5=AF=BC=E8=88=AA=20+=20Nav2=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 地图 overlay 新增 AGV 位置橙色脉冲点(动画) - navCurrentPos 刷新周期:地图 Tab 下每 2 秒刷新 - agv-dot CSS:14px 橙色圆点 + 脉冲动画 - 点击地图直接导航功能(onMapClick) - onMapClick:修复 img 标签 patch 逻辑(原已生效) - style.css: 新增 agv-dot 脉冲动画样式 --- agv_app/static/css/style.css | 15 +++++++++++++++ agv_app/static/js/setting.js | 5 ++++- agv_app/templates/setting.html | 12 +++++++++--- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/agv_app/static/css/style.css b/agv_app/static/css/style.css index af9e83a..3eb5073 100644 --- a/agv_app/static/css/style.css +++ b/agv_app/static/css/style.css @@ -720,3 +720,18 @@ a:hover { text-decoration: underline; } border: 2px solid #fff; box-shadow: 0 0 6px rgba(243,156,18,0.9); } +/* AGV 实时位置点 */ +.agv-dot { + width: 14px !important; + height: 14px !important; + background: #ff5722 !important; + border: 2px solid #fff !important; + border-radius: 50% !important; + box-shadow: 0 0 8px #ff5722, 0 0 16px #ff572288 !important; + animation: agv-pulse 1.5s ease-in-out infinite !important; + z-index: 10 !important; +} +@keyframes agv-pulse { + 0%, 100% { transform: scale(1); opacity: 1; } + 50% { transform: scale(1.3); opacity: 0.7; } +} diff --git a/agv_app/static/js/setting.js b/agv_app/static/js/setting.js index 7f1b5e6..2f69743 100644 --- a/agv_app/static/js/setting.js +++ b/agv_app/static/js/setting.js @@ -66,7 +66,10 @@ const app = createApp({ if (this.nav2Available && this.navStatus === 'navigating') { this.refreshNavStatus() } - }, 3000) + if (this.tab === 'map' && this.nav2Available) { + this.refreshNavStatus() // also refresh position for map display + } + }, 2000) }, watch: { // 监听点位数据变化,自动刷新地图 diff --git a/agv_app/templates/setting.html b/agv_app/templates/setting.html index 3043b55..e3d6f52 100644 --- a/agv_app/templates/setting.html +++ b/agv_app/templates/setting.html @@ -4,7 +4,7 @@ 设置 - AGV 拍摄系统 - +
@@ -53,6 +53,12 @@
+ +
+
- - + +