[Frontend][系統監控] 往上往下狀態變更前清除程序補上 | loading css 調整
This commit is contained in:
parent
3f8802b1d6
commit
0f25b12fa5
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<!-- 左圖區 -->
|
<!-- 左圖區 -->
|
||||||
<div class="col-3 my-3">
|
<div class="col-4 my-3">
|
||||||
|
|
||||||
<div style="position:relative ">
|
<div style="position:relative ">
|
||||||
<div id="elevatorBlock" class="elevator">
|
<div id="elevatorBlock" class="elevator">
|
||||||
@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- End-左圖區 -->
|
<!-- End-左圖區 -->
|
||||||
<!-- 中間卡片區 -->
|
<!-- 中間卡片區 -->
|
||||||
<div class="col-7 my-3">
|
<div class="col-6 my-3">
|
||||||
<div id="eleCards" class="row">
|
<div id="eleCards" class="row">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -930,13 +930,21 @@
|
|||||||
if (data.point_name == "CP") {
|
if (data.point_name == "CP") {
|
||||||
$(`#${matchDevice.device_number}_card [name=curFloor]`).text(data.value);
|
$(`#${matchDevice.device_number}_card [name=curFloor]`).text(data.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (data.point_name == "RD") {
|
||||||
//往上或往下
|
//往上或往下
|
||||||
if (getValueByName("RD") == "UP") {
|
if (getValueByName("RD") == "UP") {
|
||||||
|
$(`#${matchDevice.device_number}_card [name=downFloArrow]`).removeClass("light-flash-c");
|
||||||
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).addClass("light-flash-c");
|
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).addClass("light-flash-c");
|
||||||
}
|
} else if (getValueByName("RD") == "DOWN") {
|
||||||
if (getValueByName("RD") == "DOWN") {
|
$(`#${matchDevice.device_number}_card [name=upFloArrow]`).removeClass("light-flash-c");
|
||||||
$(`#${matchDevice.device_number}_card [name=downFloArrow]`).addClass("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");
|
actLightByPoi("FE", "#emerReturn");
|
||||||
//群控故障
|
//群控故障
|
||||||
@ -1117,10 +1125,14 @@
|
|||||||
}
|
}
|
||||||
//往上或往下
|
//往上或往下
|
||||||
if (subData["RD"] == "UP") {
|
if (subData["RD"] == "UP") {
|
||||||
|
$(`#imdStaTable_${devNum} [name=downFloArrow]`).removeClass("light-flash-c");
|
||||||
$(`#imdStaTable_${devNum} [name=upFloArrow]`).addClass("light-flash-c");
|
$(`#imdStaTable_${devNum} [name=upFloArrow]`).addClass("light-flash-c");
|
||||||
}
|
} else if (subData["RD"] == "DOWN") {
|
||||||
if (subData["RD"] == "DOWN") {
|
$(`#imdStaTable_${devNum} [name=upFloArrow]`).removeClass("light-flash-c");
|
||||||
$(`#imdStaTable_${devNum} [name=downFloArrow]`).addClass("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)
|
//即時狀態(左側Table)
|
||||||
|
@ -100,6 +100,14 @@ input.toggle:checked {
|
|||||||
background: #97c193;
|
background: #97c193;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.loading-bg {
|
||||||
|
background: #0000009c;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 2000;
|
||||||
|
}
|
||||||
|
|
||||||
@keyframes flashing-c {
|
@keyframes flashing-c {
|
||||||
0% {
|
0% {
|
||||||
|
@ -2558,7 +2558,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
|||||||
var pageAct = {}; //記錄全頁面已選擇項目
|
var pageAct = {}; //記錄全頁面已選擇項目
|
||||||
|
|
||||||
if (!jwt) {
|
if (!jwt) {
|
||||||
location.href = "login.html";
|
location.href = "prelogin";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (location.href.indexOf("ord") != -1) {
|
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",
|
"n4js/historybaja",
|
||||||
"lib/statistics/flot/flot.bundle",
|
"lib/statistics/flot/flot.bundle",
|
||||||
"lib/statistics/peity/peity.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);
|
], loadedMasterPack);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@ -2617,6 +2614,14 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
|||||||
function loadedJsPack() {
|
function loadedJsPack() {
|
||||||
loadEvent();
|
loadEvent();
|
||||||
|
|
||||||
|
myBaja = new MyBaja();
|
||||||
|
myBaja.setMyUserAccount(Login);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登入驗證完成 Callback
|
||||||
|
* */
|
||||||
|
function isValidLogin() {
|
||||||
$("#app").load("_dashboard.html", loadCallback);
|
$("#app").load("_dashboard.html", loadCallback);
|
||||||
|
|
||||||
getBuiList();
|
getBuiList();
|
||||||
@ -2695,8 +2700,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
|
|||||||
|
|
||||||
console.log(result);
|
console.log(result);
|
||||||
}
|
}
|
||||||
/*})*/
|
|
||||||
//})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// page loaded callback
|
// page loaded callback
|
||||||
@ -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 ↓
|
// ↓ 系統監控 - 共用 Function ↓
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
@ -28,10 +28,13 @@ function subscriptionDevices() {
|
|||||||
|
|
||||||
function MyBaja() {
|
function MyBaja() {
|
||||||
// 取得使用者帳號
|
// 取得使用者帳號
|
||||||
this.setMyUserAccount = function (callBackFunc) {
|
this.setMyUserAccount = function (callBackFunc = null) {
|
||||||
if (callBackFunc != undefined && callBackFunc != null) {
|
require(['baja!'], function (baja) {
|
||||||
baja_my_user_account_func = callBackFunc;
|
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/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')
|
// // 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) {
|
setEleUpDownStyle = function (elevId) {
|
||||||
if (this.movStatus[elevId] == 1) {
|
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")
|
$(`#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)");
|
.css("--flash-color-1", "#44ea8e").css("--flash-color-2", "rgba(255,255,255,0)");
|
||||||
} else if (this.movStatus[elevId] == 2) {
|
} 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")
|
$(`#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)");
|
.css("--flash-color-1", "#44ea8e").css("--flash-color-2", "rgba(255,255,255,0)");
|
||||||
} else {
|
} else {
|
||||||
|
@ -104,6 +104,9 @@
|
|||||||
[
|
[
|
||||||
"lib/app.bundle",
|
"lib/app.bundle",
|
||||||
"lib/app.menu",
|
"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",*/
|
/*"lib/notifications/sweetalert2/sweetalert2.bundle",*/
|
||||||
], loadedMasterPack);
|
], loadedMasterPack);
|
||||||
}
|
}
|
||||||
@ -114,15 +117,10 @@
|
|||||||
require(
|
require(
|
||||||
[
|
[
|
||||||
"init",
|
"init",
|
||||||
|
|
||||||
], loadedJsPack);
|
], loadedJsPack);
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadedJsPack() {
|
function loadedJsPack() {
|
||||||
if (location.href.indexOf("localhost:5966") == -1) {
|
|
||||||
myBaja = new MyBaja();
|
|
||||||
myBaja.setMyUserAccount(Login)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (localStorage.getItem('mitsubishi-t') == 'true') {
|
if (localStorage.getItem('mitsubishi-t') == 'true') {
|
||||||
document.getElementById("rememberme").checked = true;
|
document.getElementById("rememberme").checked = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user