user.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import http from '@/utils/request'
  2. export function login (data) {
  3. return http.post('/api/system/auth/login', data)
  4. }
  5. // 用户列表
  6. export function getUserList (data) {
  7. return http.post('/authentication/user/list', data)
  8. }
  9. // 用户详情
  10. export function getUserDetails (data) {
  11. return http.post('/authentication/user/detail', data)
  12. }
  13. // 保存用户
  14. export function saveUser (data) {
  15. return http.post('/authentication/user/save', data)
  16. }
  17. // 删除用户
  18. export function deleteUser (data) {
  19. return http.post('/authentication/user/del', data)
  20. }
  21. // 用户字典
  22. // export function getUserDiction (data) {
  23. // return http.post('/authentication/dictionaries/list/tenant', data)
  24. // }
  25. // 修改重置密码
  26. export function resetPassword (params) {
  27. return http.post('/authentication/user/resetpwd', params)
  28. }
  29. // 上传文件
  30. export function uploadFile (path, file) {
  31. const form = new FormData()
  32. form.append('path', path)
  33. form.append('file', file)
  34. return http.upload('/authentication/document/file/upload', form)
  35. }
  36. // 下载用户列表
  37. export function downloadUserTemplate () {
  38. return http.post('/authentication/user/gz/icbc/excel/dowan')
  39. }
  40. // 批量导入用户
  41. export function userExcelExport (params) {
  42. return http.upload('/authentication/user/gz/icbc/excel/export', params)
  43. }