電站管理 - 獨立移出

This commit is contained in:
b110212000 2021-10-01 11:38:55 +08:00
parent 201ef52151
commit b1a62fde79
3 changed files with 89 additions and 78 deletions

View File

@ -250,6 +250,9 @@
'render': function (data, type, full, meta) {
return '<img src="' + data + '?v=' + Date.now() + '" width="200px" height="40px">';
}
},{
'targets': 8,
'visible': false
}],
"language": {
"emptyTable": "查無資料",

View File

@ -1,5 +1,5 @@
@{
ViewData["MainNum"] = "6";
ViewData["MainNum"] = "8";
ViewData["SubNum"] = "1";
ViewData["Title"] = "電站管理";
}

View File

@ -154,12 +154,12 @@
-->
<ul id="js-nav-menu" class="nav-menu">
<!--<li class="active">
<a href="blank.html" title="Blank Project" data-filter-tags="blank page">
<i class="fal fa-globe"></i>
<span class="nav-link-text" data-i18n="nav.blankpage">Blank Project</span>
</a>
</li>
<li class="nav-title">Navigation Title</li>-->
<a href="blank.html" title="Blank Project" data-filter-tags="blank page">
<i class="fal fa-globe"></i>
<span class="nav-link-text" data-i18n="nav.blankpage">Blank Project</span>
</a>
</li>
<li class="nav-title">Navigation Title</li>-->
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("MapOverview") || ViewBag.auths.Contains("StationOverview"))
{
<li class="@(ViewData["MainNum"] == "1" ? "active open" : "")">
@ -176,14 +176,14 @@
</a>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|| ViewBag.auths.Contains("StationOverview_Info")
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|| ViewBag.auths.Contains("StationOverview_Inverter")
|| ViewBag.auths.Contains("StationOverview_History")
|| ViewBag.auths.Contains("StationOverview_Exception")
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|| ViewBag.auths.Contains("StationOverview_Info")
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|| ViewBag.auths.Contains("StationOverview_Inverter")
|| ViewBag.auths.Contains("StationOverview_History")
|| ViewBag.auths.Contains("StationOverview_Exception")
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
{
<li class="@(ViewData["MainNum"] == "1" && ViewData["SubNum"] == "2" ? "active" : "")">
<a asp-controller="StationOverview" asp-action="Index" title="電站總覽" data-filter-tags="utilities disabled item">
@ -196,13 +196,13 @@
}
<!-- Example of open and active states -->
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|| ViewBag.auths.Contains("StationOverview_Info")
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|| ViewBag.auths.Contains("StationOverview_Inverter")
|| ViewBag.auths.Contains("StationOverview_History")
|| ViewBag.auths.Contains("StationOverview_Exception")
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
|| ViewBag.auths.Contains("StationOverview_UpToDate")
|| ViewBag.auths.Contains("StationOverview_Info")
|| ViewBag.auths.Contains("StationOverview_InverterInfo")
|| ViewBag.auths.Contains("StationOverview_Inverter")
|| ViewBag.auths.Contains("StationOverview_History")
|| ViewBag.auths.Contains("StationOverview_Exception")
|| ViewBag.auths.Contains("StationOverview_OperationRecord"))
{
<li class="@(ViewData["MainNum"] == "2" ? "active open" : "")">
<a href="javascript:void(0);" title="電站資訊" data-filter-tags="category">
@ -236,17 +236,17 @@
}
@*<li class="@(ViewData["MainNum"] == "2" && ViewData["SubNum"].ToString() == ViewBag.myPowerStationSummaries.Count.ToString() ? "active" : "")">
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
</a>
</li>*@
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
</a>
</li>*@
</ul>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|| ViewBag.auths.Contains("AnalysisStationCombine")
|| ViewBag.auths.Contains("AnalysisStationInfo")
|| ViewBag.auths.Contains("AnalysisInverter"))
|| ViewBag.auths.Contains("AnalysisStationCombine")
|| ViewBag.auths.Contains("AnalysisStationInfo")
|| ViewBag.auths.Contains("AnalysisInverter"))
{
<li class="@(ViewData["MainNum"] == "3" ? "active open" : "")">
<a href="#" title="交叉分析" data-filter-tags="category">
@ -282,10 +282,10 @@
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin
|| ViewBag.auths.Contains("StationReport")
|| ViewBag.auths.Contains("ElectricitySoldRecord")
|| ViewBag.auths.Contains("PowerGeneration")
|| ViewBag.auths.Contains("NoticeSchedule"))
|| ViewBag.auths.Contains("StationReport")
|| ViewBag.auths.Contains("ElectricitySoldRecord")
|| ViewBag.auths.Contains("PowerGeneration")
|| ViewBag.auths.Contains("NoticeSchedule"))
{
<li class="@(ViewData["MainNum"] == "4" ? "active open" : "")">
<a href="#" title="報表查詢" data-filter-tags="category">
@ -295,38 +295,38 @@
<ul>
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("StationReport"))
{
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
<a asp-controller="StationReport" asp-action="Index" title="電站報表" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站報表</span>
</a>
</li>
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
<a asp-controller="StationReport" asp-action="Index" title="電站報表" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站報表</span>
</a>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("ElectricitySoldRecord"))
{
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "2" ? "active" : "")">
<a asp-controller="ElectricitySoldRecord" asp-action="Index" title="台電售電記錄" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">台電售電記錄</span>
</a>
</li>
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "2" ? "active" : "")">
<a asp-controller="ElectricitySoldRecord" asp-action="Index" title="台電售電記錄" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">台電售電記錄</span>
</a>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerGeneration"))
{
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "3" ? "active" : "")">
<a asp-controller="PowerGeneration" asp-action="Index" title="電站發電收入" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電廠發電效能統計</span>
</a>
</li>
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "3" ? "active" : "")">
<a asp-controller="PowerGeneration" asp-action="Index" title="電站發電收入" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電廠發電效能統計</span>
</a>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("NoticeSchedule"))
{
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "4" ? "active" : "")">
<a asp-controller="NoticeSchedule" asp-action="Index" title="報告發送記錄" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">報告發送記錄</span>
</a>
</li>
<li class="@(ViewData["MainNum"] == "4" && ViewData["SubNum"].ToString() == "4" ? "active" : "")">
<a asp-controller="NoticeSchedule" asp-action="Index" title="報告發送記錄" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">報告發送記錄</span>
</a>
</li>
}
</ul>
</li>
@ -348,8 +348,23 @@
</ul>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation") || ViewBag.auths.Contains("Operation") || ViewBag.auths.Contains("OperationRecord"))
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))
{
<li class="@(ViewData["MainNum"] == "8" ? "active open" : "")">
<a href="#" title="電站管理" data-filter-tags="category">
<i class="fal fa-cogs"></i>
<span class="nav-link-text" data-i18n="nav.category">電站管理</span>
</a>
<ul>
<li class="@(ViewData["MainNum"] == "8" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
</a>
</li>
</ul>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Operation") || ViewBag.auths.Contains("OperationRecord"))
{
<li class="@(ViewData["MainNum"] == "6" ? "active open" : "")">
<a href="#" title="運維管理" data-filter-tags="category">
@ -357,14 +372,7 @@
<span class="nav-link-text" data-i18n="nav.category">運維管理</span>
</a>
<ul>
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("PowerStation"))
{
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"].ToString() == "1" ? "active" : "")">
<a asp-controller="PowerStation" asp-action="Index" title="電站管理" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">電站管理</span>
</a>
</li>
}
@if (ViewBag.myUser.Role.Layer == (int)RoleLayerEnum.PlatformAdmin || ViewBag.auths.Contains("Operation"))
{
<li class="@(ViewData["MainNum"] == "6" && ViewData["SubNum"] == "2" ? "active" : "")">
@ -410,21 +418,21 @@
</li>
}
@*@if (ViewBag.auths.Contains("User"))
{
<li class="">
<a href="javascript:void(0);" title="功能清單" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">功能清單</span>
</a>
</li>
}
@if (ViewBag.auths.Contains("User"))
{
<li class="">
<a href="javascript:void(0);" title="定時任務設定" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定時任務設定</span>
</a>
</li>
}*@
{
<li class="">
<a href="javascript:void(0);" title="功能清單" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">功能清單</span>
</a>
</li>
}
@if (ViewBag.auths.Contains("User"))
{
<li class="">
<a href="javascript:void(0);" title="定時任務設定" data-filter-tags="utilities disabled item">
<span class="nav-link-text" data-i18n="nav.utilities_disabled_item">定時任務設定</span>
</a>
</li>
}*@
</ul>
</li>
}