// eslint-disable-next-line filenames/match-regex
import axios from '@/common/services/axios-instance'
class AuditRiskbraryService {
  // 判定问题
  batchDecide(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/batchDecide',
      data: data,
    })
  }

  // 提交整改 / 整改要求 / 查看
  saveIamQuestionReform(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/saveIamQuestionReform',
      data: data,
    })
  }

  // 提交整改 / 整改要求 / 查看
  startProcessPages(data) {
    return axios({
      method: 'post',
      url: 'api/framework/v1/task-form-process/start-process-pages',
      data: data,
    })
  }

  // 提交整改 / 流程
  startDispatch(data) {
    return axios({
      method: 'post',
      url: 'api/framework/v1/process-drive/process-instance/start_dispatch',
      data: data,
    })
  }

  getDetail(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/iamQuestionReformQueryList',
      data: data,
    })
  }

  // 获取明细详情
  getDetailInfo(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/detail',
      data: data,
    })
  }

  // 审核详情 questionExamineDetail
  getQuestionExamineDetail(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionExamineDetail',
      data,
    })
  }

  // 删除明细详情
  deleteDetailInfo(data) {
    return axios({
      method: 'delete',
      url: 'api/xcoa-mobile/v1/iam-page/iamQuestionReform?ids=' + data,
    })
  }

  // 汇总审核/questionSummaryExamine  问题汇总审核
  questionSummaryExamine(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionSummaryExamine',
      data,
    })
  }

  // 汇总删除 /questionSummaryDelete  问题汇总批量删除
  questionSummaryDelete(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionSummaryDelete',
      data,
    })
  }

  // 明细审核
  questionDetailExamine(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionDetailExamine',
      data,
    })
  }

  // 明细删除
  // .post('api/xcoa-mobile/v1/iamquestionreform/questionDetailDelete', params)
  questionDetailDelete(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionDetailDelete',
      data,
    })
  }

  // 导出明细数据
  exportQuestionDetail(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/detailExport',
      data,
      responseType: 'blob',
    })
  }

  // 审核明细导出
  // examineDetailExport
  examineDetailExport(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/examineDetailExport',
      data,
      responseType: 'blob',
    })
  }

  // 获取用户基础信息
  // http://localhost:8080/-app-/api/framework/v1/user-manager/users/17191071880
  getUserInfo(data) {
    return axios({
      method: 'get',
      url: 'api/framework/v1/user-manager/users/' + data,
    })
  }

  // 汇总审核导出
  // /iamquestionreform/examineSummaryExport  汇总审核导出
  examineSummaryExport(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/examineSummaryExport',
      data,
      responseType: 'blob',
    })
  }

  // 用户是否归属集团，并返回二级单位 /iamdatacategory/getGroups    get
  getGroups() {
    return axios({
      method: 'get',
      url: 'api/xcoa-mobile/v1/iamdatacategory/getGroups',
    })
  }

  // 风险库看板
  // /iamquestionreform/reformBoard  看板第一个接口
  reformBoard(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/reformBoard',
      data,
    })
  }

  // /reformRateStatistics 整改率统计
  reformRateStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/reformRateStatistics',
      data,
    })
  }

  /// questionNatureStatistics 问题性质统计
  questionNatureStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionNatureStatistics',
      data,
    })
  }

  // /modelDomainStatistics 模型领域统计
  modelDomainStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/modelDomainStatistics',
      data,
    })
  }
  // 汇总导出正常版本 领导版本加New

  // http://localhost:8080/-app-/api/xcoa-mobile/v1/iamquestionreform/export
  export(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/export',
      data,
      responseType: 'blob',
    })
  }

  exportNew(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/exportNew',
      data,
      responseType: 'blob',
    })
  }

  // 看板导出
  exportBoardLine(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/reformBoardExport',
      data,
      responseType: 'blob',
    })
  }

  // 问题性质
  exportBoardBar(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionNatureExport',
      data,
      responseType: 'blob',
    })
  }

  // 模型领域
  exportBoardBarModel(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/modelDomainExport',
      data,
      responseType: 'blob',
    })
  }

  // /iamquestionreform/countStatistics   推送数量统计
  getCountStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/countStatistics',
      data,
    })
  }

  // /iamquestionreform/statusStatistics 状态统计
  getStatusStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/statusStatistics',
      data,
    })
  }

  // /domainDistribution  领域分布
  getDomainDistribution(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/domainDistribution',
      data,
    })
  }

  // /phaseDistribution 阶段分布
  getPhaseDistribution(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/phaseDistribution',
      data,
    })
  }

  // /questionNumRank 问题数量排名
  getQuestionNumRank(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionNumRank',
      data,
    })
  }

  // /reformRateRank   整改率排名
  getReformRateRank(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/reformRateRank',
      data,
    })
  }

  // 下载
  downLoadTwoTable(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform//rankExport',
      data,
      responseType: 'blob',
    })
  }

  // 获取项目
  // api/framework/v1/dict-manager/getvalues
  getProject(data) {
    return axios({
      method: 'post',
      url: 'api/framework/v1/dict-manager/getvalues?dictCode=project',
      data: data,
    })
  }

  // /iamauditproject/countStatistics 审计开展数量统计
  countStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamauditproject/countStatistics',
      data,
    })
  }

  /// questionStatistics  审计问题统计
  questionStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamauditproject/questionStatistics',
      data,
    })
  }

  // 整改率统计，按照单位
  // /iamquestionreform/reformRateExport 整改率导出
  reformRateExport(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/reformRateExport',
      data,
      responseType: 'blob',
    })
  }

  // /iamquestionreform/questionSummaryQueryExamine  查询下发 参数跟查询一样
  questionSummaryQueryExamine(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/questionSummaryQueryExamine',
      data,
    })
  }

  // /iamquestionreform/resPersonStatistics 责任人分析
  // 查询责任人数据
  getResPersonStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/resPersonStatistics',
      data,
    })
  }

  // iamquestionreform/resPersonExport   整改看板责任人导出
  resPersonExport(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/resPersonExport',
      data,
      responseType: 'blob',
    })
  }

  //   /iamauditproject/reformStatistics  整改情况统计
  getReformStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamauditproject/reformStatistics',
      data,
    })
  }

  // /iamauditproject/riskStatistics 风险情况统计
  getRiskStatistics(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamauditproject/riskStatistics',
      data,
    })
  }

  // iamauditproject/questionExport 审计发现问题导出
  // iamauditproject/riskExport        风险分布导出
  exportquestionExport(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamauditproject/questionExport',
      data,
      responseType: 'blob',
    })
  }

  exportriskExport(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamauditproject/riskExport',
      data,
      responseType: 'blob',
    })
  }

  // 获取模型数据
  // framework/v1/page/wp/audit/maintain/iamModelMaintain
  getIamModelMaintain(data) {
    return axios({
      method: 'post',
      url: 'api/framework/v1/page/wp/audit/maintain/iamModelMaintain',
      data,
    })
  }

  // iamquestionreform/updateViewFlag 关注类修改查看状态  POST Long instId
  setUpdateViewFlag(instId) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/updateViewFlag?instId=' + instId,
    })
  }

  // iamquestionreform/restoreQuestion 恢复已删除问题
  restoreQuestion(data) {
    return axios({
      method: 'post',
      url: 'api/xcoa-mobile/v1/iamquestionreform/restoreQuestion',
      data: data,
    })
  }
}
export default new AuditRiskbraryService()
