import request from '@/utils/request'

// 创建信息上报
export function createHarmfulInfoReport(data) {
  return request({
    url: '/server/harmful-info-report/create',
    method: 'post',
    data: data
  })
}

// 更新信息上报
export function updateHarmfulInfoReport(data) {
  return request({
    url: '/server/harmful-info-report/update',
    method: 'post',
    data: data
  })
}

// 删除信息上报
export function deleteHarmfulInfoReport(id) {
  return request({
    url: '/server/harmful-info-report/delete?id=' + id,
    method: 'post'
  })
}

// 上报信息上报
export function reportHarmfulInfoReport(id) {
  return request({
    url: '/server/harmful-info-report/report?id=' + id,
    method: 'post'
  })
}

// 获得信息上报
export function getHarmfulInfoReport(id) {
  return request({
    url: '/server/harmful-info-report/get?id=' + id,
    method: 'get'
  })
}

// 获得信息上报分页
export function getHarmfulInfoReportPage(params) {
  return request({
    url: '/server/harmful-info-report/page',
    method: 'get',
    params
  })
}
// 导出信息上报 Excel
export function exportHarmfulInfoReportExcel(params) {
  return request({
    url: '/server/harmful-info-report/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}

// 在HarmfulInfoReportApi中添加
export function exportSummaryExcel(query) {
  return request({
    url: '/server/harmful-info-report/export-summary-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

export function indexdata(params) {
  return request({
    url: '/server/harmful-info-report/indexdata',
    method: 'post',
    params
  })
}
