state.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // import _ from 'lodash'
  2. import cloneDeep from 'lodash/cloneDeep'
  3. export const defaultData = {
  4. // 大屏信息
  5. pageInfo: {
  6. className:
  7. 'com.gccloud.dataroom.core.module.manage.dto.DataRoomPageDTO',
  8. id: '',
  9. name: '测试bigScreen',
  10. code: '',
  11. icon: '',
  12. iconColor: '#007aff',
  13. orderNum: 0,
  14. remark: '',
  15. type: 'bigScreen',
  16. style: '',
  17. parentCode: '0',
  18. // 大屏页面的配置
  19. pageConfig: {
  20. w: 1920,
  21. h: 1080,
  22. bgColor: '#151a26', // 背景色
  23. bg: '', // 背景图
  24. opacity: 100,
  25. customTheme: 'auto',
  26. themeJson: {}, // 自定义主题配置
  27. // 缓存的数据集 { name: '', dataSetId: '' }
  28. cacheDataSets: [],
  29. refreshConfig: [],
  30. // 自适应模式 无(none) 、自动(auto)、宽度铺满(fitWidth)、高度铺满(fitHeight)和 双向铺满(cover) 5 种自适应模式
  31. fitMode: 'none'
  32. },
  33. // 图表的集合
  34. chartList: []
  35. },
  36. // 当前选中的组件code
  37. activeCode: null,
  38. // 当前鼠标悬浮的组件code
  39. hoverCode: null,
  40. // 页面初始化加载状态
  41. pageLoading: true,
  42. // 当前选中的组件的配置
  43. activeItemConfig: null,
  44. // 当前选中的组件的对齐线
  45. presetLine: [],
  46. // 强制更新键
  47. updateKey: null,
  48. // 是否显示网格
  49. hasGrid: false,
  50. // 多选的组件code数据
  51. activeCodes: [],
  52. // 复制到粘贴板上的组件编码
  53. copyChartCodes: [],
  54. // false 表示 shift 键没有被按下, true表示 shift 键被按下
  55. shiftKeyDown: false,
  56. // 缩放
  57. zoom: 100,
  58. // 自适应下的缩放比例
  59. fitZoom: 100,
  60. iframeDialog: false
  61. }
  62. export default () => ({
  63. // 存储的大屏timeline信息
  64. timelineStore: [],
  65. // 当前的timeline 的index
  66. currentTimeLine: 0,
  67. // 具体信息
  68. ...cloneDeep(defaultData)
  69. })