소스 검색

增加新任务调度Sundial管理页面(待完善)

zuohuaijun 3 년 전
부모
커밋
98d8ddf232
34개의 변경된 파일2036개의 추가작업 그리고 522개의 파일을 삭제
  1. 3 3
      Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj
  2. 87 8
      Admin.NET/Admin.NET.Core/Admin.NET.Core.xml
  3. 6 6
      Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs
  4. 41 0
      Admin.NET/Admin.NET.Core/Service/Job/Dto/JobDetailInput.cs
  5. 0 10
      Admin.NET/Admin.NET.Core/Service/Job/Dto/JobInput.cs
  6. 14 0
      Admin.NET/Admin.NET.Core/Service/Job/Dto/JobOutput.cs
  7. 39 0
      Admin.NET/Admin.NET.Core/Service/Job/Dto/JobTriggerInput.cs
  8. 112 28
      Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs
  9. 7 0
      Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs
  10. 0 47
      Admin.NET/Admin.NET.Core/Service/Timer/Dto/TimerInput.cs
  11. 0 15
      Admin.NET/Admin.NET.Core/Service/Timer/Dto/TimerMethod.cs
  12. 0 20
      Admin.NET/Admin.NET.Core/Service/Timer/Dto/TimerOutput.cs
  13. 0 247
      Admin.NET/Admin.NET.Core/Service/Timer/SysTimerService.cs
  14. 561 42
      Web/src/api-services/apis/sys-job-api.ts
  15. 80 0
      Web/src/api-services/models/add-job-detail-input.ts
  16. 147 0
      Web/src/api-services/models/add-job-trigger-input.ts
  17. 11 11
      Web/src/api-services/models/admin-result-list-sys-job-cluster.ts
  18. 57 0
      Web/src/api-services/models/admin-result-list-sys-job-trigger.ts
  19. 57 0
      Web/src/api-services/models/admin-result-sql-sugar-paged-list-job-output.ts
  20. 24 0
      Web/src/api-services/models/cluster-status.ts
  21. 5 5
      Web/src/api-services/models/delete-job-detail-input.ts
  22. 10 12
      Web/src/api-services/models/delete-job-trigger-input.ts
  23. 15 5
      Web/src/api-services/models/index.ts
  24. 34 0
      Web/src/api-services/models/job-output.ts
  25. 63 0
      Web/src/api-services/models/sql-sugar-paged-list-job-output.ts
  26. 51 0
      Web/src/api-services/models/sys-job-cluster.ts
  27. 27 21
      Web/src/api-services/models/sys-job-detail.ts
  28. 48 42
      Web/src/api-services/models/sys-job-trigger.ts
  29. 6 0
      Web/src/api-services/models/sys-log-ex.ts
  30. 6 0
      Web/src/api-services/models/sys-log-op.ts
  31. 80 0
      Web/src/api-services/models/update-job-detail-input.ts
  32. 80 0
      Web/src/api-services/models/update-job-trigger-input.ts
  33. 119 0
      Web/src/views/system/job/component/editJobDetail.vue
  34. 246 0
      Web/src/views/system/job/index.vue

+ 3 - 3
Admin.NET/Admin.NET.Core/Admin.NET.Core.csproj

@@ -14,9 +14,9 @@
   <ItemGroup>
     <PackageReference Include="AngleSharp" Version="0.17.1" />
     <PackageReference Include="AspNetCoreRateLimit" Version="4.0.2" />
-    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.1.3" />
-    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.1.3" />
-    <PackageReference Include="Furion.Pure" Version="4.8.1.3" />
+    <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.1.4" />
+    <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.1.4" />
+    <PackageReference Include="Furion.Pure" Version="4.8.1.4" />
     <PackageReference Include="Lazy.Captcha.Core" Version="1.1.6" />
     <PackageReference Include="Magicodes.IE.Excel" Version="2.7.0" />
     <PackageReference Include="Magicodes.IE.Pdf" Version="2.7.0" />

+ 87 - 8
Admin.NET/Admin.NET.Core/Admin.NET.Core.xml

@@ -5271,9 +5271,54 @@
             </summary>
             <param name="context"></param>
         </member>
-        <member name="P:Admin.NET.Core.Service.JobInput.Name">
+        <member name="P:Admin.NET.Core.Service.JobDetailInput.JobId">
             <summary>
-            作业任务名称
+            作业Id
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.PageJobInput.JobId">
+            <summary>
+            作业Id
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.PageJobInput.Description">
+            <summary>
+            描述信息
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.AddJobDetailInput.JobId">
+            <summary>
+            作业Id
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.JobOutput.JobDetail">
+            <summary>
+            作业信息
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.JobOutput.JobTriggers">
+            <summary>
+            触发器集合
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.JobTriggerInput.JobId">
+            <summary>
+            作业Id
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.JobTriggerInput.TriggerId">
+            <summary>
+            触发器Id
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.AddJobTriggerInput.JobId">
+            <summary>
+            作业Id
+            </summary>
+        </member>
+        <member name="P:Admin.NET.Core.Service.AddJobTriggerInput.TriggerId">
+            <summary>
+            触发器Id
             </summary>
         </member>
         <member name="T:Admin.NET.Core.Service.JobClusterServer">
@@ -5318,23 +5363,57 @@
             系统作业任务服务
             </summary>
         </member>
-        <member name="M:Admin.NET.Core.Service.SysJobService.GetJobList">
+        <member name="M:Admin.NET.Core.Service.SysJobService.GetJobPage(Admin.NET.Core.Service.PageJobInput)">
+            <summary>
+            获取作业分页列表
+            </summary>
+        </member>
+        <member name="M:Admin.NET.Core.Service.SysJobService.AddJobDetail(Admin.NET.Core.Service.AddJobDetailInput)">
+            <summary>
+            添加作业
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Admin.NET.Core.Service.SysJobService.UpdateJobDetail(Admin.NET.Core.Service.UpdateJobDetailInput)">
+            <summary>
+            更新作业
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Admin.NET.Core.Service.SysJobService.DeleteJobDetail(Admin.NET.Core.Service.DeleteJobDetailInput)">
+            <summary>
+            删除作业
+            </summary>
+            <returns></returns>
+        </member>
+        <member name="M:Admin.NET.Core.Service.SysJobService.GetJobTriggerList(Admin.NET.Core.Service.JobDetailInput)">
+            <summary>
+            获取触发器列表
+            </summary>
+        </member>
+        <member name="M:Admin.NET.Core.Service.SysJobService.AddJobTrigger(Admin.NET.Core.Service.AddJobTriggerInput)">
             <summary>
-            获取所有作业任务列表
+            添加作业
             </summary>
+            <returns></returns>
         </member>
-        <member name="M:Admin.NET.Core.Service.SysJobService.AddJob">
+        <member name="M:Admin.NET.Core.Service.SysJobService.UpdateJobTrigger(Admin.NET.Core.Service.UpdateJobTriggerInput)">
             <summary>
-            增加作业任务
+            更新触发器
             </summary>
             <returns></returns>
         </member>
-        <member name="M:Admin.NET.Core.Service.SysJobService.DeleteJob(Admin.NET.Core.Service.JobInput)">
+        <member name="M:Admin.NET.Core.Service.SysJobService.DeleteJobTrigger(Admin.NET.Core.Service.DeleteJobTriggerInput)">
             <summary>
-            删除作业任务
+            删除触发器
             </summary>
             <returns></returns>
         </member>
+        <member name="M:Admin.NET.Core.Service.SysJobService.GetJobClusterList">
+            <summary>
+            获取集群列表
+            </summary>
+        </member>
         <member name="P:Admin.NET.Core.Service.PageLogInput.StartTime">
             <summary>
             开始时间

+ 6 - 6
Admin.NET/Admin.NET.Core/SeedData/SysMenuSeedData.cs

