bigScreenApi.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import Vue from 'vue'
  2. // 大屏详情
  3. export function getScreenInfo (code) {
  4. return Vue.prototype.$dataRoomAxios.get(`/bigScreen/design/info/code/${code}`)
  5. }
  6. // 保存更新大屏
  7. export function saveScreen(data) {
  8. data.chartList.forEach((item) => {
  9. if (item.type == 'customComponent') {
  10. item.setting=item.setting.map((x) => {
  11. const {field,value,...obj}=x
  12. return {field,value}
  13. })
  14. }
  15. })
  16. return Vue.prototype.$dataRoomAxios.post('/bigScreen/design/update', data)
  17. }
  18. // 根据数据集获取数据集详情
  19. export function getDataSetDetails (id) {
  20. return Vue.prototype.$dataRoomAxios.get('/dataset/datasetInfo/' + id)
  21. }
  22. // 根据数据集id获取数据
  23. export function getDataByDataSetId (dataSetId) {
  24. return Vue.prototype.$dataRoomAxios.post('/dataset/execute', {
  25. dataSetId,
  26. params: []
  27. })
  28. }
  29. // 得到图表详情
  30. export function getChatInfo (params) {
  31. return Vue.prototype.$dataRoomAxios.post('/bigScreen/chart/data/list', params)
  32. }
  33. // 得到图表的更新数据
  34. export function getUpdateChartInfo (params) {
  35. return Vue.prototype.$dataRoomAxios.post('/bigScreen/chart/data/chart', params)
  36. }
  37. // 业务组件列表
  38. export function getBizComponentPage (params) {
  39. return Vue.prototype.$dataRoomAxios.get('/bigScreen/bizComponent/page', params)
  40. }
  41. // 根据code获得业务组件的信息
  42. export function getBizComponentInfo (code) {
  43. return Vue.prototype.$dataRoomAxios.get(`/bigScreen/bizComponent/info/${code}`)
  44. }
  45. // 更新业务组件
  46. export function updateBizComponent (params) {
  47. return Vue.prototype.$dataRoomAxios.post('/bigScreen/bizComponent/update', params)
  48. }