-
-
- 設備編號 |
- B01-B2-19F-CR-001 |
- 3D 座標 |
- 113 |
-
-
- 設備名稱 |
- A區迴路001 |
- forge dbid |
- 101 |
-
-
- 廠牌 |
- 飛利浦 Philip |
- IP |
- 192.168.1.105 |
-
-
- 型號 |
- BH065 |
- |
- |
-
-
- 原廠文件 |
- 2022使用手冊.pdf |
- |
- |
-
-
- 型號 |
- BH065 |
- |
- |
-
-
+ let strHtml = ``
return strHtml;
}
@@ -236,9 +185,11 @@
`,
group:"device",
onShow: function (tooltipEle, oriEle) {
- console.log($(oriEle).data("number"))
+ console.log( "ori: " + $(oriEle).data("number"))
var tab = new YT.Tab({ tabName: "cardTab" })
loadOpeRecTable();
+ //loadErrRecTable2($(oriEle).data("number"));
+ loadErrRecTable();
}
})
@@ -281,6 +232,87 @@
opeRecTable = new YourTeam.JqDataTables.getTableByAjax(url, tag, null, columns, column_defs, callback, null, null, null, null, null, "tpi");
}
+
+ function loadErrRecTable() {
+ let tag = "#errRecTable";
+ let datas;
+ //getOneDeviceAlarmTop10ByBaja(_devicePath, callback);
+
+ let column_defs = [
+ { "targets": [0], "width": "8%", "sortable": true },
+ { "targets": [1], "width": "8%", "sortable": true },
+ { "targets": [2], "width": "7%", "sortable": true },
+ { "targets": [3], "width": "7%", "sortable": true },
+ ];
+
+ let columns = [
+ {
+ "title": "異常ID",
+ "data": "uuid",
+ },
+ {
+ "title": "異常原因",
+ "data": "msgText",
+ },
+ {
+ "title": "ACK確認",
+ "data": "ackState",
+ },
+ {
+ "title": "發生/賦歸時間",
+ "data": "timestamp",
+ },
+
+ ];
+
+ //let callback = function (result) {
+ // datas = result;
+ //}
+ let result = '{"count": 2,"data":[{ "uuid": "43dc7846-bd96-4be2-ab35-f11aec729c60","msgText": "","ackState": "1","timestamp": "2022-Nov-16 10:30:24.951 AM UTC+08:00"},{"uuid": "7c309846-d862-4a8b-803b-cdc8e0efa092","msgText": "","ackState": "1","timestamp": "2022-Nov-16 10:00:24.893 AM UTC+08:00"}]}';
+ let json_object = JSON.parse(result);
+ datas = json_object['data'];
+ errRecTable = new YourTeam.JqDataTables.getTableByStatic(tag, datas, columns, column_defs);
+ }
+
+ //function loadErrRecTable2(allPath) {
+ // if (allPath != undefined && allPath != null) {
+ // let _pathArr = allPath.split("_");//TPE_B1_ELEV_EL_R2F_NA_ELEV1_N1
+ // let _devicePath = _pathArr[0] + "_" + _pathArr[1] + "_" + _pathArr[2] + "_" + _pathArr[3] + "_" + _pathArr[4] + "_" + _pathArr[5];
+ // //getOneDeviceAlarmTop10ByBaja(_devicePath, callback);
+ // console.log("devicePath: " + _devicePath);
+ // let result = '{"count": 2,"0": { "uuid": "43dc7846-bd96-4be2-ab35-f11aec729c60","timestamp": "2022-Nov-16 10:30:24.951 AM UTC+08:00","sourceName": "TPE_B1_ELEV_EL_R2F_NA_ELEV1_N1_TRIP","sourceState": "1","msgText": "","ackState": "1","normalTime": "1970-Jan-1 08:00:00.000 AM UTC+08:00"},"1": {"uuid": "7c309846-d862-4a8b-803b-cdc8e0efa092","timestamp": "2022-Nov-16 10:00:24.893 AM UTC+08:00","sourceName": "TPE_B1_ELEV_EL_R2F_NA_ELEV1_N1_TRIP","sourceState": "0","msgText": "","ackState": "1","normalTime": "2022-Nov-16 10:15:24.939 AM UTC+08:00"}}';
+ // let result_Json = JSON.parse(result)
+ // var eachTable = $('.each-table tbody');
+
+ // for (var i = 0; i < result_Json['count']; i++)
+ // {
+ // item = result_Json[i.toString()];
+ // eachTable.append(
+ // '' +
+ // '' + item.uuid + ' | ' +
+ // '' + item.msgText + ' | ' +
+ // '' + (item.ackState = 1 ? item.normalTime : '未確認') + ' | ' +
+ // '' + item.timestamp + ' | ' +
+ // '
');
+ // }
+
+ // }
+
+ // let callback = function (result) {
+ // var eachTable = $('.each-table tbody');
+ // $.each(result, function (index, element) {
+ // eachTable.append(
+ // '' +
+ // '' + element[index].uuid + ' | ' +
+ // '' + element[index].msgText + ' | ' +
+ // '' + (element[index].ackState = 1 ? element[index].normalTime : '未確認') + ' | ' +
+ // '' + element[index].timestamp + ' | ' +
+ // '
');
+ // });
+ // }
+ //}
}
+
+
\ No newline at end of file
diff --git a/Frontend/index.html b/Frontend/index.html
index ade6287..40bf6c9 100644
--- a/Frontend/index.html
+++ b/Frontend/index.html
@@ -1116,10 +1116,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
@@ -2064,11 +2064,12 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
-
+