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))