ApiLog.razor 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. @page "/system/alllog/apilog"
  2. @attribute [ReuseTabsPage(Title = "接口日志管理")]
  3. <Spin Spinning="Loading">
  4. <Table @ref="Table" AutoHeight TItem="SystemLogApi" @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.IpAddress" Title="IP地址" Width="200" />
  16. <PropertyColumn Align="ColumnAlign.Center" Property="c=>c.UserAgent" Title="UserAgent" Width="200" />
  17. <PropertyColumn Align="ColumnAlign.Center" Property="c => c.CreateTime" Title="创建时间" Width="200">
  18. @{
  19. var formattedTime = row.CreateTime?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A";
  20. }
  21. @formattedTime
  22. </PropertyColumn>
  23. </ColumnDefinitions>
  24. <PaginationTemplate>
  25. <Pagination Class="@(context.PaginationClass + " my-custom-pagination")"
  26. Total="context.Total"
  27. PageSize="context.PageSize"
  28. Current="context.PageIndex"
  29. ShowSizeChanger
  30. ShowQuickJumper
  31. ShowTotal="ShowTotal"
  32. OnChange="context.HandlePageChange" />
  33. </PaginationTemplate>
  34. </Table>
  35. </Spin>
  36. @inject ModalService ModalService;
  37. @inject ConfirmService ComfirmService;