[後台][緊急應變] 硬體清單選單增加 | 增加硬體清單權限 | 硬體清單前端程序及介面調整 | 事件清單前端程序及介面調整 | 左邊選單順序程序調整
This commit is contained in:
parent
56e18cc5a1
commit
f1f366aae8
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 105 KiB |
@ -0,0 +1,24 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace FrontendWebApi.Controllers
|
||||||
|
{
|
||||||
|
public class EmergencyHardwareMenuController : MyBaseController<EmergencyHardwareMenuController>
|
||||||
|
{
|
||||||
|
private readonly ILogger<EmergencyHardwareMenuController> _logger;
|
||||||
|
|
||||||
|
public EmergencyHardwareMenuController(ILogger<EmergencyHardwareMenuController> logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IActionResult Index()
|
||||||
|
{
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
@{
|
@{
|
||||||
ViewData["MainNum"] = "4";
|
ViewData["MainNum"] = "4";
|
||||||
ViewData["SubNum"] = "2";
|
ViewData["SubNum"] = "3";
|
||||||
ViewData["Title"] = "聯絡清單";
|
ViewData["Title"] = "聯絡清單";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,23 +15,28 @@
|
|||||||
<div class="col-xl-12">
|
<div class="col-xl-12">
|
||||||
<div id="panel-5" class="panel">
|
<div id="panel-5" class="panel">
|
||||||
<div class="panel-container show">
|
<div class="panel-container show">
|
||||||
<div class="panel-hdr">
|
@*<div class="panel-hdr">
|
||||||
<div class="col-auto">顯示類型</div>
|
<div class="col-auto">顯示類型</div>
|
||||||
<div class="col" id="show-mode">
|
<div class="col" id="show-mode">
|
||||||
<button type="button" class="btn btn-success" onclick="ChangeMode('alarm', this)">事件清單</button>
|
<button type="button" class="btn btn-success" onclick="ChangeMode('alarm', this)">事件清單</button>
|
||||||
<button type="button" class="btn btn-secondary" onclick="ChangeMode('normal', this)">緊急應變硬體清單</button>
|
<button type="button" class="btn btn-secondary" onclick="ChangeMode('normal', this)">緊急應變硬體清單</button>
|
||||||
<button type="button" class="btn btn-secondary float-right" onclick="OnSimulationExercise('', '',1)">模擬演練</button>
|
<button type="button" class="btn btn-secondary float-right" onclick="OnSimulationExercise('', '',1)">模擬演練</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>*@
|
||||||
<div class="panel-hdr">
|
<div class="panel-hdr">
|
||||||
<div class="col-auto">防災類別</div>
|
<div class="col-auto">防災類別</div>
|
||||||
<div class="col" id="disaster">防災類別</div>
|
<div class="col" id="disaster">防災類別
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-auto">
|
||||||
|
<button type="button" class="btn btn-secondary" onclick="OnSimulationExercise('', '',1)">模擬演練</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-hdr">
|
<div class="panel-hdr">
|
||||||
<div class="col-auto">棟別 </div>
|
<div class="col-auto">棟別 </div>
|
||||||
<div class="col" id="building">棟別</div>
|
<div class="col" id="building">棟別</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-hdr">
|
@*<div class="panel-hdr">
|
||||||
<div class="col-auto">樓層</div>
|
<div class="col-auto">樓層</div>
|
||||||
<div class="col" id="floors">棟別</div>
|
<div class="col" id="floors">棟別</div>
|
||||||
</div>
|
</div>
|
||||||
@ -42,7 +47,7 @@
|
|||||||
<div class="panel-hdr">
|
<div class="panel-hdr">
|
||||||
<div class="col-auto">設備小類</div>
|
<div class="col-auto">設備小類</div>
|
||||||
<div class="col" id="layer3">設備大類</div>
|
<div class="col" id="layer3">設備大類</div>
|
||||||
</div>
|
</div>*@
|
||||||
<div class="panel-container">
|
<div class="panel-container">
|
||||||
<div class="panel-content">
|
<div class="panel-content">
|
||||||
<div class="frame-wrap">
|
<div class="frame-wrap">
|
||||||
@ -322,7 +327,7 @@
|
|||||||
temp_alarm_device = []; //暫存所有的報警設備
|
temp_alarm_device = []; //暫存所有的報警設備
|
||||||
var backfill_building_device_amount = [], backfill_layer2_device_amount = [], backfill_layer3_device_amount = [];
|
var backfill_building_device_amount = [], backfill_layer2_device_amount = [], backfill_layer3_device_amount = [];
|
||||||
var backfill_building_alarm_device_amount = [], backfill_layer2_alarm_device_amount = [], backfill_layer3_alarm_device_amount = [];
|
var backfill_building_alarm_device_amount = [], backfill_layer2_alarm_device_amount = [], backfill_layer3_alarm_device_amount = [];
|
||||||
var select_all_disaster = false, select_all_floor = false,
|
var select_all_disaster = false, select_all_floor = false,select_all_building = false,
|
||||||
select_all_layer2 = false, select_all_layer3 = false;
|
select_all_layer2 = false, select_all_layer3 = false;
|
||||||
|
|
||||||
var changeBuilding = "";
|
var changeBuilding = "";
|
||||||
@ -340,7 +345,7 @@
|
|||||||
var SelectedFilter =
|
var SelectedFilter =
|
||||||
{
|
{
|
||||||
disasters: [],
|
disasters: [],
|
||||||
building_tag: '',
|
building_tag: [],
|
||||||
floor_guids: [],
|
floor_guids: [],
|
||||||
layer2: [],
|
layer2: [],
|
||||||
layer3: []
|
layer3: []
|
||||||
@ -925,11 +930,11 @@
|
|||||||
</div>`;*@
|
</div>`;*@
|
||||||
|
|
||||||
html += `<div class="btn-group ml-2" onclick="SelectBuilding('${building.tag}',this)">
|
html += `<div class="btn-group ml-2" onclick="SelectBuilding('${building.tag}',this)">
|
||||||
<button type="button" class="btn btn-secondary">${building.name}</button>
|
<button type="button" class="btn btn-secondary" data-tag="${building.tag}" >${building.name}</button>
|
||||||
<button type="button" class="btn btn-secondary building_device_amount" id="${building.tag}_device_amount">0</button>
|
<button type="button" class="btn btn-secondary building_device_amount" data-tag="${building.tag}" id="${building.tag}_device_amount">0</button>
|
||||||
</div>`;
|
</div>`;
|
||||||
});
|
});
|
||||||
|
$('#building').append(`<button type="button" class="btn btn-secondary waves-effect waves-themed d-inline-block ml-2" onclick="AllBuilding()"> 全選 </button>`);
|
||||||
$('#building').append(html);
|
$('#building').append(html);
|
||||||
|
|
||||||
$('#building').find('div').first().click();
|
$('#building').find('div').first().click();
|
||||||
@ -940,6 +945,7 @@
|
|||||||
html += '<button type="button" class="btn btn-secondary ml-2" onclick="SelectBuilding(\'' + building.tag + '\',this)">' + building.name + '</button>';
|
html += '<button type="button" class="btn btn-secondary ml-2" onclick="SelectBuilding(\'' + building.tag + '\',this)">' + building.name + '</button>';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#building').append(`<button type="button" class="btn btn-secondary waves-effect waves-themed d-inline-block ml-2" onclick="AllBuilding()"> 全選 </button>`);
|
||||||
$('#building').append(html);
|
$('#building').append(html);
|
||||||
|
|
||||||
$('#building').find('button').first().click();
|
$('#building').find('button').first().click();
|
||||||
@ -948,51 +954,71 @@
|
|||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
|
//#region 計算現有勾選棟別
|
||||||
|
function resetCalSelectBuilding(){
|
||||||
|
SelectedFilter.building_tag = [];
|
||||||
|
$('#building').find('button.btn-success').each((index,ele) => {
|
||||||
|
let ele_building_tag = $(ele).data("tag");
|
||||||
|
if(SelectedFilter.building_tag.indexOf(ele_building_tag) == -1){
|
||||||
|
SelectedFilter.building_tag.push(ele_building_tag);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(SelectedFilter.building_tag)
|
||||||
|
}
|
||||||
|
//#endregion
|
||||||
|
|
||||||
//#region 選擇棟別
|
//#region 選擇棟別
|
||||||
function SelectBuilding(building_tag, e) {
|
function SelectBuilding(building_tag, e) {
|
||||||
$('#building').find('button').removeClass('btn-success').addClass('btn-secondary')
|
//$('#building').find('button').removeClass('btn-success').addClass('btn-secondary')
|
||||||
|
|
||||||
|
|
||||||
SelectedFilter.building_tag = building_tag;
|
|
||||||
if (show_mode == 'alarm') {
|
if (show_mode == 'alarm') {
|
||||||
$(e).find('button').addClass('btn-success');
|
if($(e).find("button.btn-success").length > 0){
|
||||||
|
$(e).find('button').removeClass('btn-success').addClass('btn-secondary');
|
||||||
|
} else {
|
||||||
|
$(e).find('button').removeClass('btn-secondary').addClass('btn-success');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$(e).addClass('btn-success');
|
$(e).addClass('btn-success');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resetCalSelectBuilding();
|
||||||
|
|
||||||
is_need_reload = true;
|
is_need_reload = true;
|
||||||
ChangeFilterFloor();
|
ChangeFilterFloor();
|
||||||
UpdateDeviceAmount();
|
UpdateDeviceAmount();
|
||||||
|
ResetDeviceTable();
|
||||||
@*console.log("SelectedFilter", SelectedFilter);*@
|
@*console.log("SelectedFilter", SelectedFilter);*@
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
//#region 修改過濾條件(樓層)
|
//#region 修改過濾條件(樓層)
|
||||||
function ChangeFilterFloor() {
|
function ChangeFilterFloor() {
|
||||||
temp_all_floor = [];
|
//temp_all_floor = [];
|
||||||
all_device_group.forEach(function (disaster, disaster_index) {
|
//all_device_group.forEach(function (disaster, disaster_index) {
|
||||||
if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取已選擇的防災類型的棟別內容
|
// if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取已選擇的防災類型的棟別內容
|
||||||
disaster.groupBuildings.forEach(function (building, building_index) {
|
// disaster.groupBuildings.forEach(function (building, building_index) {
|
||||||
if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
|
// if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
|
||||||
building.groupFloors.forEach(function (floor, floor_index) {
|
// building.groupFloors.forEach(function (floor, floor_index) {
|
||||||
if (temp_all_floor.findIndex(x => x.name == floor.name) < 0) { //表示未加入,需加入
|
// if (temp_all_floor.findIndex(x => x.name == floor.name) < 0) { //表示未加入,需加入
|
||||||
temp_all_floor.push(floor);
|
// temp_all_floor.push(floor);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
$("#floors").empty();
|
//$("#floors").empty();
|
||||||
$("#floors").append(`<button type="button" class="btn btn-secondary ml-2 mb-2" onclick="AllFloor()">全選</button>`);
|
//$("#floors").append(`<button type="button" class="btn btn-secondary ml-2 mb-2" onclick="AllFloor()">全選</button>`);
|
||||||
var html = "";
|
//var html = "";
|
||||||
temp_all_floor.forEach(function (floor, floor_index) {
|
//temp_all_floor.forEach(function (floor, floor_index) {
|
||||||
html += '<button type="button" class="btn btn-outline-success ml-2 mb-2" onclick="SelectFloor(\'' + floor.name + '\',this)">' + floor.name + '</button>';
|
// html += '<button type="button" class="btn btn-outline-success ml-2 mb-2" onclick="SelectFloor(\'' + floor.name + '\',this)">' + floor.name + '</button>';
|
||||||
});
|
//});
|
||||||
$('#floors').append(html);
|
//$('#floors').append(html);
|
||||||
|
|
||||||
select_all_floor = false;
|
//select_all_floor = false;
|
||||||
$('#floors').find('button').first().click();
|
//$('#floors').find('button').first().click();
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@ -1041,51 +1067,68 @@
|
|||||||
|
|
||||||
//#region 修改過濾條件(大類)
|
//#region 修改過濾條件(大類)
|
||||||
function ChangeFilterLayer2() {
|
function ChangeFilterLayer2() {
|
||||||
temp_all_layer2 = [];
|
//temp_all_layer2 = [];
|
||||||
all_device_group.forEach(function (disaster, disaster_index) {
|
//all_device_group.forEach(function (disaster, disaster_index) {
|
||||||
if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
|
// if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
|
||||||
disaster.groupBuildings.forEach(function (building, building_index) {
|
// disaster.groupBuildings.forEach(function (building, building_index) {
|
||||||
if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
|
// if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
|
||||||
building.groupFloors.forEach(function (floor, floor_index) {
|
// building.groupFloors.forEach(function (floor, floor_index) {
|
||||||
if (SelectedFilter.floor_guids.findIndex(x => x == floor.name) > -1) { //抓取選擇樓層的底下大類
|
// if (SelectedFilter.floor_guids.findIndex(x => x == floor.name) > -1) { //抓取選擇樓層的底下大類
|
||||||
floor.groupLayer2s.forEach(function (layer2, layer2_index) {
|
// floor.groupLayer2s.forEach(function (layer2, layer2_index) {
|
||||||
if (temp_all_layer2.findIndex(x => x.value == layer2.value) < 0) {
|
// if (temp_all_layer2.findIndex(x => x.value == layer2.value) < 0) {
|
||||||
temp_all_layer2.push(layer2);
|
// temp_all_layer2.push(layer2);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
//});
|
||||||
|
|
||||||
|
//$("#layer2").empty();
|
||||||
|
//$("#layer2").append(`<div class="ml-2 mb-2" style="position: relative; display: inline-flex; vertical-align: middle" onclick="AllLayer2()">
|
||||||
|
// <button type="button" class="btn btn-secondary">全選</button>
|
||||||
|
// </div>`);
|
||||||
|
//var html = "";
|
||||||
|
//temp_all_layer2.forEach(function (layer2, layer2_index) {
|
||||||
|
|
||||||
|
// var layer2_device_amount = backfill_layer2_device_amount.filter(x => x.value == layer2.value && x.building_tag == SelectedFilter.building_tag)[0];
|
||||||
|
|
||||||
|
// @*html += `
|
||||||
|
// <div class="btn-group ml-2 mb-2" onclick="SelectLayer2('${layer2.value}',this)">
|
||||||
|
// <button type="button" class="btn btn-outline-success">${layer2.name}</button>
|
||||||
|
// <button type="button" class="btn btn-outline-success device_amount" id="${layer2_device_amount.building_tag}_${layer2_device_amount.value}_device_amount">${layer2_device_amount.device_amount}</button>
|
||||||
|
// </div>`;*@
|
||||||
|
|
||||||
|
// html += `
|
||||||
|
// <div class="btn-group ml-2 mb-2" onclick="SelectLayer2('${layer2.value}',this)">
|
||||||
|
// <button type="button" class="btn btn-outline-success">${layer2.name}</button>
|
||||||
|
// <button type="button" class="btn btn-outline-success device_amount" id="${layer2_device_amount.building_tag}_${layer2_device_amount.value}_device_amount">0</button>
|
||||||
|
// </div>`;
|
||||||
|
|
||||||
|
//});
|
||||||
|
//$('#layer2').append(html);
|
||||||
|
|
||||||
|
//select_all_layer2 = false;
|
||||||
|
//$('#layer2').find('div').first().click();
|
||||||
}
|
}
|
||||||
});
|
//#endregion
|
||||||
|
|
||||||
|
//#region 全選棟別
|
||||||
|
function AllBuilding() {
|
||||||
|
if (select_all_building) { //全選 -> 取消全選
|
||||||
|
select_all_building = false;
|
||||||
|
$('#building').find('div > button.btn-success').removeClass('btn-success').addClass('btn-secondary');
|
||||||
|
} else { //取消全選 -> 全選
|
||||||
|
select_all_building = true;
|
||||||
|
$('#building').find('div > button.btn-secondary').removeClass('btn-secondary').addClass('btn-success');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#layer2").empty();
|
resetCalSelectBuilding();
|
||||||
$("#layer2").append(`<div class="ml-2 mb-2" style="position: relative; display: inline-flex; vertical-align: middle" onclick="AllLayer2()">
|
is_need_reload = true;
|
||||||
<button type="button" class="btn btn-secondary">全選</button>
|
UpdateDeviceAmount();
|
||||||
</div>`);
|
@*console.log("SelectedFilter", SelectedFilter);*@
|
||||||
var html = "";
|
|
||||||
temp_all_layer2.forEach(function (layer2, layer2_index) {
|
|
||||||
|
|
||||||
var layer2_device_amount = backfill_layer2_device_amount.filter(x => x.value == layer2.value && x.building_tag == SelectedFilter.building_tag)[0];
|
|
||||||
|
|
||||||
@*html += `
|
|
||||||
<div class="btn-group ml-2 mb-2" onclick="SelectLayer2('${layer2.value}',this)">
|
|
||||||
<button type="button" class="btn btn-outline-success">${layer2.name}</button>
|
|
||||||
<button type="button" class="btn btn-outline-success device_amount" id="${layer2_device_amount.building_tag}_${layer2_device_amount.value}_device_amount">${layer2_device_amount.device_amount}</button>
|
|
||||||
</div>`;*@
|
|
||||||
|
|
||||||
html += `
|
|
||||||
<div class="btn-group ml-2 mb-2" onclick="SelectLayer2('${layer2.value}',this)">
|
|
||||||
<button type="button" class="btn btn-outline-success">${layer2.name}</button>
|
|
||||||
<button type="button" class="btn btn-outline-success device_amount" id="${layer2_device_amount.building_tag}_${layer2_device_amount.value}_device_amount">0</button>
|
|
||||||
</div>`;
|
|
||||||
|
|
||||||
});
|
|
||||||
$('#layer2').append(html);
|
|
||||||
|
|
||||||
select_all_layer2 = false;
|
|
||||||
$('#layer2').find('div').first().click();
|
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@ -1134,65 +1177,65 @@
|
|||||||
|
|
||||||
//#region 修改過濾條件(小類)
|
//#region 修改過濾條件(小類)
|
||||||
function ChangeFilterLayer3() {
|
function ChangeFilterLayer3() {
|
||||||
temp_all_layer3 = [];
|
//temp_all_layer3 = [];
|
||||||
all_device_group.forEach(function (disaster, disaster_index) {
|
//all_device_group.forEach(function (disaster, disaster_index) {
|
||||||
if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
|
// if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
|
||||||
disaster.groupBuildings.forEach(function (building, building_index) {
|
// disaster.groupBuildings.forEach(function (building, building_index) {
|
||||||
if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
|
// if (building.tag == SelectedFilter.building_tag) { //抓取選擇棟別的底下樓層
|
||||||
building.groupFloors.forEach(function (floor, floor_index) {
|
// building.groupFloors.forEach(function (floor, floor_index) {
|
||||||
if (SelectedFilter.floor_guids.findIndex(x => x == floor.name) > -1) { //抓取選擇樓層的底下大類
|
// if (SelectedFilter.floor_guids.findIndex(x => x == floor.name) > -1) { //抓取選擇樓層的底下大類
|
||||||
floor.groupLayer2s.forEach(function (layer2, layer2_index) {
|
// floor.groupLayer2s.forEach(function (layer2, layer2_index) {
|
||||||
if (SelectedFilter.layer2.findIndex(x => x == layer2.value) > -1) { //抓取選擇大類的底下小類
|
// if (SelectedFilter.layer2.findIndex(x => x == layer2.value) > -1) { //抓取選擇大類的底下小類
|
||||||
layer2.groupLayer3s.forEach(function (layer3, layer3_index) {
|
// layer2.groupLayer3s.forEach(function (layer3, layer3_index) {
|
||||||
var new_layer3 = {
|
// var new_layer3 = {
|
||||||
name: layer3.name,
|
// name: layer3.name,
|
||||||
value: layer3.value,
|
// value: layer3.value,
|
||||||
device_amount: layer3.device_amount
|
// device_amount: layer3.device_amount
|
||||||
}
|
// }
|
||||||
|
|
||||||
var temp_device_amount = new_layer3.device_amount;
|
// var temp_device_amount = new_layer3.device_amount;
|
||||||
var temp_layer3_index = temp_all_layer3.findIndex(x => x.value == layer3.value);
|
// var temp_layer3_index = temp_all_layer3.findIndex(x => x.value == layer3.value);
|
||||||
if (temp_layer3_index < 0) {
|
// if (temp_layer3_index < 0) {
|
||||||
temp_all_layer3.push(new_layer3);
|
// temp_all_layer3.push(new_layer3);
|
||||||
} else {
|
// } else {
|
||||||
temp_all_layer3[temp_layer3_index].device_amount += temp_device_amount;
|
// temp_all_layer3[temp_layer3_index].device_amount += temp_device_amount;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
//});
|
||||||
|
|
||||||
$("#layer3").empty();
|
//$("#layer3").empty();
|
||||||
$("#layer3").append(`<div class="ml-2 mb-2" style="position: relative; display: inline-flex; vertical-align: middle" onclick="AllLayer3()">
|
//$("#layer3").append(`<div class="ml-2 mb-2" style="position: relative; display: inline-flex; vertical-align: middle" onclick="AllLayer3()">
|
||||||
<button type="button" class="btn btn-secondary">全選</button>
|
// <button type="button" class="btn btn-secondary">全選</button>
|
||||||
</div>`);
|
// </div>`);
|
||||||
var html = "";
|
//var html = "";
|
||||||
temp_all_layer3.forEach(function (layer3, layer3_index) {
|
//temp_all_layer3.forEach(function (layer3, layer3_index) {
|
||||||
|
|
||||||
var layer3_device_amount = backfill_layer3_device_amount.filter(x => x.layer3 == layer3.value && x.building_tag == SelectedFilter.building_tag)[0];
|
// var layer3_device_amount = backfill_layer3_device_amount.filter(x => x.layer3 == layer3.value && x.building_tag == SelectedFilter.building_tag)[0];
|
||||||
|
|
||||||
@*html += `
|
// @*html += `
|
||||||
<div class="btn-group ml-2 mb-2" onclick="SelectLayer3('${layer3.value}',this)">
|
// <div class="btn-group ml-2 mb-2" onclick="SelectLayer3('${layer3.value}',this)">
|
||||||
<button type="button" class="btn btn-outline-success">${layer3.name}</button>
|
// <button type="button" class="btn btn-outline-success">${layer3.name}</button>
|
||||||
<button type="button" class="btn btn-outline-success device_amount" id="${layer3_device_amount.building_tag}_${layer3_device_amount.layer3}_device_amount">${layer3_device_amount.device_amount}</button>
|
// <button type="button" class="btn btn-outline-success device_amount" id="${layer3_device_amount.building_tag}_${layer3_device_amount.layer3}_device_amount">${layer3_device_amount.device_amount}</button>
|
||||||
</div>`;*@
|
// </div>`;*@
|
||||||
|
|
||||||
html += `
|
// html += `
|
||||||
<div class="btn-group ml-2 mb-2" onclick="SelectLayer3('${layer3.value}',this)">
|
// <div class="btn-group ml-2 mb-2" onclick="SelectLayer3('${layer3.value}',this)">
|
||||||
<button type="button" class="btn btn-outline-success">${layer3.name}</button>
|
// <button type="button" class="btn btn-outline-success">${layer3.name}</button>
|
||||||
<button type="button" class="btn btn-outline-success device_amount" id="${layer3_device_amount.building_tag}_${layer3_device_amount.layer3}_device_amount">0</button>
|
// <button type="button" class="btn btn-outline-success device_amount" id="${layer3_device_amount.building_tag}_${layer3_device_amount.layer3}_device_amount">0</button>
|
||||||
</div>`;
|
// </div>`;
|
||||||
});
|
//});
|
||||||
|
|
||||||
$('#layer3').append(html);
|
//$('#layer3').append(html);
|
||||||
|
|
||||||
select_all_layer3 = false;
|
//select_all_layer3 = false;
|
||||||
$('#layer3').find('div').first().click();
|
//$('#layer3').find('div').first().click();
|
||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
@ -1241,9 +1284,7 @@
|
|||||||
function ResetDeviceTable() {
|
function ResetDeviceTable() {
|
||||||
|
|
||||||
if ((SelectedFilter.disasters == null || SelectedFilter.disasters.length <= 0)
|
if ((SelectedFilter.disasters == null || SelectedFilter.disasters.length <= 0)
|
||||||
|| (SelectedFilter.building_tag == null || SelectedFilter.building_tag == "")
|
|| (SelectedFilter.building_tag == null || SelectedFilter.building_tag.length <= 0)
|
||||||
|| (SelectedFilter.floor_guids == null || SelectedFilter.floor_guids.length <= 0)
|
|
||||||
|| (SelectedFilter.layer3 == null || SelectedFilter.layer3.length <= 0)
|
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1327,7 +1368,7 @@
|
|||||||
// de_number = $(e).parent().parent().attr('de-number');
|
// de_number = $(e).parent().parent().attr('de-number');
|
||||||
var url = "/api/EmergencyDevice/SaveAndOpenSimulationExercise";
|
var url = "/api/EmergencyDevice/SaveAndOpenSimulationExercise";
|
||||||
var send_data = {
|
var send_data = {
|
||||||
build: SelectedFilter.building_tag,
|
build: SelectedFilter.building_tag[0] ?? null,
|
||||||
disaster: disaster,
|
disaster: disaster,
|
||||||
type: type,
|
type: type,
|
||||||
device: guid
|
device: guid
|
||||||
|
1950
FrontendWebApi/Views/EmergencyHardwareMenu/Index.cshtml
Normal file
1950
FrontendWebApi/Views/EmergencyHardwareMenu/Index.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
@{
|
@{
|
||||||
ViewData["MainNum"] = "4";
|
ViewData["MainNum"] = "4";
|
||||||
ViewData["SubNum"] = "3";
|
ViewData["SubNum"] = "4";
|
||||||
ViewData["Title"] = "紀錄查詢";
|
ViewData["Title"] = "紀錄查詢";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@{
|
@{
|
||||||
ViewData["MainNum"] = "4";
|
ViewData["MainNum"] = "4";
|
||||||
ViewData["SubNum"] = "5";
|
ViewData["SubNum"] = "6";
|
||||||
ViewData["Title"] = "AED裝置設定";
|
ViewData["Title"] = "AED裝置設定";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@{
|
@{
|
||||||
ViewData["MainNum"] = "4";
|
ViewData["MainNum"] = "4";
|
||||||
ViewData["SubNum"] = "4";
|
ViewData["SubNum"] = "5";
|
||||||
ViewData["Title"] = "滅火器設定";
|
ViewData["Title"] = "滅火器設定";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,14 +89,22 @@
|
|||||||
@if (ViewBag.role.Contains("EmergencyDeviceMenuIndex"))
|
@if (ViewBag.role.Contains("EmergencyDeviceMenuIndex"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "1" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "1" ? "active" : "")">
|
||||||
<a asp-controller="EmergencyDeviceMenu" asp-action="Index" title="設備總覽" data-filter-tags="utilities disabled item">
|
<a asp-controller="EmergencyDeviceMenu" asp-action="Index" title="事件清單" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">設備總覽</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">事件清單</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
@if (ViewBag.role.Contains("EmergencyHardwareIndex"))
|
||||||
|
{
|
||||||
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "2" ? "active" : "")">
|
||||||
|
<a asp-controller="EmergencyHardwareMenu" asp-action="Index" title="緊急應變硬體清單" data-filter-tags="utilities disabled item">
|
||||||
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">緊急應變硬體清單</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
@if (ViewBag.role.Contains("EmergencyContactIndex"))
|
@if (ViewBag.role.Contains("EmergencyContactIndex"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "2" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "3" ? "active" : "")">
|
||||||
<a asp-controller="EmergencyContact" asp-action="Index" title="聯絡清單" data-filter-tags="utilities disabled item">
|
<a asp-controller="EmergencyContact" asp-action="Index" title="聯絡清單" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">聯絡清單</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">聯絡清單</span>
|
||||||
</a>
|
</a>
|
||||||
@ -104,7 +112,7 @@
|
|||||||
}
|
}
|
||||||
@if (ViewBag.role.Contains("EmergencyRecordIndex"))
|
@if (ViewBag.role.Contains("EmergencyRecordIndex"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "3" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "4" ? "active" : "")">
|
||||||
<a asp-controller="EmergencyRecord" asp-action="Index" title="紀錄查詢" data-filter-tags="utilities disabled item">
|
<a asp-controller="EmergencyRecord" asp-action="Index" title="紀錄查詢" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">紀錄查詢</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">紀錄查詢</span>
|
||||||
</a>
|
</a>
|
||||||
@ -113,7 +121,7 @@
|
|||||||
|
|
||||||
@if (ViewBag.role.Contains("RescueDeviceFireExtinguisher"))
|
@if (ViewBag.role.Contains("RescueDeviceFireExtinguisher"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "3" && ViewData["SubNum"] == "4" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "5" ? "active" : "")">
|
||||||
<a asp-controller="RescueDevice" asp-action="FireExtinguisher" title="滅火器設定" data-filter-tags="utilities disabled item">
|
<a asp-controller="RescueDevice" asp-action="FireExtinguisher" title="滅火器設定" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">滅火器設定</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">滅火器設定</span>
|
||||||
</a>
|
</a>
|
||||||
@ -121,7 +129,7 @@
|
|||||||
}
|
}
|
||||||
@if (ViewBag.role.Contains("RescueDeviceAED"))
|
@if (ViewBag.role.Contains("RescueDeviceAED"))
|
||||||
{
|
{
|
||||||
<li class="@(ViewData["MainNum"] == "3" && ViewData["SubNum"] == "5" ? "active" : "")">
|
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"] == "6" ? "active" : "")">
|
||||||
<a asp-controller="RescueDevice" asp-action="AED" title="AED裝置設定" data-filter-tags="utilities disabled item">
|
<a asp-controller="RescueDevice" asp-action="AED" title="AED裝置設定" data-filter-tags="utilities disabled item">
|
||||||
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">AED裝置設定</span>
|
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">AED裝置設定</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -18,10 +18,10 @@
|
|||||||
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
|
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
|
||||||
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
|
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
|
||||||
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
||||||
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
||||||
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
||||||
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
|
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
|
||||||
"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
|
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
|
||||||
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
||||||
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
|
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,9 @@
|
|||||||
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
|
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
|
||||||
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
|
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
|
||||||
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //三菱
|
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //三菱
|
||||||
"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
|
||||||
//"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
//"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
|
||||||
|
"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
|
||||||
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
|
||||||
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
|
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
|
||||||
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
|
||||||
|
Loading…
Reference in New Issue
Block a user