+
\ No newline at end of file
diff --git a/Frontend/css/yourteam/plugins/yt-tooltip/yt-tooltip.css b/Frontend/css/yourteam/plugins/yt-tooltip/yt-tooltip.css
index a9de2a9..cbc7338 100644
--- a/Frontend/css/yourteam/plugins/yt-tooltip/yt-tooltip.css
+++ b/Frontend/css/yourteam/plugins/yt-tooltip/yt-tooltip.css
@@ -4,5 +4,6 @@
border-radius: 5px;
box-shadow: 0px 0px 11px 3px rgb(0 0 0 / 20%);
min-width:100px;
+ z-index:2001;
}
diff --git a/Frontend/index.html b/Frontend/index.html
index 83f16d8..a6b4fbb 100644
--- a/Frontend/index.html
+++ b/Frontend/index.html
@@ -2035,7 +2035,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
var jwt = null;
var loadingTip = '';
var pageAct = {}; //記錄全頁面已選擇項目
- pageAct.AreaTag = "TPE";
+ pageAct.AreaTag = "";
if (location.href.indexOf("ord") != -1) {
location.href = "/file/index.html"
}
@@ -2114,6 +2114,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
function loadedJsPack() {
cookies = new YourTeam.Utility.Cookie();
jwt = cookies.get("JWT-Authorization");
+ pageAct.AreaTag = initAreaTag;
loadEvent();
if (!jwt) {
@@ -2246,6 +2247,14 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
})
+ onEvent("yt:tab:change", "#lightSch-tab", function () {
+ debugger
+ if (pageAct.sysMainTag == "LT" && $("#lightSchModal").length != 0) {
+ loadLightSchTable();
+ $("#lightSchModal").modal("show");
+ }
+ })
+
$(window).on("timeout:3s", function () {
getSystemAlarmByBaja((data) => {
if (typeof getAlarmSub != "undefined" && getAlarmSub) {
@@ -2349,11 +2358,12 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
}
// Card 呈現初始化
- function initPopover() {
+ function initPopover(type = null) {
$("[name=devItem]").each((index, ele) => {
let devNum = $(ele).data("number"); //設備編號
let devGuid = $(ele).data("id"); //guid
let devName = $(ele).data("name"); //full_name
+ let lightHtml = type == "light" ? `` : "";
$(ele).YTTooltip({
html: `
@@ -2364,6 +2374,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
+ ${lightHtml}
@@ -2371,12 +2382,11 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
-
${drawStateTabBlo(devNum)}
- ${drawInfoTabBlo(devGuid)}
+
${drawErrRecTabBlo()}
@@ -2384,10 +2394,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
${drawOpeRecTabBlo()}
-
-
-
-
`,
+
+ `,
group: "device",
onShow: function (tooltipEle, oriEle) {
var tab = new YT.Tab({ tabName: "cardTab" })
@@ -2395,7 +2403,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
//loadErrRecTable2($(oriEle).data("number"));
//loadErrRecTable();
loadErr($(oriEle).data("number"));
- subDeviceSetTable ? subDeviceSetTable($(oriEle).data("number")) : ""
+ $(tooltipEle).find("#info").html(typeof drawInfoTabBlo != "undefined"? drawInfoTabBlo(devGuid) : "");
+ typeof subDeviceSetTable != "undefined "? subDeviceSetTable($(oriEle).data("number")) : ""
}
})
})
@@ -2440,6 +2449,67 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
let opeRecTable = new YourTeam.JqDataTables.getTableByAjax(url, tag, null, columns, column_defs, null, null, null, null, null, null, "tpi");
}
+ function loadLightSchTable(devGuid) {
+
+ /*let url = baseApiUrl + "/api/Device/GetOpeDevice?device_guid=" + devGuid;*/
+ let url = `https://63772efc5c47776512165937.mockapi.io/api/GetLightSche`;
+ let tag = "#lightSchTable";
+
+ let column_defs = [
+ { "targets": [0], "width": "14%", "sortable": true },
+ { "targets": [1], "width": "14%", "sortable": true },
+ { "targets": [2], "width": "14%", "sortable": true },
+ { "targets": [3], "width": "14%", "sortable": true },
+ { "targets": [4], "width": "14%", "sortable": true },
+ { "targets": [5], "width": "14%", "sortable": true },
+ { "targets": [6], "width": "16%", "sortable": true },
+ ];
+
+ let columns = [
+ {
+ "title": "序號",
+ "data": null,
+ "render": function (data, type, row,meta) {
+ return meta.row + 1;
+ },
+ },
+ {
+ "title": "排程名稱",
+ "data": "sch_name",
+ },
+ {
+ "title": "設備數量",
+ "data": "dev_cnt",
+ },
+ {
+ "title": "排程設定",
+ "data": "sch_set",
+ },
+ {
+ "title": "動作",
+ "data": "action",
+ },
+ {
+ "title": "狀態",
+ "data": "status",
+ },
+ {
+ "title": "功能",
+ "data": "sch_id",
+ "render": function (data, type, row) {
+ let btnDiv = creDiv(["row", "m-0", "justify-content-center"], { "style": "gap:10px" });
+ let icon = creI(["fas", "fa-pencil-alt"]);
+ btnDiv.append(creBtnHtml("觸發執行", "lightSchTabTogBtn" + data, null, ["btn", "btn-success"]));
+ btnDiv.append(creBtn("修改", "lightSchTabEdiBtn" + data, null, ["btn", "btn-danger"], { "toggle": "modal", "target": "#delModal" }).append(icon));
+ return btnDiv.outerHtml();
+ },
+ },
+
+ ];
+
+ let lightSchTable = new YourTeam.JqDataTables.getTableByAjax(url, tag, null, columns, column_defs, null, null, null, null, null, null, "tpi");
+ }
+
// Baja 取得異常紀錄
function loadErr(allPath) {
if (allPath != undefined && allPath != null) {
diff --git a/Frontend/js/forge/forgemodel.js b/Frontend/js/forge/forgemodel.js
index dd52a24..3264074 100644
--- a/Frontend/js/forge/forgemodel.js
+++ b/Frontend/js/forge/forgemodel.js
@@ -104,7 +104,7 @@ function launchViewerNoTools(urn, callback) {
Autodesk.Viewing.Initializer(options, () => {
//viewer = new Autodesk.Viewing.GuiViewer3D(document.getElementById('forgeViewer'));
- viewer = new Autodesk.Viewing.Viewer3D($('forgeViewer')[0]);
+ viewer = new Autodesk.Viewing.Viewer3D($(selector)[0]);
viewer.start();
var documentId = 'urn:' + urn;
diff --git a/Frontend/js/site.js b/Frontend/js/site.js
index e48d498..50d6da7 100644
--- a/Frontend/js/site.js
+++ b/Frontend/js/site.js
@@ -176,6 +176,9 @@ function creImg(ele, text = null, id = null, name = null, cls = [], data = {}, a
return $(`<${ele} ${comp.attrText}>${comp.text}`);
}
+function creI(cls = [], data = {}, attr = {}, id = null, name = null, text = null) {
+ return creEle("i", text, id, name, cls, data, attr);
+}
/**
* 根據該棟建築底下的'所有'電梯執行緒物件
* */