Newer
Older
KaiFengPC / src / api / system / dept.js
@鲁yixuan 鲁yixuan on 19 Aug 922 bytes updata
  1. import request from '@/utils/request';
  2.  
  3. // 搜索部门列表
  4. export function listDept(query) {
  5. return request({
  6. url: '/system/dept/list',
  7. method: 'get',
  8. params: query,
  9. });
  10. }
  11.  
  12. // 搜索部门列表(排除节点)
  13. export function listDeptExcludeChild(deptId) {
  14. return request({
  15. url: '/system/dept/list/exclude/' + deptId,
  16. method: 'get',
  17. });
  18. }
  19.  
  20. // 搜索部门详细
  21. export function getDept(deptId) {
  22. return request({
  23. url: '/system/dept/' + deptId,
  24. method: 'get',
  25. });
  26. }
  27.  
  28. // 新增部门
  29. export function addDept(data) {
  30. return request({
  31. url: '/system/dept',
  32. method: 'post',
  33. data: data,
  34. });
  35. }
  36.  
  37. // 修改部门
  38. export function updateDept(data) {
  39. return request({
  40. url: '/system/dept',
  41. method: 'put',
  42. data: data,
  43. });
  44. }
  45.  
  46. // 删除部门
  47. export function delDept(deptId) {
  48. return request({
  49. url: '/system/dept/' + deptId,
  50. method: 'delete',
  51. });
  52. }