1. bug fix

This commit is contained in:
Kai 2021-08-06 11:38:13 +08:00
parent f2e1ea235d
commit 2ac29120cd
14 changed files with 333 additions and 269 deletions

View File

@ -38,7 +38,7 @@ namespace SolarPower.Controllers
}
else
{
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser.CompanyId);
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser);
}
var siteDBNamePowerStationId = new Dictionary<string, List<int>>();

View File

@ -37,7 +37,7 @@ namespace SolarPower.Controllers
}
else
{
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser.CompanyId);
powerStations = await powerStationRepository.GetPowerStationsByCompanyId(myUser);
}
var siteDBNamePowerStationId = new Dictionary<string, List<int>>();
@ -51,7 +51,7 @@ namespace SolarPower.Controllers
var powerStationDevices = await powerStationRepository.GetPowerStationDevice(siteDBNamePowerStationId, filter);
powerStationDevices = powerStationDevices.Where(x => x.DeviceId != null).ToList();
//powerStationDevices = powerStationDevices.Where(x => x.DeviceId != null).ToList();
var powerStationDevice_cityName_Group = powerStationDevices.GroupBy(x => x.CityName).ToList();
@ -79,7 +79,10 @@ namespace SolarPower.Controllers
temp.Add(powerStation);
foreach (var device in psName_Group)
{
temp.Add(device);
if(!string.IsNullOrEmpty(device.DeviceId))
{
temp.Add(device);
}
}
deviceDic.Add(psName_Group.Key, temp);
}

View File

