WorkflowDefine.razor 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. <Button Type="primary" Icon="plus" OnClick="ChangeRectSize" Style="float:right">改变流程框大小</Button>
  17. </Content>
  18. <ChildContent>
  19. @if (workflows == null)
  20. {
  21. <Spin />
  22. }
  23. else
  24. {
  25. <AntDesign.Table @ref="table" @bind-PageIndex="_pageIndex" @bind-PageSize="_pageSize"
  26. TItem="wispro.sp.entity.workflowDefine.Workflow"
  27. Loading="_loading"
  28. DataSource="@workflows"
  29. Total="_total"
  30. Bordered=@true
  31. Size=@TableSize.Middle
  32. HidePagination>
  33. <ChildContent>
  34. <Selection Key="@(context.Id.ToString())" />
  35. <AntDesign.Column Title="序号" TData="int">
  36. @serialNumber(_pageIndex, _pageSize, context.Id)
  37. </AntDesign.Column>
  38. <AntDesign.Column Title="流程名称" @bind-Field="@context.Name" Sortable Filterable />
  39. <AntDesign.Column Title="创建日期" @bind-Field="@context.CreateTime" Format="yyyy-MM-dd" Sortable Filterable />
  40. <AntDesign.Column Title="生效日期" @bind-Field="@context.EffectivrDate" Format="yyyy-MM-dd" Sortable Filterable />
  41. <AntDesign.Column Title="失效日期" @bind-Field="@context.ExpirationDate" Format="yyyy-MM-dd" Sortable Filterable />
  42. <AntDesign.Column Title="绑定对象" TData="string">
  43. @workflowService.GetBindObjectName(context.ContentObjectType)
  44. </AntDesign.Column>
  45. <AntDesign.Column Title="说明" @bind-Field="@context.Memo" Filterable />
  46. <AntDesign.Column Title="创建人" TData="string">
  47. @if (context.CreateUser != null)
  48. {
  49. <span>@context.CreateUser.Name</span>
  50. }
  51. </AntDesign.Column>
  52. <ActionColumn>
  53. <Space>
  54. <SpaceItem><Button OnClick="()=>InitFieldSetting(context)">初始化栏位</Button></SpaceItem>
  55. </Space>
  56. <Space>
  57. <SpaceItem><Button OnClick="()=>Detail(context.Id)">详情</Button></SpaceItem>
  58. </Space>
  59. <Space>
  60. <SpaceItem><Button Danger OnClick="()=>Delete(context)">删除</Button></SpaceItem>
  61. </Space>
  62. </ActionColumn>
  63. </ChildContent>
  64. <PaginationTemplate>
  65. <div style="display: flex; align-items: center">
  66. <Pagination Class="my-custom-pagination"
  67. Total="@_total"
  68. PageSize="@_pageSize"
  69. Current="@_pageIndex"
  70. ShowSizeChanger="@true" />
  71. </div>
  72. </PaginationTemplate>
  73. </AntDesign.Table>
  74. }
  75. <Divider />
  76. <div style="height:400px;width:100%;overflow:auto;background:#FFFFFF;">
  77. <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="@ChartWidth" height="800">
  78. <text x="@(ChartWidth/2)" y="50" fill="black" alignment-baseline="middle" text-anchor="middle" font-size="30" font-weight="800">案件系数申核流程</text>
  79. <circle cx="@(ChartWidth/5)" cy="200" r="25" stroke="black" stroke-width="2" fill="white" />
  80. <a @onclick="() => ClickStep(false)">
  81. <text x="@(ChartWidth/5)" y="200" fill="black" alignment-baseline="middle" text-anchor="middle" font-size="16">开始</text>
  82. </a>
  83. <rect x="@(2*ChartWidth/5-rectWidth/2)" y="@(200-rectHeight/2)" rx="10" ry="10" width="@rectWidth" height="@rectHeight" style="fill:green;stroke:black;stroke-width:3;opacity:0.5" />
  84. <a @onclick="() => ClickStep(false)">
  85. <text x="@(2*ChartWidth/5)" y="200" fill="black" alignment-baseline="middle" text-anchor="middle" font-size="@rectFontSize" font-weight="700">提出申诉</text>
  86. </a>
  87. <rect x="@(3*ChartWidth/5-rectWidth/2)" y="@(200-rectHeight/2)" rx="10" ry="10" width="@rectWidth" height="@rectHeight" style="fill:green;stroke:black;stroke-width:3;opacity:0.5" />
  88. <a @onclick="() => ClickStep(false)">
  89. <text x="@(3*ChartWidth/5)" y="200" fill="black" alignment-baseline="middle" text-anchor="middle" font-size="@rectFontSize" font-weight="700">主管申核</text>
  90. </a>
  91. <circle cx="@(4*ChartWidth/5)" cy="200" r="25" stroke="black" stroke-width="2" fill="gray" />
  92. <a @onclick="() => ClickStep(true)">
  93. <text x="@(4*ChartWidth/5)" y="200" fill="black" alignment-baseline="middle" text-anchor="middle">结束</text>
  94. </a>
  95. <path d="M@(ChartWidth/5+25) 200 H@(2*ChartWidth/5-rectWidth/2)" stroke="black" />
  96. <path d="M@(2*ChartWidth/5-rectWidth/2) 200 L@(2*ChartWidth/5-rectWidth/2-8) 205 L@(2*ChartWidth/5-rectWidth/2-8) 195 Z" stroke="black" />
  97. <path d="M@(2*ChartWidth/5+rectWidth/2) 200 H@(3*ChartWidth/5-rectWidth/2)" stroke="black" />
  98. <path d="M@(3*ChartWidth/5-rectWidth/2) 200 L@(3*ChartWidth/5-rectWidth/2-8) 205 L@(3*ChartWidth/5-rectWidth/2-8) 195 Z" stroke="black" />
  99. <path d="M@(3*ChartWidth/5+rectWidth/2) 200 H@(4*ChartWidth/5-25)" stroke="black" />
  100. <path d="M@(4*ChartWidth/5-25) 200 L@(4*ChartWidth/5-25-8) 205 L@(4*ChartWidth/5-25-8) 195 Z" stroke="black" />
  101. </svg>
  102. </div>
  103. </ChildContent>
  104. </PageContainer>
  105. <style>
  106. .my-custom-pagination {
  107. margin: 15px 0;
  108. }
  109. .my-custom-pagination .ant-pagination-item,
  110. .my-custom-pagination .ant-pagination-item-link {
  111. border-radius: 100%;
  112. }
  113. </style>
  114. <Modal Title="初始化栏位"
  115. Visible="@_initModalVisible"
  116. OnOk="@InitOk"
  117. OnCancel="@InitCancel"
  118. OkText="@("确认")"
  119. CancelText="@("取消")"
  120. Width="900">
  121. <wispro.sp.web.Components.InputValueSetting DataSource="@InitInputValues"/>
  122. </Modal>
  123. <Modal Title="修改"
  124. Visible="@_visible"
  125. OnOk="@HandleOk"
  126. OnCancel="@HandleCancel">
  127. <Form Model="EditingObj" LabelColSpan="6"
  128. WrapperColSpan="16">
  129. <FormItem Label="流程名称">
  130. <Input @bind-Value="@context.Name" />
  131. </FormItem>
  132. <FormItem Label="生效日期">
  133. <DatePicker TValue="DateTime" Picker="@DatePickerType.Date" @bind-Value="@context.EffectivrDate" />
  134. </FormItem>
  135. <FormItem Label="失效日期">
  136. <DatePicker TValue="DateTime?" Picker="@DatePickerType.Date" @bind-Value="@context.ExpirationDate" />
  137. </FormItem>
  138. <FormItem Label="启动时绑定对象">
  139. <Select DataSource="@workflowService.GetBindObjects()"
  140. @bind-Value="@context.ContentObjectType"
  141. LabelName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.Name)"
  142. ValueName="@nameof(wispro.sp.entity.workflowDefine.BindObjectType.ObjectTypeFullName)"
  143. Placeholder="请选项一项"
  144. DefaultActiveFirstItem="false"
  145. EnableSearch="true"
  146. AllowClear="true"
  147. Style="width:220px;">
  148. </Select>
  149. </FormItem>
  150. <FormItem Label="说明">
  151. <TextArea @bind-Value="@context.Memo" MinRows="4" />
  152. </FormItem>
  153. </Form>
  154. </Modal>