import request from '@/utils/request'

// 查询报表配置列表
export function listConfig(query) {
  return request({
    url: '/business/config/list',
    method: 'get',
    params: query
  })
}

// 查询报表配置详细
export function getConfig(id) {
  return request({
    url: '/business/config/' + id,
    method: 'get'
  })
}

// 新增报表配置
export function addConfig(data) {
  return request({
    url: '/business/config',
    method: 'post',
    data: data
  })
}

// 修改报表配置
export function updateConfig(data) {
  return request({
    url: '/business/config',
    method: 'put',
    data: data
  })
}

// 删除报表配置
export function delConfig(id) {
  return request({
    url: '/business/config/' + id,
    method: 'delete'
  })
}

// 配置保存
export function save(data) {
  return request({
    url: '/business/config/save',
    method: 'post',
    data
  })
}
