dept.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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/get?id=' + deptId,
  21. method: 'get'
  22. })
  23. }
  24. // 获取部门精简信息列表
  25. export function listSimpleDepts() {
  26. return request({
  27. url: '/system/dept/list-all-simple',
  28. method: 'get'
  29. })
  30. }
  31. // 新增部门
  32. export function addDept(data) {
  33. return request({
  34. url: '/system/dept/create',
  35. method: 'post',
  36. data: data
  37. })
  38. }
  39. // 修改部门
  40. export function updateDept(data) {
  41. return request({
  42. url: '/system/dept/update',
  43. method: 'put',
  44. data: data
  45. })
  46. }
  47. // 删除部门
  48. export function delDept(id) {
  49. return request({
  50. url: '/system/dept/delete?id=' + id,
  51. method: 'delete'
  52. })
  53. }