|
@**@
|
- @record.CodArticolo
+ @record.dtEvento
|
@record.IdxMacchina
|
- @record.NumPezzi
+ @record.CodFlux
|
- @record.Tcassegnato.ToString("N3")
+ @record.Valore
|
-
- @record.DataInizio
- |
- @record.Note |
- @record.KeyRichiesta |
@*@if (ArticoloDelEnabled(record.CodArticolo))
{
diff --git a/MP.SPEC/Components/ListPARAMS.razor.cs b/MP.SPEC/Components/ListPARAMS.razor.cs
index e0353136..1b11848e 100644
--- a/MP.SPEC/Components/ListPARAMS.razor.cs
+++ b/MP.SPEC/Components/ListPARAMS.razor.cs
@@ -31,14 +31,43 @@ namespace MP.SPEC.Components
#region Public Methods
- public string checkSelect(string CodArticolo)
+ public void Dispose()
+ {
+ //aTimer.Elapsed -= ElapsedTimer;
+ aTimer.Stop();
+ aTimer.Dispose();
+ }
+
+ public void ElapsedTimer(object? source, System.Timers.ElapsedEventArgs e)
+ {
+ var pUpd = Task.Run(async () =>
+ {
+ await Task.Delay(1);
+ //await InvokeAsync(() => StateHasChanged());
+ await InvokeAsync(() => reloadData());
+ });
+ pUpd.Wait();
+ //Log.Trace($"Elapsed Timer Footer");
+ }
+
+ public void StartTimer()
+ {
+ int tOutPeriod = 2000;
+ //int.TryParse(Configuration["ReloadStatusTimer"], out tOutPeriod);
+ aTimer = new System.Timers.Timer(tOutPeriod);
+ aTimer.Elapsed += ElapsedTimer;
+ aTimer.Enabled = true;
+ aTimer.Start();
+ }
+
+ public string checkSelect(string IdxMacchina)
{
string answ = "";
if (currRecord != null)
{
try
{
- answ = (currRecord.CodArticolo == CodArticolo) ? "table-info" : "";
+ answ = (currRecord.IdxMacchina == IdxMacchina) ? "table-info" : "";
}
catch
{ }
@@ -58,7 +87,7 @@ namespace MP.SPEC.Components
[Inject]
protected MessageService MessageService { get; set; } = null!;
-
+ private static System.Timers.Timer aTimer = null!;
#endregion Protected Properties
#region Protected Methods
@@ -67,6 +96,7 @@ namespace MP.SPEC.Components
{
MessageService.EA_PageUpdated += MessageService_EA_PageUpdated;
MessageService.EA_SearchUpdated += OnSeachUpdated;
+ StartTimer();
await reloadData();
}
@@ -91,13 +121,17 @@ namespace MP.SPEC.Components
#region Private Fields
+
+
private string _statoSel = "*";
- private ODLModel? currRecord = null;
+ private FluxLog? currRecord = null;
- private List? ListRecords;
+ private List? ListRecords;
- private List? SearchRecords;
+ private List? SearchRecords;
+
+ private List? a;
#endregion Private Fields
@@ -140,7 +174,7 @@ namespace MP.SPEC.Components
private async Task reloadData()
{
isLoading = true;
- SearchRecords = await MDService.ListODLFilt(true, SearchVal, selStato);
+ SearchRecords = await MDService.FluxLogGetLastFilt(SearchVal, selStato, 300);
totalCount = SearchRecords.Count;
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
await Task.Delay(1);
diff --git a/MP.SPEC/Pages/PARAMS.razor b/MP.SPEC/Pages/PARAMS.razor
index 8360b1c0..e5fc1f46 100644
--- a/MP.SPEC/Pages/PARAMS.razor
+++ b/MP.SPEC/Pages/PARAMS.razor
@@ -25,13 +25,13 @@
@**@
- *
-
- -
- I parametri sono nella tabella FluxLog (in preparazione modello dati + metodi...) --> FluxLogGetLastFilt
-
- -
- scopo della apgina è mostrare in "quasi tempo reale" (near realtime) i parametri che si aggiornano
-
- -
- la pagina deve avere un card come PODL nel cui header siano mostrate elenco amchcine ed elenco parametri x mostrare tutti / solo uno (filtro)
-
- -
- MpDataService --> metodi per elenchi: MacchineGetAll e ParametriGetAll
-
- -
- il metodo principale recupera gli ultimi n record (configurabile? mostrare in alto un selettore x indicare quanti "last values" recuperare?)
-
- -
- il refgresh idealmente è ogni 2-5 sec (configurabile come sopra?)
-
-
-
diff --git a/MP.SPEC/Pages/PARAMS.razor.cs b/MP.SPEC/Pages/PARAMS.razor.cs
index 4f47569c..10a1a219 100644
--- a/MP.SPEC/Pages/PARAMS.razor.cs
+++ b/MP.SPEC/Pages/PARAMS.razor.cs
@@ -25,6 +25,8 @@ namespace MP.SPEC.Pages
#region Protected Methods
+
+
protected void ForceReload(int newNum)
{
numRecord = newNum;
@@ -84,15 +86,17 @@ namespace MP.SPEC.Pages
}
protected override async Task OnInitializedAsync()
- {
+ {
// abilito ricerca...
MsgService.ShowSearch = true;
// resetto search
MsgService.SearchVal = "";
ListAziende = await MDService.ElencoAziende();
ListStati = await MDService.AnagStatiComm();
+ ListMacchine = await MDService.MacchineGetAll();
// carico dati
await reloadData();
+
}
private string currAzienda { get; set; } = "*";
@@ -105,10 +109,14 @@ namespace MP.SPEC.Pages
private List? ListStati;
+ private List? ListMacchine;
+
#endregion Private Fields
#region Private Properties
+
+
private int currPage
{
get => MsgService.currPage;
@@ -147,15 +155,9 @@ namespace MP.SPEC.Pages
}
#endif
- //private bool showODL { get; set; } = false;
private bool addEnabled = false;
- //private string textToggle
- //{
- // get => showODL ? "In Corso" : "Programmati";
- //}
-
private int totalCount
{
get => MsgService.totalCount;
@@ -173,19 +175,6 @@ namespace MP.SPEC.Pages
isLoading = false;
}
- //private async Task toggleCurrent()
- //{
- // //NavManager.NavigateTo("/PODL");
- // showODL = !showODL;
- // await Task.Delay(1);
- //}
- private async Task navToPODL()
- {
- NavManager.NavigateTo("/PODL");
- //showODL = !showODL;
- await Task.Delay(1);
- }
-
#endregion Private Methods
}
}
|