import request from '@/utils/request'

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

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

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

export function caseDetail(id) {
  return request({
    url: 'case/detail',
    method: 'get',
    params: {
      id: id
    }
  })
}

// 获得处置部门列表
export function getDisposalDeptList() {
  return request({
    url: '/case/disposalDept',
    method: 'get'
  })
}

// 获得处置人员列表
export function getUserList(params) {
  return request({
    url: '/mgr/simplelist',
    method: 'post',
    params
  })
}
// 根据案卷类别获取案卷大类
export function getCaseType(eorc) {
  return request({
    url: '/case/type/list',
    method: 'get',
    params: {
      eorc: eorc
    }
  })
}

// 根据案卷大类获取案卷小类
export function getCaseDetailType(caseTypeId) {
  return request({
    url: '/case/typeDetail/list',
    method: 'get',
    params: {
      typeId: caseTypeId
    }
  })
}

// 新增案卷
export function addCase(data) {
  return request({
    url: 'case/add',
    method: 'post',
    data
  })
}
