修改更改ack状态

This commit is contained in:
dev02 2023-01-12 18:04:20 +08:00
parent b0e9ba73f0
commit dc9c313e1c
4 changed files with 15 additions and 6 deletions

View File

@ -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 `<td><a href="#" onclick="return false" class="btn btn-${btnCol}">${confirm}</a></td>`
return data == "1" ? `<td><button onclick="chgAck('${row.uuid}')" class="btn btn-${btnCol}">${confirm}</button></td>` : `<td><button class="btn btn-${btnCol}">${confirm}</button></td>`;
}
},
{
@ -848,4 +848,11 @@
}
}, null, "POST").send();
}
function chgAck(devUuid) {
$.post(window.location.origin + '/obix/alarm/' + devUuid + '/ack', '<obj is="obix:AckAlarmIn"><str name="ackUser" val="obix" /></obj>', function () {
}, "text");
getData();
}
</script>

View File

@ -269,7 +269,7 @@
new Date(start).getTime(),
new Date(end).getTime(),
pageAct.deviceName,
"Mitsubishi_Sup",
"Mitsubishi_JACE8000",
callBackFromHistory);
}

View File

@ -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
{

View File

@ -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; }
}
}