diff --git a/src/frontend/src/domain/source/cron-job.js b/src/frontend/src/domain/source/cron-job.js index 19240b70e6..721a377218 100644 --- a/src/frontend/src/domain/source/cron-job.js +++ b/src/frontend/src/domain/source/cron-job.js @@ -54,7 +54,7 @@ class CronJob extends ModuleBase { }); } - // // 删除定时任务 + // 删除定时任务 deleteDataById({ id }) { return Request.delete(`${this.path}/cron/job/${id}`); } diff --git a/src/frontend/src/views/cron-job/list/components/operation/index.vue b/src/frontend/src/views/cron-job/list/components/operation/index.vue index a4b2a146a8..d5671d09c3 100644 --- a/src/frontend/src/views/cron-job/list/components/operation/index.vue +++ b/src/frontend/src/views/cron-job/list/components/operation/index.vue @@ -675,7 +675,9 @@ if (params.endTime) { params.endTime = new Date(params.endTime).getTime() / 1000; } - return CronJobService.update({ + + const requestHandler = params.id ? CronJobService.update : CronJobService.create; + return requestHandler({ ...params, variableValue: variableList, }).then(() => {