uc.js 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import request from '@/utils/request'
  2. const uc = window.context.uc
  3. // 用户选择器 获取用户列表
  4. export function getUserSelectorList(data) {
  5. return request({
  6. url: `${context.uc}/api/user/v1/users/queryByType`,
  7. method: 'post',
  8. data,
  9. })
  10. }
  11. // 用户选择器
  12. export function getByParentAndDem(data) {
  13. return request({
  14. url: `${context.uc}/api/org/v1/orgs/getByParentAndDem`,
  15. method: 'post',
  16. data,
  17. })
  18. }
  19. // 用户选择器 获取权限
  20. export function getUserSelectorDem() {
  21. return request({
  22. url: `${context.uc}/api/demension/v1/dems/getAll`,
  23. method: 'get',
  24. })
  25. }
  26. // 组织选择器 获取列表
  27. export function getOrgSelectorList(data) {
  28. return request({
  29. url: `${context.uc}/api/org/v1/orgs/getOrgPage`,
  30. method: 'post',
  31. data,
  32. })
  33. }
  34. // 角色选择器 获取列表
  35. export function getRoleSelectorList(data) {
  36. return request({
  37. url: `${context.uc}/api/role/v1/roles/getRolePage`,
  38. method: 'post',
  39. data,
  40. })
  41. }
  42. // 职务选择器 获取列表
  43. export function getJobSelectorList(data) {
  44. return request({
  45. url: `${context.uc}/api/job/v1/jobs/getJobPage`,
  46. method: 'post',
  47. data,
  48. })
  49. }
  50. // 岗位选择器 获取列表
  51. export function getOrgPostSelectorList(data) {
  52. return request({
  53. url: `${context.uc}/api/org/v1/orgPosts/getOrgPostPage`,
  54. method: 'post',
  55. data,
  56. })
  57. }
  58. // 维度选择器 获取列表
  59. export function getDemSelectorList(data) {
  60. return request({
  61. url: `${context.uc}/api/demension/v1/dems/getDemListAll`,
  62. method: 'post',
  63. data,
  64. })
  65. }
  66. //获取租户信息
  67. export function getTenantInfo(tenant, cb) {
  68. return request({
  69. url: `${uc}/uc/tenantManage/v1/getTenantByCode?code=${tenant}`,
  70. method: 'get',
  71. })
  72. }
  73. // 校验当前登录用户的电子签章密码
  74. export function getCurrentSeal(password, secretFree) {
  75. return request({
  76. url: `${uc}/uc/electronicSeal/v1/getElectronicSeal?password=${password}&secretFree=${secretFree}`,
  77. method: 'get',
  78. })
  79. }
  80. // 获取签章信息
  81. export function getSealByCurrentUserId() {
  82. return request({
  83. url: `${uc}/uc/electronicSeal/v1/getSealByCurrentUserId`,
  84. method: 'get',
  85. })
  86. }
  87. export function getDefaultPwdStrategy() {
  88. return request.get(`${uc}/api/pwdStrategy/v1/getDefault`)
  89. }
  90. export function resetPassword(params) {
  91. return request({
  92. url: `${uc}/api/user/v1/user/modifiUserPsd`,
  93. method: 'post',
  94. data: params,
  95. })
  96. }
  97. //获取系统中所有用户
  98. export function getAllUserList() {
  99. return request({
  100. url: `${uc}/api/user/v2/users/getAllUser`,
  101. method: 'get',
  102. })
  103. }
  104. // 获取企业单位用户
  105. export function getOrgUserQuery(params) {
  106. return request({
  107. url: `${uc}/api/user/v1/users/getOrgUserQuery`,
  108. method: 'post',
  109. data: params,
  110. })
  111. }