This commit is contained in:
dev02 2023-09-14 09:26:56 +08:00
commit b098c427fe
3 changed files with 1474 additions and 1469 deletions

View File

@ -1070,10 +1070,14 @@
{
title: "設備名稱",
data: "sourceName_zh",
render: function (data) {
return (
allDevices.find((d) => d.device_number === data)?.full_name || ""
);
render: function (data, type, row) {
const building_name = pageAct.buildList.find(
({ building_tag }) => building_tag === data.split("_")[1]
)?.full_name;
return allDevices.find((d) => d.device_number === data)?.full_name ||
row.alarmClass === "Sys_Con_AlarmClass"
? `${building_name}_電錶邊緣控制器_${data.split("_")[7]}`
: "";
},
},
{

View File

@ -2328,7 +2328,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
];
// 向 niagara 取得告警資料
getDeviceAlarmCardByBaja(null, now, false, false, function (bajaDatas) {
let datas = bajaDatas.data;
let datas = bajaDatas.data.filter(({ alarmClass }) => alarmClass!== "defaultAlarmClass");
let titleHtml = `異常通知`;
let notices = [];
// 遍歷每個告警資料

View File

@ -262,6 +262,7 @@ namespace FrontendWebApi.ApiControllers
}
if (d.type != lastDeviceItem)
{
RowPosition = 0;
lastDeviceItem = d.type;
sheet = workbook.CreateSheet($"{building.Where(x => x.building_tag == lhe.device_number.Split("_")[1]).Select(x => x.full_name).FirstOrDefault()}{"_" + d.type}");
#region set cell
@ -282,7 +283,7 @@ namespace FrontendWebApi.ApiControllers
cell.SetCellValue("記錄時間");
cell.CellStyle = styleLine12;
#endregion
RowPosition = 0;
RowPosition = 1;
}
else {
RowPosition += 1;