personnelManage.js 778 Bytes

import {
  api,
  getAction,
  deleteAction,
  putAction
} from './manageApi'


export const updateUserPassword = (data) => {
  return putAction(`${api.users}/update-password`, data)
}

// 根据条件获取用户
export const getUserList = (params) => {
  return getAction(api.users, params)
}



// 重置用户密码
// export const resetPassword = id => {
//   return putAction(`${api.users}/${id}/reset-password`)
// }

// 重置用户密码
export const resetPassword = (ids) => {
  return putAction(`${api.users}/reset-passwords?ids=${ids}`)
}

// 人员列表
export const getUserRoles = (id) => {
  return getAction(`${api.userRoles}/${id}/users`)
}
// 更新人员
export const updateUser = (id, data) => {
  return putAction(`${api.userRoles}/${id}/users`, data)
}