import { defAxios as request } from '@/utils/http'

/**
 * @description: 获取报告列表
 * @param {*} params
 * @return {*}
 */
export function getReportList(params) {
  return request({
    url: '/report/page',
    method: 'GET',
    params
  })
}

/**
 * @description: 获取报告详情
 * @param {*} id
 * @return {*}
 */
export function getReportDetail(id) {
  return request({
    url: `/report/${id}`,
    method: 'GET'
  })
}

/**
 * @description: 下载报告
 * @param {*} id
 * @return {*}
 */
export function reportDownload(id) {
  return request({
    url: `report/${id}/word`,
    method: 'GET',
    headers: {
      responseType: 'arraybuffer'
    }
  })
}

/**
 * @description: 下载报告
 * @param {*} id
 * @return {*}
 */
export function reportHandleDownload(id) {
  return request({
    url: `report/${id}/handleWord`,
    method: 'GET',
    headers: {
      responseType: 'arraybuffer'
    }
  })
}

