Rap 原分销系统代码Web
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
727B

  1. import request from '@/utils/request'
  2. export function getDepts(params) {
  3. return request({
  4. url: 'api/dept',
  5. method: 'get',
  6. params
  7. })
  8. }
  9. export function getDeptSuperior(ids) {
  10. const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
  11. return request({
  12. url: 'api/dept/superior',
  13. method: 'post',
  14. data
  15. })
  16. }
  17. export function add(data) {
  18. return request({
  19. url: 'api/dept',
  20. method: 'post',
  21. data
  22. })
  23. }
  24. export function del(ids) {
  25. return request({
  26. url: 'api/dept',
  27. method: 'delete',
  28. data: ids
  29. })
  30. }
  31. export function edit(data) {
  32. return request({
  33. url: 'api/dept',
  34. method: 'put',
  35. data
  36. })
  37. }
  38. export default { add, edit, del, getDepts, getDeptSuperior }