Screen.razor 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. @page "/site/screen"
  2. @using AI.Platform.Core.Entity.Site
  3. @using AI.Platform.Page.Pages.Site.Model
  4. @attribute [ReuseTabsPage(Title = "设备管理")]
  5. <Spin Spinning="Loading">
  6. <div class="filter_box">
  7. <div class="filter_row" style="justify-content:start">
  8. <span>站名</span><Input Placeholder="请输入要查找的站名" @bind-Value="filterData.siteName" Style="width:30%" />
  9. <span>设备码</span><Input Placeholder="请输入要查找的设备码" @bind-Value="filterData.sn" Style="width:30%" />
  10. </div>
  11. <div class="filter_row" style="justify-content:start">
  12. <Button Icon="search" OnClick="Query" Style="margin-right:2%">查询</Button>
  13. <Button Icon="reload" OnClick="HandleReset" Style="margin-right:2%">重置</Button>
  14. <Button Icon="upload" OnClick="@(() => ShowDialog(1, null))">新增</Button>
  15. </div>
  16. </div>
  17. <UpdateScreenDialog onCallback="OnDialogCallback" onVisibleCallback="OnDialogVisibleCallback" @bind-IsVisible="isOpen" @bind-model="model" />
  18. <Table @ref="_Table" AutoHeight TItem="SnInfo" DataSource="_DataSource" PageSize="filterData.pageSize" Total="Total"
  19. OnChange="OnChange">
  20. <ColumnDefinitions Context="row">
  21. <PropertyColumn Property="c => c.siteName" Title="站名" />
  22. <PropertyColumn Property="c => c.sn" Title="设备码" />
  23. <PropertyColumn Property="c => c.CreateTime" Title="创建时间" />
  24. <PropertyColumn Property="c => c.EditTime" Title="修改时间" />
  25. <PropertyColumn Property="c => c.Remark" Title="备注" />
  26. <ActionColumn Width="180" Title="操作" Fixed="ColumnFixPlacement.Right">
  27. <Button Type="ButtonType.Primary" Color="Color.Blue6" OnClick="@(() => ShowDialog(2, row))">编辑</Button>
  28. <Button Type="ButtonType.Primary" Color="Color.Red6" OnClick="@(() => ShowDialog(3, row))">删除</Button>
  29. </ActionColumn>
  30. </ColumnDefinitions>
  31. <PaginationTemplate>
  32. <Pagination Class="@(context.PaginationClass + " my-custom-pagination")"
  33. Total="Total"
  34. PageSize="filterData.pageSize"
  35. Current="filterData.currentPage"
  36. ShowSizeChanger="true"
  37. ShowQuickJumper="true"
  38. OnChange="OnPageChange"
  39. ShowTotal="showTotal" />
  40. </PaginationTemplate>
  41. </Table>
  42. </Spin>
  43. <style>
  44. .filter_box{
  45. display:flex;
  46. flex-direction:column;
  47. align-items:center;
  48. background:#ffffff;
  49. padding:2%;
  50. }
  51. .filter_row{
  52. display:flex;
  53. flex-direction:row;
  54. justify-content:space-between;
  55. align-items:center;
  56. width:100%;
  57. margin-top:2%;
  58. }
  59. </style>