userSystem.js 1.55 KB
Newer Older
wangdanlei's avatar
wangdanlei committed
1 2 3
import { post, get } from '../../utils/http'
// 查询所有用户列表
export function getAllUsers(params) {
wangdanlei's avatar
wangdanlei committed
4
  return post('/DxUserInfo/find/recursion', params)
wangdanlei's avatar
wangdanlei committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18
}
// 查找群组下的用户
export function getOrgUsers(params) {
  return post(`/UserGroupRef/getAllUsersByGroup/`, params)
}
// export function getOrgUsers(params) {
//   return get(`/User/org/${params}`)
// }
// 查询上下文角色下的用户
export function getContextUsers(params) {
  return get('/DxContextTeam/withContextIdAndTeamCode', params)
}
// 查询PBO变量下的用户
export function getPboVariableUser(params) {
wangdanlei's avatar
wangdanlei committed
19 20 21 22 23 24 25 26
  return get('/workflow/inst/pboVariable', params)
}
// 通过用户名或账号模糊匹配查询存在账号的用户
export function getUsersByAccount(params) {
  return get('/DxUserInfo/byAccount', params)
}
// 查询独立组织和所有子组织
export function getUserOrganizations(params) {
wangdanlei's avatar
wangdanlei committed
27
  return get('/DxOrgMemberLink/getUserOrganizations', params)
wangdanlei's avatar
wangdanlei committed
28 29
}
// 查询组织下的用户
wangdanlei's avatar
wangdanlei committed
30 31 32
// export function getUsersInOrgs(isIncludeSubOrg, params) {
//   return post(`/DxOrgMemberLink/getOrgMemberListByOrgIds?isIncludeSubOrg=${isIncludeSubOrg}`, params)
// }
wangdanlei's avatar
wangdanlei committed
33
export function getUsersInOrgs(isIncludeSubOrg, params) {
wangdanlei's avatar
wangdanlei committed
34 35 36 37 38
  return post(`/DxOrganization/getUserListByOrgIds?isIncludeSubOrg=${isIncludeSubOrg}`, params)
}
export function findInUserSameIndependentOrg(cascade, userAccount, accurate) {
  const userId = localStorage.getItem('userId')
  return post(`/DxUserInfo/findInUserSameIndependentOrg?userId=${userId}&cascade=${cascade}&userAccount=${userAccount}&accurate=${!!accurate}`)
wangdanlei's avatar
wangdanlei committed
39
}