From f538183c8389011a19e033cfac80b84307c89175 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Tue, 4 Apr 2023 20:11:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE-=E6=B5=81=E5=90=91?= =?UTF-8?q?=E5=9C=B0=E5=9B=BE):=20=E4=BF=AE=E5=A4=8D=E6=96=B0=E5=BB=BA?= =?UTF-8?q?=E7=9A=84=E8=A7=86=E5=9B=BE=E9=A2=9C=E8=89=B2=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/utils/style.js | 4 +- frontend/src/components/canvas/utils/utils.js | 2 +- .../src/views/chart/chart/map/map_antv.js | 6 +- .../components/shapeAttr/MapSelectorAntV.vue | 304 ------------------ 4 files changed, 8 insertions(+), 308 deletions(-) delete mode 100644 frontend/src/views/chart/components/shapeAttr/MapSelectorAntV.vue diff --git a/frontend/src/components/canvas/utils/style.js b/frontend/src/components/canvas/utils/style.js index b7cc3dd182..84d3f7c5b4 100644 --- a/frontend/src/components/canvas/utils/style.js +++ b/frontend/src/components/canvas/utils/style.js @@ -1,6 +1,7 @@ import { cos, sin } from '@/components/canvas/utils/translate' import store from '@/store' import Vue from 'vue' +import { DEFAULT_COLOR_CASE, DEFAULT_COLOR_CASE_DARK } from '@/views/chart/chart/chart' export const LIGHT_THEME_COLOR_MAIN = '#000000' export const LIGHT_THEME_COLOR_SLAVE1 = '#CCCCCC' @@ -348,6 +349,7 @@ export function adaptCurTheme(customStyle, customAttr, chartType) { // 符号地图特殊处理 Vue.set(customStyle, 'baseMapStyle', { baseMapTheme: 'light' }) } + customAttr['color'] = { ...DEFAULT_COLOR_CASE, ...canvasStyle.chartInfo.chartColor } } else { recursionThemTransObj(THEME_STYLE_TRANS_MAIN, customStyle, DARK_THEME_COLOR_MAIN) recursionThemTransObj(THEME_STYLE_TRANS_SLAVE1, customStyle, DARK_THEME_COLOR_SLAVE1) @@ -359,8 +361,8 @@ export function adaptCurTheme(customStyle, customAttr, chartType) { recursionThemTransObj(THEME_ATTR_TRANS_MAIN, customAttr, DARK_THEME_COLOR_MAIN) recursionThemTransObj(THEME_ATTR_TRANS_SLAVE1_BACKGROUND, customAttr, DARK_THEME_COMPONENT_BACKGROUND_BACK) } + customAttr['color'] = { ...DEFAULT_COLOR_CASE_DARK, ...canvasStyle.chartInfo.chartColor } } - customAttr['color'] = { ...canvasStyle.chartInfo.chartColor } customStyle['text'] = { ...canvasStyle.chartInfo.chartTitle, title: customStyle['text']['title'], diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index 947fae5048..ff651c0dc8 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -85,7 +85,7 @@ export function panelDataPrepare(componentData, componentStyle, callback) { componentStyle.refreshViewEnable = (componentStyle.refreshViewEnable === undefined ? true : componentStyle.refreshViewEnable) componentStyle.aidedDesign = (componentStyle.aidedDesign || deepCopy(AIDED_DESIGN)) componentStyle.pdfPageLine = (componentStyle.pdfPageLine || deepCopy(PAGE_LINE_DESIGN)) - componentStyle.chartInfo = { ...deepCopy(PANEL_CHART_INFO), ...componentStyle.chartInfo } + componentStyle.chartInfo = (componentStyle.chartInfo || deepCopy(PANEL_CHART_INFO)) componentStyle.chartInfo.tabStyle = (componentStyle.chartInfo.tabStyle || deepCopy(TAB_COMMON_STYLE)) componentStyle.themeId = (componentStyle.themeId || 'NO_THEME') componentStyle.panel.themeColor = (componentStyle.panel.themeColor || 'light') diff --git a/frontend/src/views/chart/chart/map/map_antv.js b/frontend/src/views/chart/chart/map/map_antv.js index 087fbbedba..c597604fa9 100644 --- a/frontend/src/views/chart/chart/map/map_antv.js +++ b/frontend/src/views/chart/chart/map/map_antv.js @@ -26,8 +26,10 @@ export function baseFlowMapOption(chartDom, chartId, chart, action) { }) init = true } else { - chartDom.setPitch(size.mapPitch) - chartDom.setMapStyle(mapStyle) + if (chartDom.map) { + chartDom.setPitch(size.mapPitch) + chartDom.setMapStyle(mapStyle) + } } if (xAxis?.length < 2 || xAxisExt?.length < 2) { return chartDom diff --git a/frontend/src/views/chart/components/shapeAttr/MapSelectorAntV.vue b/frontend/src/views/chart/components/shapeAttr/MapSelectorAntV.vue deleted file mode 100644 index 42ff9f4ea5..0000000000 --- a/frontend/src/views/chart/components/shapeAttr/MapSelectorAntV.vue +++ /dev/null @@ -1,304 +0,0 @@ - - - - -