2021-06-24 14:43:52 +08:00
|
|
|
|
// eslint-disable-next-line no-unused-vars
|
2022-06-22 18:02:42 +08:00
|
|
|
|
import { DEFAULT_COLOR_CASE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
2021-05-07 19:20:47 +08:00
|
|
|
|
import { deepCopy } from '@/components/canvas/utils/utils'
|
2022-06-22 18:02:42 +08:00
|
|
|
|
import { COMMON_BACKGROUND_BASE } from '@/components/canvas/custom-component/component-list'
|
2022-08-01 17:53:58 +08:00
|
|
|
|
export const TAB_COMMON_STYLE = {
|
|
|
|
|
headFontColor: '#000000',
|
|
|
|
|
headFontActiveColor: '#000000',
|
|
|
|
|
headBorderColor: null,
|
|
|
|
|
headBorderActiveColor: null
|
|
|
|
|
}
|
2021-05-05 22:14:23 +08:00
|
|
|
|
|
2022-06-23 12:01:33 +08:00
|
|
|
|
export const FILTER_COMMON_STYLE = {
|
|
|
|
|
horizontal: 'left',
|
2022-06-23 18:34:44 +08:00
|
|
|
|
vertical: 'top',
|
2022-06-23 12:01:33 +08:00
|
|
|
|
color: '#000000',
|
|
|
|
|
brColor: '',
|
|
|
|
|
wordColor: '',
|
|
|
|
|
innerBgColor: ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const FILTER_COMMON_STYLE_DARK = {
|
|
|
|
|
horizontal: 'left',
|
2022-06-23 18:34:44 +08:00
|
|
|
|
vertical: 'top',
|
2022-06-23 12:01:33 +08:00
|
|
|
|
color: '#FFFFFF',
|
2022-06-23 18:34:44 +08:00
|
|
|
|
brColor: '#4E4B4B',
|
2022-08-01 17:53:58 +08:00
|
|
|
|
wordColor: '#FFFFFF',
|
2022-06-23 12:01:33 +08:00
|
|
|
|
innerBgColor: '#131E42'
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-05 22:14:23 +08:00
|
|
|
|
export const DEFAULT_PANEL_STYLE = {
|
2022-06-22 18:02:42 +08:00
|
|
|
|
themeColor: 'light',
|
2021-04-27 10:28:55 +08:00
|
|
|
|
color: '#ffffff',
|
2021-05-05 22:14:23 +08:00
|
|
|
|
imageUrl: null,
|
|
|
|
|
backgroundType: 'image',
|
2021-11-24 11:25:01 +08:00
|
|
|
|
gap: 'yes',
|
|
|
|
|
resultMode: 'all', // 视图结果显示模式 all 视图 custom 仪表板自定义
|
|
|
|
|
resultCount: 1000 // 视图结果显示条数
|
2021-05-05 22:14:23 +08:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-23 12:01:33 +08:00
|
|
|
|
export const PANEL_CHART_INFO = {
|
|
|
|
|
chartTitle: DEFAULT_TITLE_STYLE,
|
|
|
|
|
chartColor: DEFAULT_COLOR_CASE,
|
|
|
|
|
chartCommonStyle: COMMON_BACKGROUND_BASE,
|
2022-08-01 17:53:58 +08:00
|
|
|
|
filterStyle: FILTER_COMMON_STYLE,
|
|
|
|
|
tabStyle: TAB_COMMON_STYLE
|
2022-06-23 12:01:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-06-22 14:14:31 +08:00
|
|
|
|
export const CANVAS_STYLE = {
|
2021-06-01 13:40:26 +08:00
|
|
|
|
width: 1600,
|
|
|
|
|
height: 900,
|
2021-05-05 22:14:23 +08:00
|
|
|
|
scale: 100,
|
2021-06-01 13:40:26 +08:00
|
|
|
|
scaleWidth: 100,
|
|
|
|
|
scaleHeight: 100,
|
|
|
|
|
selfAdaption: true,
|
2021-06-10 17:15:30 +08:00
|
|
|
|
auxiliaryMatrix: true,
|
2021-05-05 22:14:23 +08:00
|
|
|
|
openCommonStyle: true,
|
2021-09-23 17:00:13 +08:00
|
|
|
|
panel: DEFAULT_PANEL_STYLE,
|
2022-04-18 18:37:02 +08:00
|
|
|
|
aidedDesign: {
|
|
|
|
|
showGrid: false,
|
|
|
|
|
matrixBase: 4 // 当前matrix的基数 (是pcMatrixCount的几倍)
|
|
|
|
|
}, // 辅助设计
|
2021-11-03 17:44:20 +08:00
|
|
|
|
refreshViewLoading: true, // 仪表板视图loading提示
|
|
|
|
|
refreshUnit: 'minute', // 仪表板刷新时间带外 默认 分钟
|
2022-06-22 18:02:42 +08:00
|
|
|
|
refreshTime: 5, // 仪表板刷新时间 默认5分钟
|
|
|
|
|
themeId: 'system_1', // 当前所选主题ID 默认系统主题1
|
|
|
|
|
chartInfo: PANEL_CHART_INFO
|
|
|
|
|
}
|
|
|
|
|
|
2022-04-15 13:14:24 +08:00
|
|
|
|
export const AIDED_DESIGN = {
|
|
|
|
|
showGrid: false,
|
|
|
|
|
matrixBase: 1 // 当前matrix的基数 (是pcMatrixCount的几倍)
|
2021-06-22 14:14:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const DEFAULT_COMMON_CANVAS_STYLE_STRING = {
|
2022-06-22 18:02:42 +08:00
|
|
|
|
...CANVAS_STYLE
|
2021-04-27 10:28:55 +08:00
|
|
|
|
}
|
2021-05-07 19:20:47 +08:00
|
|
|
|
|
|
|
|
|
export function chartTransStr2Object(targetIn, copy) {
|
|
|
|
|
const target = copy === 'Y' ? deepCopy(targetIn) : targetIn
|
|
|
|
|
return target
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-22 18:02:42 +08:00
|
|
|
|
export function chartTransObject2Str(targetIn, copy) {
|
2021-06-24 14:43:52 +08:00
|
|
|
|
// eslint-disable-next-line no-undef
|
2021-05-07 19:20:47 +08:00
|
|
|
|
const target = copy === 'Y' ? deepCopy(targetIn) : targetIn
|
|
|
|
|
return target
|
|
|
|
|
}
|