Merge pull request #9821 from dataease/pr@dev@fix_map_drill

fix(视图): 世界地图下钻到中国地图失败 #9201
This commit is contained in:
fit2cloud-chenyw 2024-05-23 18:07:42 +08:00 committed by GitHub
commit 929a7193d5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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