state.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import _ from 'lodash'
  2. export const defaultData = {
  3. // 大屏信息
  4. pageInfo: {
  5. className:
  6. 'com.gccloud.bigscreen.core.module.manage.dto.BigScreenPageDTO',
  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. // 自适应模式 无(none) 、自动(auto)、宽度铺满(fitWidth)、高度铺满(fitHeight)和 双向铺满(cover) 5 种自适应模式
  29. fitMode: 'none'
  30. },
  31. // 图表的集合
  32. chartList: []
  33. },
  34. // 当前选中的组件code
  35. activeCode: null,
  36. // 当前鼠标悬浮的组件code
  37. hoverCode: null,
  38. // 页面初始化加载状态
  39. pageLoading: true,
  40. // 当前选中的组件的配置
  41. activeItemConfig: null,
  42. // 当前选中的组件的对齐线
  43. presetLine: [],
  44. // 强制更新键
  45. updateKey: null,
  46. // 是否显示网格
  47. hasGrid: false,
  48. // 多选的组件code数据
  49. activeCodes: [],
  50. // 复制到粘贴板上的组件编码
  51. copyChartCodes: [],
  52. // false 表示 shift 键没有被按下, true表示 shift 键被按下
  53. shiftKeyDown: false,
  54. // 缩放
  55. zoom: 100,
  56. // 自适应下的缩放比例
  57. fitZoom: 100,
  58. iframeDialog: false
  59. }
  60. export default () => ({
  61. // 存储的大屏timeline信息
  62. timelineStore: [],
  63. // 当前的timeline 的index
  64. currentTimeLine: 0,
  65. // 具体信息
  66. ..._.cloneDeep(defaultData)
  67. })