提交 | 用户 | 时间
|
fd2207
|
1 |
import request from '@/utils/request' |
懒 |
2 |
|
|
3 |
// 查询定时任务调度列表 |
|
4 |
export function listJob(query) { |
|
5 |
return request({ |
|
6 |
url: '/monitor/job/list', |
|
7 |
method: 'get', |
|
8 |
params: query |
|
9 |
}) |
|
10 |
} |
|
11 |
|
|
12 |
// 查询定时任务调度详细 |
|
13 |
export function getJob(jobId) { |
|
14 |
return request({ |
|
15 |
url: '/monitor/job/' + jobId, |
|
16 |
method: 'get' |
|
17 |
}) |
|
18 |
} |
|
19 |
|
|
20 |
// 新增定时任务调度 |
|
21 |
export function addJob(data) { |
|
22 |
return request({ |
|
23 |
url: '/monitor/job', |
|
24 |
method: 'post', |
|
25 |
data: data |
|
26 |
}) |
|
27 |
} |
|
28 |
|
|
29 |
// 修改定时任务调度 |
|
30 |
export function updateJob(data) { |
|
31 |
return request({ |
|
32 |
url: '/monitor/job', |
|
33 |
method: 'put', |
|
34 |
data: data |
|
35 |
}) |
|
36 |
} |
|
37 |
|
|
38 |
// 删除定时任务调度 |
|
39 |
export function delJob(jobId) { |
|
40 |
return request({ |
|
41 |
url: '/monitor/job/' + jobId, |
|
42 |
method: 'delete' |
|
43 |
}) |
|
44 |
} |
|
45 |
|
|
46 |
// 任务状态修改 |
|
47 |
export function changeJobStatus(jobId, status) { |
|
48 |
const data = { |
|
49 |
jobId, |
|
50 |
status |
|
51 |
} |
|
52 |
return request({ |
|
53 |
url: '/monitor/job/changeStatus', |
|
54 |
method: 'put', |
|
55 |
data: data |
|
56 |
}) |
|
57 |
} |
|
58 |
|
|
59 |
|
|
60 |
// 定时任务立即执行一次 |
|
61 |
export function runJob(jobId, jobGroup) { |
|
62 |
const data = { |
|
63 |
jobId, |
|
64 |
jobGroup |
|
65 |
} |
|
66 |
return request({ |
|
67 |
url: '/monitor/job/run', |
|
68 |
method: 'put', |
|
69 |
data: data |
|
70 |
}) |
|
71 |
} |