Log.razor 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. @page "/system/alllog/log"
  2. @attribute [ReuseTabsPage(Title = "日志管理")]
  3. <Spin Spinning="Loading">
  4. <Table @ref="Table" AutoHeight TItem="SystemLog" @bind-PageSize="Ps" @bind-PageIndex="Pi" Total="Total" DataSource="DataSource" @bind-SelectedRows="SelectedRows" OnChange="OnChange">
  5. <TitleTemplate>
  6. <Flex Justify="FlexJustify.Start" Gap="@("10")">
  7. <Input Width="300" Placeholder="输入名称" @bind-Value="@Q_Name" />
  8. <Button OnClick="Search">搜索</Button>
  9. <Button OnClick="ResetQuery">重置</Button>
  10. </Flex>
  11. </TitleTemplate>
  12. <ColumnDefinitions Context="row">
  13. <PropertyColumn Align="ColumnAlign.Center" Property="c=>c.Id" Width="100" Title="ID" />
  14. <PropertyColumn Align="ColumnAlign.Left" Property="c=>c.Info" Title="日志信息" />
  15. <PropertyColumn Align="ColumnAlign.Center" Property="c=>c.LogType" Title="日志类型" Width="200" />
  16. <PropertyColumn Align="ColumnAlign.Center" Property="c => c.CreateTime" Title="创建时间" Width="200">
  17. @{
  18. var formattedTime = row.CreateTime?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A";
  19. }
  20. @formattedTime
  21. </PropertyColumn>
  22. </ColumnDefinitions>
  23. <PaginationTemplate>
  24. <Pagination Class="@(context.PaginationClass + " my-custom-pagination")"
  25. Total="context.Total"
  26. PageSize="context.PageSize"
  27. Current="context.PageIndex"
  28. ShowSizeChanger
  29. ShowQuickJumper
  30. ShowTotal="ShowTotal"
  31. OnChange="context.HandlePageChange" />
  32. </PaginationTemplate>
  33. </Table>
  34. </Spin>
  35. @inject ModalService ModalService;
  36. @inject ConfirmService ComfirmService;