Merge branch 'Willy'

This commit is contained in:
b110212000 2021-07-21 15:36:37 +08:00
commit 8e36857ff7
4 changed files with 10 additions and 12 deletions

View File

@ -987,7 +987,7 @@ namespace SolarPower.Controllers
Brand = Device.Brand, Brand = Device.Brand,
ColName = Device.ColName, ColName = Device.ColName,
PowerStationId = Device.PowerStationId, PowerStationId = Device.PowerStationId,
DBName = Device.DBName, DBName = powerStation.SiteDB,
Id = Device.Id, Id = Device.Id,
Name = Device.Name, Name = Device.Name,
ProductModel = Device.ProductModel, ProductModel = Device.ProductModel,
@ -1035,7 +1035,7 @@ namespace SolarPower.Controllers
Brand = Device.Brand, Brand = Device.Brand,
ColName = Device.ColName, ColName = Device.ColName,
PowerStationId = Device.PowerStationId, PowerStationId = Device.PowerStationId,
DBName = Device.DBName, DBName = powerStation.SiteDB,
Id = Device.Id, Id = Device.Id,
Name = Device.Name, Name = Device.Name,
ProductModel = Device.ProductModel, ProductModel = Device.ProductModel,

View File

@ -24,7 +24,8 @@
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"
}, },
"applicationUrl": "https://localhost:5001;http://localhost:5000" "applicationUrl": "https://localhost:5001;http://localhost:5000"
} }

View File

@ -2063,7 +2063,7 @@
TypeName: $("#Device_Type_modal :selected").text(), TypeName: $("#Device_Type_modal :selected").text(),
Brand: $("#Device_Brand_modal").val(), Brand: $("#Device_Brand_modal").val(),
ProductModel: $("#Device_ProductModel_modal").val(), ProductModel: $("#Device_ProductModel_modal").val(),
DBName: $("#Device_DBName_modal").val(), //DBName: $("#Device_DBName_modal").val(),
TableName: $("#Device_TableName_modal").val(), TableName: $("#Device_TableName_modal").val(),
ColName: $("#Device_ColName_modal").val(), ColName: $("#Device_ColName_modal").val(),
InstallDate: $("#Device_InstallDate_modal").val(), InstallDate: $("#Device_InstallDate_modal").val(),
@ -2091,7 +2091,7 @@
//#region 取一筆設備 //#region 取一筆設備
$('#Device_table').on("click", "button.edit-btn", function () { $('#Device_table').on("click", "button.edit-btn", function () {
$("#Device-modal .modal-title").html("設備資料 - 編輯"); $("#Device-modal .modal-title").html("設備資料 - 編輯");
document.getElementById('Device_Status_modal').disabled = true;
selected_id = $(this).parents('tr').attr('data-id'); selected_id = $(this).parents('tr').attr('data-id');
//取得單一運維基本資料 //取得單一運維基本資料
@ -2109,12 +2109,11 @@
return; return;
} }
document.getElementById('Device_Type_modal').disabled = true; document.getElementById('Device_Type_modal').disabled = true;
document.getElementById('Device_Status_modal').disabled = false;
document.getElementById('Device_Enabled_modal').disabled = false; document.getElementById('Device_Enabled_modal').disabled = false;
$("#Device_Type_modal").val(rel.data.type); $("#Device_Type_modal").val(rel.data.type);
$("#Device_Brand_modal").val(rel.data.brand); $("#Device_Brand_modal").val(rel.data.brand);
$("#Device_ProductModel_modal").val(rel.data.productModel); $("#Device_ProductModel_modal").val(rel.data.productModel);
$("#Device_DBName_modal").val(rel.data.dbName); //$("#Device_DBName_modal").val(rel.data.dbName);
$("#Device_TableName_modal").val(rel.data.tableName); $("#Device_TableName_modal").val(rel.data.tableName);
$("#Device_ColName_modal").val(rel.data.colName); $("#Device_ColName_modal").val(rel.data.colName);
$("#Device_Controller_modal").val(rel.data.controllerId); $("#Device_Controller_modal").val(rel.data.controllerId);
@ -2133,7 +2132,7 @@
//#region 取一筆逆變器 //#region 取一筆逆變器
$('#Inverter_table').on("click", "button.edit-btn", function () { $('#Inverter_table').on("click", "button.edit-btn", function () {
$("#Inverter-modal .modal-title").html("逆變器 - 編輯"); $("#Inverter-modal .modal-title").html("逆變器 - 編輯");
document.getElementById('Inverter_Status_modal').disabled = true;
selected_id = $(this).parents('tr').attr('data-id'); selected_id = $(this).parents('tr').attr('data-id');
var url = "/PowerStation/GetOneInverter/"; var url = "/PowerStation/GetOneInverter/";
@ -2148,8 +2147,6 @@
toast_error(rel.msg); toast_error(rel.msg);
return; return;
} }
document.getElementById('Inverter_Status_modal').disabled = false;
document.getElementById('Inverter_Enabled_modal').disabled = false; document.getElementById('Inverter_Enabled_modal').disabled = false;
$("#Inverter_ControllerId_modal").val(rel.data.controllerId); $("#Inverter_ControllerId_modal").val(rel.data.controllerId);
$("#Inverter_InverterName_modal").val(rel.data.inverterName); $("#Inverter_InverterName_modal").val(rel.data.inverterName);

View File

@ -275,12 +275,12 @@
<label class="form-label" for="Device_ProductModel_modal"><span class="text-danger">*</span>型號</label> <label class="form-label" for="Device_ProductModel_modal"><span class="text-danger">*</span>型號</label>
<input type="text" id="Device_ProductModel_modal" name="Device_ProductModel_modal" class="form-control"> <input type="text" id="Device_ProductModel_modal" name="Device_ProductModel_modal" class="form-control">
</div> </div>
<div class="form-group col-lg-6"> @*<div class="form-group col-lg-6">
<div style="margin-bottom: 0.3rem"> <div style="margin-bottom: 0.3rem">
<label class="form-label" for="Device_DBName_modal">DBName</label> <label class="form-label" for="Device_DBName_modal">DBName</label>
<input type="text" id="Device_DBName_modal" name="Device_DBName_modal" class="form-control"> <input type="text" id="Device_DBName_modal" name="Device_DBName_modal" class="form-control">
</div> </div>
</div> </div>*@
<div class="form-group col-lg-6"> <div class="form-group col-lg-6">
<div style="margin-bottom: 0.3rem"> <div style="margin-bottom: 0.3rem">
<label class="form-label" for="Device_TableName_modal">tableName</label> <label class="form-label" for="Device_TableName_modal">tableName</label>