import request from '@/utils/request'

export function departmentAssess(params) {
  return request({
    url: '/departmentAssess/departmentAccess/',
    method: 'get',
    params
  })
}

export function deptAssessCaseList(params) {
  return request({
    url: '/departmentAssess/caseDetail/',
    method: 'get',
    params
  })
}

export function exportAssessDept(params) {
  return request({
    url: '/departmentAssess/listExp',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键，一定要加上 responseType 值为 blob
  })
}

export function getRuleList(params) {
  return request({
    url: '/departmentAssess/ruleList',
    method: 'get',
    params
  })
}

export function updateRule(params) {
  return request({
    url: '/departmentAssess/updateRule',
    method: 'get',
    params
  })
}

// 高发问题列表查询
export function highEventList(params) {
  return request({
    url: '/departmentAssess/highEventList',
    method: 'get',
    params
  })
}

// 高发问题按大类统计
export function highCaseEventList(params) {
  return request({
    url: '/departmentAssess/highCaseEventList',
    method: 'get',
    params
  })
}

// 高发问题文件导出
export function exportAssessHighEvent(params) {
  return request({
    url: '/departmentAssess/highEventListEXP',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键，一定要加上 responseType 值为 blob
  })
}

// 案件来源列表查询
export function sourceList(params) {
  return request({
    url: '/departmentAssess/sourceList',
    method: 'get',
    params
  })
}

// 案件来源文件导出
export function exportAssessSource(params) {
  return request({
    url: '/departmentAssess/sourceListEXP',
    method: 'get',
    timeout: 120000,
    params,
    responseType: 'blob' // 这一步也很关键，一定要加上 responseType 值为 blob
  })
}
