MON:
- Fix paginazione blocchi con metodo come TAB3
This commit is contained in:
+123
-125
@@ -1,141 +1,139 @@
|
||||
<div class="col machBlock ">
|
||||
@if (CurrRecord == null || !dataLoaded)
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="@cssStatus(CurrRecord.Semaforo) p-1 @overlayCss">
|
||||
<div class="d-flex ui-title justify-content-center align-items-center text-uppercase">
|
||||
<div class="px-0 @textDescrCss(@CurrRecord.Nome)">
|
||||
<span>@CurrRecord.Nome</span>
|
||||
</div>
|
||||
@if (CurrRecord == null || !dataLoaded)
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="@cssStatus(CurrRecord.Semaforo) p-1 @overlayCss">
|
||||
<div class="d-flex ui-title justify-content-center align-items-center text-uppercase">
|
||||
<div class="px-0 @textDescrCss(@CurrRecord.Nome)">
|
||||
<span>@CurrRecord.Nome</span>
|
||||
</div>
|
||||
@if (hasRow(1))
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pt-1 px-1">
|
||||
@foreach (var item in rowValues(1))
|
||||
</div>
|
||||
@if (hasRow(1))
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pt-1 px-1">
|
||||
@foreach (var item in rowValues(1))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pt-1 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 pe-0">Art</div>
|
||||
<div class="px-1 ps-0 ui-art">
|
||||
@if (showArt == "CodArticolo")
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
<span>@CurrRecord.CodArticolo</span>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pt-1 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 pe-0">Art</div>
|
||||
<div class="px-1 ps-0 ui-art">
|
||||
@if (showArt == "CodArticolo")
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(CurrRecord.Disegno))
|
||||
{
|
||||
<span>@CurrRecord.CodArticolo</span>
|
||||
<span>[@CurrRecord.CodArticolo]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(CurrRecord.Disegno))
|
||||
{
|
||||
<span>[@CurrRecord.CodArticolo]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@CurrRecord.Disegno</span>
|
||||
}
|
||||
<span>@CurrRecord.Disegno</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(2))
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pb-1 px-1">
|
||||
@foreach (var item in rowValues(2))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pb-1 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 pe-0">@(CurrRecord.IdxPOdl > 0 ? $"PODL{CurrRecord.IdxPOdl:00000000}" : "-")</div>
|
||||
<div class="px-1 ps-0">@(CurrRecord.IdxOdl > 0 ? $"ODL{CurrRecord.IdxOdl:00000000}" : "-")</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(3))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 mt-1 px-1">
|
||||
@foreach (var item in rowValues(3))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex justify-content-between pt-0 mt-1 pb-2 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 text-truncate col-8">@CurrRecord.DescrizioneStato</div>
|
||||
<div class="px-1 ps-0 text-nowrap">@getMinSec(getDecimal(@CurrRecord.Durata))</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(4))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1">
|
||||
@foreach (var item in rowValues(4))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex justify-content-between pt-0 pb-2 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 pe-0">TCiclo</div>
|
||||
<div class="px-1 ps-0">std: @getMinSec(@CurrRecord.TCAssegnato)</div>
|
||||
<div class="px-1 ps-0">act: @getMinSec(@CurrRecord.TCLavRT)</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(5))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1">
|
||||
@foreach (var item in rowValues(5))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1 fontSmall1 text-uppercase">
|
||||
<div class="px-1 pe-0">Pezzi<small class="small"><sub>p/o</sub></small></div>
|
||||
<div class="px-1 ps-0">@CurrRecord.PezziProd / @CurrRecord.NumPezzi</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(6))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1">
|
||||
@foreach (var item in rowValues(6))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="@cssComStatus(CurrRecord.Semaforo, CurrRecord.LastUpdate) p-1">
|
||||
<div class="row fontSmaller mt-1">
|
||||
<div class="col-12">
|
||||
<div class="text-right ui-footer px-2">
|
||||
<div class="row">
|
||||
@if (showComErr(CurrRecord.LastUpdate))
|
||||
{
|
||||
<div class="col text-warning">
|
||||
<b>C.101</b>
|
||||
</div>
|
||||
}
|
||||
<div class="col text-end">
|
||||
@CurrRecord.LastUpdate
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(2))
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pb-1 px-1">
|
||||
@foreach (var item in rowValues(2))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex ui-subtitle justify-content-between py-0 pb-1 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 pe-0">@(CurrRecord.IdxPOdl > 0 ? $"PODL{CurrRecord.IdxPOdl:00000000}" : "-")</div>
|
||||
<div class="px-1 ps-0">@(CurrRecord.IdxOdl > 0 ? $"ODL{CurrRecord.IdxOdl:00000000}" : "-")</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(3))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 mt-1 px-1">
|
||||
@foreach (var item in rowValues(3))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex justify-content-between pt-0 mt-1 pb-2 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 text-truncate col-8">@CurrRecord.DescrizioneStato</div>
|
||||
<div class="px-1 ps-0 text-nowrap">@getMinSec(getDecimal(@CurrRecord.Durata))</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(4))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1">
|
||||
@foreach (var item in rowValues(4))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex justify-content-between pt-0 pb-2 px-1 fontSmall text-uppercase">
|
||||
<div class="px-1 pe-0">TCiclo</div>
|
||||
<div class="px-1 ps-0">std: @getMinSec(@CurrRecord.TCAssegnato)</div>
|
||||
<div class="px-1 ps-0">act: @getMinSec(@CurrRecord.TCLavRT)</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(5))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1">
|
||||
@foreach (var item in rowValues(5))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1 fontSmall1 text-uppercase">
|
||||
<div class="px-1 pe-0">Pezzi<small class="small"><sub>p/o</sub></small></div>
|
||||
<div class="px-1 ps-0">@CurrRecord.PezziProd / @CurrRecord.NumPezzi</div>
|
||||
</div>
|
||||
}
|
||||
@if (hasRow(6))
|
||||
{
|
||||
<div class="d-flex justify-content-between py-0 px-1">
|
||||
@foreach (var item in rowValues(6))
|
||||
{
|
||||
<div class="px-1 @item.TagCss">@item.TagName: <b>@currVal(item.TagLocation)</b></div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="@cssComStatus(CurrRecord.Semaforo, CurrRecord.LastUpdate) p-1">
|
||||
<div class="row fontSmaller mt-1">
|
||||
<div class="col-12">
|
||||
<div class="text-right ui-footer px-2">
|
||||
<div class="row">
|
||||
@if (showComErr(CurrRecord.LastUpdate))
|
||||
{
|
||||
<div class="col text-warning">
|
||||
<b>C.101</b>
|
||||
</div>
|
||||
}
|
||||
<div class="col text-end">
|
||||
@CurrRecord.LastUpdate
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
+58
-48
@@ -4,65 +4,75 @@
|
||||
|
||||
<PageTitle>MP MON</PageTitle>
|
||||
|
||||
<div class="row statusMap mx-1 my-1">
|
||||
@if (ListMSE == null)
|
||||
{
|
||||
@if (ListMSE == null)
|
||||
{
|
||||
<div class="row statusMap mx-1 my-1">
|
||||
<div class="col-12">
|
||||
<LoadingData></LoadingData>
|
||||
</div>
|
||||
}
|
||||
else if (ListMSE.Count == 0)
|
||||
{
|
||||
</div>
|
||||
}
|
||||
else if (ListMSE.Count == 0)
|
||||
{
|
||||
|
||||
<div class="row statusMap mx-1 my-1">
|
||||
<div class="col-12">
|
||||
<div class="alert alert-warning">
|
||||
No data found
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
int mseIdx = 0;
|
||||
for (int i = 0; i < mapNRow; i++)
|
||||
{
|
||||
int mseIdx = 0;
|
||||
for (int i = 0; i < mapNRow; i++)
|
||||
{
|
||||
<div class="row statusMap mx-1 my-1">
|
||||
@for (int j = 0; j < mapNCol; j++)
|
||||
{
|
||||
var currMse = MseById(mseIdx);
|
||||
mseIdx++;
|
||||
if (currMse != null)
|
||||
{
|
||||
<DetailMSE CurrRecord="@currMse" currTagConf="@getIobTag(currMse.IdxMacchina)" currTagVal="@getTagVal(currMse.IdxMacchina)" doAnimate="@doAnimate" keepAliveMin="@keepAliveMin" showArt="@showArt" doBlink="@doBlink"></DetailMSE>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col machBlock"> </div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
<hr />
|
||||
|
||||
int currIdx = 0;
|
||||
foreach (var recordIob in ListMSE)
|
||||
{
|
||||
<DetailMSE CurrRecord="@recordIob" currTagConf="@getIobTag(recordIob.IdxMacchina)" currTagVal="@getTagVal(recordIob.IdxMacchina)" doAnimate="@doAnimate" keepAliveMin="@keepAliveMin" showArt="@showArt" doBlink="@doBlink"></DetailMSE>
|
||||
currIdx++;
|
||||
if (currIdx >= maxCol)
|
||||
<div class="row statusMap mx-1 my-1">
|
||||
@for (int j = 0; j < maxCol; j++)
|
||||
{
|
||||
currIdx = 0;
|
||||
@((MarkupString)"</div><div class=\"row statusMap mx-1 my-1\">")
|
||||
var currMse = MseById(mseIdx);
|
||||
mseIdx++;
|
||||
if (currMse != null)
|
||||
{
|
||||
<div class="col machBlock ">
|
||||
<DetailMSE CurrRecord="@currMse" currTagConf="@getIobTag(currMse.IdxMacchina)" currTagVal="@getTagVal(currMse.IdxMacchina)" doAnimate="@doAnimate" keepAliveMin="@keepAliveMin" showArt="@showArt" doBlink="@doBlink"></DetailMSE>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="col machBlock"> </div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
@* <div class="row statusMap mx-1 my-1">
|
||||
@{
|
||||
int currIdx = 0;
|
||||
foreach (var recordIob in ListMSE)
|
||||
{
|
||||
<div class="col machBlock ">
|
||||
<DetailMSE CurrRecord="@recordIob" currTagConf="@getIobTag(recordIob.IdxMacchina)" currTagVal="@getTagVal(recordIob.IdxMacchina)" doAnimate="@doAnimate" keepAliveMin="@keepAliveMin" showArt="@showArt" doBlink="@doBlink"></DetailMSE>
|
||||
</div>
|
||||
currIdx++;
|
||||
if (currIdx >= maxCol)
|
||||
{
|
||||
currIdx = 0;
|
||||
@((MarkupString)"</div><div class=\"row statusMap mx-1 my-1\">")
|
||||
;
|
||||
}
|
||||
}
|
||||
// controllo se devo "chiudere riga...
|
||||
int currNum = (currIdx % maxCol);
|
||||
while (currNum < (maxCol))
|
||||
{
|
||||
@((MarkupString)"<div class=\"col machBlock\"> </div>")
|
||||
;
|
||||
currNum++;
|
||||
|
||||
}
|
||||
}
|
||||
// controllo se devo "chiudere riga...
|
||||
int currNum = (currIdx % maxCol);
|
||||
while (currNum < (maxCol))
|
||||
{
|
||||
@((MarkupString)"<div class=\"col machBlock\"> </div>")
|
||||
;
|
||||
currNum++;
|
||||
</div> *@
|
||||
|
||||
}
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
+35
-49
@@ -58,9 +58,26 @@ namespace MP.Mon.Pages
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Numero righe mappa: calcolato da num elementi e numMax x riga...
|
||||
/// </summary>
|
||||
protected int mapNRow
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 1;
|
||||
int numElems = ListMSE != null ? ListMSE.Count : 1;
|
||||
answ = (int)Math.Ceiling((double)numElems / mapNCol);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected MonDataFeeder MMDataService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
@@ -159,7 +176,20 @@ namespace MP.Mon.Pages
|
||||
return answ;
|
||||
}
|
||||
|
||||
private string CodGruppo = "";
|
||||
/// <summary>
|
||||
/// restituisce MSE dato indice
|
||||
/// </summary>
|
||||
/// <param name="mseIdx">Indice MSE richiesto</param>
|
||||
/// <returns></returns>
|
||||
protected MappaStatoExpl? MseById(int mseIdx)
|
||||
{
|
||||
MappaStatoExpl? answ = null;
|
||||
if (ListMSE != null && ListMSE.Count > mseIdx)
|
||||
{
|
||||
answ = ListMSE[mseIdx];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
@@ -179,51 +209,15 @@ namespace MP.Mon.Pages
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private static System.Timers.Timer slowTimer = new System.Timers.Timer(300000);
|
||||
private string CodGruppo = "";
|
||||
private List<ConfigModel>? CurrConfig = null;
|
||||
private bool doBlink = false;
|
||||
private List<MappaStatoExpl>? ListMSE = null;
|
||||
private List<Macchine> listMacchine = new List<Macchine>();
|
||||
private List<MappaStatoExpl>? ListMSE = null;
|
||||
private Random rnd = new Random();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Numero righe mappa: calcolato da num elementi e numMax x riga...
|
||||
/// </summary>
|
||||
protected int mapNRow
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 1;
|
||||
int numElems = ListMSE != null ? ListMSE.Count : 1;
|
||||
answ = (int)Math.Ceiling((double)numElems / mapNCol);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// restituisce MSE dato indice
|
||||
/// </summary>
|
||||
/// <param name="mseIdx">Indice MSE richiesto</param>
|
||||
/// <returns></returns>
|
||||
protected MappaStatoExpl? MseById(int mseIdx)
|
||||
{
|
||||
MappaStatoExpl? answ = null;
|
||||
if (ListMSE != null && ListMSE.Count > mseIdx)
|
||||
{
|
||||
answ = ListMSE[mseIdx];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Numero colonne mappa: calcolato larghezza riga...
|
||||
/// </summary>
|
||||
protected int mapNCol
|
||||
{
|
||||
get => maxCol;
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -284,9 +278,9 @@ namespace MP.Mon.Pages
|
||||
}
|
||||
}
|
||||
dataList = listaFilt;
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG && false
|
||||
#if DEBUG
|
||||
// hack: legge 3 volte i dati x stressare sistema
|
||||
var singleData = dataList;
|
||||
ListMSE = new List<MappaStatoExpl>();
|
||||
@@ -304,11 +298,6 @@ namespace MP.Mon.Pages
|
||||
}
|
||||
InvokeAsync(() =>
|
||||
{
|
||||
#if false
|
||||
// attesa random 0-50ms...
|
||||
Random rnd = new Random();
|
||||
Task.Delay(rnd.Next(5, 50));
|
||||
#endif
|
||||
StateHasChanged();
|
||||
});
|
||||
}
|
||||
@@ -345,9 +334,6 @@ namespace MP.Mon.Pages
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user