[Frontend][系統監控] 往上往下狀態變更前清除程序補上 | loading css 調整
This commit is contained in:
parent
3f8802b1d6
commit
0f25b12fa5
@ -47,7 +47,7 @@
|
||||
|
||||
<div class="d-flex">
|
||||
<!-- 左圖區 -->
|
||||
<div class="col-3 my-3">
|
||||
<div class="col-4 my-3">
|
||||
|
||||
<div style="position:relative ">
|
||||
<div id="elevatorBlock" class="elevator">
|
||||
@ -88,9 +88,9 @@
|
||||
</div>
|
||||
<!-- End-左圖區 -->
|
||||
<!-- 中間卡片區 -->
|
||||
<div class="col-7 my-3">
|
||||
<div class="col-6 my-3">
|
||||
<div id="eleCards" class="row">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- End-中間卡片區 -->
|
||||
@ -930,13 +930,21 @@
|
||||
if (data.point_name == "CP") {
|
||||
$(`#${matchDevice.device_number}_card [name=curFloor]`).text(data.value);
|
||||
}
|
||||
//往上或往下
|
||||
if (getValueByName("RD") == "UP") {
|
||||
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).addClass("light-flash-c");
|
||||
}
|
||||
if (getValueByName("RD") == "DOWN") {
|
||||
$(`#${matchDevice.device_number}_card [name=downFloArrow]`).addClass("light-flash-c");
|
||||
|
||||
if (data.point_name == "RD") {
|
||||
//往上或往下
|
||||
if (getValueByName("RD") == "UP") {
|
||||
$(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
|
||||
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).addClass("light-flash-c");
|
||||
} else if (getValueByName("RD") == "DOWN") {
|
||||
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
|
||||
$(`#${matchDevice.device_number}_card [name=downFloArrow]`).addClass("light-flash-c");
|
||||
} else {
|
||||
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
|
||||
$(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
|
||||
}
|
||||
}
|
||||
|
||||
//消防回歸
|
||||
actLightByPoi("FE", "#emerReturn");
|
||||
//群控故障
|
||||
@ -973,7 +981,7 @@
|
||||
subDeviceSetEleManNotSerFloor(master);
|
||||
});
|
||||
myBaja.setSubscribeDeviceEndCallBack(function (data) {
|
||||
|
||||
|
||||
let devNumArr = data.map(x => { return { devNum: x.device_number_full, priority: allDevList.filter(y => y.device_number == x.device_number_full)[0]?.priority } }).DistinctBy("devNum");
|
||||
devNumArr = devNumArr.oSort("priority");
|
||||
$.each(devNumArr, (idx, devObj) => {
|
||||
@ -1032,10 +1040,10 @@
|
||||
|
||||
let result = [];
|
||||
let masterList = allDevList.map(x => x.device_number.split("_")[5]).Distinct();
|
||||
|
||||
|
||||
// Master(第六段) 區分
|
||||
$.each(masterList, (idx, master) => {
|
||||
|
||||
|
||||
let main = {};
|
||||
// 匯入 Master 名稱`
|
||||
main.devName = master;
|
||||
@ -1069,7 +1077,7 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
console.log("result:",result)
|
||||
console.log("result:", result)
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -1101,7 +1109,7 @@
|
||||
} else {
|
||||
elevObj.setElevFloor(matchDevice.device_number, subData["CP"]);
|
||||
}
|
||||
|
||||
|
||||
if (isFirstLoad3D == false && elev3DObj.length != 0) {
|
||||
let elevObj = elev3DObj.filter(x => x.nodeId == elev3DBind[devNum])[0];
|
||||
if (elevObj && elevObj.id) {
|
||||
@ -1117,10 +1125,14 @@
|
||||
}
|
||||
//往上或往下
|
||||
if (subData["RD"] == "UP") {
|
||||
$(`#imdStaTable_${devNum} [name=downFloArrow]`).removeClass("light-flash-c");
|
||||
$(`#imdStaTable_${devNum} [name=upFloArrow]`).addClass("light-flash-c");
|
||||
}
|
||||
if (subData["RD"] == "DOWN") {
|
||||
} else if (subData["RD"] == "DOWN") {
|
||||
$(`#imdStaTable_${devNum} [name=upFloArrow]`).removeClass("light-flash-c");
|
||||
$(`#imdStaTable_${devNum} [name=downFloArrow]`).addClass("light-flash-c");
|
||||
} else {
|
||||
$(`#imdStaTable_${devNum} [name=upFloArrow]`).removeClass("light-flash-c");
|
||||
$(`#imdStaTable_${devNum} [name=downFloArrow]`).removeClass("light-flash-c");
|
||||
}
|
||||
|
||||
//即時狀態(左側Table)
|
||||
@ -1155,16 +1167,16 @@
|
||||
} else {
|
||||
let strHtml = ``;
|
||||
let masterArr = [];
|
||||
|
||||
|
||||
$("#eleCards").html("");
|
||||
|
||||
|
||||
$.each(res.data, (index, floObj) => {
|
||||
let masters = floObj.device_list.map(x => x.device_number?.split("_")[5]).Distinct();
|
||||
|
||||
|
||||
$.each(masters, (idx, master) => {
|
||||
|
||||
let masDiv = creDiv(["col-12","row","m-0","gap-5"]);
|
||||
masDiv.append(creEle("h2", master, null, null,["col-12","p-0"]));
|
||||
let masDiv = creDiv(["col-12", "row", "m-0", "gap-5"]);
|
||||
masDiv.append(creEle("h2", master, null, null, ["col-12", "p-0"]));
|
||||
strHtml = ``;
|
||||
floObj.device_list.filter(x => x.device_number?.split("_")[5] == master).forEach((devObj) => {
|
||||
allDevList.push(devObj);
|
||||
@ -1184,9 +1196,9 @@
|
||||
</div>`));
|
||||
})
|
||||
$("#eleCards").append(masDiv);
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
})
|
||||
initPopover();
|
||||
//平面圖載入
|
||||
@ -2380,7 +2392,7 @@
|
||||
|
||||
//載入3D模型
|
||||
function load3DModel() {
|
||||
|
||||
|
||||
|
||||
launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA==', (viewer) => {
|
||||
$.each(viewer3DNodeIds, function (idx, node) {
|
||||
|
@ -100,6 +100,14 @@ input.toggle:checked {
|
||||
background: #97c193;
|
||||
}
|
||||
|
||||
.loading-bg {
|
||||
background: #0000009c;
|
||||
background-repeat: no-repeat;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
z-index: 2000;
|
||||
}
|
||||
|
||||
@keyframes flashing-c {
|
||||
0% {
|
||||
|
@ -2558,7 +2558,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
var pageAct = {}; //記錄全頁面已選擇項目
|
||||
|
||||
if (!jwt) {
|
||||
location.href = "login.html";
|
||||
location.href = "prelogin";
|
||||
}
|
||||
|
||||
if (location.href.indexOf("ord") != -1) {
|
||||
@ -2587,9 +2587,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
"n4js/historybaja",
|
||||
"lib/statistics/flot/flot.bundle",
|
||||
"lib/statistics/peity/peity.bundle",
|
||||
"lib/jquery-validation/dist/jquery.validate",
|
||||
"lib/jquery-validation/dist/additional-methods.min",
|
||||
"lib/jquery-validation/dist/localization/messages_zh_TW",
|
||||
], loadedMasterPack);
|
||||
}
|
||||
/**
|
||||
@ -2617,6 +2614,14 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
function loadedJsPack() {
|
||||
loadEvent();
|
||||
|
||||
myBaja = new MyBaja();
|
||||
myBaja.setMyUserAccount(Login);
|
||||
}
|
||||
|
||||
/**
|
||||
* 登入驗證完成 Callback
|
||||
* */
|
||||
function isValidLogin() {
|
||||
$("#app").load("_dashboard.html", loadCallback);
|
||||
|
||||
getBuiList();
|
||||
@ -2695,8 +2700,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
|
||||
console.log(result);
|
||||
}
|
||||
/*})*/
|
||||
//})
|
||||
}
|
||||
|
||||
// page loaded callback
|
||||
@ -2705,7 +2708,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
resetYTTooltip();
|
||||
}
|
||||
|
||||
//事件先行讀取
|
||||
// 事件先行讀取
|
||||
function loadEvent() {
|
||||
onEvent("click", "[name=topFunBtn]", function () {
|
||||
_ytTabInited = []
|
||||
@ -2756,6 +2759,43 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
||||
}
|
||||
}
|
||||
|
||||
// 登入驗證
|
||||
function Login(account) {
|
||||
console.log(account)
|
||||
/*if ($("#login-form").valid()) {*/
|
||||
var url = baseApiUrl + "/api/Login/";
|
||||
var send_data = {
|
||||
account: account,
|
||||
password: "rJ2T5Kkj"
|
||||
}
|
||||
if (location.href.indexOf("localhost:5966") != -1) {
|
||||
location.href = "login.html";
|
||||
}
|
||||
$.ajax({
|
||||
method: "post",
|
||||
url: url,
|
||||
data: JSON.stringify(send_data),
|
||||
async: false,
|
||||
contentType: "application/json; charset=UTF-8",
|
||||
dataType: 'json',
|
||||
success: function (rel) {
|
||||
if (rel.code != "0000") {
|
||||
toast_error(rel.msg || "系統內部發生錯誤,請聯絡系統管理員");
|
||||
return;
|
||||
}
|
||||
else {
|
||||
/*toast_ok(rel.msg);*/
|
||||
localStorage.setItem('JWT-Authorization', rel.data.token);
|
||||
isValidLogin();
|
||||
}
|
||||
},
|
||||
error: function (xhr, textStatus, thrownError) {
|
||||
alert(textStatus);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// ↓ 系統監控 - 共用 Function ↓
|
||||
//==============================================================================
|
||||
|
@ -28,10 +28,13 @@ function subscriptionDevices() {
|
||||
|
||||
function MyBaja() {
|
||||
// 取得使用者帳號
|
||||
this.setMyUserAccount = function (callBackFunc) {
|
||||
if (callBackFunc != undefined && callBackFunc != null) {
|
||||
baja_my_user_account_func = callBackFunc;
|
||||
}
|
||||
this.setMyUserAccount = function (callBackFunc = null) {
|
||||
require(['baja!'], function (baja) {
|
||||
console.log("baja", baja)
|
||||
user_name = baja.getUserName();
|
||||
callBackFunc ? callBackFunc(user_name) : "";
|
||||
});
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@ -298,12 +301,7 @@ function getElevatorInfoByBaja(path, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
require(['baja!'], function (baja) {
|
||||
user_name = baja.getUserName();
|
||||
if (baja_my_user_account_func != undefined && baja_my_user_account_func != null) {
|
||||
baja_my_user_account_func(user_name);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// baja.Ord.make('ip:greencloud.fic.com.tw|foxs:|station:|slot:/Arena/H/F3|bql:select name, displayname, slotPath, out.value, out from control:ControlPoint')
|
||||
// // baja.Ord.make('ip:greencloud.fic.com.tw|foxs:|station:|slot:/Arena/H/E1/B1F/TestData/H_E1_B1F_TestData_Data|bql:select slotPath,out.value from control:NumericWritable')
|
||||
|
@ -256,9 +256,11 @@ class ElevatorHandler {
|
||||
|
||||
setEleUpDownStyle = function (elevId) {
|
||||
if (this.movStatus[elevId] == 1) {
|
||||
$(`#elevator-item-${elevId}`).next("span.elevator-item-todown").removeClass("light-flash-c-bd")
|
||||
$(`#elevator-item-${elevId}`).prev("span.elevator-item-toup").addClass("light-flash-c-bd")
|
||||
.css("--flash-color-1", "#44ea8e").css("--flash-color-2", "rgba(255,255,255,0)");
|
||||
} else if (this.movStatus[elevId] == 2) {
|
||||
$(`#elevator-item-${elevId}`).prev("span.elevator-item-toup").removeClass("light-flash-c-bd")
|
||||
$(`#elevator-item-${elevId}`).next("span.elevator-item-todown").addClass("light-flash-c-bd")
|
||||
.css("--flash-color-1", "#44ea8e").css("--flash-color-2", "rgba(255,255,255,0)");
|
||||
} else {
|
||||
|
@ -104,6 +104,9 @@
|
||||
[
|
||||
"lib/app.bundle",
|
||||
"lib/app.menu",
|
||||
"lib/jquery-validation/dist/jquery.validate",
|
||||
"lib/jquery-validation/dist/additional-methods.min",
|
||||
"lib/jquery-validation/dist/localization/messages_zh_TW",
|
||||
/*"lib/notifications/sweetalert2/sweetalert2.bundle",*/
|
||||
], loadedMasterPack);
|
||||
}
|
||||
@ -114,16 +117,11 @@
|
||||
require(
|
||||
[
|
||||
"init",
|
||||
|
||||
], loadedJsPack);
|
||||
}
|
||||
|
||||
function loadedJsPack() {
|
||||
if (location.href.indexOf("localhost:5966") == -1) {
|
||||
myBaja = new MyBaja();
|
||||
myBaja.setMyUserAccount(Login)
|
||||
}
|
||||
|
||||
|
||||
if (localStorage.getItem('mitsubishi-t') == 'true') {
|
||||
document.getElementById("rememberme").checked = true;
|
||||
remember = true;
|
||||
|
Loading…
Reference in New Issue
Block a user