Merge branch 'Gary'

This commit is contained in:
桂任 林 2021-06-14 18:20:02 +08:00
commit 6b1907ee74
4 changed files with 70 additions and 22 deletions

View File

@ -36,8 +36,8 @@ namespace SolarPower.Helper
var rootStr = ed.DESDecrypt(dbConfig.Root);
var passwordStr = ed.DESDecrypt(dbConfig.Password);
var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;";
//var connStr = @"server=127.0.0.1;database=solar_power;user=root;password=000000;charset=utf8;";
//var connStr = $"server={serverStr};database={databaseStr};user={rootStr};password={passwordStr};charset=utf8;";
var connStr = @"server=127.0.0.1;database=solar_power;user=root;password=000000;charset=utf8;";
this._connectionString = connStr;
}

View File

@ -50,7 +50,7 @@
<div class="tab-pane fade show active" id="tab-newtaipei" role="tabpanel" aria-labelledby="tab-newtaipei">
<div class="row mb-5 d-flex justify-content-between">
<div class="col-6">
<a asp-controller="PowerStation" asp-action="Add" class="btn btn-success waves-effect waves-themed mb-3">
<a asp-controller="PowerStation" asp-action="Edit" asp-route-solarid="new" class="btn btn-success waves-effect waves-themed mb-3">
<span class="fal fa-plus mr-1"></span>
新增電站
</a>

View File

@ -27,7 +27,7 @@
</span> 新竹巨城站
</h1>
</div>
<ul class="nav nav-tabs mb-5" role="tablist">
<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>
@ -87,6 +87,35 @@
<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) {

View File

@ -15,17 +15,36 @@
</div>
<div class="card-body">
<div class="row d-flex justify-content-between">
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="addressLabel">地址: </p>
<select class="form-control" id="company_select">
<option value="0" selected>全部</option>
</select>
</div>
<div class="col-xl-2 justify-content-center">
<p id="power_station_name_text">電站名稱:</p>
<select class="form-control" id="company_select">
<option value="0" selected>全部</option>
</select>
</div>
<div class="col-xl-2 justify-content-center">
<input type="text" id="addressDetail" name="addressDetail" class="form-control">
</div>
</div>
<div class="row d-flex justify-content-between">
<div class="col-xl-2 justify-content-center">
<p id="power_station_id_text">電站代碼: </p>
<label class="form-label" id="power_station_id_label" for="power_station_id">電站編號</label>
<input type="text" id="power_station_id" name="power_station_id" disabled="disabled" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="power_station_name_text">電站名稱:</p>
<label class="form-label" id="power_station_name_label" for="power_station_name">電站名稱</label>
<input type="text" id="power_station_name" name="power_station_name" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p>是否為代管 </p>
<p class="color-info-600">
<div class="custom-control custom-switch">
@ -34,49 +53,49 @@
</div>
</p>
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="ElectricityMeterAt_text">台電掛錶日 </p>
<label class="form-label" id="ElectricityMeterAt_Label" for="ElectricityMeterAt">台電掛錶日</label>
<input type="date" id="ElectricityMeterAt" name="ElectricityMeterAt" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="EstimatedRecoveryTime_text">預計回收年限:</p>
<label class="form-label" id="EstimatedRecoveryTime_Label" for="EstimatedRecoveryTime">預計回收年限</label>
<input type="text" id="EstimatedRecoveryTime" name="EstimatedRecoveryTime" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<p id="CreatedBy_text">資料建立:</pCreatedBy>
<div class="col-xl-2 justify-content-center">
<p id="CreatedBy_text">資料建立:</p>
</div>
</div>
<div class="row d-flex justify-content-between mb-5">
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="GeneratingCapacity_text">電廠發電容量 <br>(kW)</p>
<label class="form-label" id="GeneratingCapacity_Label" for="GeneratingCapacity">電廠發電容量</label>
<input type="text" id="GeneratingCapacity" name="GeneratingCapacity" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="power_station_operation_personnel_text">運維人員:</p>
<select class="js-example-basic-multiple form-control" id="power_station_operation_personnel" multiple="multiple">
</select>
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="EscrowName_text">被代管公司 </p>
<label class="form-label" id="EscrowName_Lable" for="EscrowName">被代管公司</label>
<input type="text" id="EscrowName" name="EscrowName" class="form-control" disabled="disabled">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="PowerRate_text">授電費率:</p>
<label class="form-label" id="PowerRate_Label" for="PowerRate">授電費率</label>
<input type="text" id="PowerRate" name="PowerRate" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="Coordinate_Text">座標:</p>
<label class="form-label" id="Coordinate_Label" for="Coordinate">座標</label>
<input type="text" id="Coordinate" name="Coordinate" class="form-control">
</div>
<div class="col-xl-2 d-flex justify-content-center">
<div class="col-xl-2 justify-content-center">
<p id="CreatedAt_Text">建立時間:</p>
</div>
</div>
@ -95,7 +114,7 @@
<label class="form-label" id="InverterProductModel_Label" for="InverterProductModel">型號</label>
<input type="text" id="InverterProductModel" name="InverterProductModel" class="form-control">
</div>
<div class="col-xl-4 text-right">
<div class="col-xl-4">
<p id="InverterAmount_text">數量:<span class="color-info-600">400</span></p>
<label class="form-label" id="InverterAmount_Label" for="InverterAmount">數量</label>
<input type="text" id="InverterAmount" name="InverterAmount" class="form-control">
@ -115,13 +134,13 @@
<label class="form-label" id="PhotovoltaicPanelSpecification_Label" for="PhotovoltaicPanelSpecification">規格</label>
<input type="text" id="PhotovoltaicPanelSpecification" name="PhotovoltaicPanelSpecification" class="form-control">
</div>
<div class="col-xl-4 text-right">
<div class="col-xl-4">
<p id="PhotovoltaicPanelAmount_text">數量:<span class="color-info-600">1116</span></p>
<label class="form-label" id="PhotovoltaicPanelAmount_Label" for="PhotovoltaicPanelAmount">數量</label>
<input type="text" id="PhotovoltaicPanelAmount" name="PhotovoltaicPanelAmount" class="form-control">
</div>
<div class="col-xl-4">
<p>型號 <span class="color-info-600" id="PhotovoltaicPanelProductModel_text">6MN6A295</span></p>
<p id="PhotovoltaicPanelProductModel_text">型號 <span class="color-info-600">6MN6A295</span></p>
<label class="form-label" id="PhotovoltaicPanelProductModel_Label" for="PhotovoltaicPanelProductModel">型號</label>
<input type="text" id="PhotovoltaicPanelProductModel" name="PhotovoltaicPanelProductModel" class="form-control">
</div>
@ -134,7 +153,7 @@
</div>
<div class="row mb-5">
<div class="row mb-5" id="BoEPart">
<div class="card border mb-g w-100">
<!-- notice the additions of utility paddings and display properties on .card-header -->
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">
@ -199,7 +218,7 @@
</div>
<div class="row mb-5">
<div class="row mb-5" id="land_buildingPart">
<div class="card border mb-g w-100">
<!-- notice the additions of utility paddings and display properties on .card-header -->
<div class="card-header bg-fusion-50 pr-3 d-flex align-items-center flex-wrap justify-content-between">