604776ebdeedc41df7e05c0473f7563c7366c216.svn-base 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import fetch from '@/utils/fetch'
  2. export function addDashboard(data) {
  3. return fetch({
  4. url: '/dashboard/create',
  5. method: 'POST',
  6. data
  7. })
  8. }
  9. export function updateDashboard(data) {
  10. return fetch({
  11. url: '/dashboard/update',
  12. method: 'POST',
  13. data
  14. })
  15. }
  16. export function getdDashboardById(id) {
  17. return fetch({
  18. url: `/dashboard/${id}`
  19. })
  20. }
  21. export function deleteDashboard(data) {
  22. return fetch({
  23. url: `/dashboard/delete`,
  24. method: 'post',
  25. data
  26. })
  27. }
  28. export function dashboardList() {
  29. return fetch({
  30. url: `/dashboard/list`
  31. })
  32. }
  33. export function addChartToDB(data) {
  34. return fetch({
  35. url: '/chartboard/map',
  36. method: 'POST',
  37. data
  38. })
  39. }
  40. export function chartByDashboard(id) {
  41. return fetch({
  42. url: `/chartboardmap/chartbydashboard?dashboard_id=${id}`
  43. })
  44. }
  45. export function dbByChart(id) {
  46. return fetch({
  47. url: `/chartboardmap/boardbychart?chart_id=${id}`
  48. })
  49. }
  50. export function unMapChartDb(data) {
  51. return fetch({
  52. url: '/chartboard/unmap',
  53. method: 'POST',
  54. data
  55. })
  56. }
  57. export function dbOrder(data) {
  58. return fetch({
  59. url: '/dashboard/order',
  60. method: 'POST',
  61. data
  62. })
  63. }