Browse Source

修改历史曲线查询时,根据ID查询。

reconfiguration
ZhaoGang 3 weeks ago
parent
commit
01eeeb9ad0
2 changed files with 6 additions and 5 deletions
  1. +1
    -1
      BPASmartClient.Academy/View/HistoryChart50LView.xaml
  2. +5
    -4
      BPASmartClient.Academy/ViewModel/HistoryChart50LViewModel.cs

+ 1
- 1
BPASmartClient.Academy/View/HistoryChart50LView.xaml View File

@@ -158,7 +158,7 @@
<RadioButton
x:Name="ceshi" Grid.Column="3"
Command="{Binding DataContext.InspectDataCommand, RelativeSource={RelativeSource AncestorType={x:Type UserControl}, Mode=FindAncestor}}"
CommandParameter="{Binding Name}"
CommandParameter="{Binding Id}"
Content="查看" FontSize="16" Foreground="White" GroupName="sss"
Style="{StaticResource setCheck}" />
</Grid>


+ 5
- 4
BPASmartClient.Academy/ViewModel/HistoryChart50LViewModel.cs View File

@@ -56,11 +56,11 @@ namespace BPASmartClient.Academy.ViewModel

Stopwatch sw = new Stopwatch();

private void OxyInit(string num)
private void OxyInit(string Id)
{
OxyModel.Series.Clear();
OxyDataModels.Clear();
OxyModel = new PlotModel() { Title = num };
OxyModel = new PlotModel() { Title = RecipeCharts.FirstOrDefault(r=>r.Id==Id).Name };
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜温度")));
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜蒸汽压力")));
OxyDataModels.Add(new OxyDataModel(CreateLine("反应釜蒸汽流量")));
@@ -72,7 +72,7 @@ namespace BPASmartClient.Academy.ViewModel
OxyDataModels.Add(new OxyDataModel(CreateLine("比例阀实际开度")));
OxyDataModels.Add(new OxyDataModel(CreateLine("卤水配制罐重量")));

SqliteOperate.GetInstance.QueryableByNum(num).ForEach(item =>
SqliteOperate.GetInstance.QueryableById(Id).ForEach(item =>
{
double x = DateTimeAxis.ToDouble(item.Createtime);
OxyDataModels[0].dataPoints.Add(new DataPoint(x, item.Temperature));
@@ -138,7 +138,8 @@ namespace BPASmartClient.Academy.ViewModel
{
Num = RecipeCharts.Count + 1,
CreateTime = item.Createtime,
Name = item.ProductNumber
Name = item.ProductNumber,
Id=item.Id,
});
});
}


Loading…
Cancel
Save