From 67da0c93680d21419aeb2d15532a564ac4108608 Mon Sep 17 00:00:00 2001 From: wangfq Date: Wed, 10 Jun 2026 14:51:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20renderLatest=20=E4=B8=8D=E5=86=8D?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E6=B5=8B=E8=AF=95=E6=A8=A1=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E6=A0=B9=E9=99=A4=E6=98=BE=E7=A4=BA=E5=9B=9E=E9=80=80=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: loadTestMode() 先从工装配置读取 TestMode=0(灵敏度) 并正确显示, 但紧接着 renderLatest() 看到最后一条测试数据 test_mode=1(波动), 又调用 updateTestModeUI(1) 把显示覆盖回去。 测试模式的权威来源是工装配置(tb_fixture_param),renderLatest 只应 展示最新测试数据的内容,不应修改模式指示器。 --- edc-web/app/static/js/test_op.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/edc-web/app/static/js/test_op.js b/edc-web/app/static/js/test_op.js index d626a28..2b93be2 100644 --- a/edc-web/app/static/js/test_op.js +++ b/edc-web/app/static/js/test_op.js @@ -402,9 +402,6 @@ function decodeRelay(v) { // ─── 显示最新结果 ────────────────────────────── function renderLatest(data) { - if (data.test_mode !== undefined && data.test_mode !== currentTestMode) { - updateTestModeUI(data.test_mode); - } const div = document.getElementById("latest-result"); div.innerHTML = `

设备型号:${data.str_type || '-'}