import axios from '@/common/services/axios-instance'

class KpiAnalysisFormService {
  // 获取字典值
  getDictValue(key) {
    return axios({
      url: 'api/xcoa-mobile/v1/iam-law/dictionary?key=' + key,
      method: 'get',
    })
  }

  // 获取指标分析数据
  getKpiAssayList(data) {
    return axios({
      url: 'api/xcoa-mobile/v1/kpi-assay/getKpiAssayList',
      method: 'post',
      data,
    })
  }

  // 获取指标分析表头
  getKpiAssayHeader(data) {
    return axios({
      url: 'api/xcoa-mobile/v1/kpi-assay/getKpiAssayHeader',
      method: 'post',
      data,
    })
  }

  // 导出指标分析
  exportKpiAssayList(data) {
    return axios({
      url: 'api/xcoa-mobile/v1/kpi-assay/exportKpiAssayList',
      method: 'post',
      data,
      responseType: 'blob',
    })
  }
}

export default new KpiAnalysisFormService()
