diff --git a/Frontend/_alert.html b/Frontend/_alert.html index 90358bf..1f69c26 100644 --- a/Frontend/_alert.html +++ b/Frontend/_alert.html @@ -1074,10 +1074,11 @@ 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" + (row.alarmClass === "Sys_Con_AlarmClass" ? `${building_name}_電錶邊緣控制器_${data.split("_")[7]}` - : ""; + : ""); }, }, { diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index a64bb72..31c112e 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -6,14 +6,17 @@
- +
- +
-
@@ -27,54 +30,89 @@
- - - + + +
- - + +
- - + +
-
-
- -
+
+
- -
+
-
-
+ \ No newline at end of file + diff --git a/Frontend/index.html b/Frontend/index.html index f9b0e76..bfb7c23 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -190,7 +190,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li + -->
@@ -234,21 +234,21 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li + + + + -->
@@ -257,7 +257,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li id="toggleNoticeBtn" class="d-flex align-items-center justify-content-center ml-2"> + alt="Dr. Codex Lantern">-->
@@ -275,7 +275,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li data-target="logoutList" class="d-flex align-items-center justify-content-center ml-2"> + alt="Dr. Codex Lantern">-->
@@ -295,10 +295,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
+ Diamond Controls®
-->
@@ -314,25 +314,25 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li data-class="mobile-nav-on">
+
+ +
+
--> +
+ 2022 © SmartAdmin by gotbootstrap.com +
+
+ +
+ --> @@ -1032,7 +1032,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li checkDevState(); loadNoticeConSta(); - refreshSubPage() + refreshSubPage(); allDevices = getAllDevice(); if (pageAct.isShowBuildingInMenu) { @@ -1354,7 +1354,9 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li } else { $( `#subSysBtn${lastPageAct.sysSubTag - }[data-building-tag=${buildingTagOnJquery(lastPageAct.buiTag)}]` + }[data-building-tag=${buildingTagOnJquery( + lastPageAct.buiTag + )}]` ).click(); } } else { @@ -1418,7 +1420,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li function drawErrRecTabBlo() { let strHtml = ` -
`; + `; return strHtml; } @@ -1426,7 +1428,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li function drawOpeRecTabBlo() { let strHtml = ` -
`; + `; return strHtml; } @@ -1453,45 +1455,45 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li html: `
-
+
-
- -
- -
-
-
- ${drawStateTabBlo(devNum)} -
-
+
+
+ ${drawStateTabBlo(devNum)} +
+
+
+
+ ${drawErrRecTabBlo()} +
+
+ ${drawOpeRecTabBlo()} +
-
- ${drawErrRecTabBlo()} -
-
- ${drawOpeRecTabBlo()} -
-
-
`, +
`, group: "device", // 在 _sysElevator.html 及 _sysMonAll.html 會用到 onShow: function (tooltipEle, oriEle) { @@ -1850,27 +1852,27 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li sysSubObj.device_normal_point_value != null ) { strHtml += `
- - -
`; + + +
`; } if ( sysSubObj.device_close_point_name != null && sysSubObj.device_close_point_value != null ) { strHtml += `
- - -
`; + + + `; } if ( sysSubObj.device_error_point_name != null && sysSubObj.device_error_point_value != null ) { strHtml += `
- - -
`; + + + `; } return strHtml; @@ -1909,7 +1911,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li } function setSysTagForPageAct(obj) { - console.log($(obj).data("subsysobj")) + console.log($(obj).data("subsysobj")); pageAct.sysMainTag = $(obj).data("subsysobj")?.main_system_tag || pageAct.sysSubObj.main_system_tag; @@ -2035,28 +2037,28 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li if (!res || res.code != "0000" || !res.data) { } else { let strHtml = `
- -
首頁 -
- -
`; + +
首頁 +
+ + `; $.each(res.data, function (i, v) { if (v.authCode == "PF1") { strHtml += `
- -
${v.subName} -
-
- -
- `; +
+ `; hasMonitor = true; } else { @@ -2077,11 +2079,11 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li ? "fa-user" : ""; strHtml += `
- -
${v.subName} -
-
`; + +
${v.subName} +
+ `; } }); @@ -2236,9 +2238,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li { page: page, tabname: "systemMonitor", - "building-tag": buildingTagOnJquery( - pageAct.buiTag - ), + "building-tag": buildingTagOnJquery(pageAct.buiTag), }, "topFunBtn" ); @@ -2328,16 +2328,25 @@ 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.filter(({ alarmClass }) => alarmClass!== "defaultAlarmClass"); + let datas = bajaDatas.data.filter( + ({ alarmClass }) => alarmClass !== "defaultAlarmClass" + ); let titleHtml = `異常通知`; let notices = []; // 遍歷每個告警資料 $.each(datas ?? [], (idx, data) => { if (noticeOptArr.findIndex((x) => x.id == data.uuid) == -1) { // 針對該告警對象的設備,從 allDevices 找出設備名稱 - datas[idx].full_name = allDevices.filter( - (x) => x.device_number == data.devicePath - )[0]?.full_name; + const building_name = pageAct.buildList.find( + ({ building_tag }) => + building_tag === data.devicePath.split("_")[1] + )?.full_name; + + datas[idx].full_name = + allDevices.filter((x) => x.device_number == data.devicePath)[0] + ?.full_name || (data.alarmClass === "Sys_Con_AlarmClass" + ? `${building_name}_電錶邊緣控制器_${data.split("_")[7]}` + : ""); let div1 = creDiv(["col-12"]); let button = creBtn(