dept.js 958 B

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