import service from "./index";
const apiAdmin = '/mediate/'

const statisticalAnalysisApi = {
    
    //========================start::统计分析======================================
    // 调解数据列表
    getMediateDataList: data => {
        return service.service.post(`${apiAdmin}statistic/mediateData/getMediateDataList`, data)
    },
    // 调解数据列表--导出
    exportMediateDataList: data => {
        return service.postFile(`${apiAdmin}statistic/mediateData/exportMediateDataList`, data)
    },
    // 调解统计任务列表
    getMediateTaskDataList: data => {
        return service.service.post(`${apiAdmin}statistic/mediateTaskData/getMediateTaskDataList`, data)
    },
    // 调解统计任务列表-导出
    exportMediateTaskDataList: data => {
        return service.postFile(`${apiAdmin}statistic/mediateTaskData/exportMediateTaskDataList`, data)
    },
    //========================end::统计分析======================================


    //========================start::业绩统计======================================
    // 案件统计查询
    financialCaseStatistics: data => {
        return service.service.post(`${apiAdmin}statistics/financialCaseStatistics`, data)
    },
    // 案件导出（调解员和案件）
    exportFinancialCaseStatistics: data => {
        const config = {
            responseType: 'blob',
        };
        return service.service.post(`${apiAdmin}statistics/exportFinancialCaseStatistics`, data , config)
    },
    //========================end::业绩统计======================================

    //========================start::对账统计======================================
    // 对账报表查询
    reconciliationList: data => {
        return service.service.post(`${apiAdmin}statistics/reconciliationList`, data)
    },
    // 对账报表导出
    exportReconciliationList: data => {
        const config = {
            responseType: 'blob',
        };
        return service.service.post(`${apiAdmin}statistics/exportReconciliationList`, data , config)
    },
    // 上传文件
    uploadReconciliation: data => {
        return service.service.post(`${apiAdmin}statistics/reconciliation`, data,
          {
            headers:
              {'Content-Type': 'multipart/form-data'},
          },
        )
      },
    //========================end::对账统计======================================


}
export default statisticalAnalysisApi;
