topmenu.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import request from '@/router/axios';
  2. export const getList = (current, size, params) => {
  3. return request({
  4. url: '/api/blade-system/topmenu/list',
  5. method: 'get',
  6. params: {
  7. ...params,
  8. current,
  9. size,
  10. }
  11. })
  12. }
  13. export const getDetail = (id) => {
  14. return request({
  15. url: '/api/blade-system/topmenu/detail',
  16. method: 'get',
  17. params: {
  18. id
  19. }
  20. })
  21. }
  22. export const remove = (ids) => {
  23. return request({
  24. url: '/api/blade-system/topmenu/remove',
  25. method: 'post',
  26. params: {
  27. ids,
  28. }
  29. })
  30. }
  31. export const add = (row) => {
  32. return request({
  33. url: '/api/blade-system/topmenu/submit',
  34. method: 'post',
  35. data: row
  36. })
  37. }
  38. export const update = (row) => {
  39. return request({
  40. url: '/api/blade-system/topmenu/submit',
  41. method: 'post',
  42. data: row
  43. })
  44. }
  45. export const grantTree = () => {
  46. return request({
  47. url: '/api/blade-system/menu/grant-top-tree',
  48. method: 'get',
  49. })
  50. }
  51. export const getTopTree = (topMenuIds) => {
  52. return request({
  53. url: '/api/blade-system/menu/top-tree-keys',
  54. method: 'get',
  55. params: {
  56. topMenuIds,
  57. }
  58. })
  59. }
  60. export const grant = (topMenuIds, menuIds) => {
  61. return request({
  62. url: '/api/blade-system/topmenu/grant',
  63. method: 'post',
  64. params: {
  65. topMenuIds,
  66. menuIds,
  67. }
  68. })
  69. }