测试报告导出优化
This commit is contained in:
@@ -82,6 +82,7 @@ namespace ExportModule.ViewModels
|
|||||||
public ICommand LoadedCommand { get; }
|
public ICommand LoadedCommand { get; }
|
||||||
public ICommand QueryCommand { get; }
|
public ICommand QueryCommand { get; }
|
||||||
public ICommand ExportCommand { get; }
|
public ICommand ExportCommand { get; }
|
||||||
|
public ICommand ExportReportCommand { get; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 私有字段
|
#region 私有字段
|
||||||
@@ -95,6 +96,7 @@ namespace ExportModule.ViewModels
|
|||||||
LoadedCommand = new AsyncDelegateCommand(OnLoad);
|
LoadedCommand = new AsyncDelegateCommand(OnLoad);
|
||||||
QueryCommand = new AsyncDelegateCommand(OnQuery);
|
QueryCommand = new AsyncDelegateCommand(OnQuery);
|
||||||
ExportCommand = new AsyncDelegateCommand(OnExport);
|
ExportCommand = new AsyncDelegateCommand(OnExport);
|
||||||
|
ExportReportCommand = new AsyncDelegateCommand(OnExportReportCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 命令处理
|
#region 命令处理
|
||||||
@@ -183,6 +185,10 @@ namespace ExportModule.ViewModels
|
|||||||
await Task.Run(() => ExportToExcel(dialog.FileName, entities));
|
await Task.Run(() => ExportToExcel(dialog.FileName, entities));
|
||||||
ShowInfoMessageBox($"导出完成,共 {entities.Count} 条步骤记录,已保存至:{dialog.FileName}", () => { });
|
ShowInfoMessageBox($"导出完成,共 {entities.Count} 条步骤记录,已保存至:{dialog.FileName}", () => { });
|
||||||
}
|
}
|
||||||
|
private async Task OnExportReportCommand()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@@ -109,13 +110,20 @@
|
|||||||
Margin="4,0"
|
Margin="4,0"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<Button Grid.Column="7"
|
<Button Grid.Column="7"
|
||||||
Content="导出 Excel"
|
Content="导出详细测试步骤"
|
||||||
Command="{Binding ExportCommand}"
|
Command="{Binding ExportCommand}"
|
||||||
Style="{StaticResource MaterialDesignFlatButton}"
|
Style="{StaticResource MaterialDesignFlatButton}"
|
||||||
Padding="16,6"
|
Padding="16,6"
|
||||||
Margin="4,0"
|
Margin="4,0"
|
||||||
VerticalAlignment="Center"/>
|
VerticalAlignment="Center"/>
|
||||||
<Button Grid.Column="8"
|
<Button Grid.Column="8"
|
||||||
|
Content="导出测试报告"
|
||||||
|
Command="{Binding ExportReportCommand}"
|
||||||
|
Style="{StaticResource MaterialDesignFlatButton}"
|
||||||
|
Padding="16,6"
|
||||||
|
Margin="4,0"
|
||||||
|
VerticalAlignment="Center"/>
|
||||||
|
<Button Grid.Column="9"
|
||||||
Content="加载全部"
|
Content="加载全部"
|
||||||
Command="{Binding LoadedCommand}"
|
Command="{Binding LoadedCommand}"
|
||||||
Style="{StaticResource MaterialDesignFlatButton}"
|
Style="{StaticResource MaterialDesignFlatButton}"
|
||||||
|
|||||||
Reference in New Issue
Block a user