dept.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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 listTree(query) {
  12. return request({
  13. url: '/system/dept/listTree',
  14. method: 'get',
  15. params: query
  16. })
  17. }
  18. // 查询部门列表(排除节点)
  19. export function listDeptExcludeChild(deptId) {
  20. return request({
  21. url: '/system/dept/list/exclude/' + deptId,
  22. method: 'get'
  23. })
  24. }
  25. // 查询部门详细
  26. export function getDept(deptId) {
  27. return request({
  28. url: '/system/dept/' + deptId,
  29. method: 'get'
  30. })
  31. }
  32. // 查询当前登录人集团详细
  33. export function getGroupInfo() {
  34. return request({
  35. url: '/system/dept/getGroupInfo',
  36. method: 'get'
  37. })
  38. }
  39. // 查询部门下拉树结构
  40. export function treeselect() {
  41. return request({
  42. url: '/system/dept/treeselect',
  43. method: 'get'
  44. })
  45. }
  46. // 查询部门下拉树结构
  47. export function userdepttree() {
  48. return request({
  49. url: '/system/dept/userdepttree',
  50. method: 'get'
  51. })
  52. }
  53. // 根据角色ID查询部门树结构
  54. export function roleDeptTreeselect(roleId) {
  55. return request({
  56. url: '/system/dept/roleDeptTreeselect/' + roleId,
  57. method: 'get'
  58. })
  59. }
  60. // 新增部门
  61. export function addDept(data) {
  62. return request({
  63. url: '/system/dept',
  64. method: 'post',
  65. data: data
  66. })
  67. }
  68. // 修改部门
  69. export function updateDept(data) {
  70. return request({
  71. url: '/system/dept',
  72. method: 'put',
  73. data: data
  74. })
  75. }
  76. // 删除部门
  77. export function delDept(deptId) {
  78. return request({
  79. url: '/system/dept/' + deptId,
  80. method: 'delete'
  81. })
  82. }