import { axios } from '@/util/axios/request'

const api = {
  carReport: '/report/car'
}

export function getCarReport(parameter) {
  return axios({
    url: api.carReport,
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}

export function getPersonReport(parameter) {
  return axios({
    url: '/report/person',
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}


export function exportCarData(parameter) {
  return axios({
    responseType: 'blob',
    headers: {'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'},
    url: '/report/car/export',
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}

export function exportPersonData(parameter) {
  return axios({
    responseType: 'blob',
    headers: {'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'},
    url: '/report/person/export',
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}

