Merge pull request #8982 from dataease/pr@dev-v2@fix_map_world_drill

fix(图表): 修复地图从世界下钻到国家显示异常
This commit is contained in:
wisonic-s
2024-04-07 19:00:05 +08:00
committed by GitHub

View File

@@ -151,12 +151,18 @@ const appStore = useAppStoreWithOut()
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
const chartContainer = ref<HTMLElement>(null)
let mapTimer: number
const renderL7Plot = async (chart, chartView: L7PlotChartView<any, any>, callback) => {
const renderL7Plot = async (chart: ChartObj, chartView: L7PlotChartView<any, any>, callback) => {
const map = parseJson(chart.customAttr).map
let areaId = map.id
country.value = areaId.slice(0, 3)
if (dynamicAreaId.value) {
areaId = dynamicAreaId.value
// 世界下钻到国家,切换路径
if (country.value === '000' && dynamicAreaId.value.startsWith('000')) {
country.value = dynamicAreaId.value.slice(3)
areaId = country.value
} else {
areaId = dynamicAreaId.value
}
}
mapTimer && clearTimeout(mapTimer)
mapTimer = setTimeout(async () => {