SSTable.razor 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. @using Microsoft.Extensions.Configuration
  2. @inject IConfiguration configuration
  3. @if (Datas != null)
  4. {
  5. <AntDesign.Table @ref="table" @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
  6. TItem="AppealRecord"
  7. Loading="_loading"
  8. DataSource="@Datas"
  9. OnRow="OnRow"
  10. Total="_total"
  11. ScrollX="1150" Size="TableSize.Small" Bordered
  12. >
  13. <ChildContent>
  14. <AntDesign.Column Title="序号" TData="string" Width="80">
  15. <center> @serialNumber(_pageIndex, _pageSize, context)</center>
  16. </AntDesign.Column>
  17. <AntDesign.Column Title="申诉时间" Width="150" @bind-Field="@context.CreateTime" Format="yyyy-MM-dd hh:mm:ss" Sortable Filterable />
  18. <AntDesign.Column Title="申诉类型" Width="160" DataIndex="Type.Name" TData="string" Sortable Filterable />
  19. <AntDesign.Column Title="申诉人" Width="90" DataIndex="Creater.Name" TData="string" Sortable Filterable />
  20. <AntDesign.Column Title="案号" Width="100" DataIndex="Item.CaseNo" TData="string" Sortable Filterable />
  21. <AntDesign.Column Title="案件名称" Width="300" DataIndex="Item.CaseName" TData="string" Sortable Filterable />
  22. <AntDesign.Column Title="审核人" Width="90" DataIndex="Reviewer.Name" TData="string" Sortable Filterable />
  23. <AntDesign.Column Title="状态" Width="80" TData="string" Sortable>
  24. <Template>
  25. @if (context.State == 0)
  26. {
  27. <span>待审核</span>
  28. }
  29. else
  30. {
  31. <span>已审核</span>
  32. }
  33. </Template>
  34. </AntDesign.Column>
  35. @if (ShowAction) {
  36. <ActionColumn>
  37. <Space>
  38. @if (context.State == 0 && context.ReviewerId == UserId)
  39. {
  40. <SpaceItem><Button Type="@ButtonType.Link" OnClick="() => _OnReview(context)">审核</Button></SpaceItem>
  41. }
  42. @if (context.State == 0 && (context.ReviewerId == UserId || context.CreaterId == UserId))
  43. {
  44. <SpaceItem><Button Type="@ButtonType.Link" OnClick="() => _OnChangeReviewer(context)">变更审核人</Button></SpaceItem>
  45. }
  46. </Space>
  47. </ActionColumn>
  48. }
  49. </ChildContent>
  50. <PaginationTemplate>
  51. <div style="display: flex; align-items: center">
  52. <Pagination Class="my-custom-pagination"
  53. Total="@_total"
  54. PageSize="@_pageSize"
  55. Current="@_pageIndex"
  56. ShowSizeChanger="@true"
  57. OnChange="HandlePageChange" />
  58. </div>
  59. </PaginationTemplate>
  60. </AntDesign.Table>
  61. }
  62. else
  63. {
  64. <Spin></Spin>
  65. }
  66. <Drawer Width="600" Visible="_ShowDetail" Placement="right" Title='("申诉详情")' OnClose="_=>CloseDetail()">
  67. @if (CurrentAppealRecord != null && CurrentAppealRecord.Item != null)
  68. {
  69. Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(CurrentAppealRecord.Item));
  70. <div>
  71. <Row>
  72. <AntDesign.Col Span="4"><b>我方文号:</b></AntDesign.Col>
  73. <AntDesign.Col Span="8">@CurrentAppealRecord.Item.CaseNo</AntDesign.Col>
  74. <AntDesign.Col Span="4"><b>处理事项:</b></AntDesign.Col>
  75. <AntDesign.Col Span="8">@CurrentAppealRecord.Item.DoItem</AntDesign.Col>
  76. </Row>
  77. <Row>
  78. <AntDesign.Col Span="4"><b>案件名称:</b></AntDesign.Col>
  79. <AntDesign.Col Span="20">@CurrentAppealRecord.Item.CaseName</AntDesign.Col>
  80. </Row>
  81. </div>
  82. }
  83. @if (_FieldValues != null)
  84. {
  85. <Divider Orientation="left" Style="font-weight:bold">申诉人:@CurrentAppealRecord.Creater.Name 申诉时间:@CurrentAppealRecord.CreateTime.ToString("yyyy-MM-dd") </Divider>
  86. foreach (InputFieldValue temValue in _FieldValues)
  87. {
  88. <Row>
  89. <AntDesign.Col Span="2"></AntDesign.Col>
  90. <AntDesign.Col Span="8"><b>@temValue.InputField.FieldName:</b></AntDesign.Col>
  91. <AntDesign.Col Span="14">@temValue.Value</AntDesign.Col>
  92. </Row>
  93. }
  94. }
  95. <Divider />
  96. @if (_ReviewValues != null)
  97. {
  98. <Divider Orientation="left" Style="font-weight:bold">审核人:@CurrentAppealRecord.Reviewer.Name 审核时间:@CurrentAppealRecord.ReviewTime?.ToString("yyyy-MM-dd") </Divider>
  99. foreach (InputFieldValue temValue in _ReviewValues)
  100. {
  101. <Row>
  102. <AntDesign.Col Span="2"></AntDesign.Col>
  103. <AntDesign.Col Span="8"><b>@temValue.InputField.FieldName:</b></AntDesign.Col>
  104. <AntDesign.Col Span="14">@temValue.Value</AntDesign.Col>
  105. </Row>
  106. }
  107. }
  108. @if (attachFiles != null && attachFiles.Count > 0)
  109. {
  110. <Divider Orientation="left" Style="font-weight:bold">附件</Divider>
  111. <Row>
  112. <AntDesign.Col Span="2"></AntDesign.Col>
  113. <AntDesign.Col Span="14">文件名称</AntDesign.Col>
  114. <AntDesign.Col Span="8">上传人</AntDesign.Col>
  115. </Row>
  116. @foreach (AttachFile file in attachFiles)
  117. {
  118. <Row>
  119. <AntDesign.Col Span="2"></AntDesign.Col>
  120. <AntDesign.Col Span="14"><a href="@($"{configuration.GetValue<string>("APIUrl")}AttachFiles/Download?id={file.Id}")">@file.Name </a></AntDesign.Col>
  121. <AntDesign.Col Span="8">@file.UploadUser.Name</AntDesign.Col>
  122. </Row>
  123. }
  124. }
  125. </Drawer>
  126. <style>
  127. .my-custom-pagination {
  128. margin: 15px 0;
  129. }
  130. .my-custom-pagination .ant-pagination-item,
  131. .my-custom-pagination .ant-pagination-item-link {
  132. border-radius: 100%;
  133. }
  134. </style>