diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts index e128b5bc..6c7ed9e4 100644 --- a/src/api/infra/job/index.ts +++ b/src/api/infra/job/index.ts @@ -57,11 +57,7 @@ export function exportJob(params: JobExportReqVO) { // 任务状态修改 export function updateJobStatus(id: number, status: number) { - const params = { - id, - status, - } - return defHttp.put({ url: '/infra/job/update-status', params }) + return defHttp.put({ url: `/infra/job/update-status?id=${id}&status=${status}` }) } // 定时任务立即执行一次 diff --git a/src/views/infra/job/index.vue b/src/views/infra/job/index.vue index fcb9b8ff..8d74b769 100644 --- a/src/views/infra/job/index.vue +++ b/src/views/infra/job/index.vue @@ -52,6 +52,7 @@ function handleChangeStatus(record: Recordable, open: boolean) { async onOk() { await updateJobStatus(record.id, status) createMessage.success(t('common.successText')) + reload() }, }) }