123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- @page "/Workflow/Manage"
- @using wispro.sp.entity
-
- <PageContainer>
- <Breadcrumb>
- <Breadcrumb>
- <BreadcrumbItem>
- <a href="/Home"><Icon Type="home"></Icon></a>
- </BreadcrumbItem>
- <BreadcrumbItem>
- <Icon Type="apartment" Theme="outline" /><span>流程管理</span>
- </BreadcrumbItem>
- </Breadcrumb>
- </Breadcrumb>
- <Content>
- <Select DataSource="@FieldTypes"
- @bind-Value="@fieldType"
- LabelName="@nameof(wispro.sp.entity.EnumnDescription<wispro.sp.entity.workflowDefine.FieldType>.Description)"
- ValueName="@nameof(wispro.sp.entity.EnumnDescription<wispro.sp.entity.workflowDefine.FieldType>.Value)"
- Placeholder="请选项一项"
- DefaultActiveFirstItem="false"
- EnableSearch="true"
- AllowClear="true"
- Style="width:220px;"
- >
- </Select>
- <Button Type="primary" Icon="plus" OnClick="AddNew" Style="float:right">添加新流程</Button>
- </Content>
- <ChildContent>
- @if (workflows == null) {
- <Spin/>
- }
- else
- {
- <AntDesign.Table @ref="table" @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
- TItem="wispro.sp.entity.workflowDefine.Workflow"
- Loading="_loading"
- DataSource="@workflows"
- Total="_total"
- Bordered=@true
- Size=@TableSize.Middle
- >
- <ChildContent>
- <Selection Key="@(context.Id.ToString())" />
- <AntDesign.Column Title="序号" TData="int">
- @serialNumber(_pageIndex, _pageSize, context.Id)
- </AntDesign.Column>
- <AntDesign.Column Title="流程名称" @bind-Field="@context.Name" Sortable Filterable />
- <AntDesign.Column Title="创建日期" @bind-Field="@context.CreateTime" Format="yyyy-MM-dd" Sortable Filterable />
- <AntDesign.Column Title="生效日期" @bind-Field="@context.EffectivrDate" Format="yyyy-MM-dd" Sortable Filterable />
- <AntDesign.Column Title="失效日期" @bind-Field="@context.ExpirationDate" Format="yyyy-MM-dd" Sortable Filterable />
- <AntDesign.Column Title="说明" @bind-Field="@context.Memo" Filterable />
- <AntDesign.Column Title="创建人" TData="string">
-
- @if (context.CreateUser != null)
- {
- <span>@context.CreateUser.Name</span>
- }
-
- </AntDesign.Column>
- <ActionColumn>
- <Space>
- <SpaceItem><Button OnClick="()=>Detail(context.Id)">详情</Button></SpaceItem>
- </Space>
- <Space>
- <SpaceItem><Button Danger OnClick="()=>Delete(context.Id)">删除</Button></SpaceItem>
- </Space>
- </ActionColumn>
- </ChildContent>
- <PaginationTemplate>
- <div style="display: flex; align-items: center">
- <Pagination Class="my-custom-pagination"
- Total="@_total"
- PageSize="@_pageSize"
- Current="@_pageIndex"
- ShowSizeChanger="@true"
-
- />
- </div>
- </PaginationTemplate>
- </AntDesign.Table>
- }
- </ChildContent>
- </PageContainer>
- <style>
- .my-custom-pagination {
- margin: 15px 0;
- }
- .my-custom-pagination .ant-pagination-item,
- .my-custom-pagination .ant-pagination-item-link {
- border-radius: 100%;
- }
- </style>
|