dict.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import request from '@/router/axios';
  2. export const getBusinessDict = (params) => {
  3. return request({
  4. url: '/api/blade-system/dict-biz/treeByTenantId',
  5. method: 'get',
  6. params: {
  7. ...params,
  8. }
  9. })
  10. }
  11. export const getList = (current, size, params) => {
  12. return request({
  13. url: '/api/blade-system/dict/list',
  14. method: 'get',
  15. params: {
  16. ...params,
  17. current,
  18. size,
  19. }
  20. })
  21. }
  22. export const getParentList = (current, size, params) => {
  23. return request({
  24. url: '/api/blade-system/dict/parent-list',
  25. method: 'get',
  26. params: {
  27. ...params,
  28. current,
  29. size,
  30. }
  31. })
  32. }
  33. export const getChildList = (current, size, parentId, params) => {
  34. return request({
  35. url: '/api/blade-system/dict/child-list',
  36. method: 'get',
  37. params: {
  38. ...params,
  39. current,
  40. size,
  41. parentId: parentId,
  42. }
  43. })
  44. }
  45. export const remove = (ids) => {
  46. return request({
  47. url: '/api/blade-system/dict/remove',
  48. method: 'post',
  49. params: {
  50. ids,
  51. }
  52. })
  53. }
  54. export const add = (row) => {
  55. return request({
  56. url: '/api/blade-system/dict/submit',
  57. method: 'post',
  58. data: row
  59. })
  60. }
  61. export const update = (row) => {
  62. return request({
  63. url: '/api/blade-system/dict/submit',
  64. method: 'post',
  65. data: row
  66. })
  67. }
  68. export const getDict = (id) => {
  69. return request({
  70. url: '/api/blade-system/dict/detail',
  71. method: 'get',
  72. params: {
  73. id,
  74. }
  75. })
  76. }
  77. export const getDictTree = () => {
  78. return request({
  79. url: '/api/blade-system/dict/tree?code=DICT',
  80. method: 'get'
  81. })
  82. }
  83. export const getDictionary = (params) => {
  84. return request({
  85. url: '/api/blade-system/dict/dictionary',
  86. method: 'get',
  87. params,
  88. })
  89. }