Browse Source

邮件告警源名称错误

dev
wenlele 2 years ago
parent
commit
1273d9cc50
  1. 13
      api/app/lib/schedule/alarms_push.js

13
api/app/lib/schedule/alarms_push.js

@ -1113,6 +1113,9 @@ module.exports = function (app, opts) {
` `
).toPromise() || [] ).toPromise() || []
console.log('当前结构物下所有告警', alarmDatas);
console.log('监测因素', factorData);
console.log('结构物对应的设备', equipment);
equipment.map(f => { equipment.map(f => {
f.alarmDatas = [] f.alarmDatas = []
@ -1187,20 +1190,20 @@ module.exports = function (app, opts) {
} }
f.rowspan = rowspan3 f.rowspan = rowspan3
}) })
x.factor = x.factor.filter(b => b.devices && b.devices.length>0) x.factor = x.factor.filter(b => b.devices && b.devices.length > 0)
} else { } else {
delete x.factor delete x.factor
} }
x.rowspan = rowspan2 x.rowspan = rowspan2
}) })
h.projects = h.projects.filter(b => b.factor && b.factor.length>0) h.projects = h.projects.filter(b => b.factor && b.factor.length > 0)
} else { } else {
delete h.projects delete h.projects
} }
h.rowspan = rowspan1 h.rowspan = rowspan1
}) })
dataAlarmG1 = pepProject_name.filter(b => b.projects && b.projects.length>0)||[] dataAlarmG1 = pepProject_name.filter(b => b.projects && b.projects.length > 0) || []
} }
@ -1219,7 +1222,7 @@ module.exports = function (app, opts) {
if (type == 1) { if (type == 1) {
alarmData.map((h, hi) => { alarmData.map((h, hi) => {
if (h.projects && h.projects.length) { if (h.projects && h.projects.length) {

Loading…
Cancel
Save