Merge branch 'master' of https://gitea.mjm-staging.developers-homelab.net/BIMS/BIMS
This commit is contained in:
commit
12208825d9
@ -132,18 +132,15 @@ namespace FrontendWebApi.ApiControllers
|
||||
if (selectdevice.select_disasters == null || selectdevice.select_disasters.Count == 0)
|
||||
selectdevice.select_disasters = new List<int>();
|
||||
|
||||
var sqlString = $@"SELECT system_key as 'Name', system_value as 'Value' FROM variable where system_type = 'website_config' AND deleted = 0";
|
||||
List<KeyValue> webSiteConfig = await backendRepository.GetAllAsync<KeyValue>(sqlString);
|
||||
|
||||
deviceQue += $" AND d.device_building_tag in @building_tag ";
|
||||
disasQue = " where dd.device_system_value IN @disasters ";
|
||||
sqlString = @$"select
|
||||
var sqlString = @$"select
|
||||
d.device_guid,
|
||||
d.device_number,
|
||||
d.full_name AS device_name,
|
||||
d.device_building_tag AS building_tag,
|
||||
b.full_name AS building_name,
|
||||
CONCAT(@niagara_http, '://',b.ip_address , ':', b.ip_port,'/file/',@niagaraRootName) AS ip_address,
|
||||
CONCAT(b.ip_http, '://',b.ip_address , ':', b.ip_port,'/file/',b.niagara_root_name) AS ip_address,
|
||||
v.layer2,
|
||||
v.layer2_name,
|
||||
v.system_value AS layer3,
|
||||
@ -181,9 +178,7 @@ namespace FrontendWebApi.ApiControllers
|
||||
disasters = selectdevice.select_disasters,
|
||||
building_tag = selectdevice.selectbuilding,
|
||||
floor = selectdevice.select_Floors,
|
||||
layer3 = selectdevice.select_Layer3,
|
||||
niagaraRootName = webSiteConfig.FirstOrDefault(w => w.Name == "frontend_niagara_root_name")?.Value,
|
||||
niagara_http = webSiteConfig.FirstOrDefault(w => w.Name == "frontend_http")?.Value,
|
||||
layer3 = selectdevice.select_Layer3
|
||||
});
|
||||
|
||||
apiResult.Code = "0000";
|
||||
|
@ -53,6 +53,12 @@
|
||||
<div class="frame-wrap">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div id="getNiagaraLoading" class="row m-0 align-items-center" style="opacity:0">
|
||||
<div class="spinner-border text-info mx-2" role="status" style="width: 1.2rem; height: 1.2rem;">
|
||||
<span class="sr-only">Loading...</span>
|
||||
</div>
|
||||
<span id="getNiagaraLoadingText">正在取得即時異常設備</span>
|
||||
</div>
|
||||
<table class="table table-bordered table-hover m-0 text-center" id="alarm-device-table">
|
||||
<thead class="thead-themed">
|
||||
<tr>
|
||||
@ -365,7 +371,6 @@
|
||||
if (!enable_alarm_timer) {
|
||||
return;
|
||||
}
|
||||
|
||||
GetAlarmFromObix((data) => {
|
||||
var is_diff = false;
|
||||
if (Object.keys(temp_alarm_device).length == Object.keys(data.alarmorion).length) {
|
||||
@ -395,6 +400,7 @@
|
||||
//data.buildingAlarmDeviceAmount.forEach(function (item) {
|
||||
// $(`#${item.building_tag}_device_amount`).html(item.device_amount);
|
||||
//});
|
||||
setNiagaraLoading(true);
|
||||
ResetDeviceTable();
|
||||
}
|
||||
})
|
||||
@ -729,7 +735,7 @@
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
setNiagaraLoading(false);
|
||||
|
||||
return data;
|
||||
}
|
||||
@ -851,6 +857,15 @@
|
||||
});
|
||||
//#endregion
|
||||
|
||||
function setNiagaraLoading(isShow = true,text = "更新列表中") {
|
||||
if(isShow) {
|
||||
$("#getNiagaraLoadingText").text(text);
|
||||
$("#getNiagaraLoading").animate({opacity:1},500);
|
||||
} else {
|
||||
$("#getNiagaraLoading").animate({opacity:0},500);
|
||||
}
|
||||
}
|
||||
|
||||
function GetAlarmFromObix(callback = null){
|
||||
let url = "/api/Alarm/GetAlarmFromObix"
|
||||
$.ajax({
|
||||
|
@ -577,7 +577,7 @@
|
||||
`;*@
|
||||
|
||||
var html = `
|
||||
<a href="http://${row.ip_address}/file/BajascriptTest/_FloorMap.html?building_tag=${row.building_tag}&floor_guid=${row.floorguid}&layer3=${row.layer3}&device_number=${data}&show_cctv=1&jwt=${localStorage.getItem('JWT-Authorization')}" target="_blank">
|
||||
<a href="${row.ip_address}/_FloorMap.html?building_tag=${row.building_tag}&main_system_tag=${row.layer2}&floor_guid=${row.floorguid}&sub_system_tag=${row.layer3}&device_number=${data}&show_cctv=1&isFromEmergency=1&jwt=${localStorage.getItem('JWT-Authorization')}" target="_blank">
|
||||
${data}
|
||||
</a>
|
||||
`;
|
||||
|
Loading…
Reference in New Issue
Block a user