import request from '@/utils/request'

// 查询批文清单列表
export function listApproval(query) {
  return request({
    url: '/ehs/approval/list',
    method: 'get',
    params: query
  })
}

// 查询批文清单详细
export function getApproval(id) {
  return request({
    url: '/ehs/approval/' + id,
    method: 'get'
  })
}

// 新增批文清单
export function addApproval(data) {
  return request({
    url: '/ehs/approval',
    method: 'post',
    data: data
  })
}

// 修改批文清单
export function updateApproval(data) {
  return request({
    url: '/ehs/approval',
    method: 'put',
    data: data
  })
}

// 删除批文清单
export function delApproval(id) {
  return request({
    url: '/ehs/approval/' + id,
    method: 'delete'
  })
}


// 导出批文清单
export function exportApproval(query) {
  return request({
    url: '/ehs/approval/export',
    method: 'get',
    params: query
  })
}
