From ae17655e86df81c8974f8b8d7b2fec4eab181c4d Mon Sep 17 00:00:00 2001 From: dev01 Date: Fri, 2 Dec 2022 18:59:00 +0800 Subject: [PATCH] =?UTF-8?q?[Frontend]=20=E5=84=80=E9=8C=B6=E6=9D=BF=20baja?= =?UTF-8?q?=20=E5=8F=96=E5=80=BC=20=E7=A8=8B=E5=BA=8F=E4=B8=B2=E6=8E=A5=20?= =?UTF-8?q?|=20Layout=20=E7=99=BB=E5=87=BA=20=E7=A8=8B=E5=BA=8F=E5=BB=BA?= =?UTF-8?q?=E7=BD=AE=20|=20=E9=9B=BB=E6=A2=AF=E6=A8=A1=E5=9E=8B=E6=9B=B4?= =?UTF-8?q?=E6=8F=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Frontend/_dashboard.html | 78 +++++- Frontend/_sysElevator.html | 4 +- Frontend/index.html | 527 ++----------------------------------- 3 files changed, 94 insertions(+), 515 deletions(-) diff --git a/Frontend/_dashboard.html b/Frontend/_dashboard.html index d0b67d7..6f97a67 100644 --- a/Frontend/_dashboard.html +++ b/Frontend/_dashboard.html @@ -174,11 +174,15 @@ --> -
+
+ 異常數量
18
+ 賦歸數量
28
-
+
+ 已確認異常
8
+ 未確認異常
6
@@ -204,11 +208,15 @@ --> -
- +
+ 已完成
6
+ + 未完成
8
-
+
+ 未派工
5
+ 派工中
9
@@ -289,9 +297,11 @@ [700, 1] ]; + var tarElePath = ''; + $(document).ready(function () { getSubList(); - + getFirstEletric(); /* init datatables */ $('#dt-basic-example').dataTable( { @@ -689,7 +699,7 @@ let strHtml = ``; $.each(res.data.history_Main_Systems, (index, mainSysObj) => { $.each(mainSysObj.history_Sub_systems, (index2, subSysObj) => { - strHtml += `
+ strHtml += `
`; @@ -697,17 +707,59 @@ }) $("#sysSubBtnList").html(strHtml); getAlarmSub(); + } }, null, "POST").send(); } - function getAlarmSub() { - $(".dev-group").each((idx, ele) => { - let path = $(ele).data("id"); - getOneSystemStateByBaja(path, (data) => { - console.log(data) - }) + function getFirstEletric() { + let url = baseApiUrl + "/api/Device/GetDeviceList"; + let sendData = { + sub_system_tag: "E4", + building_tag: pageAct.buiTag, + }; + objSendData.Data = sendData; + ytAjax = new YourTeam.Ajax(url, objSendData, function (res) { + if (!res || res.code != "0000" || !res.data) { + + } else { + + $.each(res.data, (index, floObj) => { + $.each(floObj.device_list, (index2, devObj) => { + tarElePath = devObj.device_number; + }) + }) + + getElectricBaja(); + } + }, null, "POST").send(); + } + + function getElectricBaja() { + let devPath = tarElePath.split("_").slice(0, 8).join("_"); + + let today = displayDate(new Date, "date").replaceAll("/", "-") + "T00:00:00"; + let tomorrow = displayDate(new Date(new Date(today).getTime() + (24 * 60 * 60 * 1000)), "date").replaceAll("/", "-") + "T00:00:00"; + + getElectricMeterDayDataByBaja(devPath + "_KWH", "Mitsubishi_Sup", today, tomorrow, (data) => { + console.log(data) }) + } + + function getAlarmSub() { + + + //$(".dev-group").each((idx, ele) => { + // let path = $(ele).data("id"); + // let start = (new Date()).getTime(); + // console.log("path enter baja:", path); + // getOneSystemStateByBaja(path, (data) => { + // let end = (new Date()).getTime(); + // console.log("執行時間 :" + (end - start) / 1000 + " 秒","path : " + path, "輸出結果 :"+ data) + + + // }) + //}) } \ No newline at end of file diff --git a/Frontend/_sysElevator.html b/Frontend/_sysElevator.html index 5d206ab..47c96d5 100644 --- a/Frontend/_sysElevator.html +++ b/Frontend/_sysElevator.html @@ -861,7 +861,7 @@ var subSeviceData = []; //每個設備訂閱點位值 var floList = []; //每個樓層 var elevObj = null; //左側 2D 電梯物件 - var viewer3DNodeIds = [233, 228, 223]; + var viewer3DNodeIds = [758, 753, 748]; var elev3DBind = {}; var elev3DOption = {}; var elev3DObj = []; @@ -2395,7 +2395,7 @@ function load3DModel() { - launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDLm53ZA==', (viewer) => { + launchViewer('dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6dGEzaHFzZmZ6cWJub3V4a3BsZGt1a3NldzRzajIxdzUtYmltc19tb2RlbHMvJUUzJTgwJTkwJUU1JThGJUIwJUU1JThDJTk3JUU0JUI4JUFEJUU4JThGJUIxJUU1JUE0JUE3JUU2JUE4JTkzJUUzJTgwJTkxQVJDMjAyMjEyMDEubndk', (viewer) => { $.each(viewer3DNodeIds, function (idx, node) { let options = { element: $("#forgeViewer"), diff --git a/Frontend/index.html b/Frontend/index.html index d8da4e7..7f6ab0b 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -1417,8 +1417,8 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li SmartAdmin WebApp + + -->
@@ -1467,10 +1467,10 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
首頁 + + + + -->
@@ -1518,11 +1518,6 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li
-
-
天氣
- - -
@@ -1531,65 +1526,21 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li Dr. Codex Lantern + Me + -->
+
+
+ +
@@ -2080,433 +2031,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li - +