state.js 1.7 KB

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