diff --git a/Frontend/_sysMonAll.html b/Frontend/_sysMonAll.html index 25dbb39..e32aeb1 100644 --- a/Frontend/_sysMonAll.html +++ b/Frontend/_sysMonAll.html @@ -1,6 +1,6 @@ 
-
-

-
+
+ +
@@ -47,9 +47,9 @@ if (!res || res.code != "0000" || !res.data) { } else { - let strHtml = ``; + let strHtml = ``; $.each(res.data, (index, floObj) => { - strHtml += ``; + strHtml += ``; }) $("#floList").html(strHtml); floList = res.data; diff --git a/Frontend/css/site.css b/Frontend/css/site.css index 18013f4..9883cbf 100644 --- a/Frontend/css/site.css +++ b/Frontend/css/site.css @@ -3,7 +3,13 @@ background: rgba(0, 0, 0, 0.03); } +.btn-sm-2 { + padding: 2px 19px; +} +.table.dataTable td { + word-break:break-all; +} /* ================================================================ */ /* 單一方法 */ diff --git a/Frontend/index.html b/Frontend/index.html index 0fbc796..6a9123b 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -2077,8 +2077,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li } $(function () { - getSysMonBtnList(); getBuiList(); + getSysMonBtnList(); }) @@ -2095,9 +2095,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li onEvent("active:change", "#sysMonBtnList", function (e, actEle) { if (actEle) { - pageAct.sysMainTag = $(actEle).data("maintag"); - pageAct.sysSubTag = $(actEle).prop("id").split("subSysBtn")[1]; - pageAct.sysSubName = $(actEle).text(); + pageAct.sysMainTag = $(actEle).data("subSysObj").main_system_tag; + pageAct.sysSubTag = $(actEle).data("subSysObj").sub_system_tag; + pageAct.sysSubName = $(actEle).data("subSysObj").full_name; + pageAct.sysSubObj = $(actEle).data("subSysObj"); } $(this).trigger("change"); }) @@ -2115,17 +2116,23 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li function getSysMonBtnList() { let url = baseApiUrl + "/api/Device/GetMainSub"; - ytAjax = new YourTeam.Ajax(url, null, function (res) { + let sendData = { + building_tag: pageAct.buiTag, + }; + objSendData.Data = sendData; + ytAjax = new YourTeam.Ajax(url, objSendData, function (res) { if (!res || res.code != "0000" || !res.data) { } else { - let strHtml = ``; + $("#sysMonBtnList").html() $.each(res.data.history_Main_Systems, (index, mainSysObj) => { $.each(mainSysObj.history_Sub_systems, (index2, subSysObj) => { - strHtml += ``; + let btn = creBtn(subSysObj.full_name, `subSysBtn${subSysObj.sub_system_tag}`, "topFunBtn", ["dropdown-item"], { page: "systemMonitor" }); + subSysObj.main_system_tag = mainSysObj.main_system_tag; + btn.data("subSysObj", subSysObj); + $("#sysMonBtnList").append(btn); }) }) - $("#sysMonBtnList").append(strHtml); } }, null, "POST").send(); } diff --git a/FrontendWebApi/ApiControllers/DeviceManageController.cs b/FrontendWebApi/ApiControllers/DeviceManageController.cs index 17ed926..c6a3e65 100644 --- a/FrontendWebApi/ApiControllers/DeviceManageController.cs +++ b/FrontendWebApi/ApiControllers/DeviceManageController.cs @@ -61,7 +61,7 @@ namespace FrontendWebApi.ApiControllers { var dbsub = await frontendRepository.GetAllAsync( @$"select distinct v1.system_key main_name, v1.system_value main_system_tag, v2.system_key sub_name, v2.system_value sub_system_tag, v1.system_priority, v2.system_priority, - dk.device_normal_color, dk.device_error_color, dk.device_error_color + dk.device_normal_color, dk.device_close_color, dk.device_error_color from role_auth a join auth_page b on a.AuthCode = b.AuthCode join userinfo c on c.role_guid = a.role_guid