CN-1091 fix: 修复地图有时点击无法下钻的问题

This commit is contained in:
chenjinsong
2023-07-18 20:08:20 +08:00
parent c1a97b6fd8
commit 9f1ec8f626
2 changed files with 11 additions and 10 deletions

File diff suppressed because one or more lines are too long

View File

@@ -195,8 +195,8 @@ export default {
}
},
loadMarkerData (imageSeries, data) {
data = data.filter(d => d.score || d.score === 0)
imageSeries.data = data.map(r => ({
const _data = data.filter(d => d.score || d.score === 0)
imageSeries.data = _data.map(r => ({
score: r.score,
name: r.province || r.country,
throughput: valueToRangeValue(r.throughBitsRate, unitTypes.bps).join(' '),
@@ -304,14 +304,17 @@ export default {
if (!this.countryImageSeries) {
this.countryImageSeries = this.imageSeriesFactory('score', this.countrySeries)
}
this.countrySeries.show()
this.countryImageSeries.show()
this.countrySeries.geodata = geoData
this.polygonSeries.hide()
this.worldImageSeries.hide()
this.$nextTick(() => {
this.countrySeries.show()
this.countryImageSeries.show()
await this.$nextTick(() => {
this.loadAm4ChartMap(this.countrySeries, this.countryImageSeries)
})
} else {
this.$message.warning(this.$t('tip.noDetailMap'))
}
}
}
@@ -327,10 +330,8 @@ export default {
},
async location (n) {
this.$store.commit('setNpmLocationCountry', n)
if (n) {
const countryId = countryNameIdMapping[n]
await this.drill(countryId)
} else {
if (!n) {
this.countryImageSeries.data = [{}]
this.polygonSeries.show()
this.worldImageSeries.show()
this.countrySeries.hide()