// 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,
    })
  }

  // 删除明细详情
  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',
    })
  }
}
export default new AuditRiskbraryService()
