import request from '@/utils/request'

// 查询列表监控调阅任务
export function listTask(query) {
  return request({
    url: '/core/retrievalTask/list',
    method: 'get',
    params: query
  })
}

// 查询详细监控调阅任务
export function getTask(id) {
  return request({
    url: '/core/retrievalTask/' + id,
    method: 'get'
  })
}

// 新增监控调阅任务
export function addTask(data) {
  return request({
    url: '/core/retrievalTask',
    method: 'post',
    data: data
  })
}

// 修改监控调阅任务
export function updateTask(data) {
  return request({
    url: '/core/retrievalTask',
    method: 'put',
    data: data
  })
}

// 删除监控调阅任务
export function delTask(id) {
  return request({
    url: '/core/retrievalTask/' + id,
    method: 'delete'
  })

}
export function roleList() {
  return request({
    url: '/system/role/all',
    method: 'get',
    params: null
  })
}
export function exportExcel(data) {
  return request({
    url: 'core/retrievalTask/export',
    method: 'post',
    params: data,
    showLoading:true
  })
}
