fix(视图): 世界地图下钻到中国地图失败 #9201

This commit is contained in:
fit2cloud-chenyw 2024-05-23 18:05:39 +08:00
parent fa1ff98c5c
commit 70f8e4091a
2 changed files with 22 additions and 2 deletions

View File

@ -1439,8 +1439,18 @@ export default {
}
const customAttr = JSON.parse(this.chart.customAttr)
const currentNode = this.findEntityByCode(aCode || customAttr.areaCode, this.places)
let mappingName = null
if (this.chart.senior) {
const senior = JSON.parse(this.chart.senior)
if (senior?.mapMapping[currentNode.code]) {
const mapping = senior.mapMapping[currentNode.code]
if (mapping[name]) {
mappingName = mapping[name]
}
}
}
if (currentNode && currentNode.children && currentNode.children.length > 0) {
const nextNode = currentNode.children.find(item => item.name === name)
const nextNode = currentNode.children.find(item => item.name === name || (mappingName && item.name === mappingName))
this.currentAcreaNode = nextNode
const current = this.$refs[this.element.propValue.id]
if (this.chart.isPlugin) {

View File

@ -3618,8 +3618,18 @@ export default {
aCode = this.currentAcreaNode.code
}
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places)
let mappingName = null
if (this.chart.senior) {
const senior = JSON.parse(this.chart.senior)
if (senior?.mapMapping[currentNode.code]) {
const mapping = senior.mapMapping[currentNode.code]
if (mapping[name]) {
mappingName = mapping[name]
}
}
}
if (currentNode && currentNode.children && currentNode.children.length > 0) {
const nextNode = currentNode.children.find(item => item.name === name)
const nextNode = currentNode.children.find(item => item.name === name || (mappingName && item.name === mappingName))
if (!nextNode || !nextNode.code) return null
this.currentAcreaNode = nextNode
const current = this.$refs.dynamicChart