user.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. import request from '@/router/axios';
  2. export const getList = (current, size, params) => {
  3. return request({
  4. url: '/api/blade-user/page',
  5. method: 'get',
  6. params: {
  7. ...params,
  8. current,
  9. size,
  10. }
  11. })
  12. }
  13. export const remove = (ids) => {
  14. return request({
  15. url: '/api/blade-user/remove',
  16. method: 'post',
  17. params: {
  18. ids,
  19. }
  20. })
  21. }
  22. export const add = (row) => {
  23. return request({
  24. url: '/api/blade-user/submit2',
  25. method: 'post',
  26. data: row
  27. })
  28. }
  29. export const update = (row) => {
  30. return request({
  31. url: '/api/blade-user/update2',
  32. method: 'post',
  33. data: row
  34. })
  35. }
  36. export const updatePlatform = (userId, userType, userExt) => {
  37. return request({
  38. url: '/api/blade-user/update-platform',
  39. method: 'post',
  40. params: {
  41. userId,
  42. userType,
  43. userExt,
  44. }
  45. })
  46. }
  47. export const getUser = (id) => {
  48. return request({
  49. url: '/api/blade-user/detail',
  50. method: 'get',
  51. params: {
  52. id,
  53. }
  54. })
  55. }
  56. export const getUserPlatform = (id) => {
  57. return request({
  58. url: '/api/blade-user/platform-detail',
  59. method: 'get',
  60. params: {
  61. id,
  62. }
  63. })
  64. }
  65. export const getUserInfo = () => {
  66. return request({
  67. url: '/api/blade-user/info',
  68. method: 'get',
  69. })
  70. }
  71. export const resetPassword = (userIds) => {
  72. return request({
  73. url: '/api/blade-user/reset-password',
  74. method: 'post',
  75. params: {
  76. userIds,
  77. }
  78. })
  79. }
  80. export const updatePassword = (oldPassword, newPassword, newPassword1, plaintextPassword) => {
  81. return request({
  82. url: '/api/blade-user/update-password',
  83. method: 'post',
  84. params: {
  85. oldPassword,
  86. newPassword,
  87. newPassword1,
  88. plaintextPassword,
  89. }
  90. })
  91. }
  92. export const updateInfo = (row) => {
  93. return request({
  94. url: '/api/blade-user/update-info',
  95. method: 'post',
  96. data: row
  97. })
  98. }
  99. export const grant = (userIds, roleIds) => {
  100. return request({
  101. url: '/api/blade-user/grant',
  102. method: 'post',
  103. params: {
  104. userIds,
  105. roleIds,
  106. }
  107. })
  108. }
  109. export const unlock = (userIds) => {
  110. return request({
  111. url: '/api/blade-user/unlock',
  112. method: 'post',
  113. params: {
  114. userIds,
  115. }
  116. })
  117. }
  118. export const lock = (userIds) => {
  119. return request({
  120. url: '/api/blade-user/lock',
  121. method: 'post',
  122. params: {
  123. userIds,
  124. }
  125. })
  126. }
  127. export const getUserList = (params) => {
  128. return request({
  129. url: '/api/blade-user/user-list',
  130. method: 'get',
  131. params: {
  132. ...params,
  133. }
  134. })
  135. }
  136. //删除参建项目整个项目
  137. export const removeUserProjectInfoAndRoleById = (params) => {
  138. return request({
  139. url: '/api/blade-manager/contractInfo/remove-userProjectInfo-role-byId',
  140. method: 'post',
  141. params
  142. })
  143. }
  144. //获取用户
  145. export const getListBySearch = (params) => {
  146. return request({
  147. url: '/api/blade-user/search/user',
  148. method: 'get',
  149. params
  150. })
  151. }