dept.js 959 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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/list/exclude/' + deptId,
  14. method: 'get'
  15. })
  16. }
  17. // 查询部门详细
  18. export function getDept(deptId) {
  19. return request({
  20. url: '/system/dept/' + deptId,
  21. method: 'get'
  22. })
  23. }
  24. // 新增部门
  25. export function addDept(data) {
  26. return request({
  27. url: '/system/dept',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. // 修改部门
  33. export function updateDept(data) {
  34. return request({
  35. url: '/system/dept',
  36. method: 'put',
  37. data: data
  38. })
  39. }
  40. // 删除部门
  41. export function delDept(deptId) {
  42. return request({
  43. url: '/system/dept/' + deptId,
  44. method: 'delete'
  45. })
  46. }