From fb453a90c9b1bf99f640e7cb614872358e980f82 Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 31 May 2023 13:24:05 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=89=8D=E5=8F=B0]=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8D=B3=E6=99=82=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_alert.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Frontend/_alert.html b/Frontend/_alert.html index 9a930f1..7ca1713 100644 --- a/Frontend/_alert.html +++ b/Frontend/_alert.html @@ -220,6 +220,8 @@ first = true; let dataAlarm = []; var historyTable = null; + var elemIndex = 0; + var index = 0; $(function () { initDropzone(); @@ -254,7 +256,7 @@ //}); if (pageAct.SysType == "all") { - if (!$(this).is(':checked')) { + if ($(this).is(':checked')) { $(this).prop('checked', true); $(this).click(); } @@ -639,7 +641,10 @@ } else { let elem = $('input[type=checkbox][data-type=sub]:checked'); + elemIndex = 0; + index = 0; if (elem && elem.length > 0) { + elemIndex = elem.length; elem.each(function (i, v) { if (v?.id === "other") { console.log(v?.id) @@ -663,7 +668,10 @@ res.data.forEach(v => { dataAlarm.push(v); }); - callBackFromOneDeviceAlert(dataAlarm); + index++; + + if (elemIndex == index) + callBackFromOneDeviceAlert(dataAlarm); } function callBackFromAllDeviceAlert(res) {