From 5ae3b6c3d604f16c2ecc5057d720d5d79c8c091b Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期日, 23 十一月 2025 14:21:33 +0800
Subject: [PATCH] #
---
src/main/webapp/views/console.html | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/main/webapp/views/console.html b/src/main/webapp/views/console.html
index a31638f..b2c4243 100644
--- a/src/main/webapp/views/console.html
+++ b/src/main/webapp/views/console.html
@@ -555,6 +555,7 @@
var sites = res.data;
for (var i = 0; i < sites.length; i++) {
var siteEl = $("#site-" + sites[i].siteId);
+ // console.log(sites[i].siteStatus);
siteEl.attr("class", "site " + sites[i].siteStatus);
if (sites[i].workNo != null && sites[i].workNo > 0) {
siteEl.html(sites[i].siteId + "[" + sites[i].workNo + "]");
@@ -761,11 +762,19 @@
targetTop += 580;
break;
default:
+ console.log("鏃犳晥鐨勭洰鏍囩珯鐐癸細" + target);
return; // 鏃犳晥鐨勭珯鐐癸紝璺宠繃
}
+ // 纭繚鐩爣绔欑偣鐨� DOM 鍏冪礌瀛樺湪
+ var siteElement = $("#site-" + id);
+ if (!siteElement.length) {
+ console.log("鏈壘鍒扮珯鐐瑰厓绱狅細" + id);
+ return; // 濡傛灉绔欑偣鍏冪礌涓嶅瓨鍦紝璺宠繃
+ }
+
// 鑾峰彇褰撳墠绔欑偣浣嶇疆
- var currentTop = $("#site-" + id).position().top;
+ var currentTop = siteElement.position().top;
// 璁$畻涓や釜绔欑偣涔嬮棿鐨勮窛绂�
var distance = Math.abs(targetTop - currentTop);
@@ -774,10 +783,11 @@
var duration = Math.max(500, Math.min(distance / 2, 2000));
// 鎵ц鍔ㄧ敾锛屽钩婊戝湴绉诲姩鍒扮洰鏍囦綅缃�
- $("#site-" + id).animate({ top: targetTop + 'px' }, duration);
+ siteElement.animate({ top: targetTop + 'px' }, duration);
}
+
// 妫�鏌� URL 涓槸鍚﹀寘鍚� fullscreen=true 鍙傛暟
function checkFullscreen() {
const urlParams = new URLSearchParams(window.location.search);
--
Gitblit v1.9.1