dept.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 queryOrgList(query) {
  12. return request({
  13. url: '/system/dept/orgList',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询部门列表
  19. export function queryDeptList(query) {
  20. return request({
  21. url: '/system/dept/deptList',
  22. method: 'get',
  23. params: query
  24. })
  25. }
  26. // 查询部门列表(排除节点)
  27. export function listDeptExcludeChild(deptId) {
  28. return request({
  29. url: '/system/dept/list/exclude/' + deptId,
  30. method: 'get'
  31. })
  32. }
  33. // 查询部门详细
  34. export function getDept(deptId) {
  35. return request({
  36. url: '/system/dept/' + deptId,
  37. method: 'get'
  38. })
  39. }
  40. // 新增部门
  41. export function addDept(data) {
  42. return request({
  43. url: '/system/dept',
  44. method: 'post',
  45. data: data
  46. })
  47. }
  48. // 修改部门
  49. export function updateDept(data) {
  50. return request({
  51. url: '/system/dept',
  52. method: 'put',
  53. data: data
  54. })
  55. }
  56. // 删除部门
  57. export function delDept(deptId) {
  58. return request({
  59. url: '/system/dept/' + deptId,
  60. method: 'delete'
  61. })
  62. }