CN-1317 fix: 地图有时点击一次无法下钻,页面报错 “No detailed map yet”
This commit is contained in:
@@ -348,7 +348,7 @@ export default {
|
|||||||
|
|
||||||
return imageSeries
|
return imageSeries
|
||||||
},
|
},
|
||||||
async drill (countryId) {
|
async drill (countryId, num) {
|
||||||
if (countryId) {
|
if (countryId) {
|
||||||
const targetMapObject = this.polygonSeries.getPolygonById(countryId)
|
const targetMapObject = this.polygonSeries.getPolygonById(countryId)
|
||||||
targetMapObject.series.chart.zoomToMapObject(targetMapObject)
|
targetMapObject.series.chart.zoomToMapObject(targetMapObject)
|
||||||
@@ -369,9 +369,13 @@ export default {
|
|||||||
await this.$nextTick(() => {
|
await this.$nextTick(() => {
|
||||||
this.loadAm4ChartMap(this.countrySeries, this.countryImageSeries)
|
this.loadAm4ChartMap(this.countrySeries, this.countryImageSeries)
|
||||||
})
|
})
|
||||||
|
} else if (num < 2) {
|
||||||
|
// 多次测试,最多2次查询不到数据
|
||||||
|
await this.drill(countryId, 0)
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(this.$t('tip.noDetailMap'))
|
this.$message.warning(this.$t('tip.noDetailMap'))
|
||||||
}
|
}
|
||||||
|
num++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user