basicComponentsConfig.js 1.4 KB

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