7cb7d56529002c80bfbbd8b8b86de5c992353016.svn-base 862 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import fetch from '@/utils/fetch'
  2. export function addSource(data) {
  3. return fetch({
  4. url: 'source/create',
  5. method: 'POST',
  6. data
  7. })
  8. }
  9. export function updateSource(data) {
  10. return fetch({
  11. url: 'source/update',
  12. method: 'POST',
  13. data
  14. })
  15. }
  16. export function deleteSource(data) {
  17. return fetch({
  18. url: 'source/delete',
  19. method: 'POST',
  20. data
  21. })
  22. }
  23. export function sourceList() {
  24. return fetch({
  25. url: 'source/list',
  26. method: 'get'
  27. })
  28. }
  29. export function tablesByBase(sourceId) {
  30. return fetch({
  31. url: `source/tables/${sourceId}`,
  32. method: 'get'
  33. })
  34. }
  35. export function saveTableConfig(data) {
  36. return fetch({
  37. url: 'source/tables/save',
  38. method: 'POST',
  39. data
  40. })
  41. }
  42. export function linkedTablesByBase(sourceId) {
  43. return fetch({
  44. url: `source/tables/${sourceId}/linked`,
  45. method: 'get'
  46. })
  47. }