From 702bed99c4bddbe33a175092a87141a158037b59 Mon Sep 17 00:00:00 2001 From: b110212000 Date: Thu, 19 May 2022 15:42:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=AD=B7=E5=8F=B2=E8=B3=87?= =?UTF-8?q?=E6=96=99=E6=9F=A5=E8=A9=A2btn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StationOverviewInfo.cshtml | 38 ++++++++++++------- .../Views/StationOverview/_History.cshtml | 6 +-- 2 files changed, 28 insertions(+), 16 deletions(-) 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 @@ - @*
- -
*@ +
+ +