223 lines
14 KiB
Plaintext
223 lines
14 KiB
Plaintext
@page "/Energy"
|
|
|
|
<div class="card">
|
|
<div class="card-header table-primary p-1">
|
|
<SelectionFilter SelFilter="currFilter" filterChanged="DoFilter" filterReset="ResetFilter" ChartEnabled="false" OnlyEnergy="true" MaxNumMacc="MaxDisplay" SelMultiMacc="true"></SelectionFilter>
|
|
</div>
|
|
<div class="card-body py-0 px-1">
|
|
@if (isLoading)
|
|
{
|
|
<LoadingData Title="Loading Data" DisplaySize="LoadingData.CtrlSize.Large" DisplayMode="LoadingData.SpinMode.Growl"></LoadingData>
|
|
}
|
|
else
|
|
{
|
|
if (MaccSelValid)
|
|
{
|
|
@if (ListRecords == null)
|
|
{
|
|
<LoadingData></LoadingData>
|
|
}
|
|
else if (TotalCount == 0)
|
|
{
|
|
<div class="alert alert-warning text-center display-4">Nessun record trovato</div>
|
|
}
|
|
else
|
|
{
|
|
<ChartEnergy RawData="SearchRecords" DynMode="DynMode" HideCurrent="true" ShowRem="true" EC_IdxMaccRem="RemoveMachine"></ChartEnergy>
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<table class="table table-sm table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Macchina</th>
|
|
<th>Commessa/ODL</th>
|
|
<th>Articolo</th>
|
|
<th>Inizio</th>
|
|
<th>Fine</th>
|
|
@if (DynMode)
|
|
{
|
|
<th class="text-end">@Traduci("MP-STATS_TotCount01")</th>
|
|
@if (numCount > 1)
|
|
{
|
|
<th class="text-end">@Traduci("MP-STATS_TotCount02")</th>
|
|
}
|
|
@if (numCount > 2)
|
|
{
|
|
<th class="text-end">@Traduci("MP-STATS_TotCount03")</th>
|
|
}
|
|
<th class="text-end">@Traduci("MP-STATS_TotEn01")</th>
|
|
<th class="text-end">@Traduci("MP-STATS_TotEn01")/Unit</th>
|
|
@if (numTotEn > 1)
|
|
{
|
|
<th class="text-end">@Traduci("MP-STATS_TotEn02")</th>
|
|
<th class="text-end">@Traduci("MP-STATS_TotEn02")/Unit</th>
|
|
}
|
|
@if (numTotEn > 2)
|
|
{
|
|
<th class="text-end">@Traduci("MP-STATS_TotEn03")</th>
|
|
<th class="text-end">@Traduci("MP-STATS_TotEn03")/Unit</th>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<th class="text-end">Unit</th>
|
|
<th class="text-end">Energy</th>
|
|
<th class="text-end">Gas</th>
|
|
}
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var record in ListRecords)
|
|
{
|
|
string textCss = CheckCurrent(record);
|
|
<tr class="@textCss">
|
|
<td>@record.IdxMacchina</td>
|
|
<td>
|
|
<div>@record.KeyRichiesta</div>
|
|
<div class="small">@record.IdxOdl</div>
|
|
</td>
|
|
<td>
|
|
@record.CodArticolo
|
|
<div class="small">@record.DescArticolo</div>
|
|
</td>
|
|
<td class="@textCss">@record.DataInizio</td>
|
|
<td class="@textCss">@record.DataFine</td>
|
|
@if (DynMode)
|
|
{
|
|
<td class="text-end @textCss">@($"{record.TotCount01:N0}") @GetUM("TotCount01")</td>
|
|
@if (numCount > 1)
|
|
{
|
|
<td class="text-end @textCss">@($"{record.TotCount02:N0}") @GetUM("TotCount02")</td>
|
|
}
|
|
@if (numCount > 2)
|
|
{
|
|
<td class="text-end @textCss">@($"{record.TotCount03:N0}") @GetUM("TotCount03")</td>
|
|
}
|
|
<td class="text-end @textCss">
|
|
<div>
|
|
@($"{record.TotEn01:N2}") @GetUM("TotEn01")
|
|
</div>
|
|
</td>
|
|
<td class="text-end @textCss">
|
|
<div class="small">
|
|
@righDiv(record.TotEn01, record.TotCount01).ToString("N3") @GetUM("TotEn01")/@GetUM("TotCount01")
|
|
</div>
|
|
@if (numCount > 1)
|
|
{
|
|
<div class="small">
|
|
@righDiv(record.TotEn01, record.TotCount02).ToString("N3") @GetUM("TotEn01")/@GetUM("TotCount02")
|
|
</div>
|
|
}
|
|
@if (numCount > 2)
|
|
{
|
|
<div class="small">
|
|
@righDiv(record.TotEn01, record.TotCount03).ToString("N3") @GetUM("TotEn01")/@GetUM("TotCount03")
|
|
</div>
|
|
}
|
|
</td>
|
|
@if (numTotEn > 1)
|
|
{
|
|
<td class="text-end @textCss">
|
|
<div>
|
|
@($"{record.TotEn02:N2}") @GetUM("TotEn02")
|
|
</div>
|
|
</td>
|
|
<td class="text-end @textCss">
|
|
<div class="small">
|
|
@righDiv(record.TotEn02, record.TotCount01).ToString("N3") @GetUM("TotEn02")/@GetUM("TotCount01")
|
|
</div>
|
|
@if (numCount > 1)
|
|
{
|
|
<div class="small">
|
|
@righDiv(record.TotEn02, record.TotCount02).ToString("N3") @GetUM("TotEn02")/@GetUM("TotCount02")
|
|
</div>
|
|
}
|
|
@if (numCount > 2)
|
|
{
|
|
<div class="small">
|
|
@righDiv(record.TotEn02, record.TotCount03).ToString("N3") @GetUM("TotEn02")/@GetUM("TotCount03")
|
|
</div>
|
|
}
|
|
</td>
|
|
}
|
|
@if (numTotEn > 2)
|
|
{
|
|
<td class="text-end @textCss">
|
|
<div>
|
|
@($"{record.TotEn03:N2}") @GetUM("TotEn03")
|
|
</div>
|
|
</td>
|
|
<td class="text-end @textCss">
|
|
<div class="small">
|
|
@righDiv(record.TotEn03, record.TotCount01).ToString("N3") @GetUM("TotEn02")/@GetUM("TotCount01")
|
|
</div>
|
|
@if (numCount > 1)
|
|
{
|
|
<div class="small">
|
|
@righDiv(record.TotEn03, record.TotCount02).ToString("N3") @GetUM("TotEn02")/@GetUM("TotCount02")
|
|
</div>
|
|
}
|
|
@if (numCount > 2)
|
|
{
|
|
<div class="small">
|
|
@righDiv(record.TotEn03, record.TotCount03).ToString("N3") @GetUM("TotEn02")/@GetUM("TotCount03")
|
|
</div>
|
|
}
|
|
</td>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<td class="text-end @textCss">@(record.TotCount.ToString("N0")) m</td>
|
|
<td class="text-end @textCss">
|
|
<div>
|
|
@record.TotWatt.ToString("N2") kWh
|
|
</div>
|
|
<small>
|
|
@righDiv(record.TotWatt, record.TotCount).ToString("N3") kWh/m
|
|
</small>
|
|
</td>
|
|
<td class="text-end @textCss">
|
|
<div>
|
|
@record.TotGas.ToString("N2") m<sup>3</sup>
|
|
</div>
|
|
<small>
|
|
@righDiv(record.TotGas, record.TotCount).ToString("N3") m<sup>3</sup>/m
|
|
</small>
|
|
</td>
|
|
}
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="10">
|
|
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="SetNumRec" numPageChanged="SetPage" exportEnabled="true" exportRequested="ExportCsv" fileName="@fileName" totalCount="TotalCount" showLoading="isLoading" />
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
}
|
|
else
|
|
{
|
|
<div class="alert alert-info my-2">
|
|
<div class="fs-4 d-flex justify-content-around">
|
|
<div>
|
|
Selezionare impianti (fino a @MaxDisplay) per visualizzare i dati
|
|
</div>
|
|
<div>
|
|
# Impianti: <b>@NumMacc</b> | # Rec tot: <b>@TotalCount.ToString("N0")</b>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|
|
|
|
</div>
|
|
<div class="card-footer py-1">
|
|
</div>
|
|
</div> |