鞍钢鲅鱼圈能源管控系统前端代码
houzhongjian
2024-12-26 cb6cd26221d8bb2c4b1dca44a87332e9fe6f56ab
提交 | 用户 | 时间
cb6cd2 1 import request from '@/config/axios'
H 2
3 export interface ScheduleJobVO {
4   id: number
5   beanName: string
6   params: string
7   cronExpression: string
8   status: number
9   remark: string
10 }
11
12 export interface ScheduleJobPageReqVO extends PageParam {
13   beanName?: string
14 }
15
16 // 查询ScheduleJob列表
17 export const getScheduleJobPage = (params: ScheduleJobPageReqVO) => {
18   return request.get({ url: '/ansteel/job/schedule/page', params })
19 }
20
21 // 查询ScheduleJob详情
22 export const getScheduleJob = (id: number) => {
23   return request.get({ url: '/ansteel/job/schedule/info?id=' + id})
24 }
25
26 // 新增ScheduleJob
27 export const createScheduleJob = (data: ScheduleJobVO) => {
28   return request.post({ url: '/ansteel/job/schedule/create', data })
29 }
30
31 // 修改ScheduleJob
32 export const updateScheduleJob = (data: ScheduleJobVO) => {
33   return request.put({ url: '/ansteel/job/schedule/update', data })
34 }
35
36 // 删除ScheduleJob
37 export const deleteScheduleJob = (id: number) => {
38   return request.delete({ url: '/ansteel/job/schedule/delete?id=' + id })
39 }
40
41 // 立即执行
42 export const runScheduleJob = (id: number) => {
43   return request.put({ url: '/ansteel/job/schedule/run?id=' + id })
44 }
45
46 // 暂停
47 export const pauseScheduleJob = (id: number) => {
48   return request.put({ url: '/ansteel/job/schedule/pause?id=' + id })
49 }
50
51 // 恢复
52 export const resumeScheduleJob = (id: number) => {
53   return request.put({ url: '/ansteel/job/schedule/resume?id=' + id })
54 }