Commit 28b5f8d3 authored by 潘栩锋's avatar 潘栩锋 🚴

getsample 只要任何一个样品点,获取还没成功, 都是采样未完成。 且把上一次采样完成记录下来,用于 比较数据 异常报警用。

parent d242251b
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<StackPanel Margin="{StaticResource ControlMargin}"> <StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="差异比例" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="差异比例" />
...@@ -98,14 +98,6 @@ ...@@ -98,14 +98,6 @@
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Comment}" Text="样品1AD/样品0AD&#13;与上一次比较" /> <TextBlock Style="{StaticResource Styles.Text.FieldHeader.Comment}" Text="样品1AD/样品0AD&#13;与上一次比较" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Editable}" Text="差异时间范围" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource Styles.Text.FieldContent.Input.Card}" Text="{Binding ErrIntervalMin}" />
<TextBlock Style="{StaticResource Styles.Text.FieldContent.Unit}" Text="min"/>
<TextBlock Style="{StaticResource Styles.Text.FieldHeader.Comment}" Text="两次时间点比较,&#13;时间点的间隔最大时长。 大于它无效,不能比较" />
</StackPanel>
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
...@@ -277,38 +269,6 @@ ...@@ -277,38 +269,6 @@
</StackPanel> </StackPanel>
</Border> </Border>
<Border Style="{StaticResource Styles.Card.Border}">
<StackPanel>
<TextBlock Style="{StaticResource Styles.Card.Title}"
Text="采集记录"/>
<StackPanel Orientation="Horizontal">
<Button Style="{StaticResource Styles.Button.Square2}" Content="获取" Command="{Binding GetTempDataCmd}"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<ItemsControl ItemsSource="{Binding TempData}" >
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<DataGrid ItemsSource="{Binding .}" IsReadOnly="True" Margin="{StaticResource ControlMargin}" AutoGenerateColumns="False" Width="400" TextBlock.FontSize="12" TextBlock.FontWeight="Normal"
>
<DataGrid.Columns>
<DataGridTextColumn Header="复位" Binding="{Binding IsReset}" Width="100"/>
<DataGridTextColumn Header="时间" Binding="{Binding Time,StringFormat={}{0:HH:mm:ss}}" FontSize="10" Width="100"/>
<DataGridTextColumn Header="AD" Binding="{Binding Ad}" Width="100"/>
<DataGridTextColumn Header="滤波AD" Binding="{Binding FilterAd}" Width="100"/>
</DataGrid.Columns>
</DataGrid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</StackPanel>
</Border>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
<Button Style="{StaticResource Styles.Button.Apply}" VerticalAlignment="Bottom" Margin="0,0,20,20" <Button Style="{StaticResource Styles.Button.Apply}" VerticalAlignment="Bottom" Margin="0,0,20,20"
......
...@@ -85,12 +85,6 @@ namespace FLY.Thick.Base.UI ...@@ -85,12 +85,6 @@ namespace FLY.Thick.Base.UI
/// </summary> /// </summary>
public double CrossErrPercent { get; set; } public double CrossErrPercent { get; set; }
/// <summary>
/// 异常比较 时间间隔范围;
/// 两次时间点比较, 时间点的间隔最大时长。 大于它无效,不能比较
/// </summary>
public int ErrIntervalMin { get; set; }
/// <summary> /// <summary>
/// 参数:样品点参数 /// 参数:样品点参数
/// </summary> /// </summary>
...@@ -108,12 +102,11 @@ namespace FLY.Thick.Base.UI ...@@ -108,12 +102,11 @@ namespace FLY.Thick.Base.UI
#region Command #region Command
public RelayCommand ApplyCmd { get; private set; } public RelayCommand ApplyCmd { get; private set; }
public RelayCommand GetTempDataCmd { get; private set; }
#endregion #endregion
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
public List<List<TempFilterData>> TempData { get; private set; }
public string InfoName { get; set; } public string InfoName { get; set; }
IGetSampleService getSampleService; IGetSampleService getSampleService;
...@@ -121,7 +114,6 @@ namespace FLY.Thick.Base.UI ...@@ -121,7 +114,6 @@ namespace FLY.Thick.Base.UI
public PgGetSampleVm() public PgGetSampleVm()
{ {
ApplyCmd = new RelayCommand(Apply); ApplyCmd = new RelayCommand(Apply);
GetTempDataCmd = new RelayCommand(GetTempData);
} }
...@@ -139,7 +131,6 @@ namespace FLY.Thick.Base.UI ...@@ -139,7 +131,6 @@ namespace FLY.Thick.Base.UI
Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.ErrPercent), this, nameof(ErrPercent)); Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.ErrPercent), this, nameof(ErrPercent));
Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.ErrValue), this, nameof(ErrValue)); Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.ErrValue), this, nameof(ErrValue));
Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.CrossErrPercent), this, nameof(CrossErrPercent)); Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.CrossErrPercent), this, nameof(CrossErrPercent));
Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.ErrIntervalMin), this, nameof(ErrIntervalMin));
Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.SearchRange), this, nameof(SearchRange)); Misc.BindingOperations.SetBinding(this.getSampleService, nameof(this.getSampleService.SearchRange), this, nameof(SearchRange));
...@@ -257,7 +248,7 @@ namespace FLY.Thick.Base.UI ...@@ -257,7 +248,7 @@ namespace FLY.Thick.Base.UI
this.getSampleService.ErrPercent = this.ErrPercent; this.getSampleService.ErrPercent = this.ErrPercent;
this.getSampleService.ErrValue = this.ErrValue; this.getSampleService.ErrValue = this.ErrValue;
this.getSampleService.CrossErrPercent = this.CrossErrPercent; this.getSampleService.CrossErrPercent = this.CrossErrPercent;
this.getSampleService.ErrIntervalMin = this.ErrIntervalMin;
for (int i = 0; i < Samples.Count(); i++) for (int i = 0; i < Samples.Count(); i++)
{ {
...@@ -287,17 +278,7 @@ namespace FLY.Thick.Base.UI ...@@ -287,17 +278,7 @@ namespace FLY.Thick.Base.UI
TimeSpan.FromSeconds(2)); TimeSpan.FromSeconds(2));
} }
private void GetTempData()
{
getSampleService.GetTempFilterDatas((asyncContext, retData) =>
{
var ll = retData as List<List<TempFilterData>>;
TempData = ll;
FLY.ControlLibrary.Window_Tip.Show("加载完成",
$"共加载{ll.Count()}列数据",
TimeSpan.FromSeconds(2));
}, null);
}
} }
public class PgGetSampleVmUt : PgGetSampleVm public class PgGetSampleVmUt : PgGetSampleVm
{ {
......
...@@ -61,13 +61,6 @@ namespace FLY.Thick.Base.IService ...@@ -61,13 +61,6 @@ namespace FLY.Thick.Base.IService
/// </summary> /// </summary>
double CrossErrPercent { get; set; } double CrossErrPercent { get; set; }
/// <summary>
/// 异常比较 时间间隔范围;
/// 两次时间点比较, 时间点的间隔最大时长。 大于它无效,不能比较
/// </summary>
int ErrIntervalMin { get; set; }
/// <summary> /// <summary>
/// 参数:样品点参数 /// 参数:样品点参数
/// </summary> /// </summary>
...@@ -191,10 +184,6 @@ namespace FLY.Thick.Base.IService ...@@ -191,10 +184,6 @@ namespace FLY.Thick.Base.IService
/// </summary> /// </summary>
public double SampleValue { get; set; } public double SampleValue { get; set; }
/// <summary>
/// 采集失败了
/// </summary>
public bool IsFailure { get; set; }
#region INotifyPropertyChanged 成员 #region INotifyPropertyChanged 成员
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment