diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index 4eb45bb..7ba58a2 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -2300,6 +2300,7 @@ document.getElementById("Group" + i).setAttribute("class", "btn btn-secondary waves-effect waves-themed"); } document.getElementById("Group" + type).setAttribute("class", "btn btn-success waves-effect waves-themed"); + document.getElementById("Historybtn").style.display = "";//隱藏 switch (type) { case 0: @@ -2355,6 +2356,8 @@ document.getElementById("DateGet").style.display = "none";//隱藏 document.getElementById("MonthGet").style.display = "none";//隱藏 document.getElementById("YearGet").style.display = "none";//隱藏 + + document.getElementById("Historybtn").style.display = "none";//隱藏 groupType = type; historyRange = ''; getTable(); @@ -2421,22 +2424,31 @@ } //#endregion + + function Historyclick() { + switch (groupType) { + case 0: historyRange = $('#DateGet').val(); break; + case 1: historyRange = $('#MonthGet').val(); break; + case 2: historyRange = $('#YearGet').val(); break; + } + getTable(); + } console.log(" before onChange event"); - $('#DateGet').on('change', function () { - console.log(" in onChange event"); - historyRange = $('#DateGet').val(); - getTable(); - }); + //$('#DateGet').on('change', function () { + // console.log(" in onChange event"); + // historyRange = $('#DateGet').val(); + // getTable(); + //}); - $('#MonthGet').on('change', function () { - historyRange = $('#MonthGet').val(); - getTable(); - }); + //$('#MonthGet').on('change', function () { + // historyRange = $('#MonthGet').val(); + // getTable(); + //}); - $('#YearGet').on('change', function () { - historyRange = $('#YearGet').val(); - getTable(); - }); + //$('#YearGet').on('change', function () { + // historyRange = $('#YearGet').val(); + // getTable(); + //}); function getTable() { diff --git a/SolarPower/Views/StationOverview/_History.cshtml b/SolarPower/Views/StationOverview/_History.cshtml index ddead60..618856d 100644 --- a/SolarPower/Views/StationOverview/_History.cshtml +++ b/SolarPower/Views/StationOverview/_History.cshtml @@ -44,9 +44,9 @@ - @*
- -
*@ +
+ +