import request from '@/utils/request'

// 查询隐患审核记录列表
export function listRecord(query) {
  return request({
    url: '/danger/approval/list',
    method: 'get',
    params: query
  })
}

// 查询隐患审核记录详细
export function getRecord(approvalId) {
  return request({
    url: '/danger/approval/' + approvalId,
    method: 'get'
  })
}

// 新增隐患审核记录
export function addRecord(data) {
  return request({
    url: '/danger/approval',
    method: 'post',
    data: data
  })
}

// 修改隐患审核记录
export function updateRecord(data) {
  return request({
    url: '/danger/approval',
    method: 'put',
    data: data
  })
}

// 删除隐患审核记录
export function delRecord(approvalId) {
  return request({
    url: '/danger/approval/' + approvalId,
    method: 'delete'
  })
}

// 导出隐患审核记录
export function exportRecord(query) {
  return request({
    url: '/danger/approval/export',
    method: 'get',
    params: query
  })
}


//查询所有隐患审核记录
export function dangerApprovalListInfo(query) {
  return request({
    url: '/danger/approval/dangerApprovalListInfo',
    method: 'get',
    params: query
  })
}
