import request from "@/util/oaRequest"

// 查询项目报工列表
export function listProjectReport(query) {
  return request({
    url: '/oa/projectReport/list',
    method: 'get',
    params: query
  })
}

// 查询项目报工详细
export function getProjectReport(reportId) {
  return request({
    url: '/oa/projectReport/' + reportId,
    method: 'get'
  })
}

// 查询项目报工详细
export function getCardData() {
  return request({
    url: '/oa/projectReport/card',
    method: 'get'
  })
}

// 查询项目报工详细
export function getTrendData(start,end) {
  return request({
    url: '/oa/projectReport/trend',
    method: 'get',
    params: {
      start:start,
      end:end
    }
  })
}

// 查询项目报工详细
export function getRankData(start,end) {
  return request({
    url: '/oa/projectReport/rank',
    method: 'get',
    params: {
      start:start,
      end:end
    }
  })
}// 查询项目报工详细
export function getSummaryList(start,end) {
  return request({
    url: '/oa/projectReport/summary',
    method: 'get',
    params: {
      start:start,
      end:end
    }
  })
}

// 查询项目报工详细
export function getProjectData(start,end) {
  return request({
    url: '/oa/projectReport/projects',
    method: 'get',
    params: {
      start:start,
      end:end
    }
  })
}
// 查询项目报工详细
export function listClearProjectReport(start,end) {
  return request({
    url: '/oa/projectReport/report',
    method: 'get',
    params: {
      start:start,
      end:end
    }
  })
}
// 查询项目报工详细
export function getPieData(start,end) {
  return request({
    url: '/oa/projectReport/distribution',
    method: 'get',
    params: {
      start:start,
      end:end
    }
  })
}

// 新增项目报工
export function addProjectReport(data) {
  return request({
    url: '/oa/projectReport',
    method: 'post',
    data: data
  })
}

// 修改项目报工
export function updateProjectReport(data) {
  return request({
    url: '/oa/projectReport',
    method: 'put',
    data: data
  })
}

// 删除项目报工
export function delProjectReport(reportId) {
  return request({
    url: '/oa/projectReport/' + reportId,
    method: 'delete'
  })
}

// 导出项目报工数据
export function exportProjectReport(params) {
  return request({
    url: '/oa/projectReport/export',
    method: 'post',
    data: params,
    responseType: 'blob'
  })
}
