WorkflowDefine.razor 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. @page "/Workflow/Manage"
  2. @using wispro.sp.entity
  3. <PageContainer>
  4. <Breadcrumb>
  5. <Breadcrumb>
  6. <BreadcrumbItem>
  7. <a href="/Home"><Icon Type="home"></Icon></a>
  8. </BreadcrumbItem>
  9. <BreadcrumbItem>
  10. <Icon Type="apartment" Theme="outline" /><span>流程管理</span>
  11. </BreadcrumbItem>
  12. </Breadcrumb>
  13. </Breadcrumb>
  14. <Content>
  15. <Button Type="primary" Icon="plus" OnClick="AddNew" Style="float:right">添加新流程</Button>
  16. </Content>
  17. <ChildContent>
  18. @if (workflows == null)
  19. {
  20. <Spin />
  21. }
  22. else
  23. {
  24. <AntDesign.Table @ref="table" @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
  25. TItem="wispro.sp.entity.workflowDefine.Workflow"
  26. Loading="_loading"
  27. DataSource="@workflows"
  28. Total="_total"
  29. Bordered=@true
  30. Size=@TableSize.Middle
  31. HidePagination>
  32. <ChildContent>
  33. <Selection Key="@(context.Id.ToString())" />
  34. <AntDesign.Column Title="序号" TData="int">
  35. @serialNumber(_pageIndex, _pageSize, context.Id)
  36. </AntDesign.Column>
  37. <AntDesign.Column Title="流程名称" @bind-Field="@context.Name" Sortable Filterable />
  38. <AntDesign.Column Title="创建日期" @bind-Field="@context.CreateTime" Format="yyyy-MM-dd" Sortable Filterable />
  39. <AntDesign.Column Title="生效日期" @bind-Field="@context.EffectivrDate" Format="yyyy-MM-dd" Sortable Filterable />
  40. <AntDesign.Column Title="失效日期" @bind-Field="@context.ExpirationDate" Format="yyyy-MM-dd" Sortable Filterable />
  41. <AntDesign.Column Title="绑定对象" TData="string">
  42. @workflowService.GetBindObjectName(context.ContentObjectType)
  43. </AntDesign.Column>
  44. <AntDesign.Column Title="说明" @bind-Field="@context.Memo" Filterable />
  45. <AntDesign.Column Title="创建人" TData="string">
  46. @if (context.CreateUser != null)
  47. {
  48. <span>@context.CreateUser.Name</span>
  49. }
  50. </AntDesign.Column>
  51. <ActionColumn>
  52. <Space>
  53. <SpaceItem><Button OnClick="()=>Detail(context.Id)">详情</Button></SpaceItem>
  54. </Space>
  55. <Space>
  56. <SpaceItem><Button Danger OnClick="()=>Delete(context)">删除</Button></SpaceItem>
  57. </Space>
  58. </ActionColumn>
  59. </ChildContent>
  60. <PaginationTemplate>
  61. <div style="display: flex; align-items: center">
  62. <Pagination Class="my-custom-pagination"
  63. Total="@_total"
  64. PageSize="@_pageSize"
  65. Current="@_pageIndex"
  66. ShowSizeChanger="@true" />
  67. </div>
  68. </PaginationTemplate>
  69. </AntDesign.Table>
  70. }
  71. </ChildContent>
  72. </PageContainer>
  73. <style>
  74. .my-custom-pagination {
  75. margin: 15px 0;
  76. }
  77. .my-custom-pagination .ant-pagination-item,
  78. .my-custom-pagination .ant-pagination-item-link {
  79. border-radius: 100%;
  80. }
  81. </style>
  82. <Modal Title="修改"
  83. Visible="@_visible"
  84. OnOk="@HandleOk"
  85. OnCancel="@HandleCancel"
  86. OkText="@("保存")"
  87. CancelText="@("取消")"
  88. Width="1000" MaskClosable="false">
  89. <Form Model="EditingObj" LabelColSpan="6"
  90. WrapperColSpan="16">
  91. <FormItem Label="流程名称">
  92. <Input @bind-Value="@context.Name" />
  93. </FormItem>
  94. <FormItem Label="生效日期">
  95. <DatePicker TValue="DateTime" Picker="@DatePickerType.Date" @bind-Value="@context.EffectivrDate" />
  96. </FormItem>
  97. <FormItem Label="失效日期">
  98. <DatePicker TValue="DateTime?" Picker="@DatePickerType.Date" @bind-Value="@context.ExpirationDate" />
  99. </FormItem>
  100. <FormItem Label="启动时绑定对象">
  101. <Select DataSource="@workflowService.GetBindObjects()"
  102. @bind-Value="@context.ContentObjectType"
  103. LabelName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.Name)"
  104. ValueName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.ObjectTypeFullName)"
  105. Placeholder="请选项一项"
  106. DefaultActiveFirstItem="false"
  107. EnableSearch="true"
  108. AllowClear="true"
  109. Style="width:220px;">
  110. </Select>
  111. </FormItem>
  112. <FormItem Label="说明">
  113. <TextArea @bind-Value="@context.Memo" MinRows="4" />
  114. </FormItem>
  115. <Divider />
  116. <FormItem Label="初始化操作名称">
  117. <Input @bind-Value="@InitAction.Name" />
  118. </FormItem>
  119. <FormItem Label="初始化界面">
  120. <Input @bind-Value="@InitAction.InputForm" />
  121. </FormItem>
  122. <wispro.sp.web.Components.InputValueSetting DataSource="@InitAction.inputValuesSettings" />
  123. </Form>
  124. </Modal>