From 4b914554853a40f37cae315793387a398b8af130 Mon Sep 17 00:00:00 2001 From: wangfq Date: Wed, 10 Jun 2026 14:24:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B5=8B=E8=AF=95=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AE=9A=E6=9C=9F=E5=88=B7=E6=96=B0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=A8=A1=E5=BC=8F=EF=BC=8C=E8=A7=A3=E5=86=B3=E5=B7=A5?= =?UTF-8?q?=E8=A3=85=E9=A1=B5=E4=BF=AE=E6=94=B9=E5=90=8E=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit loadTestMode 只在页面加载时调用一次,工装页改完 TestMode 后切回测试页, 如果页面已打开则不会刷新。现在改为每 5s 与设备状态一起同步刷新。 --- edc-web/app/static/js/test_op.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/edc-web/app/static/js/test_op.js b/edc-web/app/static/js/test_op.js index 04a2d6d..171f2cb 100644 --- a/edc-web/app/static/js/test_op.js +++ b/edc-web/app/static/js/test_op.js @@ -342,8 +342,12 @@ async function refreshDeviceStatus() { } } -// 每 5 秒刷新设备状态 -setInterval(refreshDeviceStatus, 5000); +// 每 5 秒刷新设备状态 + 测试模式(工装页修改后能及时同步) +async function refreshAll() { + await loadTestMode(); + refreshDeviceStatus(); +} +setInterval(refreshAll, 5000); // ─── UI ────────────────────────────────────────