曲线回读+测试报告导出前期工作

This commit is contained in:
hsc
2026-07-24 16:31:27 +08:00
parent c592bcd272
commit 07218fc737
16 changed files with 211 additions and 39 deletions

View File

@@ -1,5 +1,6 @@
using Logger;
using MahApps.Metro.Controls;
using Model;
using Model.Entity;
using Model.Models;
using NLog.Targets;
@@ -26,24 +27,46 @@ namespace ExportModule.ViewModels
{
#region
public bool KeepAlive => true;
private ObservableCollection<TestReportModel> _testReportModelList = new();
public ObservableCollection<TestReportModel> TestReportModelList
{
get { return _testReportModelList; }
set { SetProperty(ref _testReportModelList, value); }
}
#endregion
#region
#endregion
public ICommand LoadedCommand { get; set; }
#region
ITestReportService _testReportService { get; set; }
#endregion
public ExportViewModel(IContainerProvider containerProvider) : base(containerProvider)
{
_testReportService = containerProvider.Resolve<ITestReportService>();
LoadedCommand = new AsyncDelegateCommand(OnLoad);
}
#region
private async Task OnLoad()
{
var result=await _testReportService.GetFilterList();
if (result.IsSuccess)
{
IList<TestReportModel> reportList = result.Data;
TestReportModelList = new ObservableCollection<TestReportModel>(reportList);
}
else
{
TestReportModelList = new();
}
}
#endregion
#region

View File

@@ -3,11 +3,17 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
mc:Ignorable="d"
xmlns:prism="http://prismlibrary.com/"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
prism:ViewModelLocator.AutoWireViewModel="True"
d:DesignHeight="1080" d:DesignWidth="1920">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
<Grid>
</Grid>