@ -2033,7 +2033,23 @@ namespace SolarPower.Controllers
foreach (var solar in solaramount)
{
solar.MainDisplay = Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
//判斷該檔案是否存在
if (!string.IsNullOrEmpty(solar.MainDisplay))
{
var fullFilePath = Directory.GetCurrentDirectory() + "/wwwroot" + Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
if (System.IO.File.Exists(fullFilePath))
{
solar.MainDisplay = Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
List<int> deviceControllerid = await powerStationRepository.GetAllDeviceControllerId(solar.Id, solar.SiteDB);
var InverterTable = await powerStationRepository.InverterTable(deviceControllerid, solar.SiteDB);
solar.InverterAmount = InverterTable.Count;

View File

@ -6,11 +6,11 @@ using SolarPower.Models.PowerStation;
using SolarPower.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
using System.Globalization;
namespace SolarPower.Controllers
{
@ -52,7 +52,23 @@ namespace SolarPower.Controllers
foreach (var solar in solaramount)
{
solar.MainDisplay = Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
//判斷該檔案是否存在
if (!string.IsNullOrEmpty(solar.MainDisplay))
{
var fullFilePath = Directory.GetCurrentDirectory() + "/wwwroot" + Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
if (System.IO.File.Exists(fullFilePath))
{
solar.MainDisplay = Path.Combine(stationImageFilePath, solar.Id.ToString()) + "/" + solar.MainDisplay;
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
}
else
{
solar.MainDisplay = Path.Combine("img", "blank.gif");
}
}
apiResult.Data = solaramount;
@ -438,7 +454,7 @@ namespace SolarPower.Controllers
{
a.Function = @$"<a href='javascript:;' class='waves-effect waves-themed mb-3 mr-2 edit-btn'>{a.FormId}</a>";
}
if(a.NormalTime == "1970-01-01 08:00:00")
if (a.NormalTime == "1970-01-01 08:00:00")
{
a.NormalTime = "";
}
@ -491,12 +507,12 @@ namespace SolarPower.Controllers
{
List<double> values = new List<double>();
foreach(var lable in inverterkwhBar.Labels)
foreach (var lable in inverterkwhBar.Labels)
{
var find = false;
foreach (var value in inverterHistory)
{
if(value.TIMESTAMP == lable)
if (value.TIMESTAMP == lable)
{
values.Add(value.KWH);
find = true;

View File

@ -42,7 +42,7 @@ namespace SolarPower.Quartz.Jobs
if (this.environment.IsDevelopment())
{
dateTime = DateTimeNow.AddHours(-1).ToString("yyyy-MM-dd HH");
dateTime = "2021-08-06 10";
}
logger.LogInformation("【CalcPowerStationJob】【任務開始】");
@ -170,10 +170,22 @@ namespace SolarPower.Quartz.Jobs
history.CARBON = history.KWH * carbonRate;
//總減碳量(總發電量 * (0.554/1000)[抓資料庫值]
calcPowerStation.Total_Carbon = history.TotalKWH * carbonRate;
history.TODAYCARBON = lastmoneyhistorybyhour.TODAYCARBON + history.KWH * carbonRate;
history.TOTALCARBON = lastmoneyhistorybyhour.TOTALCARBON + history.KWH * carbonRate;
history.TODAYMONEY = lastmoneyhistorybyhour.TODAYMONEY + history.KWH * powerStation.PowerRate;
history.TOTALMONEY = lastmoneyhistorybyhour.TOTALMONEY + history.KWH * powerStation.PowerRate;
if(lastmoneyhistorybyhour != null)
{
history.TODAYCARBON = lastmoneyhistorybyhour.TODAYCARBON + history.KWH * carbonRate;
history.TOTALCARBON = lastmoneyhistorybyhour.TOTALCARBON + history.KWH * carbonRate;
history.TODAYMONEY = lastmoneyhistorybyhour.TODAYMONEY + history.KWH * powerStation.PowerRate;
history.TOTALMONEY = lastmoneyhistorybyhour.TOTALMONEY + history.KWH * powerStation.PowerRate;
}
else
{
history.TODAYCARBON = history.KWH * carbonRate;
history.TOTALCARBON = history.KWH * carbonRate;
history.TODAYMONEY = history.KWH * powerStation.PowerRate;
history.TOTALMONEY = history.KWH * powerStation.PowerRate;
}
#endregion
#region
@ -347,206 +359,213 @@ namespace SolarPower.Quartz.Jobs
}
#endregion
#region step3. historiers INSERT power_station_history_hour
List<string> history_properties = new List<string>()
if (!this.environment.IsDevelopment())
{
"PowerStationId",
"TIMESTAMP",
"SITEID",
"SITETYPE",
"KWH",
"TODAYKWH",
"TOTALKWH",
"KWHKWP",
"PR",
"MP",
"SolarHour",
"MONEY",
"CARBON",
"TODAYMONEY",
"TOTALMONEY",
"TODAYCARBON",
"TOTALCARBON"
};
#region step3. historiers INSERT power_station_history_hour
List<string> history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"SITEID",
"SITETYPE",
"KWH",
"TODAYKWH",
"TOTALKWH",
"KWHKWP",
"PR",
"MP",
"SolarHour",
"MONEY",
"CARBON",
"TODAYMONEY",
"TOTALMONEY",
"TODAYCARBON",
"TOTALCARBON"
};
await powerStationRepository.AddPowerStationHistory(powerStationHistoriesHour, history_properties);
#endregion
await powerStationRepository.AddPowerStationHistory(powerStationHistoriesHour, history_properties);
#endregion
#region step4. Pyrheliometer History INSERT sensor_history_hour
List<string> pyrheliometer_history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"Irradiance"
};
#region step4. Pyrheliometer History INSERT sensor_history_hour
List<string> pyrheliometer_history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"Irradiance"
};
await powerStationRepository.AddPyrheliometerHistory(pyrheliometerHistoriesHour, pyrheliometer_history_properties);
await powerStationRepository.AddPyrheliometerHistory(pyrheliometerHistoriesHour, pyrheliometer_history_properties);
List<string> Temp_history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"Temperature"
};
List<string> Temp_history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"Temperature"
};
await powerStationRepository.AddTempHistory(TempHistoriesHour, Temp_history_properties);
#endregion
await powerStationRepository.AddTempHistory(TempHistoriesHour, Temp_history_properties);
#endregion
#region step5. calcPowerStations UPDATE power_station
List<string> power_station_properties = new List<string>()
{
"Id",
"kwh",
"Today_kwh",
"Total_kwh",
"today_kwhkwp",
"today_money",
"total_money",
"today_PR",
"today_carbon",
"total_carbon",
"today_irradiance",
"SolarHour",
"WeathersStationId",
"TodayWeatherTemp",
"TodayWeather",
"RateOfRain"
};
#region step5. calcPowerStations UPDATE power_station
List<string> power_station_properties = new List<string>()
{
"Id",
"kwh",
"Today_kwh",
"Total_kwh",
"today_kwhkwp",
"today_money",
"total_money",
"today_PR",
"today_carbon",
"total_carbon",
"today_irradiance",
"SolarHour",
"WeathersStationId",
"TodayWeatherTemp",
"TodayWeather",
"RateOfRain"
};
await powerStationRepository.UpdateList(calcPowerStations, power_station_properties);
#endregion
await powerStationRepository.UpdateList(calcPowerStations, power_station_properties);
#endregion
#region step6. inverter INSERT inverter_history_hour
List<string> inverter_history_properties = new List<string>()
{
"PowerStationId",
"INVERTERID",
"TIMESTAMP",
"Irradiance",
"AC1V",
"AC1A",
"AC1W",
"AC1F",
"AC1WH",
"AC2V",
"AC2A",
"AC2W",
"AC2F",
"AC2WH",
"AC3V",
"AC3A",
"AC3W",
"AC3F",
"AC3WH",
"DC1V",
"DC1A",
"DC1W",
"DC1KW",
"DC1WH",
"DC2V",
"DC2A",
"DC2W",
"DC2KW",
"DC2WH",
"DC3V",
"DC3A",
"DC3W",
"DC3KW",
"DC3WH",
"DC4V",
"DC4A",
"DC4W",
"DC4KW",
"DC4WH",
"DC5V",
"DC5A",
"DC5W",
"DC5KW",
"DC5WH",
"PR",
"RA1",
"RA2",
"RA3",
"RA4",
"RA5",
"DCKW",
"ACKW",
"KWH",
"TODAYKWH",
"TOTALKWH",
"KWHKWP",
};
#region step6. inverter INSERT inverter_history_hour
List<string> inverter_history_properties = new List<string>()
{
"PowerStationId",
"INVERTERID",
"TIMESTAMP",
"Irradiance",
"AC1V",
"AC1A",
"AC1W",
"AC1F",
"AC1WH",
"AC2V",
"AC2A",
"AC2W",
"AC2F",
"AC2WH",
"AC3V",
"AC3A",
"AC3W",
"AC3F",
"AC3WH",
"DC1V",
"DC1A",
"DC1W",
"DC1KW",
"DC1WH",
"DC2V",
"DC2A",
"DC2W",
"DC2KW",
"DC2WH",
"DC3V",
"DC3A",
"DC3W",
"DC3KW",
"DC3WH",
"DC4V",
"DC4A",
"DC4W",
"DC4KW",
"DC4WH",
"DC5V",
"DC5A",
"DC5W",
"DC5KW",
"DC5WH",
"PR",
"RA1",
"RA2",
"RA3",
"RA4",
"RA5",
"DCKW",
"ACKW",
"KWH",
"TODAYKWH",
"TOTALKWH",
"KWHKWP",
};
await powerStationRepository.AddInverterHistory(inverterHistories, inverter_history_properties);
#endregion
await powerStationRepository.AddInverterHistory(inverterHistories, inverter_history_properties);
#endregion
#region step6. sensoravg INSERT sensoravg_history_hour
List<string> sensoravg_history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"SENSORAVG01",
"SENSORAVG02",
"SENSORAVG03",
"SENSORAVG04",
"SENSORAVG05",
"SENSORAVG06",
"SENSORAVG07",
"SENSORAVG08",
"SENSORAVG09",
"SENSORAVG10",
"SENSORAVG11",
"SENSORAVG12",
"SENSORAVG13",
"SENSORAVG14",
"SENSORAVG15",
"SENSORAVG16",
"SENSORAVG17",
"SENSORAVG18",
"SENSORAVG19",
"SENSORAVG20",
"SENSORAVG21",
"SENSORAVG22",
"SENSORAVG23",
"SENSORAVG24",
"SENSORAVG25",
"SENSORAVG26",
"SENSORAVG27",
"SENSORAVG28",
"SENSORAVG29",
"SENSORAVG30",
"SENSORAVG31",
"SENSORAVG32",
"SENSORAVG33",
"SENSORAVG34",
"SENSORAVG35",
"SENSORAVG36",
"SENSORAVG37",
"SENSORAVG38",
"SENSORAVG39",
"SENSORAVG40",
"SENSORAVG41",
"SENSORAVG42",
"SENSORAVG43",
"SENSORAVG44",
"SENSORAVG45",
"SENSORAVG46",
"SENSORAVG47",
"SENSORAVG48",
"SENSORAVG49",
"SENSORAVG50",
};
#region step7. sensoravg INSERT sensoravg_history_hour
List<string> sensoravg_history_properties = new List<string>()
{
"PowerStationId",
"TIMESTAMP",
"SENSORAVG01",
"SENSORAVG02",
"SENSORAVG03",
"SENSORAVG04",
"SENSORAVG05",
"SENSORAVG06",
"SENSORAVG07",
"SENSORAVG08",
"SENSORAVG09",
"SENSORAVG10",
"SENSORAVG11",
"SENSORAVG12",
"SENSORAVG13",
"SENSORAVG14",
"SENSORAVG15",
"SENSORAVG16",
"SENSORAVG17",
"SENSORAVG18",
"SENSORAVG19",
"SENSORAVG20",
"SENSORAVG21",
"SENSORAVG22",
"SENSORAVG23",
"SENSORAVG24",
"SENSORAVG25",
"SENSORAVG26",
"SENSORAVG27",
"SENSORAVG28",
"SENSORAVG29",
"SENSORAVG30",
"SENSORAVG31",
"SENSORAVG32",
"SENSORAVG33",
"SENSORAVG34",
"SENSORAVG35",
"SENSORAVG36",
"SENSORAVG37",
"SENSORAVG38",
"SENSORAVG39",
"SENSORAVG40",
"SENSORAVG41",
"SENSORAVG42",
"SENSORAVG43",
"SENSORAVG44",
"SENSORAVG45",
"SENSORAVG46",
"SENSORAVG47",
"SENSORAVG48",
"SENSORAVG49",
"SENSORAVG50",
};
await powerStationRepository.AddSensorAvgHistory(sensorAvgHistoryHour, sensoravg_history_properties);
#endregion
#region step8.
List<string> weather_observation_properties = new List<string>()
{
"PowerStationId",
"ObsTime",
"Temp"
};
await powerStationRepository.AddWeatherObservation(weatherObservations, weather_observation_properties);
#endregion
}
await powerStationRepository.AddSensorAvgHistory(sensorAvgHistoryHour, sensoravg_history_properties);
#endregion
List<string> weather_observation_properties = new List<string>()
{
"PowerStationId",
"ObsTime",
"Temp"
};
await powerStationRepository.AddWeatherObservation(weatherObservations, weather_observation_properties);
logger.LogInformation("【CalcPowerStationJob】【任務完成】");
}

