dept.js 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import request from '@/utils/request'
  2. // 查询部门列表
  3. export function listDept(query) {
  4. return request({
  5. url: '/system/dept/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询部门列表(排除节点)
  11. export function listDeptExcludeChild(deptId) {
  12. return request({
  13. url: '/system/dept/exclude/list',
  14. method: 'get',
  15. params:{ deptId : deptId}
  16. })
  17. }
  18. // 查询部门详细
  19. export function getDept(deptId) {
  20. return request({
  21. url: '/system/dept/info',
  22. method: 'get',
  23. params:{deptId:deptId}
  24. })
  25. }
  26. // 新增部门
  27. export function addDept(data) {
  28. return request({
  29. url: '/system/dept/add',
  30. method: 'post',
  31. data: data
  32. })
  33. }
  34. // 修改部门
  35. export function updateDept(data) {
  36. return request({
  37. url: '/system/dept/edit',
  38. method: 'post',
  39. data: data
  40. })
  41. }
  42. // 删除部门
  43. export function delDept(deptId) {
  44. return request({
  45. url: '/system/dept/delete/' + deptId,
  46. method: 'delete'
  47. })
  48. }