From 26cec1a13628646bf650a279d33c3e57c9a6a9a2 Mon Sep 17 00:00:00 2001 From: Celeste6666 Date: Mon, 30 Jan 2023 14:12:23 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Frontend][alert]=E5=B7=B2=E7=A2=BA?= =?UTF-8?q?=E8=AA=8D=E6=8C=89=E9=88=95=E4=BF=AE=E6=AD=A3=E7=82=BA=E9=A1=AF?= =?UTF-8?q?=E7=A4=BAacked=E6=99=82=E9=96=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Backend/wwwroot/forgeDemo.html | 5 ++++- Frontend/_alert.html | 20 +++++++++++--------- Frontend/index.html | 2 +- Frontend/js/n4js/alarmbaja.js | 15 +++++++++------ 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/Backend/wwwroot/forgeDemo.html b/Backend/wwwroot/forgeDemo.html index 52c3bd5..ff65298 100644 --- a/Backend/wwwroot/forgeDemo.html +++ b/Backend/wwwroot/forgeDemo.html @@ -249,7 +249,10 @@ /*launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMTEwLm53ZA==');*/ /*更新B1F + B2F鐵捲門替換空調風機為三菱指定型號*/ - launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMTE2Lm53ZA") + /* launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMTE2Lm53ZA")*/ + + /*新增軌道燈軌道*/ + launchViewer("dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDJUU5JTlCJTk5JUU2JUE4JUExJUU1JUJDJThGK01FUCVFNiU4QiU4NiVFNyVCMyVCQiVFNyVCNSVCMV8wMTE5Lm53ZA") //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlFX2ZvcmdlX3Rlc3QvJUUzJFTgwJTkwQVJDJUUzJTgwJTkxXzIwMjJfMTJfMTMubndk');//new ARC //launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dnNjb2RlX2ZvcmdlX3Rlc3QvJUUzJTgwJTkwTUVQJUUzJTgwJTkxXzIwMjJfMTJfMTMubndj');//new MEP diff --git a/Frontend/_alert.html b/Frontend/_alert.html index c5478e6..634378f 100644 --- a/Frontend/_alert.html +++ b/Frontend/_alert.html @@ -694,15 +694,17 @@ return data.split(':')[0]; } }, - { - "title": "Ack 確認", - "data": "ackState", - "render": function (data, type, row, meta) { - let confirm = data == "1" ? "未確認" : "確認"; - let btnCol = data == "1" ? "warning" : "info"; - return data == "1" ? `` : ``; - } - }, + { + "title": "Ack 確認", + "data": "ackState", + "render": function (data, type, row, meta) { + let confirm = data == "1" ? "未確認" : "確認"; + let btnCol = data == "1" ? "warning" : "info"; + return data == "1" ? `` : + `${new Date(row.ackedTime + ).toLocaleString('zh-tw')}` /*``*/; + } + }, { "title": "派工/維運單號", "data": "formId", diff --git a/Frontend/index.html b/Frontend/index.html index d55696e..95db2ec 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -801,7 +801,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li /*"lib/jquery-validation/dist/additional-methods.min",*/ /* 會影響 messages_zh_TW 文字呈現 */ "lib/jquery-validation/dist/localization/messages_zh_TW", "lib/jquery-ui/jquery-ui.min", - "lib/chart.js_4.1.2/chart.umd", + "lib/chart.js/chart.min", "lib/dropzone/dropzone-min", "lib/jstree-master/jstree.min", "lib/notifications/sweetalert2/sweetalert2.bundle", diff --git a/Frontend/js/n4js/alarmbaja.js b/Frontend/js/n4js/alarmbaja.js index e816462..8bbccf1 100644 --- a/Frontend/js/n4js/alarmbaja.js +++ b/Frontend/js/n4js/alarmbaja.js @@ -95,7 +95,7 @@ function getAlarmByBaja(startDate_millisecond, endDate_millisecond, isRecover, i var _ackState = isAck ? "= 'acked'" : "= 'unacked'"; console.log("local:|foxs:|alarm:|bql:select timestamp, ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where alarmClass = '" + alarmClass + "' and timestamp.millis > " + startDate_millisecond + " and timestamp.millis < " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp asc") require(['baja!'], function (baja) { - baja.Ord.make("local:|foxs:|alarm:|bql:select timestamp, ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where alarmClass = '" + alarmClass + "' and timestamp.millis > " + startDate_millisecond + " and timestamp.millis < " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp asc").get() + baja.Ord.make("local:|foxs:|alarm:|bql:select timestamp, ackTime, ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where alarmClass = '" + alarmClass + "' and timestamp.millis > " + startDate_millisecond + " and timestamp.millis < " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp asc").get() .then(function (table) { return table.cursor({ each: function (record) { @@ -104,9 +104,11 @@ function getAlarmByBaja(startDate_millisecond, endDate_millisecond, isRecover, i _sourceName = _sourceTmp[7] + "-" + _sourceTmp[8]; if (_index == 0) - _ss += '{"buildingFloorName_zh":"' + _bfName + '", "uuid":"' + record.get('uuid') + '", "timestamp":"' + record.get('timestamp') + '", "alarmClass":"' + record.get('alarmClass') + '", "sourceName_zh":"' + _sourceName + '", "msgText":"' + record.get('alarmData').get('msgText') + '", "ackState":"' + record.get('ackState') + '", "normalTime":"' + record.get('normalTime') + '"}'; + _ss += '{"buildingFloorName_zh":"' + _bfName + '", "uuid":"' + record.get('uuid') + '", "timestamp":"' + record.get('timestamp') + '", "alarmClass":"' + record.get('alarmClass') + '", "sourceName_zh":"' + _sourceName + '", "msgText":"' + record.get('alarmData').get('msgText') + '", "ackState":"' + record.get('ackState') + '", "normalTime":"' + record.get('normalTime') + '","ackedTime":"' + record.get('ackTime').$cEncStr + + '"}'; else - _ss += ',{"buildingFloorName_zh":"' + _bfName + '", "uuid":"' + record.get('uuid') + '", "timestamp":"' + record.get('timestamp') + '", "alarmClass":"' + record.get('alarmClass') + '", "sourceName_zh":"' + _sourceName + '", "msgText":"' + record.get('alarmData').get('msgText') + '", "ackState":"' + record.get('ackState') + '", "normalTime":"' + record.get('normalTime') + '"}'; + _ss += '{"buildingFloorName_zh":"' + _bfName + '", "uuid":"' + record.get('uuid') + '", "timestamp":"' + record.get('timestamp') + '", "alarmClass":"' + record.get('alarmClass') + '", "sourceName_zh":"' + _sourceName + '", "msgText":"' + record.get('alarmData').get('msgText') + '", "ackState":"' + record.get('ackState') + '", "normalTime":"' + record.get('normalTime') + '","ackedTime":"' + record.get('ackTime').$cEncStr + + '"}'; _index++; }, after: function () { @@ -574,9 +576,9 @@ function getAllDeviceAlarmByBaja(startDate_millisecond, endDate_millisecond, isR if (startDate_millisecond) { startUrl = "timestamp.millis >= " + startDate_millisecond + " and "; } - console.log("local:|foxs:|alarm:|bql:select timestamp, priority ,ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where " + startUrl + "timestamp.millis <= " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp desc"); + console.log("local:|foxs:|alarm:|bql:select timestamp, ackTime, priority ,ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where " + startUrl + "timestamp.millis <= " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp desc"); - baja.Ord.make("local:|foxs:|alarm:|bql:select timestamp, priority ,ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where " + startUrl + "timestamp.millis <= " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp desc").get() + baja.Ord.make("local:|foxs:|alarm:|bql:select timestamp, ackTime, priority ,ackState, alarmClass, alarmClassDisplayName, alarmValue, alarmData, alarmData.sourceName, uuid, alarmData.msgText, alarmData.numericValue, alarmData.presentValue, alarmData.status, alarmData.toState, normalTime from openAlarms where " + startUrl + "timestamp.millis <= " + endDate_millisecond + " and normalTime " + _recoverState + " and ackState " + _ackState + " order by timestamp desc").get() .then(function (table) { return table.cursor({ each: function (record) { @@ -597,7 +599,8 @@ function getAllDeviceAlarmByBaja(startDate_millisecond, endDate_millisecond, isR main.devicePath = _sourceTmp.slice(0, 8).join("_");; main.msgText = record.get('alarmData').get('msgText'); main.normalTime = record.get('normalTime'); - main.priority = record.get('priority'); + main.priority = record.get('priority'); + main.ackedTime = record.get('ackTime').$cEncStr; _result.data.push(main); _index++; }, From 655413ceb8a8bcf82c15a29170f8cf4e3c52c15d Mon Sep 17 00:00:00 2001 From: Celeste6666 Date: Mon, 30 Jan 2023 14:19:29 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[Frontend][accountManage]=E9=9A=B1=E8=97=8F?= =?UTF-8?q?=E5=B8=B3=E8=99=9F=E7=AE=A1=E7=90=86=E5=88=AA=E9=99=A4=E6=8C=89?= =?UTF-8?q?=E9=88=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_accountManagement.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frontend/_accountManagement.html b/Frontend/_accountManagement.html index f568305..43a9b62 100644 --- a/Frontend/_accountManagement.html +++ b/Frontend/_accountManagement.html @@ -322,7 +322,7 @@ let btnDiv = creDiv(["row", "m-0", "justify-content-center"], { "style": "gap:10px" }); btnDiv.append(creBtnHtml("修改", "accManEdiBtn" + data, null, ["btn", "btn-info"], { "toggle": "modal", "target": "#accManModal" })); btnDiv.append(creBtnHtml("設備權限", "accManSysRolEdiBtn" + data, null, ["btn", "btn-info"], { "toggle": "modal", "target": "#accManSysModal", "fullname": row.full_name })); - btnDiv.append(creBtnHtml("刪除", "accManDelBtn" + data, null, ["btn", "btn-danger"], { "toggle": "modal", "target": "#delModal" })); + /*btnDiv.append(creBtnHtml("刪除", "accManDelBtn" + data, null, ["btn", "btn-danger"], { "toggle": "modal", "target": "#delModal" }));*/ return btnDiv.outerHtml(); } },