號機 |
@@ -520,7 +520,7 @@
@@ -528,7 +528,7 @@
|
@@ -536,7 +536,7 @@
|
@@ -544,7 +544,7 @@
|
@@ -552,7 +552,7 @@
|
@@ -1430,6 +1430,7 @@
onEvent("click", "#eleManTable [id^=eleManDevEdit]", function () {
let devNum = $(this).prop("id").split("eleManDevEdit")[1];
let scheBtn = ["preMeaSche", "stopSche", "onlyOpeSche", "vipSche", "retOpeSche"];
+ $("#detDevDiv").data("devnum", devNum);
$("#bajaSche").html("");
// 電梯管理 Modal 切換到 detail 頁面
modalTogDiv("#eleManModal", "#tabDiv", "#detDevDiv", "next", function () {
@@ -1451,26 +1452,45 @@
let master = $(this).prop("id").split("eleManMasEdit")[1];
let subData = subSeviceData.filter(x => x.device_number.split("_")[5] == master)[0];
$("#bajaMasSche").html("");
+
// 電梯管理 Modal 切換到 detail 頁面
modalTogDiv("#eleManModal", "#tabDiv", "#detMasDiv", "next", function () {
subDeviceSetEleManNotSerFloor(master);
let devNumPath = subData.device_number?.split("_").join("/");
let ifHtml = ``
$("#bajaMasSche").html(ifHtml);
-
})
})
- // 電梯管理 Modal 不服務樓層 設定不服務樓層(BAJA)
+ // 電梯管理 Modal 不服務樓層 設定不服務樓層(BAJA)
onEvent("click", "#eleManTable [name^=notSerChk]", function () {
require(['baja!'], function (baja) {
- baja.Ord.make("local:|foxs:|station:|slot:/TPE/B1/ELEV/EL/R2F/NA/ELEV1/N1|bql:select name, displayName, out, out.value, slotPath, parent.name as 'device_number' from control:ControlPoint where name = 'CP' or name = 'RD' or name = 'DS' or name = 'ST' or name = 'LOAD' or name = 'MID' or name = 'HAND' or name = 'IND' or name = 'MD' or name = 'DNO'").get()
+ baja.Ord.make("local:|foxs:|station:|slot:/TPE/B1/ELEV/EL/R2F/NA/ELEV1/N1").get()
.then(function (table) {
});
});
})
+ // 電梯管理 Modal 設備 設定點位(BAJA)
+ onEvent("change", "#eleManDevTable input:checkbox", function () {
+ debugger
+ let devNum = $("#detDevDiv").data("devnum");
+ let point = $(this).data("point");
+ let val = $(this).val();
+ let devNumPath = devNum?.split("_").join("/");
+ require(['baja!'], function (baja) {
+ baja.Ord.make(`local:|foxs:|station:|slot:${devNumPath}`).get()
+ .then(function (dev) {
+ dev.set({
+ slot: point,
+ value:val == "on"? true : false,
+ })
+ });
+ });
+
+ })
+
// 切換 modal 內 div 頁面
function modalTogDiv(modal, div1, div2, type = "next", callback = null) {
$(modal).find(div1).parent("div").css("overflow", "hidden");
diff --git a/Frontend/index.html b/Frontend/index.html
index 1178452..ec96779 100644
--- a/Frontend/index.html
+++ b/Frontend/index.html
@@ -2560,6 +2560,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
location.href = "login.html";
}
+ if (location.href.indexOf("ord") != -1) {
+ location.href = "/file/index.html"
+ }
+
$(function () {
// 二次引用 jquery.js
// - 在 require 內部程序需要引用 jquery,由於 require 的套件需要依賴 jquery ,就算 HTML 已經引用 jquery, require 也無法參考
diff --git a/Frontend/js/n4js/bajatest.js b/Frontend/js/n4js/bajatest.js
index 194da23..7e91410 100644
--- a/Frontend/js/n4js/bajatest.js
+++ b/Frontend/js/n4js/bajatest.js
@@ -1,6 +1,9 @@
let baja_subscribe_device_callback_func; //設定BQL訂閱之後要回傳的Function
+let baja_my_user_account_func; //取得帳號資料要回傳的Function
var ordPath; //當前點選選單的tag,用來抓出設備路徑,例如:旅館棟->H,消防偵煙器->F3
window.tolSubList = [];
+
+var user_name = "";
function subscriptionDevices() {
// 用BQL的方式去訂閱
this.setSubscribeDevicesByBql = function (tempOrdPath) {
@@ -13,6 +16,16 @@ function subscriptionDevices() {
baja_subscribe_device_callback_func = callBackFunc;
}
}
+
+}
+
+function MyBaja() {
+ // 取得使用者帳號
+ this.setMyUserAccount = function (callBackFunc) {
+ if (callBackFunc != undefined && callBackFunc != null) {
+ baja_my_user_account_func = callBackFunc;
+ }
+ };
}
/**
@@ -270,7 +283,12 @@ 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')
diff --git a/Frontend/login.html b/Frontend/login.html
index 35bb7e4..b07a1a7 100644
--- a/Frontend/login.html
+++ b/Frontend/login.html
@@ -69,23 +69,62 @@
|