diff --git a/frontend/src/views/chart/components/ChartComponent.vue b/frontend/src/views/chart/components/ChartComponent.vue index 83109bb792..7c6afd991e 100644 --- a/frontend/src/views/chart/components/ChartComponent.vue +++ b/frontend/src/views/chart/components/ChartComponent.vue @@ -167,6 +167,9 @@ export default { destroyed() { this.myChart.dispose() }, + created() { + this.loadThemeStyle() + }, methods: { reDrawView() { 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) { const chart = this.chart let chart_option = {} diff --git a/frontend/src/views/chart/components/senior/MapMapping.vue b/frontend/src/views/chart/components/senior/MapMapping.vue index 627918757d..6116d815cd 100644 --- a/frontend/src/views/chart/components/senior/MapMapping.vue +++ b/frontend/src/views/chart/components/senior/MapMapping.vue @@ -215,16 +215,17 @@ export default { }) } const cCode = this.currentAreaCode + if(!cCode) return if (this.$store.getters.geoMap[cCode]) { const json = this.$store.getters.geoMap[cCode] - innerCallBack(json, cCode) + json && innerCallBack(json, cCode) } else { geoJson(cCode).then(res => { this.$store.dispatch('map/setGeo', { key: cCode, value: res }).then(() => { - innerCallBack(res, cCode) + res && innerCallBack(res, cCode) }) }) }