forked from github/dataease
fix(视图): 世界地图下钻到中国地图失败 #9201
This commit is contained in:
parent
fa1ff98c5c
commit
70f8e4091a
@ -1439,8 +1439,18 @@ export default {
|
|||||||
}
|
}
|
||||||
const customAttr = JSON.parse(this.chart.customAttr)
|
const customAttr = JSON.parse(this.chart.customAttr)
|
||||||
const currentNode = this.findEntityByCode(aCode || customAttr.areaCode, this.places)
|
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) {
|
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
|
this.currentAcreaNode = nextNode
|
||||||
const current = this.$refs[this.element.propValue.id]
|
const current = this.$refs[this.element.propValue.id]
|
||||||
if (this.chart.isPlugin) {
|
if (this.chart.isPlugin) {
|
||||||
|
@ -3618,8 +3618,18 @@ export default {
|
|||||||
aCode = this.currentAcreaNode.code
|
aCode = this.currentAcreaNode.code
|
||||||
}
|
}
|
||||||
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places)
|
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) {
|
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
|
if (!nextNode || !nextNode.code) return null
|
||||||
this.currentAcreaNode = nextNode
|
this.currentAcreaNode = nextNode
|
||||||
const current = this.$refs.dynamicChart
|
const current = this.$refs.dynamicChart
|
||||||
|
Loading…
Reference in New Issue
Block a user