diff --git a/SolarPower/Repository/Implement/OverviewRepository.cs b/SolarPower/Repository/Implement/OverviewRepository.cs index 5c76a83..6687a49 100644 --- a/SolarPower/Repository/Implement/OverviewRepository.cs +++ b/SolarPower/Repository/Implement/OverviewRepository.cs @@ -418,7 +418,7 @@ namespace SolarPower.Repository.Implement { PowerStationId = post.Id, Status = post.Status, - })).ToList(); + }, commandTimeout: 600)).ToList(); } catch (Exception exception) { diff --git a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml index 7539c01..6f37cc1 100644 --- a/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml +++ b/SolarPower/Views/StationOverview/StationOverviewInfo.cshtml @@ -175,6 +175,13 @@ var selectInverterkwhBarType = 0; var HeapMapXAxis = []; var countOperationRecordFile = 0; + var isloadingdone_uptodate = false; + var isloadingdone_info = false; + var isloadingdone_inverterinfo = false; + var isloadingdone_inverter = false; + var isloadingdone_history = false; + var isloadingdone_exception = false; + var isloadingdone_operation = false; function showLoading() { var i = document.getElementById("loading"); @@ -183,7 +190,10 @@ function hideLoading() { var i = document.getElementById("loading"); - i.style.display = "none"; + if (isloadingdone_uptodate && isloadingdone_info && isloadingdone_inverterinfo && isloadingdone_inverter && isloadingdone_history && isloadingdone_exception && isloadingdone_operation) + { + i.style.display = "none"; + } } $(function () { @@ -262,6 +272,7 @@ }; $.post(url, send_data, function (rel) { if (rel.code != "0000") { + isloadingdone_uptodate = true; hideLoading(); toast_error(rel.msg); return; @@ -320,6 +331,7 @@ $("#money-card-subtitle-total").html("總計"); $("#money-card-subtitle-avg").html("今日"); } + isloadingdone_uptodate = true; hideLoading(); }, 'json'); @@ -757,6 +769,7 @@ } $.post(url, send_data, function (rel) { if (rel.code != "0000") { + isloadingdone_info = true; hideLoading(); toast_error(rel.msg); return; @@ -781,6 +794,7 @@ $("#power_station_select_modal").append($("