建立overview

This commit is contained in:
b110212000 2021-07-01 09:41:36 +08:00
parent f7e2e9c123
commit ab63e65966
7 changed files with 317 additions and 3 deletions

View File

@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SolarPower.Controllers
{
public class StationOverviewController : MyBaseController<StationOverviewController>
{
public IActionResult Index()
{
return View();
}
}
}

View File

@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SolarPower.Models
{
public class Overview
{
}
}

View File

@ -0,0 +1,18 @@
using SolarPower.Helper;
using SolarPower.Models;
using SolarPower.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SolarPower.Repository.Implement
{
public class OverviewRepository : RepositoryBase<Overview>, IOverviewRepository
{
public OverviewRepository(IDatabaseHelper databaseHelper) : base(databaseHelper)
{
tableName = "power_station";
}
}
}

View File

@ -0,0 +1,12 @@
using SolarPower.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace SolarPower.Repository.Interface
{
public interface IOverviewRepository : IRepositoryBase<Overview>
{
}
}

View File

@ -1,4 +1,5 @@
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
@ -36,7 +37,7 @@ namespace SolarPower.Services.Implement
Interlocked.Increment(ref execCount); Interlocked.Increment(ref execCount);
} }
if (execCount == 1 && send_complete) if (execCount == 1)
{ {
try try
{ {
@ -58,5 +59,10 @@ namespace SolarPower.Services.Implement
_timer?.Change(Timeout.Infinite, 0); _timer?.Change(Timeout.Infinite, 0);
return Task.CompletedTask; return Task.CompletedTask;
} }
public void Dispose()
{
throw new NotImplementedException();
}
} }
} }

View File

@ -100,7 +100,7 @@
</a> </a>
</li> </li>
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")"> <li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
<a href="0stations.html" title="電站總覽" data-filter-tags="utilities disabled item"> <a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站總覽</span> <span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站總覽</span>
</a> </a>
</li> </li>

View File

