forked from github/dataease
fix: 增加下钻方法返回值
This commit is contained in:
parent
6b1abd07f8
commit
10a4b2cefa
@ -166,24 +166,28 @@ export default {
|
||||
this.myEcharts(chart_option)
|
||||
},
|
||||
registerDynamicMap(areaCode) {
|
||||
this.downOrUp = true
|
||||
if (this.$store.getters.geoMap[areaCode]) {
|
||||
this.downOrUp = true
|
||||
const json = this.$store.getters.geoMap[areaCode]
|
||||
this.$echarts.registerMap('MAP', json)
|
||||
console.log('开始切换地图:' + areaCode)
|
||||
return
|
||||
}
|
||||
geoJson(areaCode).then(res => {
|
||||
this.downOrUp = true
|
||||
this.$echarts.registerMap('MAP', res)
|
||||
console.log('开始切换地图:' + areaCode)
|
||||
this.$store.dispatch('map/setGeo', {
|
||||
key: areaCode,
|
||||
value: res
|
||||
})
|
||||
}).catch(() => {
|
||||
this.downOrUp = true
|
||||
})
|
||||
},
|
||||
|
||||
initMapChart(geoJson, chart) {
|
||||
if (!this.$echarts.getMap('MAP') || !this.downOrUp) {
|
||||
console.log('开始初始化地图:')
|
||||
this.$echarts.registerMap('MAP', geoJson)
|
||||
}
|
||||
// this.$echarts.getMap('MAP') || this.$echarts.registerMap('MAP', geoJson)
|
||||
|
@ -1457,9 +1457,11 @@ export default {
|
||||
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places)
|
||||
if (currentNode && currentNode.children && currentNode.children.length > 0) {
|
||||
const nextNode = currentNode.children.find(item => item.name === name)
|
||||
if (!nextNode || !nextNode.code) return null
|
||||
// this.view.customAttr.areaCode = nextNode.code
|
||||
this.currentAcreaNode = nextNode
|
||||
this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(nextNode.code)
|
||||
return nextNode
|
||||
}
|
||||
},
|
||||
// 根据地名获取areaCode
|
||||
|
Loading…
Reference in New Issue
Block a user