From dc9c313e1cf11ebbf6a616fb4cfdfc316e84294b Mon Sep 17 00:00:00 2001 From: dev02 Date: Thu, 12 Jan 2023 18:04:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=94=B9ack?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_alert.html | 17 ++++++++++++----- Frontend/_historyData.html | 2 +- .../ApiControllers/DashboardController.cs | 1 + FrontendWebApi/Models/AlarmRecord.cs | 1 + 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/Frontend/_alert.html b/Frontend/_alert.html index f8b1c95..47b2381 100644 --- a/Frontend/_alert.html +++ b/Frontend/_alert.html @@ -230,11 +230,11 @@ if (!pageAct.selAllSysSub) { console.log(this); pageAct.selAllSysSub = true; - + $.each($('input[type=checkbox][data-type=sub]:checked'), function (i, v) { $(v).click(); }); - + if (pageAct.SysType == "all") { if (!$(this).is(':checked')) { $(this).prop('checked', true); @@ -509,7 +509,7 @@ // 全部類別 // `; //} - + //$.each(res.data.history_Main_Systems, function (i, v) { // if (pageAct.mainStatus) { // mainStrHtml += `
@@ -698,10 +698,10 @@ { "title": "Ack 確認", "data": "ackState", - "render": function (data) { + "render": function (data, type, row, meta) { let confirm = data == "1" ? "未確認" : "確認"; let btnCol = data == "1" ? "warning" : "info"; - return `${confirm}` + return data == "1" ? `` : ``; } }, { @@ -848,4 +848,11 @@ } }, null, "POST").send(); } + + function chgAck(devUuid) { + $.post(window.location.origin + '/obix/alarm/' + devUuid + '/ack', '', function () { + + }, "text"); + getData(); + } \ No newline at end of file diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index 599ffc4..018dd57 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -269,7 +269,7 @@ new Date(start).getTime(), new Date(end).getTime(), pageAct.deviceName, - "Mitsubishi_Sup", + "Mitsubishi_JACE8000", callBackFromHistory); } diff --git a/FrontendWebApi/ApiControllers/DashboardController.cs b/FrontendWebApi/ApiControllers/DashboardController.cs index 5e6d4ff..5baa9f4 100644 --- a/FrontendWebApi/ApiControllers/DashboardController.cs +++ b/FrontendWebApi/ApiControllers/DashboardController.cs @@ -11,6 +11,7 @@ using System.Collections.Generic; using System.Data.SqlTypes; using System.IO; using System.Threading.Tasks; +using System.Text; namespace FrontendWebApi.ApiControllers { diff --git a/FrontendWebApi/Models/AlarmRecord.cs b/FrontendWebApi/Models/AlarmRecord.cs index 9a71033..b00e0f5 100644 --- a/FrontendWebApi/Models/AlarmRecord.cs +++ b/FrontendWebApi/Models/AlarmRecord.cs @@ -66,5 +66,6 @@ namespace FrontendWebApi.Models public string alarmClass_txt { get; set; } public string device_name { get; set; } public string errMsg { get; set; } + public string uuid { get; set; } } }