新增 错误的任务列表

This commit is contained in:
小肥羊 2024-11-14 18:01:42 +08:00
parent c597adf48f
commit 2ae7477034
2 changed files with 20 additions and 1 deletions

View File

@ -10,7 +10,9 @@
<Table @ref="_table" Loading="tableLoading" TItem="VideoTaskDto" PageSize="15" Total="_total" DataSource="_dataSource" @bind-SelectedRows="_selectedRows" OnChange="OnChange"
OnExpand="OnExpand">
<TitleTemplate>
<Flex Justify="end" Gap="10"> </Flex>
<Flex Justify="end" Gap="10">
<Button Type="primary" @onclick="ShowErrorTask">错误任务</Button>
</Flex>
</TitleTemplate>
<ColumnDefinitions Context="row">
<Selection />

View File

@ -2,6 +2,7 @@
using AntDesign.TableModels;
using FFmpeg.NET.Services;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.DataProtection.KeyManagement;
using SqlSugar;
using System.Linq.Expressions;
@ -47,6 +48,22 @@ namespace Learn.VideoAnalysis.Components.Pages
/// </summary>
/// <param name="query"></param>
/// <param name="changed"></param>
async void ShowErrorTask(MouseEventArgs e)
{
_dataSource = await taskDB.AsQueryable()
.Where(s=>s.ErrorMessage != null &&s.ErrorMessage!=string.Empty)
.Select<VideoTaskDto>()
.ToListAsync();
_total = _dataSource.Count();
tableLoading = false;
StateHasChanged();
}
/// <summary>
/// 分页 查询 筛选 时
/// </summary>
/// <param name="query"></param>
/// <param name="changed"></param>
async void OnChange(QueryModel<VideoTaskDto> query)
{
lastQuery= query;