diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts index e128b5bc2e25e3dc0db7ac9a42c43e5ef5d301c4..6c7ed9e4790a2bc03bb645d9c10f0d0b623c0bf8 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 fcb9b8ffb0402ca587e04468e3fc1b4fc86f2a89..8d74b769a3bd62d2c132bc22391d7d66d23e8517 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() }, }) }