dept.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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/' + deptId,
  21. method: 'get'
  22. })
  23. }
  24. // 查询部门下拉树结构
  25. export function treeselect() {
  26. return request({
  27. url: '/system/dept/treeselect',
  28. method: 'get'
  29. })
  30. }
  31. // 根据角色ID查询部门树结构
  32. export function roleDeptTreeselect(roleId) {
  33. return request({
  34. url: '/system/dept/roleDeptTreeselect/' + roleId,
  35. method: 'get'
  36. })
  37. }
  38. // 新增部门
  39. export function addDept(data) {
  40. return request({
  41. url: '/system/dept',
  42. method: 'post',
  43. data: data
  44. })
  45. }
  46. // 修改部门
  47. export function updateDept(data) {
  48. return request({
  49. url: '/system/dept',
  50. method: 'put',
  51. data: data
  52. })
  53. }
  54. // 删除部门
  55. export function delDept(deptId) {
  56. return request({
  57. url: '/system/dept/' + deptId,
  58. method: 'delete'
  59. })
  60. }
  61. // 查询部门详细
  62. export function updatePadNum(data) {
  63. return request({
  64. url: '/system/dept/updatePadNum',
  65. method: 'get',
  66. params: data
  67. })
  68. }
  69. // 充值部门红包
  70. export function addRedMoney(data) {
  71. return request({
  72. url: '/system/dept/addRedMoney',
  73. method: 'get',
  74. params: data
  75. })
  76. }
  77. // 扣减部门红包
  78. export function deductRedMoney(data) {
  79. return request({
  80. url: '/system/dept/deductRedMoney',
  81. method: 'get',
  82. params: data
  83. })
  84. }
  85. // 充值部门流量
  86. export function addFlowNum(data) {
  87. return request({
  88. url: '/system/dept/addFlowNum',
  89. method: 'get',
  90. params: data
  91. })
  92. }
  93. // 扣减部门流量
  94. export function deductFlowNum(data) {
  95. return request({
  96. url: '/system/dept/deductFlowNum',
  97. method: 'get',
  98. params: data
  99. })
  100. }
  101. // 查询部门流量明细列表
  102. export function flowDetailList(query) {
  103. return request({
  104. url: '/system/dept/flowDetailList',
  105. method: 'get',
  106. params: query
  107. })
  108. }
  109. // 查询部门红包明细列表
  110. export function redMoneyDetailList(query) {
  111. return request({
  112. url: '/system/dept/redMoneyDetailList',
  113. method: 'get',
  114. params: query
  115. })
  116. }