@@ -349,8 +349,11 @@
var Verifybool = false; //-驗證成功
var CloseVerify = false;
var ToVerifyType = 0;
-
+
$(function () {
+ $("#emergency-item-form").submit((e) => {
+ e.preventDefault();
+ })
//#region 定時取得報警設備(3s)
interval_id = setInterval(function () {
@@ -409,7 +412,7 @@
emergencyContactTable = $("#membertable").DataTable({
"columns": [
{
- "data": "full_name"
+ "data": "name"
},
{
"data": "departmentName"
@@ -453,7 +456,7 @@
SmsMemberTable = $("#smsMemberTable").DataTable({
"columns": [
{
- "data": "full_name"
+ "data": "name"
},
{
"data": "departmentName"
@@ -869,6 +872,7 @@
is_need_reload = true;
ChangeFilterBuilding();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -889,6 +893,7 @@
is_need_reload = true;
ChangeFilterBuilding();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -956,6 +961,7 @@
is_need_reload = true;
ChangeFilterFloor();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -968,7 +974,7 @@
disaster.groupBuildings.forEach(function (building, building_index) {
if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
building.groupFloors.forEach(function (floor, floor_index) {
- if (temp_all_floor.findIndex(x => x.guid == floor.guid) < 0) { //表示未加入,需加入
+ if (temp_all_floor.findIndex(x => x.name == floor.name) < 0) { //表示未加入,需加入
temp_all_floor.push(floor);
}
});
@@ -981,7 +987,7 @@
$("#floors").append(`
`);
var html = "";
temp_all_floor.forEach(function (floor, floor_index) {
- html += '
';
+ html += '
';
});
$('#floors').append(html);
@@ -1001,32 +1007,34 @@
$('#floors').find('.btn-outline-success').removeClass('btn-outline-success').addClass('btn-success');
SelectedFilter.floor_guids = [];
temp_all_floor.forEach(function (floor, floor_index) {
- SelectedFilter.floor_guids.push(floor.guid);
+ SelectedFilter.floor_guids.push(floor.name);
});
}
is_need_reload = true;
ChangeFilterLayer2();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
//#region 選擇樓層
- function SelectFloor(floor_guid, e) {
+ function SelectFloor(floor_tag, e) {
select_all_floor = false;
- var floor_index = SelectedFilter.floor_guids.findIndex(x => x == floor_guid);
+ var floor_index = SelectedFilter.floor_guids.findIndex(x => x == floor_tag);
if (floor_index > -1) { //已選擇 -> 未選擇
SelectedFilter.floor_guids.splice(floor_index, 1);
$(e).removeClass('btn-success').addClass('btn-outline-success');
}
else { //未選擇 -> 已選擇
- SelectedFilter.floor_guids.push(floor_guid);
+ SelectedFilter.floor_guids.push(floor_tag);
$(e).removeClass('btn-outline-success').addClass('btn-success');
}
is_need_reload = true;
ChangeFilterLayer2();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -1039,7 +1047,7 @@
disaster.groupBuildings.forEach(function (building, building_index) {
if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
building.groupFloors.forEach(function (floor, floor_index) {
- if (SelectedFilter.floor_guids.findIndex(x => x == floor.guid) > -1) { //抓取選擇樓層的底下大類
+ if (SelectedFilter.floor_guids.findIndex(x => x == floor.name) > -1) { //抓取選擇樓層的底下大類
floor.groupLayer2s.forEach(function (layer2, layer2_index) {
if (temp_all_layer2.findIndex(x => x.value == layer2.value) < 0) {
temp_all_layer2.push(layer2);
@@ -1098,6 +1106,7 @@
is_need_reload = true;
ChangeFilterLayer3();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -1118,6 +1127,7 @@
is_need_reload = true;
ChangeFilterLayer3();
+ UpdateDeviceAmount();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -1130,7 +1140,7 @@
disaster.groupBuildings.forEach(function (building, building_index) {
if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
building.groupFloors.forEach(function (floor, floor_index) {
- if (SelectedFilter.floor_guids.findIndex(x => x == floor.guid) > -1) { //抓取選擇樓層的底下大類
+ if (SelectedFilter.floor_guids.findIndex(x => x == floor.name) > -1) { //抓取選擇樓層的底下大類
floor.groupLayer2s.forEach(function (layer2, layer2_index) {
if (SelectedFilter.layer2.findIndex(x => x == layer2.value) > -1) { //抓取選擇大類的底下小類
layer2.groupLayer3s.forEach(function (layer3, layer3_index) {
@@ -1203,6 +1213,7 @@
is_need_reload = true;
ResetDeviceTable();
+ UpdateDeviceAmount();
}
//#endregion
@@ -1222,6 +1233,7 @@
is_need_reload = true;
ResetDeviceTable();
+ UpdateDeviceAmount();
}
//#endregion
@@ -1601,9 +1613,9 @@
var includeli = "";
$.each(rel.data, function (index, val) {
if (index == 0) {
- includeli += '
' + val.full_name + '';
+ includeli += '
' + val.name + '';
} else {
- includeli += '
' + val.full_name + '';
+ includeli += '
' + val.name + '';
}
});
@@ -1666,7 +1678,7 @@
}
$('#hbr_' + setting).empty();
- $('#hbr_' + setting).append('
' + rel.data.full_name + '
');
+ $('#hbr_' + setting).append('
' + rel.data.name + '
');
$('#tag_' + setting).empty();
$('#tag_' + setting).append(rel.data.set_doing);
@@ -1751,7 +1763,6 @@
}
function PassVerify(Vbool) {
- console.log(SmsMemberTable.data().toArray())
if (ToVerifyType == 0) {
if (Vbool) {
var url = "api/EmergencyDevice/CheckVerifybool";
@@ -1788,9 +1799,6 @@
$('#list_' + EmerLastsetting).find('.active').children().trigger('click');
$('#emergency-verify-modal').modal('hide');
}
-
-
-
}
}
if (ToVerifyType == 1) {
diff --git a/FrontendWebApi/Views/Login/Index.cshtml b/FrontendWebApi/Views/Login/Index.cshtml
index 5d90c0c..994097b 100644
--- a/FrontendWebApi/Views/Login/Index.cshtml
+++ b/FrontendWebApi/Views/Login/Index.cshtml
@@ -78,7 +78,7 @@
async: false,
dataType: 'json',
success: function (rel) {
- window.location = "/Home/Index/";
+ window.location = "/EmergencyDeviceMenu";
},
error: function (xhr, textStatus, thrownError) {
alert(textStatus);