import { axios } from '@/utils/request'

export const listJob = (params) => {
  let url = `/job/queryJob/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
export const pauseJob = (params) => {
  return axios({
    url: '/job/pauseJob',
    data: params,
    method: 'post'
  })
}
export const resumeJob = (params) => {
  return axios({
    url: '/job/resumeJob',
    data: params,
    method: 'post'
  })
}
export const delJob = (params) => {
  return axios({
    url: `job/delJob/${params.id}`,
    method: 'get'
  })
}
export const addJob = (params) => {
  return axios({
    url: '/job/addJob',
    data: params,
    method: 'post'
  })
}
export const callJob = (params) => {
  return axios({
    url: `job/callJob/${params.id}`,
    method: 'get'
  })
}
