Skip to content

Commit

Permalink
实现任务调度管理
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxue committed Oct 17, 2022
1 parent 8c712a8 commit 43db378
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 127 deletions.
32 changes: 24 additions & 8 deletions src/api/admin/task.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,40 @@ export const update = (params, config = {}) => {
}

/**
* 彻底删除
* 暂停任务
*/
export const deleteAsync = (params, config = {}) => {
return request.delete(apiPrefix + 'delete', { params: params, ...config })
export const pause = (params, config = {}) => {
return request.post(apiPrefix + 'pause', params, config)
}

/**
* 启动任务
*/
export const resume = (params, config = {}) => {
return request.post(apiPrefix + 'resume', params, config)
}

/**
* 批量彻底删除
* 执行任务
*/
export const batchDelete = (params, config = {}) => {
return request.put(apiPrefix + 'batch-delete', params, config)
export const run = (params, config = {}) => {
return request.post(apiPrefix + 'run', params, config)
}

/**
* 删除任务
*/
export const deleteAsync = (params, config = {}) => {
return request.delete(apiPrefix + 'delete', { params: params, ...config })
}

export default {
get,
getPage,
add,
update,
deleteAsync,
batchDelete
pause,
resume,
run,
deleteAsync
}
119 changes: 0 additions & 119 deletions src/views/admin/task.vue

This file was deleted.

Loading

0 comments on commit 43db378

Please sign in to comment.