This commit is contained in:
dev01 2022-11-23 09:08:55 +08:00
commit 92f8c45436
2 changed files with 25 additions and 20 deletions

View File

@ -91,8 +91,6 @@
initApp.listFilter($('#js_nested_list'), $('#js_nested_list_filter'));
//init navigation
initApp.buildNavigation($('#js_nested_list'));
initData();
});
function initList() {
@ -104,6 +102,7 @@
function success(res) {
let strHtml = ``;
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 += `<li>
<a href="#" onClick="getData(${val2.sub_system_tag}, ${val.main_system_tag})" data-filter-tags="user interface buttons" data-subtag="${val2.sub_system_tag}">
<a href="#" onClick="getData('${val.main_system_tag}', '${val2.sub_system_tag}', '${val2.full_name}')" data-filter-tags="user interface buttons" data-subtag="${val2.sub_system_tag}">
<span class="nav-link-text">
${val2.full_name} ${val2.sub_system_tag}
</span>
@ -125,37 +124,42 @@
if (index == 0 && index2 == 0) {
sst = val2.sub_system_tag;
mst = val.main_system_tag;
sstn = val2.full_name;
}
});
strHtml += `</ul> </li>`;
});
$('#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);
}
</script>

View File

@ -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);