View File

@ -3710,16 +3710,26 @@ namespace SolarPower.Repository.Implement
}
}
public async Task<List<PowerStation>> GetPowerStationsByCompanyId(int companyId)
public async Task<List<PowerStation>> GetPowerStationsByCompanyId(MyUser myUser)
{
List<PowerStation> result;
using (IDbConnection conn = this._databaseHelper.GetConnection())
{
try
{
var sql = $"SELECT * FROM {tableName} WHERE Deleted = 0 AND CompanyId = @CompanyId";
var sql = $"SELECT * FROM {tableName} ps";
result = (await conn.QueryAsync<PowerStation>(sql, new { CompanyId = companyId })).ToList();
if (myUser.Role.Layer == 2)
{
sql += " WHERE ps.Deleted = 0 AND ps.CompanyId = @CompanyId ";
}
else
{
sql += @" LEFT JOIN power_station_operation_personnel op ON ps.Id = op.PowerStationId
WHERE ps.Deleted = 0 AND op.Deleted = 0 AND op.UserId = @UserId ";
}
result = (await conn.QueryAsync<PowerStation>(sql, new { CompanyId = myUser.CompanyId, UserId = myUser.Id })).ToList();
}
catch (Exception exception)
{

View File

@ -546,7 +546,7 @@ namespace SolarPower.Repository.Interface
Task<SensorAvgHistory> CalcSensorAvgHistoryMonthDataByPowerStationId(string month, int powerStationId);
Task<int> AddSensorAvgHistoryMonthList(List<SensorAvgHistory> entity, List<string> properties);
Task<int> UpdateSensorAvgHistoryMonthList(List<SensorAvgHistory> entity);
Task<List<PowerStation>> GetPowerStationsByCompanyId(int companyId);
Task<List<PowerStation>> GetPowerStationsByCompanyId(MyUser myUser);
Task<List<PowerStationInverter>> GetPowerStationInverter(Dictionary<string, List<int>> dic, string filter);
Task<List<PowerStationDevice>> GetPowerStationDevice(Dictionary<string, List<int>> dic, string filter);
Task<List<InverterHistory>> GetInverterHistoryRowData(string nowDay, List<StationCodeWithInverterIds> entities);

View File

@ -21,7 +21,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -217,7 +220,7 @@
PushSpecifyCurrentCompareCol(Single_day_compare_col);
})
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -225,7 +228,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
//#region 更換搜尋條件(日,日區間,月,年)
function changeType(type, e) {

View File

@ -25,7 +25,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3" id="collapse"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -591,7 +594,7 @@
//#endregion
//#region 左邊的搜索欄位
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -599,7 +602,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
$("#js_list_accordion_filter").change(function (e) {
GetPowerStationCollapse($(this).val());

View File

@ -21,7 +21,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -166,7 +169,7 @@
//#endregion
})
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -174,7 +177,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
//#region 更換搜尋條件(日,日區間,月,年)
function changeType(type, e) {
@ -444,7 +447,7 @@
$.post(url, send_data, function (rel) {
if (rel.code != "0000") {
toast_error(rel.data.msg);
toast_error(rel.msg);
return;
}

View File

@ -187,7 +187,7 @@
</div>
<div class="row">
<div class="row align-items-end">
@*
<div class="col-xl-6">
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">逆變器</h5>
@ -216,31 +216,31 @@
</div>
</div>
*@
<div class="col-xl-6">
<div class="col-xl-8">
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">光電板</h5>
<div class="row d-flex justify-content-between px-5">
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_brand_label" for="photovoltaic_panel_brand">廠牌</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_brand_text" class="color-info-600"></label>
<input type="text" id="photovoltaic_panel_brand" name="photovoltaic_panel_brand" class="form-control">
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_specification_label" for="photovoltaic_panel_specification">規格</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_specification_text" class="color-info-600"></label>
<input type="text" id="photovoltaic_panel_specification" name="photovoltaic_panel_specification" class="form-control">
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_amount_label" for="photovoltaic_panel_amount">數量</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_amount_text" class="color-info-600"></label>
<input type="number" step="1" id="photovoltaic_panel_amount" name="photovoltaic_panel_amount" class="form-control">
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_product_model_label" for="photovoltaic_panel_product_model">型號</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_product_model_text" class="color-info-600"></label>

View File

@ -2403,53 +2403,41 @@
pointHoverRadius: 5,
fill: false,
data: listtemperature
},{
}, {
type: 'line',
label: '日照度(kWh/㎡)',
yAxisID: 'B',
borderColor: 'rgba(190, 45, 45,1)',
pointBackgroundColor: 'rgb(190, 45, 45,1)',
pointBorderColor: 'rgb(190, 45, 45,1)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
data: listirradiance
},{
type: 'bar',
label: 'PR(%)',
yAxisID: 'D',
borderColor: 'rgba(68, 114, 196)',
pointBackgroundColor: 'rgb(68, 114, 196)',
pointBorderColor: 'rgb(68, 114, 196)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
backgroundColor: 'rgba(68, 114, 196)',
borderWidth: 1,
data: listpr
},{
type: 'line',
type: 'bar',
label: '發電小時',
yAxisID: 'C',
borderColor: 'rgba(165, 165, 165)',
pointBackgroundColor: 'rgb(165, 165, 165)',
pointBorderColor: 'rgb(165, 165, 165)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
backgroundColor: 'rgba(165, 165, 165)',
borderWidth: 1,
data: listsolarhour
},{
type: 'line',
label: '日照度(kWh/㎡)',
yAxisID: 'B',
borderColor: 'rgba(190, 45, 45,1)',
pointBackgroundColor: 'rgb(190, 45, 45,1)',
pointBorderColor: 'rgb(190, 45, 45,1)',
pointBorderWidth: 1,
borderWidth: 2,
pointRadius: 4,
pointHoverRadius: 5,
fill: false,
data: listirradiance
}, {
type: 'bar',
backgroundColor: 'rgba(103, 180, 172, 1)',
borderWidth: 1,
label: '發電量(kWh)',
yAxisID: 'A',
data: listkwh
}]
type: 'bar',
backgroundColor: 'rgba(103, 180, 172, 1)',
borderWidth: 1,
label: '發電量(kWh)',
yAxisID: 'A',
data: listkwh
}]
},
options: {
title: {

View File

@ -157,29 +157,29 @@
</div>
<div class="row">
<div class="col-xl-6">
<div class="row align-items-end">
<div class="col-xl-8">
<h5 class="border-bottom font-weight-bold mb-3 pl-5 pb-3">光電板</h5>
<div class="row d-flex justify-content-between px-5">
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_brand_label" for="photovoltaic_panel_brand">廠牌</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_brand_text" class="color-info-600"></label>
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_specification_label" for="photovoltaic_panel_specification">規格</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_specification_text" class="color-info-600"></label>
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_amount_label" for="photovoltaic_panel_amount">數量</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_amount_text" class="color-info-600"></label>
</div>
</div>
<div class="col-xl-4 mb-3 row">
<div class="col-xl-3 mb-3 row">
<label class="col-xl-4 form-label" id="photovoltaic_panel_product_model_label" for="photovoltaic_panel_product_model">型號</label>
<div class="col-xl-8">
<label id="photovoltaic_panel_product_model_text" class="color-info-600"></label>

View File

@ -166,7 +166,10 @@
</div>
</div>
<div class="col-auto px-0">
<a href="javascript:;" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;"><i onclick="myfunc(this)" class="fal fa-angle-right fa-lg py-3" id="collapse"></i></a>
<a href="javascript:;" id="collapse" data-target=".sidebar" data-toggle="collapse" class="btn btn-default btn-xs btn-icon waves-effect waves-themed" style="border-radius: 0;" aria-expanded="true">
<span class="collapsed-reveal"><i class="fal fa-angle-left fa-lg py-3"></i></span>
<span class="collapsed-hidden"><i class="fal fa-angle-right fa-lg py-3"></i></span>
</a>
</div>
<main class="col px-5 pl-md-2 main">
@ -513,7 +516,7 @@
//#endregion
//#region 左邊的搜索欄位
function myfunc(div) {
@*function myfunc(div) {
var className = div.getAttribute("class");
if (className == "fal fa-angle-left fa-lg py-3") {
div.className = "fal fa-angle-right fa-lg py-3";
@ -521,7 +524,7 @@
else {
div.className = "fal fa-angle-left fa-lg py-3";
}
}
}*@
$("#js_list_accordion_filter").change(function (e) {
GetPowerStationCollapse($(this).val());