From 80f10f871fb97129eacfad5cc303af5cdc4529ca Mon Sep 17 00:00:00 2001 From: wenlele Date: Wed, 10 May 2023 17:21:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=AE=E4=BB=B6=E9=A1=B9=E7=9B=AE=E5=90=8D?= =?UTF-8?q?=E4=B8=8D=E5=B1=95=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/schedule/alarms_push.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index a48c629..b6bb99d 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -1153,6 +1153,7 @@ module.exports = function (app, opts) { }) } + console.log('数据组合', JSON.stringify(pepProject_name)); pepProject_name.forEach(h => { let rowspan1 = 0 @@ -1177,6 +1178,7 @@ module.exports = function (app, opts) { delete c.alarmDatas } }) + } else { delete f.devices } @@ -1185,19 +1187,20 @@ module.exports = function (app, opts) { } f.rowspan = rowspan3 }) + x.factor = x.factor.filter(b => b.devices && b.devices.length>0) } else { delete x.factor } x.rowspan = rowspan2 }) + h.projects = h.projects.filter(b => b.factor && b.factor.length>0) } else { delete h.projects } h.rowspan = rowspan1 }) - console.log('数据组合', JSON.stringify(pepProject_name)); - // - dataAlarmG1 = pepProject_name + + dataAlarmG1 = pepProject_name.filter(b => b.projects && b.projects.length>0)||[] } @@ -1216,6 +1219,7 @@ module.exports = function (app, opts) { if (type == 1) { + alarmData.map((h, hi) => { if (h.projects && h.projects.length) {