import request from '@/utils/request'

// 查询事件申请列表
export function listApproveaccident(query) {
  return request({
    url: '/ehs/approveaccident/list',
    method: 'get',
    params: query
  })
}

// 查询事件申请详细
export function getApproveaccident(id) {
  return request({
    url: '/ehs/approveaccident/' + id,
    method: 'get'
  })
}

//开启审批流程
export function saveApproveaccident(data) {
  return request({
    url: '/ehs/approveaccident/save',
    method: 'post',
    data: data
  })
}

// 新增事件申请
export function addApproveaccident(data) {
  return request({
    url: '/ehs/approveaccident',
    method: 'post',
    data: data
  })
}

// 修改事件申请
export function updateApproveaccident(data) {
  return request({
    url: '/ehs/approveaccident',
    method: 'put',
    data: data
  })
}

// 删除事件申请
export function delApproveaccident(id) {
  return request({
    url: '/ehs/approveaccident/' + id,
    method: 'delete'
  })
}

// 导出事件申请
export function exportApproveaccident(query) {
  return request({
    url: '/ehs/approveaccident/export',
    method: 'get',
    params: query
  })
}