@@ -95,12 +95,12 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
             new SysMenu{ Id=252885263005343, Pid=252885263005340, Title="增加", Permission="sysDictType:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
             new SysMenu{ Id=252885263005344, Pid=252885263005340, Title="删除", Permission="sysDictType:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
 
-            new SysMenu{ Id=252885263005350, Pid=252885263005300, Title="任务调度", Path="/platform/timer", Name="sysTimer", Component="/system/timer/index", Icon="ele-AlarmClock", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
-            new SysMenu{ Id=252885263005351, Pid=252885263005350, Title="查询", Permission="sysTimer:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263005352, Pid=252885263005350, Title="编辑", Permission="sysTimer:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263005353, Pid=252885263005350, Title="增加", Permission="sysTimer:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263005354, Pid=252885263005350, Title="删除", Permission="sysTimer:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
-            new SysMenu{ Id=252885263005355, Pid=252885263005350, Title="状态", Permission="sysTimer:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005350, Pid=252885263005300, Title="任务调度", Path="/platform/job", Name="sysJob", Component="/system/job/index", Icon="ele-AlarmClock", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=130 },
+            new SysMenu{ Id=252885263005351, Pid=252885263005350, Title="查询", Permission="sysJob:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005352, Pid=252885263005350, Title="编辑", Permission="sysJob:update", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005353, Pid=252885263005350, Title="增加", Permission="sysJob:add", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005354, Pid=252885263005350, Title="删除", Permission="sysJob:delete", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
+            new SysMenu{ Id=252885263005355, Pid=252885263005350, Title="状态", Permission="sysJob:setStatus", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=100 },
 
             new SysMenu{ Id=252885263005360, Pid=252885263005300, Title="系统监控", Path="/platform/server", Name="sysServer", Component="/system/server/index", Icon="ele-Monitor", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), Order=140 },
 

+ 41 - 0
Admin.NET/Admin.NET.Core/Service/Job/Dto/JobDetailInput.cs

@@ -0,0 +1,41 @@
+namespace Admin.NET.Core.Service;
+
+public class JobDetailInput
+{
+    /// <summary>
+    /// 作业Id
+    /// </summary>
+    public string JobId { get; set; }
+}
+
+public class PageJobInput : BasePageInput
+{
+    /// <summary>
+    /// 作业Id
+    /// </summary>
+    public string JobId { get; set; }
+
+    /// <summary>
+    /// 描述信息
+    /// </summary>
+    public string Description { get; set; }
+}
+
+[NotTable]
+public class AddJobDetailInput : SysJobDetail
+{
+    /// <summary>
+    /// 作业Id
+    /// </summary>
+    [Required(ErrorMessage = "作业Id不能为空"), MinLength(2, ErrorMessage = "作业Id不能少于2个字符")]
+    public override string JobId { get; set; }
+}
+
+[NotTable]
+public class UpdateJobDetailInput : AddJobDetailInput
+{
+}
+
+public class DeleteJobDetailInput : JobDetailInput
+{
+}

+ 0 - 10
Admin.NET/Admin.NET.Core/Service/Job/Dto/JobInput.cs

@@ -1,10 +0,0 @@
-namespace Admin.NET.Core.Service;
-
-public class JobInput
-{
-    /// <summary>
-    /// 作业任务名称
-    /// </summary>
-    [Required(ErrorMessage = "作业任务名称不能为空")]
-    public string Name { get; set; }
-}

+ 14 - 0
Admin.NET/Admin.NET.Core/Service/Job/Dto/JobOutput.cs

@@ -0,0 +1,14 @@
+namespace Admin.NET.Core.Service;
+
+public class JobOutput
+{
+    /// <summary>
+    /// 作业信息
+    /// </summary>
+    public SysJobDetail JobDetail { get; set; }
+
+    /// <summary>
+    /// 触发器集合
+    /// </summary>
+    public List<SysJobTrigger> JobTriggers { get; set; }
+}

+ 39 - 0
Admin.NET/Admin.NET.Core/Service/Job/Dto/JobTriggerInput.cs

@@ -0,0 +1,39 @@
+namespace Admin.NET.Core.Service;
+
+public class JobTriggerInput
+{
+    /// <summary>
+    /// 作业Id
+    /// </summary>
+    public string JobId { get; set; }
+
+    /// <summary>
+    /// 触发器Id
+    /// </summary>
+    public string TriggerId { get; set; }
+}
+
+[NotTable]
+public class AddJobTriggerInput : SysJobTrigger
+{
+    /// <summary>
+    /// 作业Id
+    /// </summary>
+    [Required(ErrorMessage = "作业Id不能为空"), MinLength(2, ErrorMessage = "作业Id不能少于2个字符")]
+    public override string JobId { get; set; }
+
+    /// <summary>
+    /// 触发器Id
+    /// </summary>
+    [Required(ErrorMessage = "触发器Id不能为空"), MinLength(2, ErrorMessage = "触发器Id不能少于2个字符")]
+    public override string TriggerId { get; set; }
+}
+
+[NotTable]
+public class UpdateJobTriggerInput : AddJobDetailInput
+{
+}
+
+public class DeleteJobTriggerInput : JobTriggerInput
+{
+}

+ 112 - 28
Admin.NET/Admin.NET.Core/Service/Job/SysJobService.cs

@@ -4,57 +4,141 @@
 /// 系统作业任务服务
 /// </summary>
 [ApiDescriptionSettings(Order = 188)]
-[AllowAnonymous]
 public class SysJobService : IDynamicApiController, ITransient
 {
+    private readonly SqlSugarRepository<SysJobDetail> _sysJobDetailRep;
+    private readonly SqlSugarRepository<SysJobTrigger> _sysJobTriggerRep;
+    private readonly SqlSugarRepository<SysJobCluster> _sysJobClusterRep;
     private readonly ISchedulerFactory _schedulerFactory;
 
-    public SysJobService(ISchedulerFactory schedulerFactory)
+    public SysJobService(SqlSugarRepository<SysJobDetail> sysJobDetailRep,
+        SqlSugarRepository<SysJobTrigger> sysJobTriggerRep,
+        SqlSugarRepository<SysJobCluster> sysJobClusterRep,
+        ISchedulerFactory schedulerFactory)
     {
+        _sysJobDetailRep = sysJobDetailRep;
+        _sysJobTriggerRep = sysJobTriggerRep;
+        _sysJobClusterRep = sysJobClusterRep;
         _schedulerFactory = schedulerFactory;
     }
 
     /// <summary>
-    /// 获取所有作业任务列表
+    /// 获取作业分页列表
     /// </summary>
-    [HttpGet("/sysJob/list")]
-    public async Task<List<SchedulerModel>> GetJobList()
+    [HttpGet("/sysJob/page")]
+    public async Task<SqlSugarPagedList<JobOutput>> GetJobPage([FromQuery] PageJobInput input)
     {
-        var JobDetails = _schedulerFactory.GetJobsOfModels();
-        return await Task.FromResult(JobDetails.ToList());
+        var jobDetails = await _sysJobDetailRep.AsQueryable()
+            .WhereIF(!string.IsNullOrWhiteSpace(input.JobId), u => u.JobId.Contains(input.JobId))
+            .WhereIF(!string.IsNullOrWhiteSpace(input.Description), u => u.Description.Contains(input.Description))
+            .Select(d => new JobOutput
+            {
+                JobDetail = d,
+            }).ToPagedListAsync(input.Page, input.PageSize);
+        await _sysJobDetailRep.AsSugarClient().ThenMapperAsync(jobDetails.Items, async u =>
+        {
+            u.JobTriggers = await _sysJobTriggerRep.GetListAsync(t => t.JobId == u.JobDetail.JobId);
+        });
+        return jobDetails;
     }
 
     /// <summary>
-    /// 增加作业任务
+    /// 添加作业
     /// </summary>
     /// <returns></returns>
-    [HttpPost("/sysJob/add")]
-    public async Task<ScheduleResult> AddJob()
+    [HttpPost("/sysJob/detailAdd")]
+    public async Task AddJobDetail(AddJobDetailInput input)
     {
-        var jobBuilder = JobBuilder.From(@"
-        {
-            ""jobId"": ""job1"",
-            ""groupName"": null,
-            ""jobType"": ""Admin.NET.Application"",
-            ""assemblyName"": ""Admin.NET.Application"",
-            ""description"": null,
-            ""concurrent"": true,
-            ""includeAnnotations"": false,
-            ""properties"": ""{}"",
-            ""updatedTime"": ""2022-11-22 18:00:00""
-        }");
-        var schedulerResult = _schedulerFactory.TryAddJob(jobBuilder, new[] { Triggers.PeriodSeconds(10) }, out _);
-        return await Task.FromResult(schedulerResult);
+        var isExist = await _sysJobDetailRep.IsAnyAsync(u => u.JobId == input.JobId && u.Id != input.Id);
+        if (isExist)
+            throw Oops.Oh(ErrorCodeEnum.D1006);
+
+        await _sysJobDetailRep.UpdateAsync(input.Adapt<SysJobDetail>());
+    }
+
+    /// <summary>
+    /// 更新作业
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("/sysJob/detailUpdate")]
+    public async Task UpdateJobDetail(UpdateJobDetailInput input)
+    {
+        var isExist = await _sysJobDetailRep.IsAnyAsync(u => u.JobId == input.JobId && u.Id != input.Id);
+        if (isExist)
+            throw Oops.Oh(ErrorCodeEnum.D1006);
+
+        await _sysJobDetailRep.UpdateAsync(input.Adapt<SysJobDetail>());
     }
 
     /// <summary>
-    /// 删除作业任务
+    /// 删除作业
     /// </summary>
     /// <returns></returns>
-    [HttpPost("/sysJob/delete")]
-    public async Task<ScheduleResult> DeleteJob(JobInput input)
+    [HttpPost("/sysJob/detailDelete")]
+    public async Task<ScheduleResult> DeleteJobDetail(DeleteJobDetailInput input)
     {
-        var schedulerResult = _schedulerFactory.TryRemoveJob(input.Name, out _);
+        await _sysJobDetailRep.DeleteAsync(u => u.JobId == input.JobId);
+        await _sysJobTriggerRep.DeleteAsync(u => u.JobId == input.JobId);
+
+        var schedulerResult = _schedulerFactory.TryRemoveJob(input.JobId, out _);
         return await Task.FromResult(schedulerResult);
     }
+
+    /// <summary>
+    /// 获取触发器列表
+    /// </summary>
+    [HttpGet("/sysJob/triggerList")]
+    public async Task<List<SysJobTrigger>> GetJobTriggerList([FromQuery] JobDetailInput input)
+    {
+        return await _sysJobTriggerRep.AsQueryable()
+            .WhereIF(!string.IsNullOrWhiteSpace(input.JobId), u => u.JobId.Contains(input.JobId))
+            .ToListAsync();
+    }
+
+    /// <summary>
+    /// 添加作业
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("/sysJob/triggerAdd")]
+    public async Task AddJobTrigger(AddJobTriggerInput input)
+    {
+        var isExist = await _sysJobDetailRep.IsAnyAsync(u => u.JobId == input.JobId && u.Id != input.Id);
+        if (isExist)
+            throw Oops.Oh(ErrorCodeEnum.D1006);
+
+        await _sysJobDetailRep.UpdateAsync(input.Adapt<SysJobDetail>());
+    }
+
+    /// <summary>
+    /// 更新触发器
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("/sysJob/triggerUpdate")]
+    public async Task UpdateJobTrigger(UpdateJobTriggerInput input)
+    {
+        var isExist = await _sysJobDetailRep.IsAnyAsync(u => u.JobId == input.JobId && u.Id != input.Id);
+        if (isExist)
+            throw Oops.Oh(ErrorCodeEnum.D1006);
+
+        await _sysJobDetailRep.UpdateAsync(input.Adapt<SysJobDetail>());
+    }
+
+    /// <summary>
+    /// 删除触发器
+    /// </summary>
+    /// <returns></returns>
+    [HttpPost("/sysJob/triggerDelete")]
+    public async Task DeleteJobTrigger(DeleteJobTriggerInput input)
+    {
+        await _sysJobTriggerRep.DeleteAsync(u => u.JobId == input.JobId);
+    }
+
+    /// <summary>
+    /// 获取集群列表
+    /// </summary>
+    [HttpGet("/sysJob/clusterList")]
+    public async Task<List<SysJobCluster>> GetJobClusterList()
+    {
+        return await _sysJobClusterRep.GetListAsync();
+    }
 }

+ 7 - 0
Admin.NET/Admin.NET.Core/Service/Tenant/SysTenantService.cs

@@ -264,6 +264,13 @@ public class SysTenantService : IDynamicApiController, ITransient
     [HttpPost("/sysTenant/update")]
     public async Task UpdateTenant(UpdateTenantInput input)
     {
+        var isExist = await _sysOrgRep.IsAnyAsync(u => u.Name == input.Name && u.Id != input.OrgId);
+        if (isExist)
+            throw Oops.Oh(ErrorCodeEnum.D1300);
+        isExist = await _sysUserRep.IsAnyAsync(u => u.Account == input.AdminName && u.Id != input.UserId);
+        if (isExist)
+            throw Oops.Oh(ErrorCodeEnum.D1301);
+
         await _sysTenantRep.AsUpdateable(input.Adapt<TenantOutput>()).IgnoreColumns(true).ExecuteCommandAsync();
 
         // 更新系统机构

+ 0 - 47
Admin.NET/Admin.NET.Core/Service/Timer/Dto/TimerInput.cs

@@ -1,47 +0,0 @@
-//namespace Admin.NET.Core.Service;
-
-//public class PageTimerInput : BasePageInput
-//{
-//    /// <summary>
-//    /// 任务名称
-//    /// </summary>
-//    public string TimerName { get; set; }
-//}
-
-//[NotTable]
-//public class AddTimerInput : SysTimer
-//{
-//    /// <summary>
-//    /// 任务名称
-//    /// </summary>
-//    [Required(ErrorMessage = "任务名称不能为空")]
-//    public override string TimerName { get; set; }
-//}
-
-//[NotTable]
-//public class UpdateTimerInput : AddTimerInput
-//{
-//}
-
-//public class DeleteTimerInput : BaseIdInput
-//{
-//}
-
-//[NotTable]
-//public class StopTimerInput : AddTimerInput
-//{
-//}
-
-//public class SetTimerStatusInput
-//{
-//    /// <summary>
-//    /// 任务名称
-//    /// </summary>
-//    [Required(ErrorMessage = "任务名称不能为空")]
-//    public string TimerName { get; set; }
-
-//    /// <summary>
-//    /// 任务状态
-//    /// </summary>
-//    public SpareTimeStatus Status { get; set; } = SpareTimeStatus.Stopped;
-//}

+ 0 - 15
Admin.NET/Admin.NET.Core/Service/Timer/Dto/TimerMethod.cs

@@ -1,15 +0,0 @@
-//namespace Admin.NET.Core.Service;
-
-//[NotTable]
-//public class TimerMethod : SysTimer
-//{
-//    /// <summary>
-//    /// 方法名
-//    /// </summary>
-//    public string MethodName { get; set; }
-
-//    /// <summary>
-//    /// 所属类
-//    /// </summary>
-//    public Type DeclaringType { get; set; }
-//}

+ 0 - 20
Admin.NET/Admin.NET.Core/Service/Timer/Dto/TimerOutput.cs

@@ -1,20 +0,0 @@
-//namespace Admin.NET.Core.Service;
-
-//[NotTable]
-//public class TimerOutput : SysTimer
-//{
-//    /// <summary>
-//    /// 执行次数
-//    /// </summary>
-//    public long Tally { get; set; }
-
-//    /// <summary>
-//    /// 任务状态
-//    /// </summary>
-//    public SpareTimeStatus Status { get; set; } = SpareTimeStatus.Stopped;
-
-//    /// <summary>
-//    /// 异常信息
-//    /// </summary>
-//    public string Exception { get; set; }
-//}

+ 0 - 247
Admin.NET/Admin.NET.Core/Service/Timer/SysTimerService.cs

@@ -1,247 +0,0 @@
-//namespace Admin.NET.Core.Service;
-
-///// <summary>
-///// 系统定时任务服务
-///// </summary>
-//[ApiDescriptionSettings(Order = 188)]
-//public class SysTimerService : IDynamicApiController, ITransient
-//{
-//    private readonly SqlSugarRepository<SysTimer> _sysTimerRep;
-//    private readonly SysCacheService _sysCacheService;
-
-//    public SysTimerService(SqlSugarRepository<SysTimer> sysTimerRep,
-//        SysCacheService sysCacheService)
-//    {
-//        _sysTimerRep = sysTimerRep;
-//        _sysCacheService = sysCacheService;
-//    }
-
-//    /// <summary>
-//    /// 获取任务分页列表
-//    /// </summary>
-//    /// <param name="input"></param>
-//    /// <returns></returns>
-//    [HttpGet("/sysTimer/page")]
-//    public async Task<SqlSugarPagedList<TimerOutput>> GetTimerPage([FromQuery] PageTimerInput input)
-//    {
-//        var workers = SpareTime.GetWorkers().ToList();
-
-//        var timers = await _sysTimerRep.AsQueryable()
-//            .WhereIF(!string.IsNullOrWhiteSpace(input.TimerName), u => u.TimerName.Contains(input.TimerName))
-//            .Select<TimerOutput>()
-//            .ToPagedListAsync(input.Page, input.PageSize);
-
-//        timers.Items.ToList().ForEach(u =>
-//        {
-//            var timer = workers.FirstOrDefault(m => m.WorkerName == u.TimerName);
-//            if (timer != null)
-//            {
-//                u.Status = timer.Status;
-//                u.Tally = timer.Tally;
-//                u.Exception = JSON.Serialize(timer.Exception);
-//            }
-//        });
-//        return timers;
-//    }
-
-//    /// <summary>
-//    /// 增加任务
-//    /// </summary>
-//    /// <param name="input"></param>
-//    /// <returns></returns>
-//    [HttpPost("/sysTimer/add")]
-//    public async Task AddTimer(AddTimerInput input)
-//    {
-//        var isExist = await _sysTimerRep.IsAnyAsync(u => u.TimerName == input.TimerName);
-//        if (isExist) throw Oops.Oh(ErrorCodeEnum.D1100);
-
-//        var timer = input.Adapt<SysTimer>();
-//        await _sysTimerRep.InsertAsync(timer);
-
-//        CreateTimer(timer); // 添加到任务调度里
-//    }
-
-//    /// <summary>
-//    /// 删除任务
-//    /// </summary>
-//    /// <param name="input"></param>
-//    /// <returns></returns>
-//    [HttpPost("/sysTimer/delete")]
-//    public async Task DeleteTimer(DeleteTimerInput input)
-//    {
-//        var timer = await _sysTimerRep.GetFirstAsync(u => u.Id == input.Id);
-//        if (timer == null) throw Oops.Oh(ErrorCodeEnum.D1101);
-
-//        await _sysTimerRep.DeleteAsync(timer);
-
-//        SpareTime.Cancel(timer.TimerName); // 从调度器里取消
-//    }
-
-//    /// <summary>
-//    /// 更新任务
-//    /// </summary>
-//    /// <param name="input"></param>
-//    /// <returns></returns>
-//    [HttpPost("/sysTimer/update")]
-//    public async Task UpdateTimber(UpdateTimerInput input)
-//    {
-//        var isExist = await _sysTimerRep.IsAnyAsync(u => u.TimerName == input.TimerName && u.Id != input.Id);
-//        if (isExist) throw Oops.Oh(ErrorCodeEnum.D1100);
-
-//        // 先从调度器里取消
-//        var oldTimer = await _sysTimerRep.GetFirstAsync(u => u.Id == input.Id);
-//        SpareTime.Cancel(oldTimer.TimerName);
-
-//        var timer = input.Adapt<SysTimer>();
-//        await _sysTimerRep.AsUpdateable(timer).IgnoreColumns(true).ExecuteCommandAsync();
-
-//        CreateTimer(timer); // 再添加到任务调度里
-//    }
-
-//    /// <summary>
-//    /// 设置任务状态
-//    /// </summary>
-//    /// <param name="input"></param>
-//    /// <returns></returns>
-//    [HttpPost("/sysTimer/setStatus")]
-//    public async void SetStatusTimer(SetTimerStatusInput input)
-//    {
-//        if (input.Status == SpareTimeStatus.Stopped)
-//            SpareTime.Stop(input.TimerName);
-//        else if (input.Status == SpareTimeStatus.Running)
-//        {
-//            var spareTime = SpareTime.GetWorkers().ToList().Find(u => u.WorkerName == input.TimerName);
-//            if (spareTime == null)
-//            {
-//                var timer = await _sysTimerRep.GetFirstAsync(u => u.TimerName == input.TimerName);
-//                CreateTimer(timer);
-//            }
-//            SpareTime.Start(input.TimerName); // 若StartNow=flase则不会启动任务
-//        }
-//    }
-
-//    /// <summary>
-//    /// 创建定时任务
-//    /// </summary>
-//    /// <param name="input"></param>
-//    private void CreateTimer(SysTimer input)
-//    {
-//        Action<SpareTimer, long> action = null;
-//        switch (input.RequestType)
-//        {
-//            case RequestTypeEnum.Run: // 创建本地方法委托
-//                {
-//                    var taskMethod = GetTimerMethodList()?.FirstOrDefault(m => m.RequestUrl == input.RequestUrl);
-//                    if (taskMethod == null) break;
-//                    var typeInstance = Activator.CreateInstance(taskMethod.DeclaringType);
-//                    action = (Action<SpareTimer, long>)Delegate.CreateDelegate(typeof(Action<SpareTimer, long>), typeInstance, taskMethod.MethodName);
-//                    break;
-//                }
-//            default: // 创建网络任务委托
-//                {
-//                    action = async (_, _) =>
-//                    {
-//                        var requestUrl = input.RequestUrl.Trim();
-//                        requestUrl = requestUrl?.IndexOf("http") == 0 ? requestUrl : "http://" + requestUrl; // 默认http协议
-//                        var requestParametersString = input.RequestPara;
-//                        var requestParameters = string.IsNullOrEmpty(requestParametersString)
-//                            ? null : JSON.Deserialize<Dictionary<string, string>>(requestParametersString);
-//                        var headersString = input.Headers;
-//                        var headers = string.IsNullOrEmpty(headersString)
-//                            ? null : JSON.Deserialize<Dictionary<string, string>>(headersString);
-//                        switch (input.RequestType)
-//                        {
-//                            case RequestTypeEnum.Get:
-//                                await requestUrl.SetHeaders(headers).GetAsync();
-//                                break;
-
-//                            case RequestTypeEnum.Post:
-//                                await requestUrl.SetHeaders(headers).SetQueries(requestParameters).PostAsync();
-//                                break;
-
-//                            case RequestTypeEnum.Put:
-//                                await requestUrl.SetHeaders(headers).SetQueries(requestParameters).PutAsync();
-//                                break;
-
-//                            case RequestTypeEnum.Delete:
-//                                await requestUrl.SetHeaders(headers).DeleteAsync();
-//                                break;
-//                        }
-//                    };
-//                    break;
-//                }
-//        }
-//        if (action == null) return;
-
-//        // 缓存任务配置参数供任务运行时读取
-//        if (input.RequestType == RequestTypeEnum.Run)
-//        {
-//            var timerParaName = $"{input.TimerName}_para";
-//            var timerPara = _sysCacheService.ExistKey(timerParaName);
-//            var requestPara = string.IsNullOrEmpty(input.RequestPara);
-
-//            // 若没有任务配置但存在缓存则删除
-//            if (requestPara && timerPara)
-//                _sysCacheService.Remove(timerParaName);
-//            else if (!requestPara)
-//                _sysCacheService.Set(timerParaName, JSON.Deserialize<Dictionary<string, string>>(input.RequestPara));
-//        }
-
-//        // 创建定时任务
-//        switch (input.TimerType)
-//        {
-//            case SpareTimeTypes.Interval:
-//                if (input.DoOnce)
-//                    SpareTime.DoOnce((int)input.Interval * 1000, action, input.TimerName, input.Remark, input.StartNow, executeType: input.ExecuteType);
-//                else
-//                    SpareTime.Do((int)input.Interval * 1000, action, input.TimerName, input.Remark, input.StartNow, executeType: input.ExecuteType);
-//                break;
-
-//            case SpareTimeTypes.Cron:
-//                SpareTime.Do(input.Cron, action, input.TimerName, input.Remark, input.StartNow, executeType: input.ExecuteType);
-//                break;
-//        }
-//    }
-
-//    /// <summary>
-//    /// 获取所有定时任务方法列表(贴spareTime特性)
-//    /// </summary>
-//    /// <returns></returns>
-//    private IEnumerable<TimerMethod> GetTimerMethodList()
-//    {
-//        // 有缓存就返回缓存
-//        var timerMethodList = _sysCacheService.Get<IEnumerable<TimerMethod>>(CacheConst.KeyTimer);
-//        if (timerMethodList != null) return timerMethodList;
-
-//        timerMethodList = App.EffectiveTypes
-//            .Where(u => u.IsClass && !u.IsInterface && !u.IsAbstract && typeof(ISpareTimeWorker).IsAssignableFrom(u))
-//            .SelectMany(u => u.GetMethods(BindingFlags.Public | BindingFlags.Instance)
-//            .Where(m => m.IsDefined(typeof(SpareTimeAttribute), false) &&
-//                   m.GetParameters().Length == 2 &&
-//                   m.GetParameters()[0].ParameterType == typeof(SpareTimer) &&
-//                   m.GetParameters()[1].ParameterType == typeof(long) && m.ReturnType == typeof(void))
-//            .Select(m =>
-//            {
-//                // 默认获取第一条任务特性
-//                var spareTimeAttribute = m.GetCustomAttribute<SpareTimeAttribute>();
-//                return new TimerMethod
-//                {
-//                    TimerName = spareTimeAttribute.WorkerName,
-//                    RequestUrl = $"{m.DeclaringType.Name}/{m.Name}",
-//                    Cron = spareTimeAttribute.CronExpression,
-//                    DoOnce = spareTimeAttribute.DoOnce,
-//                    ExecuteType = spareTimeAttribute.ExecuteType,
-//                    Interval = (int)spareTimeAttribute.Interval / 1000,
-//                    StartNow = spareTimeAttribute.StartNow,
-//                    RequestType = RequestTypeEnum.Run,
-//                    Remark = spareTimeAttribute.Description,
-//                    TimerType = string.IsNullOrEmpty(spareTimeAttribute.CronExpression) ? SpareTimeTypes.Interval : SpareTimeTypes.Cron,
-//                    MethodName = m.Name,
-//                    DeclaringType = m.DeclaringType
-//                };
-//            }));
-
-//        _sysCacheService.Set(CacheConst.KeyTimer, timerMethodList);
-//        return timerMethodList;
-//    }
-//}

+ 561 - 42
Web/src/api-services/apis/sys-job-api.ts

@@ -16,9 +16,16 @@ import { Configuration } from '../configuration';
 // Some imports not used depending on template conditions
 // @ts-ignore
 import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
-import { AdminResultListSchedulerModel } from '../models';
+import { AddJobDetailInput } from '../models';
+import { AddJobTriggerInput } from '../models';
+import { AdminResultListSysJobCluster } from '../models';
+import { AdminResultListSysJobTrigger } from '../models';
 import { AdminResultScheduleResult } from '../models';
-import { JobInput } from '../models';
+import { AdminResultSqlSugarPagedListJobOutput } from '../models';
+import { DeleteJobDetailInput } from '../models';
+import { DeleteJobTriggerInput } from '../models';
+import { UpdateJobDetailInput } from '../models';
+import { UpdateJobTriggerInput } from '../models';
 /**
  * SysJobApi - axios parameter creator
  * @export
@@ -27,12 +34,243 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
     return {
         /**
          * 
-         * @summary 增加作业任务
+         * @summary 获取集群列表
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        sysJobAddPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/sysJob/add`;
+        sysJobClusterListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/clusterList`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 添加作业
+         * @param {AddJobDetailInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysJobDetailAddPost: async (body?: AddJobDetailInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/detailAdd`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 删除作业
+         * @param {DeleteJobDetailInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysJobDetailDeletePost: async (body?: DeleteJobDetailInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/detailDelete`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 更新作业
+         * @param {UpdateJobDetailInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysJobDetailUpdatePost: async (body?: UpdateJobDetailInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/detailUpdate`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 获取作业分页列表
+         * @param {string} [jobId] 作业Id
+         * @param {string} [description] 描述信息
+         * @param {number} [page] 当前页码
+         * @param {number} [pageSize] 页码容量
+         * @param {string} [field] 排序字段
+         * @param {string} [order] 排序方向
+         * @param {string} [descStr] 降序排序
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysJobPageGet: async (jobId?: string, description?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/page`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            if (jobId !== undefined) {
+                localVarQueryParameter['JobId'] = jobId;
+            }
+
+            if (description !== undefined) {
+                localVarQueryParameter['Description'] = description;
+            }
+
+            if (page !== undefined) {
+                localVarQueryParameter['Page'] = page;
+            }
+
+            if (pageSize !== undefined) {
+                localVarQueryParameter['PageSize'] = pageSize;
+            }
+
+            if (field !== undefined) {
+                localVarQueryParameter['Field'] = field;
+            }
+
+            if (order !== undefined) {
+                localVarQueryParameter['Order'] = order;
+            }
+
+            if (descStr !== undefined) {
+                localVarQueryParameter['DescStr'] = descStr;
+            }
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 添加作业
+         * @param {AddJobTriggerInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysJobTriggerAddPost: async (body?: AddJobTriggerInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/triggerAdd`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
@@ -45,6 +283,8 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
 
             // authentication Bearer required
 
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
             const query = new URLSearchParams(localVarUrlObj.search);
             for (const key in localVarQueryParameter) {
                 query.set(key, localVarQueryParameter[key]);
@@ -55,6 +295,8 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
             localVarUrlObj.search = (new URLSearchParams(query)).toString();
             let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
             localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
 
             return {
                 url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
@@ -63,13 +305,13 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
         },
         /**
          * 
-         * @summary 删除作业任务
-         * @param {JobInput} [body] 
+         * @summary 删除触发器
+         * @param {DeleteJobTriggerInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        sysJobDeletePost: async (body?: JobInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/sysJob/delete`;
+        sysJobTriggerDeletePost: async (body?: DeleteJobTriggerInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/triggerDelete`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
@@ -104,12 +346,13 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
         },
         /**
          * 
-         * @summary 获取所有作业任务列表
+         * @summary 获取触发器列表
+         * @param {string} [jobId] 作业Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        sysJobListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
-            const localVarPath = `/sysJob/list`;
+        sysJobTriggerListGet: async (jobId?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/triggerList`;
             // use dummy base URL string because the URL constructor only accepts absolute URLs.
             const localVarUrlObj = new URL(localVarPath, 'https://example.com');
             let baseOptions;
@@ -122,6 +365,10 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
 
             // authentication Bearer required
 
+            if (jobId !== undefined) {
+                localVarQueryParameter['JobId'] = jobId;
+            }
+
             const query = new URLSearchParams(localVarUrlObj.search);
             for (const key in localVarQueryParameter) {
                 query.set(key, localVarQueryParameter[key]);
@@ -133,6 +380,47 @@ export const SysJobApiAxiosParamCreator = function (configuration?: Configuratio
             let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
             localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
 
+            return {
+                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
+                options: localVarRequestOptions,
+            };
+        },
+        /**
+         * 
+         * @summary 更新触发器
+         * @param {UpdateJobTriggerInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        sysJobTriggerUpdatePost: async (body?: UpdateJobTriggerInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
+            const localVarPath = `/sysJob/triggerUpdate`;
+            // use dummy base URL string because the URL constructor only accepts absolute URLs.
+            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
+            let baseOptions;
+            if (configuration) {
+                baseOptions = configuration.baseOptions;
+            }
+            const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
+            const localVarHeaderParameter = {} as any;
+            const localVarQueryParameter = {} as any;
+
+            // authentication Bearer required
+
+            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
+
+            const query = new URLSearchParams(localVarUrlObj.search);
+            for (const key in localVarQueryParameter) {
+                query.set(key, localVarQueryParameter[key]);
+            }
+            for (const key in options.params) {
+                query.set(key, options.params[key]);
+            }
+            localVarUrlObj.search = (new URLSearchParams(query)).toString();
+            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
+            localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
+            const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+            localVarRequestOptions.data =  needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
+
             return {
                 url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                 options: localVarRequestOptions,
@@ -149,12 +437,102 @@ export const SysJobApiFp = function(configuration?: Configuration) {
     return {
         /**
          * 
-         * @summary 增加作业任务
+         * @summary 获取集群列表
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobClusterListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysJobCluster>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobClusterListGet(options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 添加作业
+         * @param {AddJobDetailInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobDetailAddPost(body?: AddJobDetailInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobDetailAddPost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 删除作业
+         * @param {DeleteJobDetailInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobDetailDeletePost(body?: DeleteJobDetailInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultScheduleResult>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobDetailDeletePost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 更新作业
+         * @param {UpdateJobDetailInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobDetailUpdatePost(body?: UpdateJobDetailInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobDetailUpdatePost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 获取作业分页列表
+         * @param {string} [jobId] 作业Id
+         * @param {string} [description] 描述信息
+         * @param {number} [page] 当前页码
+         * @param {number} [pageSize] 页码容量
+         * @param {string} [field] 排序字段
+         * @param {string} [order] 排序方向
+         * @param {string} [descStr] 降序排序
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobPageGet(jobId?: string, description?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSqlSugarPagedListJobOutput>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobPageGet(jobId, description, page, pageSize, field, order, descStr, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 添加作业
+         * @param {AddJobTriggerInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobTriggerAddPost(body?: AddJobTriggerInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobTriggerAddPost(body, options);
+            return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
+                const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
+                return axios.request(axiosRequestArgs);
+            };
+        },
+        /**
+         * 
+         * @summary 删除触发器
+         * @param {DeleteJobTriggerInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysJobAddPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultScheduleResult>>> {
-            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobAddPost(options);
+        async sysJobTriggerDeletePost(body?: DeleteJobTriggerInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobTriggerDeletePost(body, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -162,13 +540,13 @@ export const SysJobApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 删除作业任务
-         * @param {JobInput} [body] 
+         * @summary 获取触发器列表
+         * @param {string} [jobId] 作业Id
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysJobDeletePost(body?: JobInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultScheduleResult>>> {
-            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobDeletePost(body, options);
+        async sysJobTriggerListGet(jobId?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSysJobTrigger>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobTriggerListGet(jobId, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -176,12 +554,13 @@ export const SysJobApiFp = function(configuration?: Configuration) {
         },
         /**
          * 
-         * @summary 获取所有作业任务列表
+         * @summary 更新触发器
+         * @param {UpdateJobTriggerInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysJobListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListSchedulerModel>>> {
-            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobListGet(options);
+        async sysJobTriggerUpdatePost(body?: UpdateJobTriggerInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
+            const localVarAxiosArgs = await SysJobApiAxiosParamCreator(configuration).sysJobTriggerUpdatePost(body, options);
             return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                 const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
                 return axios.request(axiosRequestArgs);
@@ -198,31 +577,98 @@ export const SysJobApiFactory = function (configuration?: Configuration, basePat
     return {
         /**
          * 
-         * @summary 增加作业任务
+         * @summary 获取集群列表
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobClusterListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysJobCluster>> {
+            return SysJobApiFp(configuration).sysJobClusterListGet(options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 添加作业
+         * @param {AddJobDetailInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysJobAddPost(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultScheduleResult>> {
-            return SysJobApiFp(configuration).sysJobAddPost(options).then((request) => request(axios, basePath));
+        async sysJobDetailAddPost(body?: AddJobDetailInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysJobApiFp(configuration).sysJobDetailAddPost(body, options).then((request) => request(axios, basePath));
         },
         /**
          * 
-         * @summary 删除作业任务
-         * @param {JobInput} [body] 
+         * @summary 删除作业
+         * @param {DeleteJobDetailInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysJobDeletePost(body?: JobInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultScheduleResult>> {
-            return SysJobApiFp(configuration).sysJobDeletePost(body, options).then((request) => request(axios, basePath));
+        async sysJobDetailDeletePost(body?: DeleteJobDetailInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultScheduleResult>> {
+            return SysJobApiFp(configuration).sysJobDetailDeletePost(body, options).then((request) => request(axios, basePath));
         },
         /**
          * 
-         * @summary 获取所有作业任务列表
+         * @summary 更新作业
+         * @param {UpdateJobDetailInput} [body] 
          * @param {*} [options] Override http request option.
          * @throws {RequiredError}
          */
-        async sysJobListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSchedulerModel>> {
-            return SysJobApiFp(configuration).sysJobListGet(options).then((request) => request(axios, basePath));
+        async sysJobDetailUpdatePost(body?: UpdateJobDetailInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysJobApiFp(configuration).sysJobDetailUpdatePost(body, options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 获取作业分页列表
+         * @param {string} [jobId] 作业Id
+         * @param {string} [description] 描述信息
+         * @param {number} [page] 当前页码
+         * @param {number} [pageSize] 页码容量
+         * @param {string} [field] 排序字段
+         * @param {string} [order] 排序方向
+         * @param {string} [descStr] 降序排序
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobPageGet(jobId?: string, description?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSqlSugarPagedListJobOutput>> {
+            return SysJobApiFp(configuration).sysJobPageGet(jobId, description, page, pageSize, field, order, descStr, options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 添加作业
+         * @param {AddJobTriggerInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobTriggerAddPost(body?: AddJobTriggerInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysJobApiFp(configuration).sysJobTriggerAddPost(body, options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 删除触发器
+         * @param {DeleteJobTriggerInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobTriggerDeletePost(body?: DeleteJobTriggerInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysJobApiFp(configuration).sysJobTriggerDeletePost(body, options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 获取触发器列表
+         * @param {string} [jobId] 作业Id
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobTriggerListGet(jobId?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListSysJobTrigger>> {
+            return SysJobApiFp(configuration).sysJobTriggerListGet(jobId, options).then((request) => request(axios, basePath));
+        },
+        /**
+         * 
+         * @summary 更新触发器
+         * @param {UpdateJobTriggerInput} [body] 
+         * @param {*} [options] Override http request option.
+         * @throws {RequiredError}
+         */
+        async sysJobTriggerUpdatePost(body?: UpdateJobTriggerInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
+            return SysJobApiFp(configuration).sysJobTriggerUpdatePost(body, options).then((request) => request(axios, basePath));
         },
     };
 };
@@ -236,33 +682,106 @@ export const SysJobApiFactory = function (configuration?: Configuration, basePat
 export class SysJobApi extends BaseAPI {
     /**
      * 
-     * @summary 增加作业任务
+     * @summary 获取集群列表
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async sysJobClusterListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysJobCluster>> {
+        return SysJobApiFp(this.configuration).sysJobClusterListGet(options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 添加作业
+     * @param {AddJobDetailInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async sysJobDetailAddPost(body?: AddJobDetailInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysJobApiFp(this.configuration).sysJobDetailAddPost(body, options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 删除作业
+     * @param {DeleteJobDetailInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async sysJobDetailDeletePost(body?: DeleteJobDetailInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultScheduleResult>> {
+        return SysJobApiFp(this.configuration).sysJobDetailDeletePost(body, options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 更新作业
+     * @param {UpdateJobDetailInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async sysJobDetailUpdatePost(body?: UpdateJobDetailInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysJobApiFp(this.configuration).sysJobDetailUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 获取作业分页列表
+     * @param {string} [jobId] 作业Id
+     * @param {string} [description] 描述信息
+     * @param {number} [page] 当前页码
+     * @param {number} [pageSize] 页码容量
+     * @param {string} [field] 排序字段
+     * @param {string} [order] 排序方向
+     * @param {string} [descStr] 降序排序
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async sysJobPageGet(jobId?: string, description?: string, page?: number, pageSize?: number, field?: string, order?: string, descStr?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSqlSugarPagedListJobOutput>> {
+        return SysJobApiFp(this.configuration).sysJobPageGet(jobId, description, page, pageSize, field, order, descStr, options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 添加作业
+     * @param {AddJobTriggerInput} [body] 
+     * @param {*} [options] Override http request option.
+     * @throws {RequiredError}
+     * @memberof SysJobApi
+     */
+    public async sysJobTriggerAddPost(body?: AddJobTriggerInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysJobApiFp(this.configuration).sysJobTriggerAddPost(body, options).then((request) => request(this.axios, this.basePath));
+    }
+    /**
+     * 
+     * @summary 删除触发器
+     * @param {DeleteJobTriggerInput} [body] 
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysJobApi
      */
-    public async sysJobAddPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultScheduleResult>> {
-        return SysJobApiFp(this.configuration).sysJobAddPost(options).then((request) => request(this.axios, this.basePath));
+    public async sysJobTriggerDeletePost(body?: DeleteJobTriggerInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysJobApiFp(this.configuration).sysJobTriggerDeletePost(body, options).then((request) => request(this.axios, this.basePath));
     }
     /**
      * 
-     * @summary 删除作业任务
-     * @param {JobInput} [body] 
+     * @summary 获取触发器列表
+     * @param {string} [jobId] 作业Id
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysJobApi
      */
-    public async sysJobDeletePost(body?: JobInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultScheduleResult>> {
-        return SysJobApiFp(this.configuration).sysJobDeletePost(body, options).then((request) => request(this.axios, this.basePath));
+    public async sysJobTriggerListGet(jobId?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSysJobTrigger>> {
+        return SysJobApiFp(this.configuration).sysJobTriggerListGet(jobId, options).then((request) => request(this.axios, this.basePath));
     }
     /**
      * 
-     * @summary 获取所有作业任务列表
+     * @summary 更新触发器
+     * @param {UpdateJobTriggerInput} [body] 
      * @param {*} [options] Override http request option.
      * @throws {RequiredError}
      * @memberof SysJobApi
      */
-    public async sysJobListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListSchedulerModel>> {
-        return SysJobApiFp(this.configuration).sysJobListGet(options).then((request) => request(this.axios, this.basePath));
+    public async sysJobTriggerUpdatePost(body?: UpdateJobTriggerInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
+        return SysJobApiFp(this.configuration).sysJobTriggerUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
     }
 }

+ 80 - 0
Web/src/api-services/models/add-job-detail-input.ts

@@ -0,0 +1,80 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+/**
+ * 
+ * @export
+ * @interface AddJobDetailInput
+ */
+export interface AddJobDetailInput {
+    /**
+     * Id
+     * @type {number}
+     * @memberof AddJobDetailInput
+     */
+    id?: number;
+    /**
+     * 组名称
+     * @type {string}
+     * @memberof AddJobDetailInput
+     */
+    groupName?: string | null;
+    /**
+     * 作业类型FullName
+     * @type {string}
+     * @memberof AddJobDetailInput
+     */
+    jobType?: string | null;
+    /**
+     * 程序集Name
+     * @type {string}
+     * @memberof AddJobDetailInput
+     */
+    assemblyName?: string | null;
+    /**
+     * 描述信息
+     * @type {string}
+     * @memberof AddJobDetailInput
+     */
+    description?: string | null;
+    /**
+     * 是否并行执行
+     * @type {boolean}
+     * @memberof AddJobDetailInput
+     */
+    concurrent?: boolean;
+    /**
+     * 是否扫描特性触发器
+     * @type {boolean}
+     * @memberof AddJobDetailInput
+     */
+    includeAnnotations?: boolean;
+    /**
+     * 额外数据
+     * @type {string}
+     * @memberof AddJobDetailInput
+     */
+    properties?: string | null;
+    /**
+     * 更新时间
+     * @type {Date}
+     * @memberof AddJobDetailInput
+     */
+    updatedTime?: Date | null;
+    /**
+     * 作业Id
+     * @type {string}
+     * @memberof AddJobDetailInput
+     */
+    jobId: string;
+}

+ 147 - 0
Web/src/api-services/models/add-job-trigger-input.ts

@@ -0,0 +1,147 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { TriggerStatus } from './trigger-status';
+/**
+ * 
+ * @export
+ * @interface AddJobTriggerInput
+ */
+export interface AddJobTriggerInput {
+    /**
+     * Id
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    id?: number;
+    /**
+     * 触发器类型FullName
+     * @type {string}
+     * @memberof AddJobTriggerInput
+     */
+    triggerType?: string | null;
+    /**
+     * 程序集Name
+     * @type {string}
+     * @memberof AddJobTriggerInput
+     */
+    assemblyName?: string | null;
+    /**
+     * 参数
+     * @type {string}
+     * @memberof AddJobTriggerInput
+     */
+    args?: string | null;
+    /**
+     * 描述信息
+     * @type {string}
+     * @memberof AddJobTriggerInput
+     */
+    description?: string | null;
+    /**
+     * 
+     * @type {TriggerStatus}
+     * @memberof AddJobTriggerInput
+     */
+    status?: TriggerStatus;
+    /**
+     * 起始时间
+     * @type {Date}
+     * @memberof AddJobTriggerInput
+     */
+    startTime?: Date | null;
+    /**
+     * 结束时间
+     * @type {Date}
+     * @memberof AddJobTriggerInput
+     */
+    endTime?: Date | null;
+    /**
+     * 最近运行时间
+     * @type {Date}
+     * @memberof AddJobTriggerInput
+     */
+    lastRunTime?: Date | null;
+    /**
+     * 下一次运行时间
+     * @type {Date}
+     * @memberof AddJobTriggerInput
+     */
+    nextRunTime?: Date | null;
+    /**
+     * 触发次数
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    numberOfRuns?: number;
+    /**
+     * 最大触发次数(0:不限制,n:N次)
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    maxNumberOfRuns?: number;
+    /**
+     * 出错次数
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    numberOfErrors?: number;
+    /**
+     * 最大出错次数(0:不限制,n:N次)
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    maxNumberOfErrors?: number;
+    /**
+     * 重试次数
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    numRetries?: number;
+    /**
+     * 重试间隔时间(ms)
+     * @type {number}
+     * @memberof AddJobTriggerInput
+     */
+    retryTimeout?: number;
+    /**
+     * 是否立即启动
+     * @type {boolean}
+     * @memberof AddJobTriggerInput
+     */
+    startNow?: boolean;
+    /**
+     * 是否启动时执行一次
+     * @type {boolean}
+     * @memberof AddJobTriggerInput
+     */
+    runOnStart?: boolean;
+    /**
+     * 更新时间
+     * @type {Date}
+     * @memberof AddJobTriggerInput
+     */
+    updatedTime?: Date | null;
+    /**
+     * 作业Id
+     * @type {string}
+     * @memberof AddJobTriggerInput
+     */
+    jobId: string;
+    /**
+     * 触发器Id
+     * @type {string}
+     * @memberof AddJobTriggerInput
+     */
+    triggerId: string;
+}

+ 11 - 11
Web/src/api-services/models/admin-result-list-scheduler-model.ts → Web/src/api-services/models/admin-result-list-sys-job-cluster.ts

@@ -11,47 +11,47 @@
  * https://github.com/swagger-api/swagger-codegen.git
  * Do not edit the class manually.
  */
-import { SchedulerModel } from './scheduler-model';
+import { SysJobCluster } from './sys-job-cluster';
 /**
  * 全局返回结果
  * @export
- * @interface AdminResultListSchedulerModel
+ * @interface AdminResultListSysJobCluster
  */
-export interface AdminResultListSchedulerModel {
+export interface AdminResultListSysJobCluster {
     /**
      * 状态码
      * @type {number}
-     * @memberof AdminResultListSchedulerModel
+     * @memberof AdminResultListSysJobCluster
      */
     code?: number;
     /**
      * 类型success、warning、error
      * @type {string}
-     * @memberof AdminResultListSchedulerModel
+     * @memberof AdminResultListSysJobCluster
      */
     type?: string | null;
     /**
      * 错误信息
      * @type {string}
-     * @memberof AdminResultListSchedulerModel
+     * @memberof AdminResultListSysJobCluster
      */
     message?: string | null;
     /**
      * 数据
-     * @type {Array<SchedulerModel>}
-     * @memberof AdminResultListSchedulerModel
+     * @type {Array<SysJobCluster>}
+     * @memberof AdminResultListSysJobCluster
      */
-    result?: Array<SchedulerModel> | null;
+    result?: Array<SysJobCluster> | null;
     /**
      * 附加数据
      * @type {any}
-     * @memberof AdminResultListSchedulerModel
+     * @memberof AdminResultListSysJobCluster
      */
     extras?: any | null;
     /**
      * 时间
      * @type {Date}
-     * @memberof AdminResultListSchedulerModel
+     * @memberof AdminResultListSysJobCluster
      */
     time?: Date;
 }

+ 57 - 0
Web/src/api-services/models/admin-result-list-sys-job-trigger.ts

@@ -0,0 +1,57 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { SysJobTrigger } from './sys-job-trigger';
+/**
+ * 全局返回结果
+ * @export
+ * @interface AdminResultListSysJobTrigger
+ */
+export interface AdminResultListSysJobTrigger {
+    /**
+     * 状态码
+     * @type {number}
+     * @memberof AdminResultListSysJobTrigger
+     */
+    code?: number;
+    /**
+     * 类型success、warning、error
+     * @type {string}
+     * @memberof AdminResultListSysJobTrigger
+     */
+    type?: string | null;
+    /**
+     * 错误信息
+     * @type {string}
+     * @memberof AdminResultListSysJobTrigger
+     */
+    message?: string | null;
+    /**
+     * 数据
+     * @type {Array<SysJobTrigger>}
+     * @memberof AdminResultListSysJobTrigger
+     */
+    result?: Array<SysJobTrigger> | null;
+    /**
+     * 附加数据
+     * @type {any}
+     * @memberof AdminResultListSysJobTrigger
+     */
+    extras?: any | null;
+    /**
+     * 时间
+     * @type {Date}
+     * @memberof AdminResultListSysJobTrigger
+     */
+    time?: Date;
+}

+ 57 - 0
Web/src/api-services/models/admin-result-sql-sugar-paged-list-job-output.ts

@@ -0,0 +1,57 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { SqlSugarPagedListJobOutput } from './sql-sugar-paged-list-job-output';
+/**
+ * 全局返回结果
+ * @export
+ * @interface AdminResultSqlSugarPagedListJobOutput
+ */
+export interface AdminResultSqlSugarPagedListJobOutput {
+    /**
+     * 状态码
+     * @type {number}
+     * @memberof AdminResultSqlSugarPagedListJobOutput
+     */
+    code?: number;
+    /**
+     * 类型success、warning、error
+     * @type {string}
+     * @memberof AdminResultSqlSugarPagedListJobOutput
+     */
+    type?: string | null;
+    /**
+     * 错误信息
+     * @type {string}
+     * @memberof AdminResultSqlSugarPagedListJobOutput
+     */
+    message?: string | null;
+    /**
+     * 
+     * @type {SqlSugarPagedListJobOutput}
+     * @memberof AdminResultSqlSugarPagedListJobOutput
+     */
+    result?: SqlSugarPagedListJobOutput;
+    /**
+     * 附加数据
+     * @type {any}
+     * @memberof AdminResultSqlSugarPagedListJobOutput
+     */
+    extras?: any | null;
+    /**
+     * 时间
+     * @type {Date}
+     * @memberof AdminResultSqlSugarPagedListJobOutput
+     */
+    time?: Date;
+}

+ 24 - 0
Web/src/api-services/models/cluster-status.ts

@@ -0,0 +1,24 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+/**
+ * <br />&nbsp; Crashed = 0<br />&nbsp; Working = 1<br />&nbsp; Waiting = 2<br />
+ * @export
+ * @enum {string}
+ */
+export enum ClusterStatus {
+    NUMBER_0 = 0,
+    NUMBER_1 = 1,
+    NUMBER_2 = 2
+}
+

+ 5 - 5
Web/src/api-services/models/job-input.ts → Web/src/api-services/models/delete-job-detail-input.ts

@@ -14,13 +14,13 @@
 /**
  * 
  * @export
- * @interface JobInput
+ * @interface DeleteJobDetailInput
  */
-export interface JobInput {
+export interface DeleteJobDetailInput {
     /**
-     * 作业任务名称
+     * 作业Id
      * @type {string}
-     * @memberof JobInput
+     * @memberof DeleteJobDetailInput
      */
-    name: string;
+    jobId?: string | null;
 }

+ 10 - 12
Web/src/api-services/models/scheduler-model.ts → Web/src/api-services/models/delete-job-trigger-input.ts

@@ -11,24 +11,22 @@
  * https://github.com/swagger-api/swagger-codegen.git
  * Do not edit the class manually.
  */
-import { JobDetail } from './job-detail';
-import { Trigger } from './trigger';
 /**
  * 
  * @export
- * @interface SchedulerModel
+ * @interface DeleteJobTriggerInput
  */
-export interface SchedulerModel {
+export interface DeleteJobTriggerInput {
     /**
-     * 
-     * @type {JobDetail}
-     * @memberof SchedulerModel
+     * 作业Id
+     * @type {string}
+     * @memberof DeleteJobTriggerInput
      */
-    jobDetail?: JobDetail;
+    jobId?: string | null;
     /**
-     * 
-     * @type {Array<Trigger>}
-     * @memberof SchedulerModel
+     * 触发器Id
+     * @type {string}
+     * @memberof DeleteJobTriggerInput
      */
-    triggers?: Array<Trigger> | null;
+    triggerId?: string | null;
 }

+ 15 - 5
Web/src/api-services/models/index.ts

@@ -3,6 +3,8 @@ export * from './add-code-gen-input';
 export * from './add-config-input';
 export * from './add-dict-data-input';
 export * from './add-dict-type-input';
+export * from './add-job-detail-input';
+export * from './add-job-trigger-input';
 export * from './add-menu-input';
 export * from './add-notice-input';
 export * from './add-org-input';
@@ -27,11 +29,12 @@ export * from './admin-result-list-int64';
 export * from './admin-result-list-menu-output';
 export * from './admin-result-list-object';
 export * from './admin-result-list-role-output';
-export * from './admin-result-list-scheduler-model';
 export * from './admin-result-list-string';
 export * from './admin-result-list-sys-config';
 export * from './admin-result-list-sys-dict-data';
 export * from './admin-result-list-sys-dict-type';
+export * from './admin-result-list-sys-job-cluster';
+export * from './admin-result-list-sys-job-trigger';
 export * from './admin-result-list-sys-menu';
 export * from './admin-result-list-sys-notice';
 export * from './admin-result-list-sys-org';
@@ -43,6 +46,7 @@ export * from './admin-result-login-output';
 export * from './admin-result-login-user-output';
 export * from './admin-result-object';
 export * from './admin-result-schedule-result';
+export * from './admin-result-sql-sugar-paged-list-job-output';
 export * from './admin-result-sql-sugar-paged-list-sys-code-gen';
 export * from './admin-result-sql-sugar-paged-list-sys-config';
 export * from './admin-result-sql-sugar-paged-list-sys-dict-data';
@@ -70,6 +74,7 @@ export * from './admin-result-we-chat-pay';
 export * from './admin-result-we-chat-pay-output';
 export * from './card-type-enum';
 export * from './change-pwd-input';
+export * from './cluster-status';
 export * from './code-gen-config';
 export * from './column-ouput';
 export * from './const-output';
@@ -90,6 +95,8 @@ export * from './delete-db-table-input';
 export * from './delete-dict-data-input';
 export * from './delete-dict-type-input';
 export * from './delete-file-input';
+export * from './delete-job-detail-input';
+export * from './delete-job-trigger-input';
 export * from './delete-menu-input';
 export * from './delete-notice-input';
 export * from './delete-org-input';
@@ -105,8 +112,7 @@ export * from './file-output';
 export * from './gen-auth-url-input';
 export * from './gender-enum';
 export * from './iaction-result';
-export * from './job-detail';
-export * from './job-input';
+export * from './job-output';
 export * from './login-input';
 export * from './login-output';
 export * from './login-type-enum';
@@ -125,8 +131,8 @@ export * from './role-menu-input';
 export * from './role-org-input';
 export * from './role-output';
 export * from './schedule-result';
-export * from './scheduler-model';
 export * from './signature-input';
+export * from './sql-sugar-paged-list-job-output';
 export * from './sql-sugar-paged-list-sys-code-gen';
 export * from './sql-sugar-paged-list-sys-config';
 export * from './sql-sugar-paged-list-sys-dict-data';
@@ -155,6 +161,9 @@ export * from './sys-file-upload-avatar-body';
 export * from './sys-file-upload-body';
 export * from './sys-file-upload-signature-body';
 export * from './sys-file-uploads-body';
+export * from './sys-job-cluster';
+export * from './sys-job-detail';
+export * from './sys-job-trigger';
 export * from './sys-log-diff';
 export * from './sys-log-ex';
 export * from './sys-log-op';
@@ -176,7 +185,6 @@ export * from './tenant-output';
 export * from './tenant-type-enum';
 export * from './tenant-user-input';
 export * from './time-span';
-export * from './trigger';
 export * from './trigger-status';
 export * from './update-code-gen-input';
 export * from './update-config-input';
@@ -184,6 +192,8 @@ export * from './update-db-column-input';
 export * from './update-db-table-input';
 export * from './update-dict-data-input';
 export * from './update-dict-type-input';
+export * from './update-job-detail-input';
+export * from './update-job-trigger-input';
 export * from './update-menu-input';
 export * from './update-notice-input';
 export * from './update-org-input';

+ 34 - 0
Web/src/api-services/models/job-output.ts

@@ -0,0 +1,34 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { SysJobDetail } from './sys-job-detail';
+import { SysJobTrigger } from './sys-job-trigger';
+/**
+ * 
+ * @export
+ * @interface JobOutput
+ */
+export interface JobOutput {
+    /**
+     * 
+     * @type {SysJobDetail}
+     * @memberof JobOutput
+     */
+    jobDetail?: SysJobDetail;
+    /**
+     * 触发器集合
+     * @type {Array<SysJobTrigger>}
+     * @memberof JobOutput
+     */
+    jobTriggers?: Array<SysJobTrigger> | null;
+}

+ 63 - 0
Web/src/api-services/models/sql-sugar-paged-list-job-output.ts

@@ -0,0 +1,63 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { JobOutput } from './job-output';
+/**
+ * 分页泛型集合
+ * @export
+ * @interface SqlSugarPagedListJobOutput
+ */
+export interface SqlSugarPagedListJobOutput {
+    /**
+     * 页码
+     * @type {number}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    page?: number;
+    /**
+     * 页容量
+     * @type {number}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    pageSize?: number;
+    /**
+     * 总条数
+     * @type {number}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    total?: number;
+    /**
+     * 总页数
+     * @type {number}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    totalPages?: number;
+    /**
+     * 当前页集合
+     * @type {Array<JobOutput>}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    items?: Array<JobOutput> | null;
+    /**
+     * 是否有上一页
+     * @type {boolean}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    hasPrevPage?: boolean;
+    /**
+     * 是否有下一页
+     * @type {boolean}
+     * @memberof SqlSugarPagedListJobOutput
+     */
+    hasNextPage?: boolean;
+}

+ 51 - 0
Web/src/api-services/models/sys-job-cluster.ts

@@ -0,0 +1,51 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+import { ClusterStatus } from './cluster-status';
+/**
+ * 系统作业集群表
+ * @export
+ * @interface SysJobCluster
+ */
+export interface SysJobCluster {
+    /**
+     * Id
+     * @type {number}
+     * @memberof SysJobCluster
+     */
+    id?: number;
+    /**
+     * 作业集群Id
+     * @type {string}
+     * @memberof SysJobCluster
+     */
+    clusterId?: string | null;
+    /**
+     * 描述信息
+     * @type {string}
+     * @memberof SysJobCluster
+     */
+    description?: string | null;
+    /**
+     * 
+     * @type {ClusterStatus}
+     * @memberof SysJobCluster
+     */
+    status?: ClusterStatus;
+    /**
+     * 更新时间
+     * @type {Date}
+     * @memberof SysJobCluster
+     */
+    updatedTime?: Date | null;
+}

+ 27 - 21
Web/src/api-services/models/job-detail.ts → Web/src/api-services/models/sys-job-detail.ts

@@ -12,63 +12,69 @@
  * Do not edit the class manually.
  */
 /**
- * 
+ * 系统作业信息表
  * @export
- * @interface JobDetail
+ * @interface SysJobDetail
  */
-export interface JobDetail {
+export interface SysJobDetail {
     /**
-     * 
+     * Id
+     * @type {number}
+     * @memberof SysJobDetail
+     */
+    id?: number;
+    /**
+     * 作业Id
      * @type {string}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     jobId?: string | null;
     /**
-     * 
+     * 组名称
      * @type {string}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     groupName?: string | null;
     /**
-     * 
+     * 作业类型FullName
      * @type {string}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     jobType?: string | null;
     /**
-     * 
+     * 程序集Name
      * @type {string}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     assemblyName?: string | null;
     /**
-     * 
+     * 描述信息
      * @type {string}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     description?: string | null;
     /**
-     * 
+     * 是否并行执行
      * @type {boolean}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     concurrent?: boolean;
     /**
-     * 
+     * 是否扫描特性触发器
      * @type {boolean}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     includeAnnotations?: boolean;
     /**
-     * 
+     * 额外数据
      * @type {string}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     properties?: string | null;
     /**
-     * 
+     * 更新时间
      * @type {Date}
-     * @memberof JobDetail
+     * @memberof SysJobDetail
      */
     updatedTime?: Date | null;
 }

+ 48 - 42
Web/src/api-services/models/trigger.ts → Web/src/api-services/models/sys-job-trigger.ts

@@ -13,129 +13,135 @@
  */
 import { TriggerStatus } from './trigger-status';
 /**
- * 
+ * 系统作业触发器表
  * @export
- * @interface Trigger
+ * @interface SysJobTrigger
  */
-export interface Trigger {
+export interface SysJobTrigger {
     /**
-     * 
+     * Id
+     * @type {number}
+     * @memberof SysJobTrigger
+     */
+    id?: number;
+    /**
+     * 触发器Id
      * @type {string}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     triggerId?: string | null;
     /**
-     * 
+     * 作业Id
      * @type {string}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     jobId?: string | null;
     /**
-     * 
+     * 触发器类型FullName
      * @type {string}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     triggerType?: string | null;
     /**
-     * 
+     * 程序集Name
      * @type {string}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     assemblyName?: string | null;
     /**
-     * 
+     * 参数
      * @type {string}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     args?: string | null;
     /**
-     * 
+     * 描述信息
      * @type {string}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     description?: string | null;
     /**
      * 
      * @type {TriggerStatus}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     status?: TriggerStatus;
     /**
-     * 
+     * 起始时间
      * @type {Date}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     startTime?: Date | null;
     /**
-     * 
+     * 结束时间
      * @type {Date}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     endTime?: Date | null;
     /**
-     * 
+     * 最近运行时间
      * @type {Date}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     lastRunTime?: Date | null;
     /**
-     * 
+     * 下一次运行时间
      * @type {Date}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     nextRunTime?: Date | null;
     /**
-     * 
+     * 触发次数
      * @type {number}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     numberOfRuns?: number;
     /**
-     * 
+     * 最大触发次数(0:不限制,n:N次)
      * @type {number}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     maxNumberOfRuns?: number;
     /**
-     * 
+     * 出错次数
      * @type {number}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     numberOfErrors?: number;
     /**
-     * 
+     * 最大出错次数(0:不限制,n:N次)
      * @type {number}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     maxNumberOfErrors?: number;
     /**
-     * 
+     * 重试次数
      * @type {number}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     numRetries?: number;
     /**
-     * 
+     * 重试间隔时间(ms)
      * @type {number}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     retryTimeout?: number;
     /**
-     * 
+     * 是否立即启动
      * @type {boolean}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     startNow?: boolean;
     /**
-     * 
+     * 是否启动时执行一次
      * @type {boolean}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     runOnStart?: boolean;
     /**
-     * 
+     * 更新时间
      * @type {Date}
-     * @memberof Trigger
+     * @memberof SysJobTrigger
      */
     updatedTime?: Date | null;
 }

+ 6 - 0
Web/src/api-services/models/sys-log-ex.ts

@@ -107,4 +107,10 @@ export interface SysLogEx {
      * @memberof SysLogEx
      */
     threadId?: number;
+    /**
+     * 请求跟踪Id
+     * @type {string}
+     * @memberof SysLogEx
+     */
+    traceId?: string | null;
 }

+ 6 - 0
Web/src/api-services/models/sys-log-op.ts

@@ -107,4 +107,10 @@ export interface SysLogOp {
      * @memberof SysLogOp
      */
     threadId?: number;
+    /**
+     * 请求跟踪Id
+     * @type {string}
+     * @memberof SysLogOp
+     */
+    traceId?: string | null;
 }

+ 80 - 0
Web/src/api-services/models/update-job-detail-input.ts

@@ -0,0 +1,80 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+/**
+ * 
+ * @export
+ * @interface UpdateJobDetailInput
+ */
+export interface UpdateJobDetailInput {
+    /**
+     * Id
+     * @type {number}
+     * @memberof UpdateJobDetailInput
+     */
+    id?: number;
+    /**
+     * 组名称
+     * @type {string}
+     * @memberof UpdateJobDetailInput
+     */
+    groupName?: string | null;
+    /**
+     * 作业类型FullName
+     * @type {string}
+     * @memberof UpdateJobDetailInput
+     */
+    jobType?: string | null;
+    /**
+     * 程序集Name
+     * @type {string}
+     * @memberof UpdateJobDetailInput
+     */
+    assemblyName?: string | null;
+    /**
+     * 描述信息
+     * @type {string}
+     * @memberof UpdateJobDetailInput
+     */
+    description?: string | null;
+    /**
+     * 是否并行执行
+     * @type {boolean}
+     * @memberof UpdateJobDetailInput
+     */
+    concurrent?: boolean;
+    /**
+     * 是否扫描特性触发器
+     * @type {boolean}
+     * @memberof UpdateJobDetailInput
+     */
+    includeAnnotations?: boolean;
+    /**
+     * 额外数据
+     * @type {string}
+     * @memberof UpdateJobDetailInput
+     */
+    properties?: string | null;
+    /**
+     * 更新时间
+     * @type {Date}
+     * @memberof UpdateJobDetailInput
+     */
+    updatedTime?: Date | null;
+    /**
+     * 作业Id
+     * @type {string}
+     * @memberof UpdateJobDetailInput
+     */
+    jobId: string;
+}

+ 80 - 0
Web/src/api-services/models/update-job-trigger-input.ts

@@ -0,0 +1,80 @@
+/* tslint:disable */
+/* eslint-disable */
+/**
+ * Admin.NET
+ * 让 .NET 开发更简单、更通用、更流行。前后端分离架构(.NET6/Vue3),开箱即用紧随前沿技术。<br/><a href='https://gitee.com/zuohuaijun/Admin.NET/'>https://gitee.com/zuohuaijun/Admin.NET</a>
+ *
+ * OpenAPI spec version: 1.0.0
+ * Contact: 515096995@qq.com
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+/**
+ * 
+ * @export
+ * @interface UpdateJobTriggerInput
+ */
+export interface UpdateJobTriggerInput {
+    /**
+     * Id
+     * @type {number}
+     * @memberof UpdateJobTriggerInput
+     */
+    id?: number;
+    /**
+     * 组名称
+     * @type {string}
+     * @memberof UpdateJobTriggerInput
+     */
+    groupName?: string | null;
+    /**
+     * 作业类型FullName
+     * @type {string}
+     * @memberof UpdateJobTriggerInput
+     */
+    jobType?: string | null;
+    /**
+     * 程序集Name
+     * @type {string}
+     * @memberof UpdateJobTriggerInput
+     */
+    assemblyName?: string | null;
+    /**
+     * 描述信息
+     * @type {string}
+     * @memberof UpdateJobTriggerInput
+     */
+    description?: string | null;
+    /**
+     * 是否并行执行
+     * @type {boolean}
+     * @memberof UpdateJobTriggerInput
+     */
+    concurrent?: boolean;
+    /**
+     * 是否扫描特性触发器
+     * @type {boolean}
+     * @memberof UpdateJobTriggerInput
+     */
+    includeAnnotations?: boolean;
+    /**
+     * 额外数据
+     * @type {string}
+     * @memberof UpdateJobTriggerInput
+     */
+    properties?: string | null;
+    /**
+     * 更新时间
+     * @type {Date}
+     * @memberof UpdateJobTriggerInput
+     */
+    updatedTime?: Date | null;
+    /**
+     * 作业Id
+     * @type {string}
+     * @memberof UpdateJobTriggerInput
+     */
+    jobId: string;
+}

+ 119 - 0
Web/src/views/system/job/component/editJobDetail.vue

@@ -0,0 +1,119 @@
+<template>
+	<div class="sys-jobDetail-container">
+		<el-dialog v-model="isShowDialog" draggable width="769px">
+			<template #header>
+				<div style="color: #fff">
+					<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Edit /> </el-icon>
+					<span> {{ title }} </span>
+				</div>
+			</template>
+			<el-form :model="ruleForm" ref="ruleFormRef" size="default" label-width="110px">
+				<el-row :gutter="35">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="作业编号" prop="jobId" :rules="[{ required: true, message: '作业编号不能为空', trigger: 'blur' }]">
+							<el-input v-model="ruleForm.jobId" placeholder="作业编号" clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="组名称" prop="groupName" :rules="[{ required: true, message: '组名称不能为空', trigger: 'blur' }]">
+							<el-input v-model="ruleForm.groupName" placeholder="组名称" clearable value="default" />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="执行方式" prop="concurrent">
+							<el-radio-group v-model="ruleForm.concurrent">
+								<el-radio :label="true">并行</el-radio>
+								<el-radio :label="false">串行</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="扫描特性触发器" prop="includeAnnotations">
+							<el-radio-group v-model="ruleForm.includeAnnotations">
+								<el-radio :label="true">是</el-radio>
+								<el-radio :label="false">否</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="额外数据" prop="properties">
+							<el-input v-model="ruleForm.properties" placeholder="额外数据" clearable type="textarea" />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
+						<el-form-item label="描述信息" prop="description">
+							<el-input v-model="ruleForm.description" placeholder="描述信息" clearable type="textarea" />
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="cancel" size="default">取 消</el-button>
+					<el-button type="primary" @click="submit" size="default">确 定</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+
+<script lang="ts">
+import { reactive, toRefs, defineComponent, ref } from 'vue';
+import mittBus from '/@/utils/mitt';
+
+import { getAPI } from '/@/utils/axios-utils';
+import { SysJobApi } from '/@/api-services/api';
+import { UpdateJobDetailInput } from '/@/api-services/models';
+
+export default defineComponent({
+	name: 'sysEditJobDetail',
+	components: {},
+	props: {
+		title: {
+			type: String,
+			default: '',
+		},
+	},
+	setup() {
+		const ruleFormRef = ref();
+		const state = reactive({
+			isShowDialog: false,
+			ruleForm: {} as UpdateJobDetailInput,
+		});
+		// 打开弹窗
+		const openDialog = (row: any) => {
+			state.ruleForm = JSON.parse(JSON.stringify(row));
+			state.isShowDialog = true;
+		};
+		// 关闭弹窗
+		const closeDialog = () => {
+			mittBus.emit('submitRefresh');
+			state.isShowDialog = false;
+		};
+		// 取消
+		const cancel = () => {
+			state.isShowDialog = false;
+		};
+		// 提交
+		const submit = () => {
+			ruleFormRef.value.validate(async (valid: boolean) => {
+				if (!valid) return;
+				if (state.ruleForm.id != undefined && state.ruleForm.id > 0) {
+					await getAPI(SysJobApi).sysJobDetailUpdatePost(state.ruleForm);
+				} else {
+					await getAPI(SysJobApi).sysJobDetailAddPost(state.ruleForm);
+				}
+				closeDialog();
+			});
+		};
+		return {
+			ruleFormRef,
+			openDialog,
+			closeDialog,
+			cancel,
+			submit,
+			...toRefs(state),
+		};
+	},
+});
+</script>

+ 246 - 0
Web/src/views/system/job/index.vue

@@ -0,0 +1,246 @@
+<template>
+	<div class="sys-job-container">
+		<el-card shadow="hover" :body-style="{ paddingBottom: '0' }">
+			<el-form :model="queryParams" ref="queryForm" :inline="true">
+				<el-form-item label="作业编号" prop="jobId">
+					<el-input placeholder="作业编号" clearable @keyup.enter="handleQuery" v-model="queryParams.jobId" />
+				</el-form-item>
+				<el-form-item label="描述信息" prop="description">
+					<el-input placeholder="描述信息" clearable @keyup.enter="handleQuery" v-model="queryParams.description" />
+				</el-form-item>
+				<el-form-item>
+					<el-button icon="ele-Refresh" @click="resetQuery"> 重置 </el-button>
+					<el-button type="primary" icon="ele-Search" @click="handleQuery" v-auth="'sysJob:page'"> 查询 </el-button>
+					<el-button icon="ele-Plus" @click="openAddJobDetail" v-auth="'sysJob:add'"> 新增作业 </el-button>
+				</el-form-item>
+			</el-form>
+		</el-card>
+
+		<el-card shadow="hover" style="margin-top: 8px">
+			<el-table :data="jobData" style="width: 100%" v-loading="loading" border>
+				<el-table-column type="expand" fixed>
+					<template #default="scope">
+						<el-table :data="scope.row.jobTriggers" border size="small">
+							<el-table-column type="index" label="序号" width="55" align="center" fixed />
+							<el-table-column prop="triggerId" label="触发器编号" width="120" fixed show-overflow-tooltip />
+							<el-table-column prop="triggerType" label="类型" show-overflow-tooltip />
+							<el-table-column prop="assemblyName" label="程序集" show-overflow-tooltip />
+							<el-table-column prop="args" label="参数" show-overflow-tooltip />
+							<el-table-column prop="description" label="描述" width="120" show-overflow-tooltip />
+							<el-table-column prop="status" label="状态" width="100" align="center" show-overflow-tooltip>
+								<template #default="scope">
+									<el-tag v-if="scope.row.status == 0"> 积压 </el-tag>
+									<el-tag v-if="scope.row.status == 1"> 就绪 </el-tag>
+									<el-tag v-if="scope.row.status == 2"> 正在运行 </el-tag>
+									<el-tag v-if="scope.row.status == 3"> 暂停 </el-tag>
+									<el-tag v-if="scope.row.status == 4"> 阻塞 </el-tag>
+									<el-tag v-if="scope.row.status == 5"> 由失败进入就绪 </el-tag>
+									<el-tag v-if="scope.row.status == 6"> 归档 </el-tag>
+									<el-tag v-if="scope.row.status == 7"> 崩溃 </el-tag>
+									<el-tag v-if="scope.row.status == 8"> 超限 </el-tag>
+									<el-tag v-if="scope.row.status == 9"> 无触发时间 </el-tag>
+									<el-tag v-if="scope.row.status == 10"> 未启动 </el-tag>
+									<el-tag v-if="scope.row.status == 11"> 未知作业触发器 </el-tag>
+									<el-tag v-if="scope.row.status == 12"> 未知作业处理程序 </el-tag>
+								</template>
+							</el-table-column>
+							<el-table-column prop="startTime" label="起始时间" width="100" align="center" show-overflow-tooltip />
+							<el-table-column prop="endTime" label="结束时间" width="100" align="center" show-overflow-tooltip />
+							<el-table-column prop="lastRunTime" label="最近运行时间" width="160" align="center" show-overflow-tooltip />
+							<el-table-column prop="nextRunTime" label="下一次运行时间" width="160" align="center" show-overflow-tooltip />
+							<el-table-column prop="numberOfRuns" label="触发次数" width="100" align="center" show-overflow-tooltip />
+							<el-table-column prop="maxNumberOfRuns" label="最大触发次数" width="150" align="center" show-overflow-tooltip />
+							<el-table-column prop="numberOfErrors" label="出错次数" width="100" align="center" show-overflow-tooltip />
+							<el-table-column prop="maxNumberOfErrors" label="最大出错次数" width="150" align="center" show-overflow-tooltip />
+							<el-table-column prop="numRetries" label="重试次数" width="100" align="center" show-overflow-tooltip />
+							<el-table-column prop="retryTimeout" label="重试间隔ms" width="120" align="center" show-overflow-tooltip />
+							<el-table-column prop="startNow" label="是否立即启动" width="120" align="center" show-overflow-tooltip>
+								<template #default="scope">
+									<el-tag v-if="scope.row.startNow == true"> 是 </el-tag>
+									<el-tag v-else> 否 </el-tag>
+								</template>
+							</el-table-column>
+							<el-table-column prop="runOnStart" label="是否启动时执行一次" width="160" align="center" show-overflow-tooltip>
+								<template #default="scope">
+									<el-tag v-if="scope.row.runOnStart == true"> 是 </el-tag>
+									<el-tag v-else> 否 </el-tag>
+								</template>
+							</el-table-column>
+							<el-table-column prop="updatedTime" label="更新时间" width="160" align="center" show-overflow-tooltip />
+							<el-table-column label="操作" width="140" align="center" show-overflow-tooltip>
+								<template #default="scope">
+									<el-button icon="ele-Edit" size="small" text type="primary"> 编辑 </el-button>
+									<el-button icon="ele-Delete" size="small" text type="danger"> 删除 </el-button>
+								</template>
+							</el-table-column>
+						</el-table>
+					</template>
+				</el-table-column>
+				<el-table-column type="index" label="序号" width="55" align="center" fixed />
+				<el-table-column prop="jobDetail.jobId" label="作业编号" width="150" fixed>
+					<template #default="scope">
+						<div style="display: flex; align-items: center">
+							<el-icon><timer /></el-icon>
+							<span style="margin-left: 5px">{{ scope.row.jobDetail.jobId }}</span>
+						</div>
+					</template>
+				</el-table-column>
+				<el-table-column prop="jobDetail.groupName" label="组名称" show-overflow-tooltip />
+				<el-table-column prop="jobDetail.jobType" label="类型" show-overflow-tooltip />
+				<el-table-column prop="jobDetail.assemblyName" label="程序集" show-overflow-tooltip />
+				<el-table-column prop="jobDetail.description" label="描述" show-overflow-tooltip />
+				<el-table-column prop="jobDetail.concurrent" label="执行方式" width="100" align="center" show-overflow-tooltip>
+					<template #default="scope">
+						<el-tag v-if="scope.row.jobDetail.concurrent == true"> 并行 </el-tag>
+						<el-tag v-else> 串行 </el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="jobDetail.includeAnnotations" label="扫描特性触发器" align="center" show-overflow-tooltip>
+					<template #default="scope">
+						<el-tag v-if="scope.row.includeAnnotations == true"> 是 </el-tag>
+						<el-tag v-else> 否 </el-tag>
+					</template>
+				</el-table-column>
+				<el-table-column prop="jobDetail.properties" label="额外数据" show-overflow-tooltip />
+				<el-table-column prop="jobDetail.updatedTime" label="更新时间" width="160" align="center" show-overflow-tooltip />
+				<el-table-column label="操作" width="230" fixed="right" align="center" show-overflow-tooltip>
+					<template #default="scope">
+						<el-button icon="ele-Clock" size="small" text type="warning"> 新增触发器 </el-button>
+						<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditJobDetail(scope.row)" v-auth="'sysJob:update'"> 编辑 </el-button>
+						<el-button icon="ele-Delete" size="small" text type="danger" @click="delJobDetail(scope.row)" v-auth="'sysJob:delete'"> 删除 </el-button>
+					</template>
+				</el-table-column>
+			</el-table>
+			<el-pagination
+				v-model:currentPage="tableParams.page"
+				v-model:page-size="tableParams.pageSize"
+				:total="tableParams.total"
+				:page-sizes="[10, 20, 50, 100]"
+				small
+				background
+				@size-change="handleSizeChange"
+				@current-change="handleCurrentChange"
+				layout="total, sizes, prev, pager, next, jumper"
+			/>
+		</el-card>
+		<EditJobDetail ref="editJobDetailRef" :title="editJobDetailTitle" />
+	</div>
+</template>
+
+<script lang="ts">
+import { toRefs, reactive, onMounted, ref, defineComponent, onUnmounted, onActivated, onDeactivated } from 'vue';
+import { ElMessageBox, ElMessage } from 'element-plus';
+import mittBus from '/@/utils/mitt';
+import { Timer } from '@element-plus/icons-vue';
+import EditJobDetail from '/@/views/system/job/component/editJobDetail.vue';
+
+import { getAPI } from '/@/utils/axios-utils';
+import { SysJobApi } from '/@/api-services/api';
+import { JobOutput } from '/@/api-services/models';
+
+export default defineComponent({
+	name: 'sysJob',
+	components: { Timer, EditJobDetail },
+	setup() {
+		const editJobDetailRef = ref();
+		const state = reactive({
+			loading: false,
+			jobData: [] as Array<JobOutput>,
+			queryParams: {
+				jobId: undefined,
+				description: undefined,
+			},
+			tableParams: {
+				page: 1,
+				pageSize: 10,
+				total: 0 as any,
+			},
+			editJobDetailTitle: '',
+			timer: null as any,
+		});
+		onMounted(async () => {
+			handleQuery();
+
+			mittBus.on('submitRefresh', () => {
+				handleQuery();
+			});
+		});
+		onUnmounted(() => {
+			mittBus.off('submitRefresh');
+		});
+		// 查询操作
+		const handleQuery = async () => {
+			state.loading = true;
+			var res = await getAPI(SysJobApi).sysJobPageGet(state.queryParams.jobId, state.queryParams.description, state.tableParams.page, state.tableParams.pageSize);
+			state.jobData = res.data.result?.items ?? [];
+			state.tableParams.total = res.data.result?.total;
+			state.loading = false;
+		};
+		// 重置操作
+		const resetQuery = () => {
+			state.queryParams.jobId = undefined;
+			state.queryParams.description = undefined;
+			handleQuery();
+		};
+		// 打开新增作业页面
+		const openAddJobDetail = () => {
+			state.editJobDetailTitle = '添加作业';
+			editJobDetailRef.value.openDialog({});
+		};
+		// 打开编辑作业页面
+		const openEditJobDetail = (row: any) => {
+			console.log(row)
+			state.editJobDetailTitle = '编辑作业';
+			editJobDetailRef.value.openDialog(row.jobDetail);
+		};
+		// 删除作业
+		const delJobDetail = (row: any) => {
+			ElMessageBox.confirm(`确定删除作业:【${row.jobDetail.jobId}】?`, '提示', {
+				confirmButtonText: '确定',
+				cancelButtonText: '取消',
+				type: 'warning',
+			})
+				.then(async () => {
+					await getAPI(SysJobApi).sysJobDetailDeletePost({ jobId: row.jobDetail.jobId });
+					handleQuery();
+					ElMessage.success('删除成功');
+				})
+				.catch(() => {});
+		};
+		// 改变页面容量
+		const handleSizeChange = (val: number) => {
+			state.tableParams.pageSize = val;
+			handleQuery();
+		};
+		// 改变页码序号
+		const handleCurrentChange = (val: number) => {
+			state.tableParams.page = val;
+			handleQuery();
+		};
+		// 修改状态
+		const changeStatus = async (row: any) => {
+			//await getAPI(SysJobApi).sysTimerSetStatusPost({ timerName: row.timerName, status: row.status });
+		};
+		onActivated(() => {
+			// state.timer = setInterval(() => {
+			// 	handleQuery();
+			// }, 10000);
+		});
+		onDeactivated(() => {
+			clearInterval(state.timer);
+		});
+		return {
+			editJobDetailRef,
+			handleQuery,
+			resetQuery,
+			openAddJobDetail,
+			openEditJobDetail,
+			delJobDetail,
+			handleSizeChange,
+			handleCurrentChange,
+			changeStatus,
+			...toRefs(state),
+		};
+	},
+});
+</script>