電站總攬-過濾條件選擇後,清空下方畫面

This commit is contained in:
wanling040@gmail.com 2022-08-01 14:53:28 +08:00
parent 1a16cb764a
commit 5fa15dbec1

View File

@ -366,6 +366,22 @@
getStation(ids); getStation(ids);
}) })
function emptyCardAndTable() {
$('#areaCard').empty();
$('#solarTable').find('tbody').empty();
$("#today_kwh").html(0);
$("#total_kwh").html(0);
$("#today_irradiance").html(0);
$("#avg_irradiance").html(0);
$("#today_PR").html(0);
$("#avg_PR").html(0);
$("#today_kwhkwp").html(0);
$("#avg_kwhkwp").html(0);
$("#today_carbon").html(0);
$("#total_carbon").html(0);
$("#update_at").html(0);
}
function getStation(ids) { function getStation(ids) {
@*var kwh = $('#kwh_order').val(); @*var kwh = $('#kwh_order').val();
var pr = $('#pr_order').val(); var pr = $('#pr_order').val();
@ -387,26 +403,13 @@
prOrderBy: $('#pr_order').val() prOrderBy: $('#pr_order').val()
} }
emptyCardAndTable();
@*ids.sort(function (a, b) { @*ids.sort(function (a, b) {
return a - b; return a - b;
}); });
ids.sort();*@ ids.sort();*@
if (ids.length == 0 || selectedStatus.length == 0) { if (ids.length != 0 && selectedStatus.length != 0) {
$('#areaCard').empty();
$('#solarTable').find('tbody').empty();
$("#today_kwh").html(0);
$("#total_kwh").html(0);
$("#today_irradiance").html(0);
$("#avg_irradiance").html(0);
$("#today_PR").html(0);
$("#avg_PR").html(0);
$("#today_kwhkwp").html(0);
$("#avg_kwhkwp").html(0);
$("#today_carbon").html(0);
$("#total_carbon").html(0);
$("#update_at").html(0);
}
else {
showLoading(); showLoading();
var Nurl = "/StationOverview/GetPowerStationByFilter"; var Nurl = "/StationOverview/GetPowerStationByFilter";
$.post(Nurl, send_data, function (rel) { $.post(Nurl, send_data, function (rel) {