Update comportamento deselezione + registrazione di TUTTI i parametri (NON solo il selezionato)
This commit is contained in:
@@ -41,8 +41,6 @@
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace MP.MONO.UI.Components
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string SelVal = "";
|
||||
[Parameter]
|
||||
public string SelVal { get; set; } = "";
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,43 +7,46 @@
|
||||
|
||||
@inject CurrentDataService MMDataService
|
||||
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<div class="px-1">
|
||||
<b>@SelectedParam</b>
|
||||
</div>
|
||||
<div class="px-1">
|
||||
<div class=" input-group input-group-sm">
|
||||
<button class="btn btn-primary" @onclick="() => toggleParam()">
|
||||
@if (!string.IsNullOrEmpty(@SelectedParam))
|
||||
{
|
||||
<div class="d-flex justify-content-between mb-2">
|
||||
<div class="px-1">
|
||||
<b>@SelectedParam</b>
|
||||
</div>
|
||||
<div class="px-1">
|
||||
<div class=" input-group input-group-sm">
|
||||
<button class="btn btn-primary" @onclick="() => toggleParam()">
|
||||
@if (showParam)
|
||||
{
|
||||
<i class="fa-solid fa-chevron-right"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa-solid fa-chevron-left"></i>
|
||||
}
|
||||
</button>
|
||||
@if (showParam)
|
||||
{
|
||||
<i class="fa-solid fa-chevron-right"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
<i class="fa-solid fa-chevron-left"></i>
|
||||
}
|
||||
</button>
|
||||
@if (showParam)
|
||||
{
|
||||
|
||||
<span class="input-group-text small">Num Rec</span>
|
||||
<input class="form-control" @bind="@maxRecord" />
|
||||
<span class="input-group-text small">Sample Sec Time</span>
|
||||
<input class="form-control" @bind="@sampleSecMin" />
|
||||
<span class="input-group-text small">Num Rec</span>
|
||||
<input class="form-control" @bind="@maxRecord" />
|
||||
<span class="input-group-text small">Sample Sec Time</span>
|
||||
<input class="form-control" @bind="@sampleSecMin" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="px-1 flex-fill">
|
||||
@if (LevelVal == null || LevelVal.Count == 0)
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MP.MONO.UI.Components.Chart.Line AspRatio="4" DataTS="@LevelVal" lineColor="@getLineColors("0.75")" backColor="@getFillColors("0.25")" pointColor="@getPointColors("1")" lTens="0" MinValue="@MinVal" MaxValue="@MaxVal"></MP.MONO.UI.Components.Chart.Line>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
<div class="px-1 flex-fill">
|
||||
@if (LevelVal == null || LevelVal.Count == 0)
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
}
|
||||
else
|
||||
{
|
||||
<MP.MONO.UI.Components.Chart.Line AspRatio="4" DataTS="@LevelVal" lineColor="@getLineColors("0.75")" backColor="@getFillColors("0.25")" pointColor="@getPointColors("1")" lTens="0" MinValue="@MinVal" MaxValue="@MaxVal"></MP.MONO.UI.Components.Chart.Line>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@@ -18,26 +18,31 @@ namespace MP.MONO.UI.Components
|
||||
|
||||
protected DateTime lastRec = DateTime.Now.AddMinutes(-1);
|
||||
|
||||
protected Dictionary<string, string> listMaxVal = new Dictionary<string, string>();
|
||||
protected Dictionary<string, string> listMinVal = new Dictionary<string, string>();
|
||||
protected Dictionary<string, List<chartJsData.chartJsTSerie>> plotData = new Dictionary<string, List<chartJsData.chartJsTSerie>>();
|
||||
|
||||
protected List<chartJsData.chartJsTSerie> LevelVal
|
||||
{
|
||||
get => plotData[SelectedParam] ?? new List<chartJsData.chartJsTSerie>();
|
||||
}
|
||||
protected double sampleSecMin = 1;
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private List<DisplayDataDTO>? ListRecords { get; set; } = null;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected string _selParam { get; set; } = "";
|
||||
|
||||
protected List<chartJsData.chartJsTSerie> LevelVal
|
||||
{
|
||||
get
|
||||
{
|
||||
List<chartJsData.chartJsTSerie> answ = new List<chartJsData.chartJsTSerie>();
|
||||
if (plotData.ContainsKey(SelectedParam))
|
||||
{
|
||||
answ = plotData[SelectedParam];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
protected string? MaxVal
|
||||
{
|
||||
get => listMaxVal[SelectedParam] ?? "0";
|
||||
@@ -48,10 +53,6 @@ namespace MP.MONO.UI.Components
|
||||
get => listMinVal[SelectedParam] ?? "0";
|
||||
}
|
||||
|
||||
protected Dictionary<string, string> listMinVal = new Dictionary<string, string>();
|
||||
protected Dictionary<string, string> listMaxVal = new Dictionary<string, string>();
|
||||
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Properties
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
@page "/Parameters"
|
||||
|
||||
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="d-flex justify-content-between">
|
||||
@@ -16,17 +14,17 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<ParamOverview EC_SelValue="paramSelected"></ParamOverview>
|
||||
<ParamOverview SelVal="@selParam" EC_SelValue="paramSelected"></ParamOverview>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
@if (string.IsNullOrEmpty(selParam))
|
||||
{
|
||||
<p>please select to plot parameter</p>
|
||||
<p>← please select an item to plot graph</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<ParamPlot SelectedParam="@selParam"></ParamPlot>
|
||||
}
|
||||
<ParamPlot SelectedParam="@selParam"></ParamPlot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user