From e4fa5d5e2d3b8355a131fcf068470fc37e19e4fe Mon Sep 17 00:00:00 2001 From: dev02 Date: Wed, 23 Nov 2022 08:59:16 +0800 Subject: [PATCH] change param --- Frontend/_historyData.html | 44 +++++++++++++++++++++----------------- Frontend/index.html | 1 + 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/Frontend/_historyData.html b/Frontend/_historyData.html index 9b3d031..1f56b5b 100644 --- a/Frontend/_historyData.html +++ b/Frontend/_historyData.html @@ -91,8 +91,6 @@ initApp.listFilter($('#js_nested_list'), $('#js_nested_list_filter')); //init navigation initApp.buildNavigation($('#js_nested_list')); - - initData(); }); function initList() { @@ -103,7 +101,8 @@ let url = baseApiUrl + "/api/History/GetMainSub"; function success(res) { let strHtml = ``; - let sst = ''; + let sst = ''; + let sstn = ''; let mst = ''; $.each(res.data.history_Main_Systems, function (index, val) { @@ -115,7 +114,7 @@ $.each(val.history_Sub_systems, function (index2, val2) { strHtml += `
  • - + ${val2.full_name} ${val2.sub_system_tag} @@ -125,37 +124,42 @@ if (index == 0 && index2 == 0) { sst = val2.sub_system_tag; mst = val.main_system_tag; + sstn = val2.full_name; } }); strHtml += `
  • `; }); $('#js_nested_list').html(strHtml); - getData(sst, mst); + getData(mst, sst, sstn); } ytAjax = new YourTeam.Ajax(url, objSendData, success, null, "POST").send(); } - function initData() { - getHistoryDataByBaja("TPE_B1_EE_E4_R2F_NA_WHT_N1_A1", - 1667232000000, - 1667232000000, - "空調設備", + function getData(mst, sst, sstn) { + //var dt = new Date(); + //console.log(dt); + // var start = dt.getFullYear().toString() + "-" + dt.getMonth().toString() + "-" + (dt.getDate()).toString() + "T00:00:00Z"; + //var end = dt.getFullYear().toString() + "-" + dt.getMonth().toString() + "-" + (dt.getDate() + 1).toString() + "T00:00:00Z"; + // console.log(new Date(start).getTime()); + // console.log(new Date(end).getTime()); + getHistoryDataByBaja("TPE_B1_EE_E4", //"TPE_" + pageAct.buiTag + "_" + mst + "_" + sst, + /*1666396800000,*/ + //1666483200000, + 1668927197000, + 1668963661000, + sstn, "Mitsubishi_Sup", - callbackForHistory); - } - - function getData(sst2, mst1) { - //getHistoryDataByBaja("TPE_B1_EE_E4_R2F_NA_WHT_N1_A1", - // 1667232000000, - // 1667232000000, - // "空調設備", - // "Mitsubishi_Sup", - // callbackForHistory); + callBackFromHistory); } function callBackFromHistory(res) { //$('#tableData tbody').html(); console.log(res) } + + function callbackForHistory(result) { + console.log(result); + } + \ No newline at end of file diff --git a/Frontend/index.html b/Frontend/index.html index 3a78ae4..1728a36 100644 --- a/Frontend/index.html +++ b/Frontend/index.html @@ -2490,6 +2490,7 @@ License: You must have a valid license purchased only from wrapbootstrap.com (li "lib/app.menu", "datatables.net.b4", "n4js/alarmbaja", + "n4js/historybaja", "lib/statistics/flot/flot.bundle", "lib/statistics/peity/peity.bundle", ], loadedMasterPack);