|
@@ -16,6 +16,7 @@ using Hotline.FlowEngine.WorkflowModules;
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
using XF.Domain.Authentications;
|
|
|
using XF.Domain.Exceptions;
|
|
|
+using XF.Domain.Extensions;
|
|
|
using XF.Utility.EnumExtensions;
|
|
|
using XF.Domain.Repository;
|
|
|
|
|
@@ -492,6 +493,11 @@ public class WorkflowController : BaseController
|
|
|
[HttpGet("base-data")]
|
|
|
public async Task<dynamic> BaseData()
|
|
|
{
|
|
|
+ var levels = new List<int> { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
|
|
|
+ var orgs = levels.Select(d => new KeyValuePair<string, string>(d.ToString(), $"{d.ToChinese()}级部门办理")).ToList();
|
|
|
+ var center = new KeyValuePair<string, string>("center", "中心办理");
|
|
|
+ var centerIsTop = new List<KeyValuePair<string, string>> { center };
|
|
|
+ centerIsTop.AddRange(orgs);
|
|
|
return new
|
|
|
{
|
|
|
ModuleOptions = WorkflowModuleConsts.AllModules.Select(d => new KeyValuePair<string, string>(d.Code, d.Name)),
|
|
@@ -501,9 +507,16 @@ public class WorkflowController : BaseController
|
|
|
StepPropertiesOptions = await _systemDomainService.GetSysDicDataByCodeAsync(SysDicTypeConsts.WorkflowStepComponent, HttpContext.RequestAborted),
|
|
|
//PathPolicyOptions = EnumExts.GetDescriptions<EPathPolicy>(),
|
|
|
ExecuteModeOptions = EnumExts.GetDescriptions<EExecuteMode>(),
|
|
|
- DynamicPolicyOptions = EnumExts.GetDescriptions<EDynamicPolicy>(),
|
|
|
InstanceModeOptions = EnumExts.GetDescriptions<EInstanceMode>(),
|
|
|
StepTypeOptions = EnumExts.GetDescriptions<EStepType>().Where(d => d.Key != 1 && d.Key != 2),
|
|
|
+ DynamicPolicyOptions = EnumExts.GetDescriptions<EDynamicPolicy>()
|
|
|
+ .Select(d => new
|
|
|
+ {
|
|
|
+ Key = d.Key,
|
|
|
+ Value = d.Value,
|
|
|
+ Items = d.Key == 0 || d.Key == 2 ? centerIsTop : orgs
|
|
|
+ }),//todo thk
|
|
|
+
|
|
|
};
|
|
|
}
|
|
|
|