forked from github/dataease
feat: 地图空值区域颜色跟随主题
This commit is contained in:
parent
8941757fb8
commit
028bd29f87
@ -450,11 +450,12 @@ export default {
|
|||||||
const base_json = JSON.parse(JSON.stringify(BASE_MAP))
|
const base_json = JSON.parse(JSON.stringify(BASE_MAP))
|
||||||
base_json.geo.map = mapId
|
base_json.geo.map = mapId
|
||||||
let themeStyle = null
|
let themeStyle = null
|
||||||
|
let panelColor = '#FFFFFF'
|
||||||
if (this.themeStyle) {
|
if (this.themeStyle) {
|
||||||
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
|
themeStyle = JSON.parse(JSON.stringify(this.themeStyle))
|
||||||
|
|
||||||
if (themeStyle && themeStyle.backgroundColorSelect) {
|
if (themeStyle && themeStyle.backgroundColorSelect) {
|
||||||
const panelColor = themeStyle.color
|
panelColor = themeStyle.color
|
||||||
if (panelColor !== '#FFFFFF') {
|
if (panelColor !== '#FFFFFF') {
|
||||||
const reverseValue = reverseColor(panelColor)
|
const reverseValue = reverseColor(panelColor)
|
||||||
this.buttonTextColor = reverseValue
|
this.buttonTextColor = reverseValue
|
||||||
@ -462,7 +463,7 @@ export default {
|
|||||||
this.buttonTextColor = null
|
this.buttonTextColor = null
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.openCommonStyle && this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.openCommonStyle && this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const panelColor = this.canvasStyleData.panel.color
|
panelColor = this.canvasStyleData.panel.color
|
||||||
if (panelColor !== '#FFFFFF') {
|
if (panelColor !== '#FFFFFF') {
|
||||||
const reverseValue = reverseColor(panelColor)
|
const reverseValue = reverseColor(panelColor)
|
||||||
this.buttonTextColor = reverseValue
|
this.buttonTextColor = reverseValue
|
||||||
@ -474,6 +475,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const chart_option = baseMapOption(base_json, geoJson, chart, this.buttonTextColor, curAreaCode, this.currentSeriesId)
|
const chart_option = baseMapOption(base_json, geoJson, chart, this.buttonTextColor, curAreaCode, this.currentSeriesId)
|
||||||
|
if (chart_option.geo.itemStyle.normal) {
|
||||||
|
chart_option.geo.itemStyle.normal.areaColor = `${panelColor}33`
|
||||||
|
} else {
|
||||||
|
chart_option.geo.itemStyle.normal = {
|
||||||
|
areaColor: `${panelColor}33`
|
||||||
|
}
|
||||||
|
}
|
||||||
if (chart_option.series?.length) {
|
if (chart_option.series?.length) {
|
||||||
const dataNames = []
|
const dataNames = []
|
||||||
chart_option.series.filter(se => se.type === 'map').forEach(se => {
|
chart_option.series.filter(se => se.type === 'map').forEach(se => {
|
||||||
|
Loading…
Reference in New Issue
Block a user