diff --git a/Frontend/_accountManagement.html b/Frontend/_accountManagement.html
new file mode 100644
index 0000000..b393da3
--- /dev/null
+++ b/Frontend/_accountManagement.html
@@ -0,0 +1,297 @@
+
+
+
+
帳號與權限管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Frontend/_sysMonFloor.html b/Frontend/_sysMonFloor.html
index 1b3d71a..55779ed 100644
--- a/Frontend/_sysMonFloor.html
+++ b/Frontend/_sysMonFloor.html
@@ -4,6 +4,9 @@
}
+
+
+
@@ -21,6 +24,16 @@
getFloData();
})
+ onEvent("click", "#resChartZoom", function () {
+ floChart.setOption({
+ geo: {
+ center: null,
+ zoom: 1.2,
+ },
+ });
+ resetData();
+ })
+
function getFloData() {
let url = baseApiUrl + "/api/Device/GetDeviceList";
let sendData = {
@@ -337,7 +350,6 @@
// console.log(params)
// })
floChart.on('georoam', function (params) {
-
var zoom = floChart.getOption().geo[0].zoom;
if (zoom <= 2.5) {
@@ -562,13 +574,6 @@
obj.itemStyle = { 'color': item.device_color };
- if (item.selected) {
- obj.symbolSize = 60
- }
- console.log(item.zoom)
- if (item.zoom > zoomToggle) {
- obj.symbolSize = 10
- }
res.push(obj);
});
diff --git a/Frontend/_systemMonitor.html b/Frontend/_systemMonitor.html
index da3be8e..59e1cca 100644
--- a/Frontend/_systemMonitor.html
+++ b/Frontend/_systemMonitor.html
@@ -41,7 +41,7 @@
function getFloList() {
let url = baseApiUrl + "/api/Device/GetFloor";
- let sendData = { building_tag: pageAct.buiTag };
+ let sendData = { building_tag: pageAct.buiTag, sub_system_tag: pageAct.sysSubTag };
objSendData.Data = sendData;
ytAjax = new YourTeam.Ajax(url, objSendData, function (res) {
if (!res || res.code != "0000" || !res.data) {
diff --git a/Frontend/index.html b/Frontend/index.html
index 2c03b0f..0fbc796 100644
--- a/Frontend/index.html
+++ b/Frontend/index.html
@@ -1162,12 +1162,12 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
@@ -2079,7 +2079,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
$(function () {
getSysMonBtnList();
getBuiList();
- /*setBuiAct();*/
})
@@ -2098,7 +2097,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
if (actEle) {
pageAct.sysMainTag = $(actEle).data("maintag");
pageAct.sysSubTag = $(actEle).prop("id").split("subSysBtn")[1];
- pageAct.sysMainName = $(actEle).text();
+ pageAct.sysSubName = $(actEle).text();
}
$(this).trigger("change");
})
diff --git a/Frontend/js/site.js b/Frontend/js/site.js
index 89733b4..bbce83b 100644
--- a/Frontend/js/site.js
+++ b/Frontend/js/site.js
@@ -12,6 +12,12 @@ $.fn.droSetItem = function () {
setDropdownItem(this);
return this;
}
+/**
+ * fn 定義 | 輸出含原元素 html
+ */
+$.fn.outerHtml = function () {
+ return $(this).prop("outerHTML");
+}
/**
* 設置 bootstrap dropdown 為下拉選單
@@ -44,6 +50,58 @@ function defDev(obj) {
obj.src = defSrc;
}
-function creEle(ele,text) {
- return $(`<${ele}>${text}${ele}>`);
+function dtAjaxResetSendData(table,sendData) {
+ table.context[0].ajax.data = function (d) {
+ d = sendData;
+ return JSON.stringify(d)
+ }
+}
+
+/**
+ * element 建造
+ * @param {any} text
+ * @param {any} id
+ * @param {any} name
+ * @param {any} cls
+ * @param {any} data
+ * @param {any} attr
+ */
+function eleBuild(text = null, id = null, name = null, cls = [], data = {}, attr = {}) {
+ cls = cls ?? [], data = data ?? {}, attr = attr ?? {};
+ id = id ? `id="${id}"` : "";
+ name = name ? `name="${name}"` : "";
+ cls = cls.length != 0 ? `class="${cls.join(' ')}"` : "";
+ data = data.length != 0 ? `${Object.keys(data).map(x => `data-${x}="${data[x]}"`).join(" ")}` : "";
+ attr = attr ? `${Object.keys(attr).map(x => `${x}="${attr[x]}"`).join(" ")}` : "";
+ let attrArr = [], attrText = "";
+ attrArr = [id, name, cls, data, attr];
+ attrText = attrArr.filter(x => x != "").join(" ");
+ text = text === null ? "" : text;
+ return { attrText: attrText, text: text };
+}
+
+function creEle(ele, text = null, id = null, name = null, cls = [], data = {}, attr = {}) {
+ let comp = eleBuild(text, id, name, cls, data, attr);
+ return $(`<${ele} ${comp.attrText}>${comp.text}${ele}>`);
+}
+
+function creDiv(cls = [], attr = {}, id = null, name = null, data = {}, text = null) {
+ return creEle("div", text, id, name, cls, data, attr);
+}
+
+function creBtn(text = null, id = null, name = null, cls = [], data = {}, attr = {}) {
+ return creEle("button", text, id, name, cls, data, attr);
+}
+
+function creBtnHtml(text = null, id = null, name = null, cls = [], data = {}, attr = {}) {
+ return creEle("button", text, id, name, cls, data, attr).prop("outerHTML");
+}
+
+function creSelect(id = null, cls = [], name = null, data = {}, attr = {}, text = null) {
+ return creEle("select", text, id, name, cls, data, attr);
+}
+
+function creOption(text = null, value = null, data = {}, attr = {}, cls = [], name = null, id = null) {
+ attr = value != null ? attr.value = value : attr;
+ return creEle("option", text, id, name, cls, data, attr);
}
\ No newline at end of file
diff --git a/Frontend/js/yourteam/yourteam.jquery.datatables.js b/Frontend/js/yourteam/yourteam.jquery.datatables.js
index 15ac1b6..7652f02 100644
--- a/Frontend/js/yourteam/yourteam.jquery.datatables.js
+++ b/Frontend/js/yourteam/yourteam.jquery.datatables.js
@@ -161,16 +161,27 @@ function fnInitJqDataTablesAjax(apiUrl, tag, sendData = null, columns, columns_d
}
let table = null;
let token = localStorage.getItem("JWT-Authorization");
-
+ let ajaxMethod = "GET";
+ let ajaxSendData = null;
+ if (typeof apiUrl == "object") {
+ ajaxMethod = apiUrl.method;
+ ajaxSendData = apiUrl.data;
+ apiUrl = apiUrl.url;
+ }
try {
let oTable = {
"ajax": {
- method: "GET",
+ method: ajaxMethod,
+ data: function (d) {
+ d = ajaxSendData;
+ return JSON.stringify(d)
+ },
url: apiUrl,
/* beforeSend: beforeSend,*/
headers: {
"Authorization": "Bearer " + token,
},
+ contentType: "application/json",
cache: true,
async:false,
dataSrc: sendData,
@@ -198,8 +209,8 @@ function fnInitJqDataTablesAjax(apiUrl, tag, sendData = null, columns, columns_d
"EmptyTable": true,
"destroy": true,
"processing": false,
- "sDom":'<"toolbar">frtipl',
- "pagingType": "simple",
+ "sDom":'<"toolbar">tipl',
+ "pagingType": "full_numbers",
//"responsive": true,
"autoWidth": true,
"aoColumns": columns,