Merge pull request #2118 from dataease/pr@dev@fix_map_drill_detail

fix: 地图钻取后查看详情范围没有切换
This commit is contained in:
fit2cloud-chenyw
2022-04-14 17:19:53 +08:00
committed by GitHub
6 changed files with 47 additions and 14 deletions

View File

@@ -6,10 +6,10 @@
<plugin-com
v-if="chart.isPlugin"
:component-name="chart.type + '-view'"
:obj="{chart}"
:obj="{chart: mapChart || chart}"
class="chart-class"
/>
<chart-component v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" class="chart-class" :chart="chart" />
<chart-component v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'echarts'" class="chart-class" :chart="mapChart || chart" />
<chart-component-g2 v-else-if="!chart.type.includes('text') && chart.type !== 'label' && !chart.type.includes('table') && renderComponent() === 'antv'" class="chart-class" :chart="chart" />
<chart-component-s2 v-else-if="chart.type === 'table-pivot' && renderComponent() === 'antv'" class="chart-class" :chart="chart" />
<label-normal v-else-if="chart.type.includes('text')" :chart="chart" class="table-class" />
@@ -62,6 +62,13 @@ export default {
}
},
computed: {
mapChart() {
if (this.chart.type && (this.chart.type === 'map' || this.chart.type === 'buddle-map')) {
const temp = JSON.parse(JSON.stringify(this.chart))
return { ...temp, ...{ DetailAreaCode: this.curComponent.DetailAreaCode }}
}
return null
},
showChartCanvas() {
return !this.chart.type.includes('table')
},