[Frontend] 修改系統監控告警 ack 狀態 | 運維保養刪除異常編號欄位 | 告警新增維修單時自動抓取該設備
This commit is contained in:
parent
bca579903b
commit
a18152e23a
3027
Frontend/_alert.html
3027
Frontend/_alert.html
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1629,7 +1629,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
title: "發生/完成時間",
|
||||
data: "finishTime",
|
||||
render: function (data, type, row) {
|
||||
return row.createdAt + "<br>" + data;
|
||||
return row.createdAt + "<br>" + (data.includes("0001")? "未完工": data);
|
||||
},
|
||||
},
|
||||
];
|
||||
@ -1758,7 +1758,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
|
||||
// Card - 異常紀錄 Table
|
||||
function callbackForErr(result) {
|
||||
// console.log("@@@",result)
|
||||
if (errRecTable) {
|
||||
errRecTable.destroy();
|
||||
}
|
||||
@ -1787,8 +1786,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
data: "ackState",
|
||||
},
|
||||
{
|
||||
title: "發生/完成時間",
|
||||
data: "normalTime",
|
||||
title: "發生時間",
|
||||
data: "timestamp",
|
||||
// "render": function (data, type, row) {
|
||||
// return row.timestamp + "<br>" + data;
|
||||
// },
|
||||
|
@ -212,7 +212,7 @@ function getOneDeviceAlarmTop10ByBaja(devicePath, callback) {
|
||||
//{ "count":2,"data": [{ "time": "2022/11/14 15:00:00", "errId": "0001", "ackCheck": "未確認", "errReason": "燈泡故障" }, { "time": "2022/11/14 15:00:00", "errId": "0002", "ackCheck": "未確認", "errReason": "燈泡故障" }]}
|
||||
require(["baja!"], function (baja) {
|
||||
baja.Ord.make(
|
||||
"local:|foxs:|alarm:|bql:select top 10 timestamp, ackState, alarmData, alarmData.sourceName, sourceState, uuid, alarmData.msgText, normalTime where alarmData.sourceName like '%" +
|
||||
"local:|foxs:|alarm:|bql:select top 10 timestamp, ackState, ackTime, alarmData, alarmData.sourceName, sourceState, uuid, alarmData.msgText, normalTime where alarmData.sourceName like '%" +
|
||||
devicePath +
|
||||
"%' order by timestamp desc"
|
||||
)
|
||||
@ -237,8 +237,8 @@ function getOneDeviceAlarmTop10ByBaja(devicePath, callback) {
|
||||
// _occurrenceTime += _timestampTemp.getFullYear().toString() + "-" + addzero(_timestampTemp.getMonth() + 1).toString() + "-" + addzero(_timestampTemp.getDate()).toString() + " " + addzero(_timestampTemp.getHours()).toString() + ":" + addzero(_timestampTemp.getMinutes()).toString() + ":" + addzero(_timestampTemp.getSeconds()).toString();
|
||||
|
||||
//var _occurrenceTime = _timestamp.format("yyyy-MM-dd hh:mm:ss");//.toLocaleString();
|
||||
var _normalTime = new Date(
|
||||
record.get("normalTime").$cEncStr
|
||||
var _ackTime = new Date(
|
||||
record.get("ackTime").$cEncStr
|
||||
).toLocaleString("zh-tw", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
@ -248,9 +248,19 @@ function getOneDeviceAlarmTop10ByBaja(devicePath, callback) {
|
||||
});
|
||||
// _normalTime += _normaltime.getFullYear().toString() + "-" + addzero(_normaltime.getMonth() + 1).toString() + "-" + addzero(_normaltime.getDate()).toString() + " " + addzero(_normaltime.getHours()).toString() + ":" + addzero(_normaltime.getMinutes()).toString() + ":" + addzero(_normaltime.getSeconds()).toString();
|
||||
|
||||
var _normalTime = new Date(
|
||||
record.get("normalTime").$cEncStr
|
||||
).toLocaleString("zh-tw", {
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
});
|
||||
|
||||
var _msgText = record.get("alarmData").get("msgText"); // == 1 ? _occurrenceTime : "未確認";
|
||||
var _ackText =
|
||||
record.get("ackState") == 1 ? _occurrenceTime : "未確認";
|
||||
record.get("ackState") == 0 ? _ackTime : "未確認";
|
||||
_ss.push({
|
||||
uuid: _resultUuid[0],
|
||||
msgText: _msgText,
|
||||
|
Loading…
Reference in New Issue
Block a user