fix: 定时任务开启/关闭报错

pull/32/head
lemoncc 2023-08-14 19:36:09 +08:00
parent d38413c1e4
commit 7936f7a3a3
No known key found for this signature in database
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()
},
})
}