FIC_Solar/SolarPower/Views/PowerStation/PowerStationEdit.cshtml
2021-06-14 18:05:53 +08:00

151 lines
6.7 KiB
Plaintext

@{
ViewData["MainNum"] = "6";
ViewData["SubNum"] = "1";
ViewData["Title"] = "電站資料管理";
}
<ol class="breadcrumb page-breadcrumb">
<li class="breadcrumb-item"><a href="javascript:void(0);">總覽</a></li>
<li class="breadcrumb-item">@ViewData["Title"]</li>
<li class="breadcrumb-item">新竹市</li>
<li class="breadcrumb-item active">新竹巨城站</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">
<span class="icon-stack fa-1x">
<i class="base-7 icon-stack-3x color-info-500"></i>
<i class="base-7 icon-stack-2x color-info-700"></i>
<i class="ni ni-graph icon-stack-1x text-white"></i>
</span> 新竹巨城站
</h1>
</div>
<ul class="nav nav-tabs mb-5" role="tablist" id="tablist">
<li class="nav-item">
<a class="nav-link fs-lg px-4 active" data-toggle="tab" href="#tab-001" role="tab">
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">電站資料</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-002" role="tab">
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">裝置列表</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-003" role="tab">
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">維運廠商</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link fs-lg px-4" data-toggle="tab" href="#tab-004" role="tab">
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">資料上傳</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link fs-lg px-4 disabled" data-toggle="tab" href="#tab-005" role="tab">
<i class="fal fa-home text-success"></i> <span class="hidden-sm-down ml-1">異常設定</span>
</a>
</li>
</ul>
<div class="tab-content p-3">
<div class="tab-pane fade show active" id="tab-001" role="tabpanel" aria-labelledby="tab-001">
@Html.Partial("_StationInfo")
</div>
<div class="tab-pane fade" id="tab-002" role="tabpanel" aria-labelledby="tab-002">
@Html.Partial("_DeviceSetting")
</div>
<div class="tab-pane fade" id="tab-003" role="tabpanel" aria-labelledby="tab-003">
@Html.Partial("_Operation")
</div>
<div class="tab-pane fade" id="tab-004" role="tabpanel" aria-labelledby="tab-004">
@Html.Partial("_UploadImage")
</div>
<div class="tab-pane fade" id="tab-005" role="tabpanel" aria-labelledby="tab-005">
<div class="row mb-5">
此處放異常設定數據
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@section Scripts{
<script>
$(function () {
var getUrlString = location.href;
var url = new URL(getUrlString);
var solarid=url.searchParams.get('solarid');
if (solarid = 'new') {
$("#power_station_id_text").hide();
$("#power_station_name_text").hide();
$("#ElectricityMeterAt_text").hide();
$("#EstimatedRecoveryTime_text").hide();
$("#CreatedBy_text").hide();
$("#GeneratingCapacity_text").hide();
$("#EscrowName_text").hide();
$("#PowerRate_text").hide();
$("#Coordinate_Text").hide();
$("#InverterBrand_text").hide();
$("#InverterProductModel_text").hide();
$("#InverterAmount_text").hide();
$("#PhotovoltaicPanelBrand_text").hide();
$("#PhotovoltaicPanelSpecification_text").hide();
$("#PhotovoltaicPanelAmount_text").hide();
$("#PhotovoltaicPanelProductModel_text").hide();
$("#CreatedAt_Text").hide();
$("#IsEscrow").attr('disabled', false)
$("#BoEPart").hide();
$("#land_buildingPart").hide();
$("#tablist").hide();
}
//#region 預先載入公司下拉式選單select_option
var url_user_select_option = "/PowerStation/GetUserSelectOptionList";
$.get(url_user_select_option, function (rel) {
if (rel.code != "0000") {
toast_error(rel.msg);
return;
}
$("#power_station_operation_personnel").empty();
$.each(rel.data, function (index, val) {
$("#power_station_operation_personnel").append($("<option />").val(val.value).text(val.text));
});
//預設查詢第一個
$("#power_station_operation_personnel").val($("#power_station_operation_personnel option:first").val());
});
//#endregion
$('.js-example-basic-multiple').select2();
});
$("#IsEscrow").click(function () {
if ($(this).prop("checked")) {
$('#IsEscrowLabel').html("Yes");
$("#EscrowName").attr('disabled', false)
} else {
$('#IsEscrowLabel').html("No");
$("#EscrowName").attr('disabled', true)
}
});
</script>
}