@@ -2091,10 +2036,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
var loadingTip = '';
var pageAct = {}; //記錄全頁面已選擇項目
pageAct.AreaTag = "TPE";
- if (localStorage.getItem("buiTag")) {
- pageAct.buiTag = localStorage.getItem("buiTag");
- }
-
if (location.href.indexOf("ord") != -1) {
location.href = "/file/index.html"
}
@@ -2194,38 +2135,12 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
function isValidLogin() {
$("#app").load("_dashboard.html", loadCallback);
+ iniFroList();
showMainSys();
getBuiList();
getSysMonBtnList();
checkDevState();
- function getSysMonBtnList() {
- let url = baseApiUrl + "/api/Device/GetMainSub";
- let sendData = {
- building_tag: pageAct.buiTag,
- };
- objSendData.Data = sendData;
- ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
- if (!res || res.code != "0000" || !res.data) {
-
- } else {
- $("#sysMonBtnList").html("")
- $.each(res.data.history_Main_Systems, (index, mainSysObj) => {
- $.each(mainSysObj.history_Sub_systems, (index2, subSysObj) => {
- let page = "systemMonitor";
- if (subSysObj.sub_system_tag == "EL") {
- page = "sysElevator";
- }
- let btn = creBtn(subSysObj.full_name, `subSysBtn${subSysObj.sub_system_tag}`, "topFunBtn", ["dropdown-item"], { page: page });
- subSysObj.main_system_tag = mainSysObj.main_system_tag;
- btn.data("subSysObj", subSysObj);
- $("#sysMonBtnList").append(btn);
- })
- })
- }
- }, null, "POST").send();
- }
-
function getBuiList() {
let url = baseApiUrl + "/api/Device/GetBuild";
ytAjax = new YourTeam.Ajax(url, null, function (res) {
@@ -2234,11 +2149,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
} else {
let strHtml = ``;
$.each(res.data, (index, buiObj) => {
- let actStr = "";
- if (pageAct.buiTag == buiObj.building_tag) {
- actStr = "active";
- }
- strHtml += `${buiObj.full_name}`;
+ strHtml += `${buiObj.full_name}`;
})
$("#buiList").append(strHtml).droSetItem(); //droSetItem 預設第一筆 active
}
@@ -2330,9 +2241,9 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
onEvent("active:change", "#buiList", function (e, actEle) {
if (actEle) {
pageAct.buiTag = $(actEle).prop("id").split("buiBtn")[1];
- localStorage.setItem("buiTag", pageAct.buiTag);
pageAct.urn = $(actEle).data("urn");
}
+
})
$(window).on("timeout:3s", function () {
@@ -2425,7 +2336,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
function drawErrRecTabBlo() {
let strHtml = `
-
`
+
`
return strHtml;
}
@@ -2433,7 +2344,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
function drawOpeRecTabBlo() {
let strHtml = `
-
`
+ `
return strHtml;
}
@@ -2446,37 +2357,37 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
$(ele).YTTooltip({
html: `
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ${drawStateTabBlo(devNum)}
-
-
- ${drawInfoTabBlo(devGuid)}
-
-
- ${drawErrRecTabBlo()}
-
-
- ${drawOpeRecTabBlo()}
-
-
+
+
+
-
`,
+
+
+
+
+
+
+
+
+
+
+
+ ${drawStateTabBlo(devNum)}
+
+
+ ${drawInfoTabBlo(devGuid)}
+
+
+ ${drawErrRecTabBlo()}
+
+
+ ${drawOpeRecTabBlo()}
+
+
+
+
+
`,
group: "device",
onShow: function (tooltipEle, oriEle) {
var tab = new YT.Tab({ tabName: "cardTab" })
@@ -2484,7 +2395,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
//loadErrRecTable2($(oriEle).data("number"));
//loadErrRecTable();
loadErr($(oriEle).data("number"));
- typeof subDeviceSetTable != "undefined" ? subDeviceSetTable($(oriEle).data("number")) : ""
+ subDeviceSetTable ? subDeviceSetTable($(oriEle).data("number")) : ""
}
})
})
@@ -2670,6 +2581,85 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
loadingTip = null;
}
}
+
+ function iniFroList() {
+ url = baseApiUrl + '/api/GetUsrFroList'
+ let hasMonitor = false;
+
+ ytAjax = new YourTeam.Ajax(url, null, function (res) {
+ if (!res || res.code != "0000" || !res.data) {
+
+ } else {
+ let strHtml = `