basicComponentsConfig.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. * @description: 基础的bigScreen展示组件
  3. * @Date: 2023-03-13 10:04:59
  4. * @Author: xing.heng
  5. * @LastEditors: wujian
  6. * @LastEditTime: 2023-06-01 15:55:48
  7. */
  8. // import _ from 'lodash'
  9. import cloneDeep from 'lodash/cloneDeep'
  10. import getComponentConfig from 'data-room-ui/js/utils/getComponentConfig'
  11. // 批量引入配置文件
  12. import { setModules, dataModules } from 'data-room-ui/js/utils/configImport'
  13. const typeList = [
  14. 'texts',
  15. 'linkChart',
  16. 'horizontalLine', // 横线
  17. 'verticalLine', // 竖线
  18. 'picture',
  19. 'timeCountDown',
  20. 'currentTime',
  21. 'iframeChart',
  22. 'digitalFlop',
  23. 'tables',
  24. 'screenScrollRanking',
  25. 'screenScrollBoard',
  26. 'video',
  27. 'input',
  28. // 'button',
  29. 'marquee',
  30. 'chartTab',
  31. 'themeSwitcher',
  32. 'themeSelect',
  33. 'select',
  34. 'timePicker',
  35. 'dateTimePicker',
  36. 'indicatorCard',
  37. 'indexCard'
  38. ]
  39. let basicConfigList = []
  40. basicConfigList = typeList.map((type) => {
  41. return getComponentConfig(type)
  42. })
  43. basicConfigList = basicConfigList.map((item) => {
  44. return basicComponentsConfig(item)
  45. })
  46. // 生成基本配置
  47. export function basicComponentsConfig (item) {
  48. return {
  49. ...item,
  50. border: { type: '', titleHeight: 60, fontSize: 30, isTitle: true, padding: [0, 0, 0, 0] },
  51. option: cloneDeep(setModules[item.type]),
  52. ...cloneDeep(dataModules[item.type])
  53. }
  54. }
  55. export default basicConfigList