From 2a2b01a5e116174caf5c6d66f8c60fa68d281d25 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 17 May 2024 18:51:53 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BB=AA=E8=A1=A8=E6=9D=BF=E7=BA=A7=E5=88=AB=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=9B=BE=E6=A0=87=E9=A2=9C=E8=89=B2=E7=AD=89=E9=AB=98?= =?UTF-8?q?=E7=BA=A7=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/dashboard/DbCanvasAttr.vue | 15 +++ .../dashboard-style/OverallSetting.vue | 6 +- .../dashboard-style/SeniorStyleSetting.vue | 109 ++++++++++++++++++ core/core-frontend/src/utils/canvasUtils.ts | 9 +- .../chart/components/editor/util/chart.ts | 11 ++ .../editor/util/dataVisualiztion.ts | 8 +- .../views/chart/components/views/index.vue | 17 ++- 7 files changed, 165 insertions(+), 10 deletions(-) create mode 100644 core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue diff --git a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue index ed47a58dfe..99eb836e99 100644 --- a/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue +++ b/core/core-frontend/src/components/dashboard/DbCanvasAttr.vue @@ -16,6 +16,7 @@ import { deepCopy } from '@/utils/utils' import { useEmitt } from '@/hooks/web/useEmitt' import { merge } from 'lodash-es' import CanvasBackground from '@/components/visualization/component-background/CanvasBackground.vue' +import SeniorStyleSetting from '@/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue' const dvMainStore = dvMainStoreWithOut() const snapshotStore = snapshotStoreWithOut() const { canvasStyleData, componentData, canvasViewInfo } = storeToRefs(dvMainStore) @@ -145,6 +146,20 @@ const saveSelfSubject = () => { > + + + + + + diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue index 9b59e77347..253d01c4e5 100644 --- a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue +++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/OverallSetting.vue @@ -152,7 +152,9 @@ import { DEFAULT_TITLE_STYLE_DARK, DEFAULT_TITLE_STYLE_LIGHT, FILTER_COMMON_STYLE_DARK, - FILTER_COMMON_STYLE_LIGHT + FILTER_COMMON_STYLE_LIGHT, + SENIOR_STYLE_SETTING_DARK, + SENIOR_STYLE_SETTING_LIGHT } from '@/views/chart/components/editor/util/chart' import ColorButton from '@/components/assist-button/ColorButton.vue' import { computed } from 'vue' @@ -189,6 +191,7 @@ const themeChange = modifyName => { canvasStyleData.value.component.chartColor = deepCopy(DEFAULT_COLOR_CASE_LIGHT) canvasStyleData.value.component.filterStyle = deepCopy(FILTER_COMMON_STYLE_LIGHT) canvasStyleData.value.component.tabStyle = deepCopy(DEFAULT_TAB_COLOR_CASE_LIGHT) + canvasStyleData.value.component.seniorStyleSetting = deepCopy(SENIOR_STYLE_SETTING_LIGHT) } else { canvasStyleData.value.backgroundColor = DARK_THEME_DASHBOARD_BACKGROUND canvasStyleData.value.component.chartCommonStyle = deepCopy(COMMON_COMPONENT_BACKGROUND_DARK) @@ -196,6 +199,7 @@ const themeChange = modifyName => { canvasStyleData.value.component.chartColor = deepCopy(DEFAULT_COLOR_CASE_DARK) canvasStyleData.value.component.filterStyle = deepCopy(FILTER_COMMON_STYLE_DARK) canvasStyleData.value.component.tabStyle = deepCopy(DEFAULT_TAB_COLOR_CASE_DARK) + canvasStyleData.value.component.seniorStyleSetting = deepCopy(SENIOR_STYLE_SETTING_DARK) } adaptCurThemeCommonStyleAll() } diff --git a/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue new file mode 100644 index 0000000000..58c51044c6 --- /dev/null +++ b/core/core-frontend/src/components/dashboard/subject-setting/dashboard-style/SeniorStyleSetting.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/core/core-frontend/src/utils/canvasUtils.ts b/core/core-frontend/src/utils/canvasUtils.ts index e3caaff4ca..e106b35000 100644 --- a/core/core-frontend/src/utils/canvasUtils.ts +++ b/core/core-frontend/src/utils/canvasUtils.ts @@ -16,7 +16,10 @@ import { import { storeToRefs } from 'pinia' import { getPanelAllLinkageInfo } from '@/api/visualization/linkage' import { queryVisualizationJumpInfo } from '@/api/visualization/linkJump' -import { getViewConfig } from '@/views/chart/components/editor/util/chart' +import { + getViewConfig, + SENIOR_STYLE_SETTING_LIGHT +} from '@/views/chart/components/editor/util/chart' import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot' import { deepCopy } from '@/utils/utils' const dvMainStore = dvMainStoreWithOut() @@ -115,6 +118,10 @@ export function initCanvasDataPrepare(dvId, busiFlag, callBack) { const canvasDataResult = JSON.parse(canvasInfo.componentData) const canvasStyleResult = JSON.parse(canvasInfo.canvasStyleData) const canvasViewInfoPreview = canvasInfo.canvasViewInfo + //历史字段适配 + canvasStyleResult.component.seniorStyleSetting = + canvasStyleResult.component.seniorStyleSetting || deepCopy(SENIOR_STYLE_SETTING_LIGHT) + canvasDataResult.forEach(componentItem => { componentItem['canvasActive'] = false if (componentItem.component === 'Group') { diff --git a/core/core-frontend/src/views/chart/components/editor/util/chart.ts b/core/core-frontend/src/views/chart/components/editor/util/chart.ts index 081a75cfa3..5942b32b3a 100644 --- a/core/core-frontend/src/views/chart/components/editor/util/chart.ts +++ b/core/core-frontend/src/views/chart/components/editor/util/chart.ts @@ -150,6 +150,17 @@ export const TAB_COMMON_STYLE_DARK = { headBorderActiveColor: '#000000' } +export const SENIOR_STYLE_SETTING_LIGHT = { + linkageIconColor: '#a6a6a6', + drillLayerColor: '#a6a6a6', + pagerColor: '#a6a6a6' +} + +export const SENIOR_STYLE_SETTING_DARK = { + linkageIconColor: '#ffffff', + drillLayerColor: '#ffffff' +} + export const FILTER_COMMON_STYLE_BASE = { layout: 'horizontal', titleLayout: 'left' diff --git a/core/core-frontend/src/views/chart/components/editor/util/dataVisualiztion.ts b/core/core-frontend/src/views/chart/components/editor/util/dataVisualiztion.ts index 5e84d62259..442330cfe7 100644 --- a/core/core-frontend/src/views/chart/components/editor/util/dataVisualiztion.ts +++ b/core/core-frontend/src/views/chart/components/editor/util/dataVisualiztion.ts @@ -8,6 +8,8 @@ import { DEFAULT_TITLE_STYLE_LIGHT, FILTER_COMMON_STYLE_DARK, FILTER_COMMON_STYLE_LIGHT, + SENIOR_STYLE_SETTING_DARK, + SENIOR_STYLE_SETTING_LIGHT, TAB_COMMON_STYLE_DARK, TAB_COMMON_STYLE_LIGHT } from '@/views/chart/components/editor/util/chart' @@ -22,7 +24,8 @@ export const PANEL_CHART_INFO_LIGHT = { chartColor: DEFAULT_COLOR_CASE_LIGHT, chartCommonStyle: COMMON_COMPONENT_BACKGROUND_LIGHT, filterStyle: FILTER_COMMON_STYLE_LIGHT, - tabStyle: TAB_COMMON_STYLE_LIGHT + tabStyle: TAB_COMMON_STYLE_LIGHT, + seniorStyleSetting: SENIOR_STYLE_SETTING_LIGHT } export const PANEL_CHART_INFO_DARK = { @@ -30,7 +33,8 @@ export const PANEL_CHART_INFO_DARK = { chartColor: DEFAULT_COLOR_CASE_DARK, chartCommonStyle: COMMON_COMPONENT_BACKGROUND_DARK, filterStyle: FILTER_COMMON_STYLE_DARK, - tabStyle: TAB_COMMON_STYLE_DARK + tabStyle: TAB_COMMON_STYLE_DARK, + seniorStyleSetting: SENIOR_STYLE_SETTING_DARK } export const PANEL_CHART_INFO_SCREEN_DARK = { diff --git a/core/core-frontend/src/views/chart/components/views/index.vue b/core/core-frontend/src/views/chart/components/views/index.vue index f2f93c3c8c..d04305c9fb 100644 --- a/core/core-frontend/src/views/chart/components/views/index.vue +++ b/core/core-frontend/src/views/chart/components/views/index.vue @@ -596,6 +596,10 @@ const marginBottom = computed(() => { const iconSize = computed(() => { return 16 * scale.value + 'px' }) + +const titleIconStyle = computed(() => { + color: canvasStyleData.value.component.seniorStyleSetting.linkageIconColor +})
@@ -729,11 +734,11 @@ const iconSize = computed(() => { flex-wrap: nowrap; gap: 8px; - color: #646a73; - - &.icons-container__dark { - color: #a6a6a6; - } + //color: #646a73; + // + //&.icons-container__dark { + // color: #a6a6a6; + //} &.is-editing { gap: 6px;