179 lines
11 KiB
Plaintext
179 lines
11 KiB
Plaintext
@using GWMS.UI.Components
|
|
@using GWMS.UI.Components.ChartJs
|
|
|
|
<div class="card">
|
|
<div class="card-header table-primary py-1 px-1 px-md-2">
|
|
@if (currItem != null)
|
|
{
|
|
<div class="d-flex justify-content-between">
|
|
<div class="py-0 px-1 mb-0">
|
|
<h2 class="mb-0">@currItem.PlantCode</h2>
|
|
</div>
|
|
<div class="py-0 px-1 mb-0">
|
|
<button class="btn btn-primary" style="min-width:10rem;" @onclick="() => ShowDetail(currItem.PlantId)">
|
|
<b>@currItem.PlantDesc <i class="fas fa-angle-double-right"></i></b>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div class="card-body p-0 p-md-1 p-lg-2">
|
|
<div class="row">
|
|
<div class="col-4 pr-0">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<ul class="list-group">
|
|
<li class="list-group-item d-flex justify-content-between align-items-center p-0 border border-primary">
|
|
<img src="./img/Plant/@(currItem.PlantCode).jpg" class="img-fluid" />
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center p-1 p-md-2">
|
|
<span><i class="fas fa-gas-pump"></i> Pressione:</span> <span style="font-size:1.2em;"><b>@currItem.PressAct["Main"].ToString("N1")</b> <span class="small"> <sub>bar</sub></span></span>
|
|
</li>
|
|
<li class="list-group-item-primary d-flex justify-content-between align-items-center py-1 px-2">
|
|
<span><i class="fas fa-compress-arrows-alt"></i> PB Alta</span>
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 px-md-2">
|
|
@if (getPressData("BH", "N1") != "")
|
|
{
|
|
<span> Stoccaggio:</span> <span><b>@getPressData("BH", "N1")</b> <sub>bar</sub></span>
|
|
}
|
|
else
|
|
{
|
|
<span> Stoccaggio:</span> <span><b>ND</b> <sub>bar</sub></span>
|
|
}
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 px-md-2">
|
|
@if (getPressData("BHA", "N1") != "")
|
|
{
|
|
<span> Alimentazione:</span> <span><b>@getPressData("BHA", "N1")</b> <sub>bar</sub></span>
|
|
}
|
|
else
|
|
{
|
|
<span> Alimentazione:</span> <span><b>ND</b> <sub>bar</sub></span>
|
|
}
|
|
</li>
|
|
<li class="list-group-item-primary d-flex justify-content-between align-items-center py-1 px-2">
|
|
<span><i class="fas fa-compress-arrows-alt"></i> PB Media</span>
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 px-md-2">
|
|
@if (getPressData("BL", "N1") != "")
|
|
{
|
|
<span> Stoccaggio:</span> <span><b>@getPressData("BL", "N1")</b> <sub>bar</sub></span>
|
|
}
|
|
else
|
|
{
|
|
<span> Stoccaggio:</span> <span><b>ND</b> <sub>bar</sub></span>
|
|
}
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center small p-1 px-md-2">
|
|
@if (getPressData("BLA", "N1") != "")
|
|
{
|
|
<span> Alimentazione:</span> <span><b>@getPressData("BLA", "N1")</b> <sub>bar</sub></span>
|
|
}
|
|
else
|
|
{
|
|
<span> Alimentazione:</span> <span><b>ND</b> <sub>bar</sub></span>
|
|
}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-8 pl-1">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<ul class="list-group">
|
|
@{
|
|
headerStatus = deviceOnline ? "list-group-item-info" : "text-secondary";
|
|
playCss = dataIsRT ? "text-success" : "text-danger";
|
|
checkRTime = dataIsRT ? $"Dati Realtime aggiornati al {_currItem.LastUpdate}" : $"Mancata ricezione: ultimo aggiornamento {_currItem.LastUpdate}";
|
|
<li class="list-group-item @headerStatus d-flex justify-content-between align-items-center px-0 py-1 small">
|
|
<div class="px-1" title="@checkRTime">
|
|
SERBATOIO
|
|
<i class="fas fa-play @playCss"></i>
|
|
</div>
|
|
<div class="px-1 text-right">
|
|
<span><i class="fas fa-database"></i> Livello:</span><span>@currItem.LevelAct.ToString("N0")/@currItem.LevelMax.ToString("N0")</span> | <span style="font-size:1.2em;"><b>@currItem.LevelRatio</b> <sub>%</sub></span>
|
|
</div>
|
|
</li>
|
|
}
|
|
<li class="list-group-item align-items-center px-1 py-2">
|
|
<div class="d-flex flex-column">
|
|
<div class="px-1 py-0 flex-grow-1">
|
|
<ProgressBar Value="@currItem.LevelRatio" Striped="false" Animated="false" />
|
|
</div>
|
|
<div class="py-0 px-1">
|
|
@if (LevelVal == null || LevelVal.Count == 0)
|
|
{
|
|
<LoadingDataSmall></LoadingDataSmall>
|
|
}
|
|
else
|
|
{
|
|
<Line Id="@(currItem.PlantCode)" AspRatio="2" DataTS="@LevelVal" lineColor="@getLineColors("0.75")" backColor="@getFillColors("0.25")" pointColor="@getPointColors("1")" lTens="0" Title="Livello" MinValue="0" MaxValue="30000"></Line>
|
|
}
|
|
</div>
|
|
</div>
|
|
</li>
|
|
<li class="list-group-item d-flex justify-content-between align-items-center p-1 p-md-2">
|
|
<div class="col-6">
|
|
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Ieri: </div>
|
|
@if (PlantLevelDto != null && PlantLevelDto.Count > 1)
|
|
{
|
|
@if (PlantLevelDto[1].QtaVenduta > 0)
|
|
{
|
|
<div style="font-size:1.2em;"><b>@($"{PlantLevelDto[1].QtaVenduta:N0}")</b> <span class="small"> <sub>kg</sub></span></div>
|
|
@* <div style="font-size:1.2em;" class="text-secondary"><b>@($"{currItem.SoldTS[0].ValDouble:N0}")</b> <span class="small"> <sub>kg</sub></span></div> *@
|
|
}
|
|
else
|
|
{
|
|
<div style="font-size:1.2em;"><b>ND</b> <span class="small"></span></div>
|
|
<div style="font-size:0.8em;"><span class="small text-danger">(<i>@($"{PlantLevelDto[1].QtaVenduta:N0}")<sub>kg</sub></i>)</span></div>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<div style="font-size:1.2em;" class="text-secondary"><b>NA</b> <span class="small"></span></div>
|
|
}
|
|
</div>
|
|
<div class="col-6 text-right">
|
|
<div><i class="fas fa-file-invoice-dollar"></i> Venduto Oggi: </div>
|
|
@if (PlantLevelDto != null && PlantLevelDto.Count > 0)
|
|
{
|
|
@if (PlantLevelDto[0].QtaVenduta > 0)
|
|
{
|
|
<div style="font-size:1.2em;"><b>@($"{PlantLevelDto[0].QtaVenduta:N0}")</b> <span class="small"> <sub>kg</sub></span></div>
|
|
|
|
@* <div style="font-size:1.2em;" class="text-secondary"><b>@($"{currItem.SoldTS[1].ValDouble:N0}")</b> <span class="small"> <sub>kg</sub></span></div> *@
|
|
}
|
|
else
|
|
{
|
|
<div style="font-size:1.2em;"><b>ND</b> <span class="small"></span></div>
|
|
<div style="font-size:0.8em;"><span class="small text-danger">(<i>@($"{PlantLevelDto[0].QtaVenduta:N0}") <sub>kg</sub></i>)</span></div>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<div style="font-size:1.2em;" class="text-secondary"><b>NA</b> <span class="small"></span></div>
|
|
}
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="col-12 small text-right">
|
|
<sup class="px-1">updated: @($"{DateTime.Now:HH:mm:ss}")</sup>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-footer alert alert-primary mb-0 p-0 p-md-1">
|
|
<div class="d-flex justify-content-between">
|
|
<div class="py-0 px-2 mb-0">
|
|
<h4>Ordini aperti: <b>@currItem.OrderTS.Count</b></h4>
|
|
</div>
|
|
<div class="py-0 px-2">
|
|
<button class="btn btn-block btn-info" style="min-width:10rem;" title="Mostra Ordini" @onclick="() => ShowOrders(currItem.PlantId)">Mostra Ordini <i class="fas fa-file-invoice"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |