!32 定时任务开启/关闭报错

Merge pull request !32 from lemoncc/cron_job
pull/33/head
xingyu 2023-08-15 09:58:14 +00:00 committed by Gitee
commit 96faa0c6f1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 5 deletions

View File

@ -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}` })
}
// 定时任务立即执行一次

View File

@ -52,6 +52,7 @@ function handleChangeStatus(record: Recordable, open: boolean) {
async onOk() {
await updateJobStatus(record.id, status)
createMessage.success(t('common.successText'))
reload()
},
})
}