From 6d64044bbe23deafc7ec80cb5add1dd4e85ef559 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 29 Jul 2022 18:28:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A7=86=E5=9B=BE):=20=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E5=9C=B0=E5=90=8D=E6=98=A0=E5=B0=84=E9=85=8D=E7=BD=AE=E4=BB=A5?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=B8=96=E7=95=8C=E5=9C=B0=E5=9B=BE=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E4=B8=8B=E9=92=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/chart/map/map.js | 5 + .../views/chart/components/ChartComponent.vue | 1 - .../chart/components/senior/MapMapping.vue | 207 ++++++++++++++++++ frontend/src/views/chart/view/ChartEdit.vue | 29 ++- 4 files changed, 239 insertions(+), 3 deletions(-) create mode 100644 frontend/src/views/chart/components/senior/MapMapping.vue diff --git a/frontend/src/views/chart/chart/map/map.js b/frontend/src/views/chart/chart/map/map.js index 278b44f62e..9af23ae8c0 100644 --- a/frontend/src/views/chart/chart/map/map.js +++ b/frontend/src/views/chart/chart/map/map.js @@ -88,6 +88,11 @@ export function baseMapOption(chart_option, chart, themeStyle) { y.name = chart.data.x[i] chart_option.series[0].data.push(y) } + if (chart.senior) { + const senior = JSON.parse(chart.senior) + + senior && senior.mapMapping && (chart_option.series[0].nameMap = senior.mapMapping) + } } } componentStyle(chart_option, chart) diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index ad91b3de3a..c1ee8f2edd 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -81,7 +81,6 @@ import { geoJson } from '@/api/map/map' import ViewTrackBar from '@/components/canvas/components/Editor/ViewTrackBar' -import eventBus from '@/components/canvas/utils/eventBus' export default { name: 'ChartComponent', diff --git a/frontend/src/views/chart/components/senior/MapMapping.vue b/frontend/src/views/chart/components/senior/MapMapping.vue new file mode 100644 index 0000000000..6623d0156b --- /dev/null +++ b/frontend/src/views/chart/components/senior/MapMapping.vue @@ -0,0 +1,207 @@ + + + + + diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 82b01cae84..52403bf5ab 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -703,7 +703,7 @@
@@ -761,6 +761,25 @@ + + + + {{ $t('chart.senior_cfg') }} + + + + + + + + + +
{{ $t('chart.chart_no_senior') }} @@ -1084,6 +1103,7 @@ import PluginCom from '@/views/system/plugin/PluginCom' import { mapState } from 'vuex' import FunctionCfg from '@/views/chart/components/senior/FunctionCfg' +import MapMapping from '@/views/chart/components/senior/MapMapping' import AssistLine from '@/views/chart/components/senior/AssistLine' import Threshold from '@/views/chart/components/senior/Threshold' import LabelNormalText from '@/views/chart/components/normal/LabelNormalText' @@ -1129,7 +1149,8 @@ export default { ChartDragItem, DrillItem, DrillPath, - PluginCom + PluginCom, + MapMapping }, props: { param: { @@ -1952,6 +1973,10 @@ export default { this.view.senior.scrollCfg = val this.calcStyle() }, + onMapMappingChange(val) { + this.view.senior.mapMapping = val + this.calcStyle() + }, showDimensionEditFilter(item) { this.dimensionItem = JSON.parse(JSON.stringify(item))