import request from '@/utils/request'

// 获取用户管理列表
export function getUserList(params) {
  return request({
    url: '/clientUser/list',
    method: 'get',
    params
  })
}

// 认领
export function receiveTask(id) {
  return request({
    url: '/clientUser/receive/' + id,
    method: 'post'
  })
}

// 分配项目经理
export function distributePM(id, managerId, flag) {
  return request({
    url: '/clientUser/distributePM/' + id + '/' + managerId + '/' + flag,
    method: 'post'
  })
}

// 批量分配项目经理
export function batchDistributePMs(data) {
  return request({
    url: '/clientUser/distributePMs',
    method: 'post',
    data
  })
}

// 分配风险经理
export function distributeRM(id, managerId) {
  return request({
    url: '/clientUser/distributeRM/' + id + '/' + managerId,
    method: 'post'
  })
}

// 批量分配风险经理
export function batchDistributeRMs(data) {
  return request({
    url: '/clientUser/distributeRMs',
    method: 'post',
    data
  })
}

// 获取项目经理待选列表
export function getPMList(params) {
  return request({
    url: '/clientUser/projectManagers',
    method: 'get',
    params
  })
}

// 获取项目经理待选列表
export function getRMList(params) {
  return request({
    url: '/clientUser/riskManagers',
    method: 'get',
    params
  })
}

// 重置密码
export function resetPassword(params) {
  return request({
    url: '/clientUser/resetPassword',
    method: 'get',
    params
  })
}
