dict.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import http from '@/http/api.js'
  2. //
  3. export const dictionary = (params) => {
  4. return http.request({
  5. url: '/api/blade-system/dict/dictionary',
  6. method: 'GET',
  7. params
  8. })
  9. }
  10. export const parentList = (params) => {
  11. return http.request({
  12. url: '/api/blade-system/dict/parent-list',
  13. method: 'GET',
  14. params
  15. })
  16. }
  17. export const remove = (ids) => {
  18. return http.request({
  19. url: '/api/blade-system/dict/remove',
  20. method: 'post',
  21. params: {
  22. ids,
  23. }
  24. })
  25. }
  26. export const add = (row) => {
  27. return http.request({
  28. url: '/api/blade-system/dict/submit',
  29. method: 'post',
  30. data: row
  31. })
  32. }
  33. export const update = (row) => {
  34. return http.request({
  35. url: '/api/blade-system/dict/submit',
  36. method: 'post',
  37. data: row
  38. })
  39. }
  40. export const dictTree = (params) => {
  41. return http.request({
  42. url: '/api/blade-system/dict/tree?code=DICT',
  43. method: 'GET',
  44. params
  45. })
  46. }
  47. export const child = (params) => {
  48. return http.request({
  49. url: '/api/blade-system/dict/child-list',
  50. method: 'GET',
  51. params
  52. })
  53. }