@@ -322,7 +327,7 @@
temp_alarm_device = []; //暫存所有的報警設備
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 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;
var changeBuilding = "";
@@ -340,7 +345,7 @@
var SelectedFilter =
{
disasters: [],
- building_tag: '',
+ building_tag: [],
floor_guids: [],
layer2: [],
layer3: []
@@ -890,7 +895,7 @@
SelectedFilter.disasters.push(disaster);
$(e).removeClass('btn-outline-success').addClass('btn-success');
}
-
+
is_need_reload = true;
ChangeFilterBuilding();
UpdateDeviceAmount();
@@ -925,11 +930,11 @@
`;*@
html += `
- ${building.name}
- 0
+ ${building.name}
+ 0
`;
});
-
+ $('#building').append(`
全選 `);
$('#building').append(html);
$('#building').find('div').first().click();
@@ -940,6 +945,7 @@
html += '
' + building.name + ' ';
});
+ $('#building').append(`
全選 `);
$('#building').append(html);
$('#building').find('button').first().click();
@@ -948,51 +954,71 @@
}
//#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 選擇棟別
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') {
- $(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 {
$(e).addClass('btn-success');
}
+ resetCalSelectBuilding();
+
is_need_reload = true;
ChangeFilterFloor();
UpdateDeviceAmount();
+ ResetDeviceTable();
@*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
//#region 修改過濾條件(樓層)
function ChangeFilterFloor() {
- temp_all_floor = [];
- all_device_group.forEach(function (disaster, disaster_index) {
- if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取已選擇的防災類型的棟別內容
- 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.name == floor.name) < 0) { //表示未加入,需加入
- temp_all_floor.push(floor);
- }
- });
- }
- });
- }
- });
+ //temp_all_floor = [];
+ //all_device_group.forEach(function (disaster, disaster_index) {
+ // if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取已選擇的防災類型的棟別內容
+ // 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.name == floor.name) < 0) { //表示未加入,需加入
+ // temp_all_floor.push(floor);
+ // }
+ // });
+ // }
+ // });
+ // }
+ //});
- $("#floors").empty();
- $("#floors").append(`
全選 `);
- var html = "";
- temp_all_floor.forEach(function (floor, floor_index) {
- html += '
' + floor.name + ' ';
- });
- $('#floors').append(html);
+ //$("#floors").empty();
+ //$("#floors").append(`
全選 `);
+ //var html = "";
+ //temp_all_floor.forEach(function (floor, floor_index) {
+ // html += '
' + floor.name + ' ';
+ //});
+ //$('#floors').append(html);
- select_all_floor = false;
- $('#floors').find('button').first().click();
+ //select_all_floor = false;
+ //$('#floors').find('button').first().click();
}
//#endregion
@@ -1041,51 +1067,68 @@
//#region 修改過濾條件(大類)
function ChangeFilterLayer2() {
- temp_all_layer2 = [];
- all_device_group.forEach(function (disaster, disaster_index) {
- if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
- 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.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);
- }
- });
- }
- });
- }
- });
- }
- });
+ //temp_all_layer2 = [];
+ //all_device_group.forEach(function (disaster, disaster_index) {
+ // if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
+ // 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.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);
+ // }
+ // });
+ // }
+ // });
+ // }
+ // });
+ // }
+ //});
- $("#layer2").empty();
- $("#layer2").append(`
- 全選
-
`);
- var html = "";
- temp_all_layer2.forEach(function (layer2, layer2_index) {
+ //$("#layer2").empty();
+ //$("#layer2").append(`
+ // 全選
+ //
`);
+ //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];
+ // var layer2_device_amount = backfill_layer2_device_amount.filter(x => x.value == layer2.value && x.building_tag == SelectedFilter.building_tag)[0];
- @*html += `
-
- ${layer2.name}
- ${layer2_device_amount.device_amount}
-
`;*@
+ // @*html += `
+ //
+ // ${layer2.name}
+ // ${layer2_device_amount.device_amount}
+ //
`;*@
- html += `
-
- ${layer2.name}
- 0
-
`;
+ // html += `
+ //
+ // ${layer2.name}
+ // 0
+ //
`;
- });
- $('#layer2').append(html);
+ //});
+ //$('#layer2').append(html);
- select_all_layer2 = false;
- $('#layer2').find('div').first().click();
+ //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');
+ }
+
+ resetCalSelectBuilding();
+ is_need_reload = true;
+ UpdateDeviceAmount();
+ @*console.log("SelectedFilter", SelectedFilter);*@
}
//#endregion
@@ -1134,65 +1177,65 @@
//#region 修改過濾條件(小類)
function ChangeFilterLayer3() {
- temp_all_layer3 = [];
- all_device_group.forEach(function (disaster, disaster_index) {
- if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
- 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.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) {
- var new_layer3 = {
- name: layer3.name,
- value: layer3.value,
- device_amount: layer3.device_amount
- }
+ //temp_all_layer3 = [];
+ //all_device_group.forEach(function (disaster, disaster_index) {
+ // if (SelectedFilter.disasters.findIndex(x => x == disaster.value) > -1) { //抓取選擇防災類型的底下棟別
+ // 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.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) {
+ // var new_layer3 = {
+ // name: layer3.name,
+ // value: layer3.value,
+ // device_amount: layer3.device_amount
+ // }
- var temp_device_amount = new_layer3.device_amount;
- var temp_layer3_index = temp_all_layer3.findIndex(x => x.value == layer3.value);
- if (temp_layer3_index < 0) {
- temp_all_layer3.push(new_layer3);
- } else {
- temp_all_layer3[temp_layer3_index].device_amount += temp_device_amount;
- }
- });
- }
- });
- }
- });
- }
- });
- }
- });
+ // var temp_device_amount = new_layer3.device_amount;
+ // var temp_layer3_index = temp_all_layer3.findIndex(x => x.value == layer3.value);
+ // if (temp_layer3_index < 0) {
+ // temp_all_layer3.push(new_layer3);
+ // } else {
+ // temp_all_layer3[temp_layer3_index].device_amount += temp_device_amount;
+ // }
+ // });
+ // }
+ // });
+ // }
+ // });
+ // }
+ // });
+ // }
+ //});
- $("#layer3").empty();
- $("#layer3").append(`
- 全選
-
`);
- var html = "";
- temp_all_layer3.forEach(function (layer3, layer3_index) {
+ //$("#layer3").empty();
+ //$("#layer3").append(`
+ // 全選
+ //
`);
+ //var html = "";
+ //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 += `
-
- ${layer3.name}
- ${layer3_device_amount.device_amount}
-
`;*@
+ // @*html += `
+ //
+ // ${layer3.name}
+ // ${layer3_device_amount.device_amount}
+ //
`;*@
- html += `
-
- ${layer3.name}
- 0
-
`;
- });
+ // html += `
+ //
+ // ${layer3.name}
+ // 0
+ //
`;
+ //});
- $('#layer3').append(html);
+ //$('#layer3').append(html);
- select_all_layer3 = false;
- $('#layer3').find('div').first().click();
+ //select_all_layer3 = false;
+ //$('#layer3').find('div').first().click();
}
//#endregion
@@ -1241,9 +1284,7 @@
function ResetDeviceTable() {
if ((SelectedFilter.disasters == null || SelectedFilter.disasters.length <= 0)
- || (SelectedFilter.building_tag == null || SelectedFilter.building_tag == "")
- || (SelectedFilter.floor_guids == null || SelectedFilter.floor_guids.length <= 0)
- || (SelectedFilter.layer3 == null || SelectedFilter.layer3.length <= 0)
+ || (SelectedFilter.building_tag == null || SelectedFilter.building_tag.length <= 0)
) {
return;
}
@@ -1327,7 +1368,7 @@
// de_number = $(e).parent().parent().attr('de-number');
var url = "/api/EmergencyDevice/SaveAndOpenSimulationExercise";
var send_data = {
- build: SelectedFilter.building_tag,
+ build: SelectedFilter.building_tag[0] ?? null,
disaster: disaster,
type: type,
device: guid
diff --git a/FrontendWebApi/Views/EmergencyHardwareMenu/Index.cshtml b/FrontendWebApi/Views/EmergencyHardwareMenu/Index.cshtml
new file mode 100644
index 0000000..3696639
--- /dev/null
+++ b/FrontendWebApi/Views/EmergencyHardwareMenu/Index.cshtml
@@ -0,0 +1,1950 @@
+@{
+ ViewData["MainNum"] = "4";
+ ViewData["SubNum"] = "2";
+ ViewData["Title"] = "緊急應變硬體清單";
+}
+
+
+ 首頁
+ 緊急應變硬體清單
+
+
+
+
+
+
+
+
+ @*
+
顯示類型
+
+ 事件清單
+ 緊急應變硬體清單
+ 模擬演練
+
+
*@
+
+
防災類別
+
防災類別
+
+ 模擬演練
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 設備編號
+ 設備名稱
+ 棟別
+ 防災類型
+ 設備大類
+ 設備小類
+ 樓層
+ 異常時間
+ 功能
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ @*
+
+ *@
+
關閉流程
+
+
+
+
+
+
+
+
+
+
+
+
+ 確認與通報
+ 通報火災授信總機
+ 通報防災中心
+ 疏導人群
+
+
+
+
+
+
+
+
+
通報火災授信總機
+
+
+
+
+ All panels needs to have an unique ID in order to use the panel funtions. .panel
is a container with no padding, .panel-hdr
has a min-height
value and default flexbox
properties. The .panel-toolbar
is inserted into .panel-hdr
for extra elements. The .panel-container
wraps .panel-content
which has a predefined padding.
+
+
+ Default panel text.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 組別
+ 全選
+
+
+ 發送簡訊
+
+
+
+
+
+
+ 姓名
+ 部門
+ 電話
+ LineID
+ Email
+
+
+
+
+
+
+
+
+
+
+ 項目
+ 步驟
+ 結果
+ 時間
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 姓名
+ 部門
+ 電話
+ LineID
+ Email
+
+
+
+
+
+
+
+
+ 發訊人:
+
+
+
+
+
+
+
+
+@section Scripts {
+
+}
\ No newline at end of file
diff --git a/FrontendWebApi/Views/EmergencyRecord/Index.cshtml b/FrontendWebApi/Views/EmergencyRecord/Index.cshtml
index da8cc75..d2ff4f5 100644
--- a/FrontendWebApi/Views/EmergencyRecord/Index.cshtml
+++ b/FrontendWebApi/Views/EmergencyRecord/Index.cshtml
@@ -1,6 +1,6 @@
@{
ViewData["MainNum"] = "4";
- ViewData["SubNum"] = "3";
+ ViewData["SubNum"] = "4";
ViewData["Title"] = "紀錄查詢";
}
diff --git a/FrontendWebApi/Views/RescueDevice/AED.cshtml b/FrontendWebApi/Views/RescueDevice/AED.cshtml
index 7b5da75..c6c9a4d 100644
--- a/FrontendWebApi/Views/RescueDevice/AED.cshtml
+++ b/FrontendWebApi/Views/RescueDevice/AED.cshtml
@@ -1,6 +1,6 @@
@{
ViewData["MainNum"] = "4";
- ViewData["SubNum"] = "5";
+ ViewData["SubNum"] = "6";
ViewData["Title"] = "AED裝置設定";
}
diff --git a/FrontendWebApi/Views/RescueDevice/FireExtinguisher.cshtml b/FrontendWebApi/Views/RescueDevice/FireExtinguisher.cshtml
index 0522ce3..ed119da 100644
--- a/FrontendWebApi/Views/RescueDevice/FireExtinguisher.cshtml
+++ b/FrontendWebApi/Views/RescueDevice/FireExtinguisher.cshtml
@@ -1,6 +1,6 @@
@{
ViewData["MainNum"] = "4";
- ViewData["SubNum"] = "4";
+ ViewData["SubNum"] = "5";
ViewData["Title"] = "滅火器設定";
}
diff --git a/FrontendWebApi/Views/Shared/_Layout.cshtml b/FrontendWebApi/Views/Shared/_Layout.cshtml
index 4b18cd6..7e85354 100644
--- a/FrontendWebApi/Views/Shared/_Layout.cshtml
+++ b/FrontendWebApi/Views/Shared/_Layout.cshtml
@@ -89,14 +89,22 @@
@if (ViewBag.role.Contains("EmergencyDeviceMenuIndex"))
{
-
- 設備總覽
+
+ 事件清單
+
+
+ }
+ @if (ViewBag.role.Contains("EmergencyHardwareIndex"))
+ {
+
+
+ 緊急應變硬體清單
}
@if (ViewBag.role.Contains("EmergencyContactIndex"))
{
-
+
聯絡清單
@@ -104,7 +112,7 @@
}
@if (ViewBag.role.Contains("EmergencyRecordIndex"))
{
-
+
紀錄查詢
@@ -113,7 +121,7 @@
@if (ViewBag.role.Contains("RescueDeviceFireExtinguisher"))
{
-
+
滅火器設定
@@ -121,7 +129,7 @@
}
@if (ViewBag.role.Contains("RescueDeviceAED"))
{
-
+
AED裝置設定
diff --git a/FrontendWebApi/appsettings.Development.json b/FrontendWebApi/appsettings.Development.json
index b87a385..f976969 100644
--- a/FrontendWebApi/appsettings.Development.json
+++ b/FrontendWebApi/appsettings.Development.json
@@ -18,10 +18,10 @@
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //30
//"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
- //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
+ "Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
- "Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
+ //"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",
"Password": "FVAPxztxpY4gJJKQ/se4bQ=="
}
diff --git a/FrontendWebApi/appsettings.json b/FrontendWebApi/appsettings.json
index 7e6da69..e57bf74 100644
--- a/FrontendWebApi/appsettings.json
+++ b/FrontendWebApi/appsettings.json
@@ -23,8 +23,9 @@
"Server": "FYlY+w0XDIz+jmF2rlZWJw==", //0.201
"Port": "js2LutKe+rdjzdxMPQUrvQ==",
//"Database": "VJB2XC+lAtzuHObDGMVOAA==", //三菱
- "Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
- //"Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
+ //"Database": "IgYBsgG2VLKKxFb64j7LOA==", //wsp
+ //"Database": "Rq7Gn4x6LwBvVtl7GY8LbA==", //MCUT
+ "Database": "7gWfmZ28HGIJZbxEbK+0yg==", //tpe_dome_dome
//"Database": "siTUcDaC/g2yGTMFWD72Kg==", //tpe_dome_hotel
//"Database": "iuaY0h0+TWkir44/eZLDqw==", //tpe_dome_office
"Root": "SzdxEgaJJ7tcTCrUl2zKsA==",