mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 12:03:05 +08:00
Merge pull request #3024 from dataease/pr@dev@fix_map_init_style
fix(视图-地图): 深色主题新建地图缩放按钮依然是浅色
This commit is contained in:
commit
72d1c316e3
@ -167,6 +167,9 @@ export default {
|
|||||||
destroyed() {
|
destroyed() {
|
||||||
this.myChart.dispose()
|
this.myChart.dispose()
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.loadThemeStyle()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
reDrawView() {
|
reDrawView() {
|
||||||
this.myChart.dispatchAction({ type: 'unselect', seriesIndex: this.linkageActiveParam.seriesIndex, name: this.linkageActiveParam.name })
|
this.myChart.dispatchAction({ type: 'unselect', seriesIndex: this.linkageActiveParam.seriesIndex, name: this.linkageActiveParam.name })
|
||||||
@ -213,6 +216,21 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
loadThemeStyle() {
|
||||||
|
let themeStyle = null
|
||||||
|
if (this.themeStyle) {
|
||||||
|
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
|
||||||
|
if (themeStyle && themeStyle.backgroundColorSelect) {
|
||||||
|
const panelColor = themeStyle.color
|
||||||
|
if (panelColor !== '#FFFFFF') {
|
||||||
|
const reverseValue = reverseColor(panelColor)
|
||||||
|
this.buttonTextColor = reverseValue
|
||||||
|
} else {
|
||||||
|
this.buttonTextColor = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
drawEcharts(activeParam) {
|
drawEcharts(activeParam) {
|
||||||
const chart = this.chart
|
const chart = this.chart
|
||||||
let chart_option = {}
|
let chart_option = {}
|
||||||
|
@ -215,16 +215,17 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const cCode = this.currentAreaCode
|
const cCode = this.currentAreaCode
|
||||||
|
if(!cCode) return
|
||||||
if (this.$store.getters.geoMap[cCode]) {
|
if (this.$store.getters.geoMap[cCode]) {
|
||||||
const json = this.$store.getters.geoMap[cCode]
|
const json = this.$store.getters.geoMap[cCode]
|
||||||
innerCallBack(json, cCode)
|
json && innerCallBack(json, cCode)
|
||||||
} else {
|
} else {
|
||||||
geoJson(cCode).then(res => {
|
geoJson(cCode).then(res => {
|
||||||
this.$store.dispatch('map/setGeo', {
|
this.$store.dispatch('map/setGeo', {
|
||||||
key: cCode,
|
key: cCode,
|
||||||
value: res
|
value: res
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
innerCallBack(res, cCode)
|
res && innerCallBack(res, cCode)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user