basicComponentsConfig.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. 'numbers',
  16. 'linkChart',
  17. 'horizontalLine', // 横线
  18. 'verticalLine', // 竖线
  19. 'picture',
  20. 'timeCountDown',
  21. 'currentTime',
  22. 'iframeChart',
  23. 'digitalFlop',
  24. 'tables',
  25. 'screenScrollRanking',
  26. 'screenScrollBoard',
  27. 'video',
  28. 'input',
  29. // 'button',
  30. 'marquee',
  31. 'chartTab',
  32. // 'themeSwitcher',
  33. 'themeSelect',
  34. 'select',
  35. 'timePicker',
  36. 'dateTimePicker',
  37. 'indicatorCard',
  38. 'indicatorCard2',
  39. 'indexCard',
  40. 'indexCard2'
  41. ]
  42. let basicConfigList = []
  43. basicConfigList = typeList.map((type) => {
  44. return getComponentConfig(type)
  45. })
  46. basicConfigList = basicConfigList.map((item) => {
  47. return basicComponentsConfig(item)
  48. })
  49. // 生成基本配置
  50. export function basicComponentsConfig (item) {
  51. return {
  52. ...item,
  53. border: { type: '', titleHeight: 60, fontSize: 30, isTitle: true, padding: [0, 0, 0, 0] },
  54. option: cloneDeep(setModules[item.type]),
  55. ...cloneDeep(dataModules[item.type])
  56. }
  57. }
  58. export default basicConfigList