From b4f95eb43d25e89f4e149121dfc97ae9b618b7ab Mon Sep 17 00:00:00 2001 From: zqc <835569504@qq.com> Date: Tue, 10 Mar 2026 09:45:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=89=8D=E7=AB=AF=E5=AF=B9?= =?UTF-8?q?=E9=A2=91=E7=8E=87=E7=9A=84=E9=99=90=E5=88=B6=EF=BC=88=E9=9D=9E?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=AB=AF=E9=83=A8=E7=BD=B2=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=9C=8D=E5=8A=A1=E7=AB=AF=E9=9C=80=E8=A6=81=E5=AF=B9?= =?UTF-8?q?=E5=BA=94=E4=BF=AE=E6=94=B9=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_page/index.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/web_page/index.html b/web_page/index.html index 90ea40a..a55ce8c 100644 --- a/web_page/index.html +++ b/web_page/index.html @@ -352,25 +352,25 @@ result_type: msg.result_type }; - const now = msg.timestamp; - const timeThreshold = now - 10; - - const existingAlert = alerts.find(alert => - JSON.stringify(alert.result_type) === JSON.stringify(alertMsg.result_type) && - alert.timestamp > timeThreshold - ); - - if (!existingAlert) { + // const now = msg.timestamp; + // const timeThreshold = now - 10; + + // const existingAlert = alerts.find(alert => + // JSON.stringify(alert.result_type) === JSON.stringify(alertMsg.result_type) && + // alert.timestamp > timeThreshold + // ); + + // if (!existingAlert) { alerts.push(alertMsg); // console.log('添加新的异常告警:', alertMsg); // console.log('当前alerts数组长度:', alerts.length); - + renderMessages(); // console.log('渲染消息列表完成'); - + const alertTypes = alertMsg.result_type.join(', '); addLog(`检测到异常: ${alertTypes}`, 'warning'); - } + // } } } else if (msg.msg_type === 'take_out') { // console.log('处理take_out类型消息');