@ -0,0 +1,251 @@
@{
ViewData["MainNum"] = "1";
ViewData["SubNum"] = "2";
ViewData["Title"] = "電站總覽";
}
<ol class="breadcrumb page-breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">總覽</a></li>
<li class="breadcrumb-item active">@ViewData["Title"]</li>
<li class="position-absolute pos-top pos-right d-none d-sm-block"><span class="js-get-date"></span></li>
</ol>
<!-- Your main content goes below here: -->
<div class="row">
<div class="col-xl-12">
<div id="panel-5" class="panel">
<div class="panel-container show">
<div class="panel-content">
<div class="subheader">
<h1 class="subheader-title"> 電站分佈區域 </h1>
</div>
<div class="row mb-3 d-flex align-items-center px-3">
<div class="pr-3">
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="Allcity()">全選</button>
</div>
<div class="pr-3">
<div class="frame-wrap" id="citytest">
<button type="button" class="btn btn-outline-success waves-effect waves-themed">
新北市
<span class="badge bg-success-700 ml-2" id="acount">4</span>
</button>
</div>
</div>
</div>
<div class="row mb-3 d-flex align-items-top px-3">
<div class="col-1 p-0">
<button type="button" class="btn btn-secondary waves-effect waves-themed" onclick="Allpowerstation()">全選</button>
</div>
<div class="col-11 p-2">
<div class="row frame-wrap" id="CheckPowerStation">
<div class="col-2 mb-2 custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline9" checked="">
<label class="custom-control-label" for="defaultInline9">設備正常</label>
</div>
<div class=" col-2 mb-2custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline10" checked="">
<label class="custom-control-label" for="defaultInline10">設備斷線</label>
</div>
<div class="col-2 mb-2 custom-control custom-checkbox custom-control-inline">
<input type="checkbox" class="custom-control-input" id="defaultInline11" checked="">
<label class="custom-control-label" for="defaultInline11">設備異常</label>
</div>
</div>
</div>
</div>
<div class="row mb-3 d-flex align-items-center px-3">
<div class="pr-3">
<label>排序條件</label>
</div>
<div class="pr-3">
<div class="frame-wrap" id="citytest">
<select class="form-control">
<option value="0">發電量 - 正序</option>
<option value="1">發電量 - 倒序</option>
</select>
</div>
</div>
<div class="pr-3">
<div class="frame-wrap" id="citytest">
<select class="form-control">
<option value="0">PR值 - 正序</option>
<option value="1">PR值 - 倒序</option>
</select>
</div>
</div>
</div>
<div id="area" class="tab-content p-3">
<div class="row mb-5">
<div class="card-columns">
<div class="card">
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 發電量</h4>
</div>
<div class="card-body" style="min-height: 148px;">
<div class="d-flex justify-content-between">
<p>今日發電量</p>
<p><span class="color-info-700">126,161.72</span> kWh</p>
</div>
<div class="d-flex justify-content-between">
<p>累積發電量</p>
<p><span class="color-info-700">4,069.73</span> kWh</p>
</div>
</div>
</div>
<div class="card">
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> 日照度</h4>
</div>
<div class="card-body" style="min-height: 148px;">
<div class="d-flex justify-content-between">
<p>即時平均日照度</p>
<p><span class="color-info-700">126,161.72</span> kW/m<sup>2</sup></p>
</div>
<div class="d-flex justify-content-between">
<p>平均日照度(30天)</p>
<p><span class="color-info-700">4,069.73</span> kW/m<sup>2</sup></p>
</div>
</div>
</div>
<div class="card">
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> PR值</h4>
</div>
<div class="card-body" style="min-height: 148px;">
<div class="d-flex justify-content-between">
<p>即時平均 PR 值</p>
<p><span class="color-info-700">119.04</span></p>
</div>
<div class="d-flex justify-content-between">
<p>平均 PR 值(30天)</p>
<p><span class="color-info-700">3.84</span></p>
</div>
</div>
</div>
<div class="card">
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
<h4 class="mb-0 font-weight-bold"><span class="fal fa-sun mr-1"></span> kWh / kWp</h4>
</div>
<div class="card-body" style="min-height: 148px;">
<div class="d-flex justify-content-between">
<p>即時平均 kWh / kWp</p>
<p><span class="color-info-700">140.39</span></p>
</div>
<div class="d-flex justify-content-between">
<p>平均 kWh / kWp (30天)</p>
<p><span class="color-info-700">4.53</span></p>
</div>
</div>
</div>
<div class="card">
<div class="card-header bg-fusion-25 pr-3 d-flex align-items-center flex-wrap">
<h4 class="mb-0 font-weight-bold"><span class="fal fa-bolt mr-1"></span> 減碳量</h4>
</div>
<div class="card-body" style="min-height: 148px;">
<div class="d-flex justify-content-between">
<p>今日減碳量</p>
<p><span class="color-info-700">6,091.78</span> kG</p>
</div>
<div class="d-flex justify-content-between">
<p>累積減碳量</p>
<p><span class="color-info-700">985.98</span> kG</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="area" class="tab-content p-3">
<div class="col-12 text-right">
<a href="javascript:TableDisplay();" class="btn btn-secondary btn-icon waves-effect waves-themed"><span class="fal fa-list mr-1"></span></a>
<a href="javascript:CardDisplay();" class="btn btn-secondary btn-icon waves-effect waves-themed"><span class="fal fa-grip-horizontal mr-1"></span></a>
</div>
<div id="templateCard" hidden="hidden">
<div class="col-xl-2">
<div class="card border m-auto m-lg-0">
<a id="editSolarUrl" href="0station.html">
<img id="Solarimg" src="img/card-backgrounds/cover-3-lg.png" class="card-img-top" alt="...">
</a>
<div class="card-body d-flex justify-content-between pb-0 px-2">
<h4 id="solarName" class="font-weight-bold" style="line-height: 27px;">
新竹巨城站
</h4>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item px-2">
<div class=" d-flex justify-content-between">
<p>裝置容量</p>
<p><span id="today_kwh" class="color-primary-400">185</span> kWh</p>
</div>
<div class=" d-flex justify-content-between">
<p>逆變器數量</p>
<p><span id="kwhkwp" class="color-primary-400">2,5840</span></p>
</div>
<div class=" d-flex justify-content-between">
<p>台電掛表日</p>
<p><span id="PR" class="color-primary-400">90</span></p>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="TableArea">
<div class="p-3">
<table id="solarTable" class="table table-bordered table-hover m-0 text-center">
<thead class="thead-themed">
<tr>
<th>編號</th>
<th>電站名稱</th>
<th>裝置容量(kWp)</th>
<th>逆變器數量</th>
<th>台電掛表日</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="templateArea" hidden="hidden">
<div class="tab-pane" id="tab-name" role="tabpanel" aria-labelledby="tab-name">
<div class="row mb-5 d-flex justify-content-between">
<div class="col-6 text-right">
<a href="javascript:TableDisplay();" class="btn btn-secondary btn-icon waves-effect waves-themed"><span class="fal fa-list mr-1"></span></a>
<a href="javascript:CardDisplay();" class="btn btn-secondary btn-icon waves-effect waves-themed"><span class="fal fa-grip-horizontal mr-1"></span></a>
</div>
</div>
<div class="row solarCard" id="solarCard">
</div>
<div class="TableArea">
<table id="solarTable" class="table table-bordered table-hover m-0 text-center">
<thead class="thead-themed">
<tr>
<th>編號</th>
<th>電站名稱</th>
<th>裝置容量(kWp)</th>
<th>逆變器數量</th>
<th>台電掛表日</th>
<th></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>