mirror of
https://gitee.com/dromara/go-view.git
synced 2025-08-07 14:29:45 +08:00
fix(地图): 地图数据编辑回显错误🐛
This commit is contained in:
parent
c42c644567
commit
acd4f16ec9
@ -116,19 +116,31 @@ const vEchartsSetOption = () => {
|
|||||||
// 更新数据处理
|
// 更新数据处理
|
||||||
const dataSetHandle = async (dataset: any) => {
|
const dataSetHandle = async (dataset: any) => {
|
||||||
props.chartConfig.option.series.forEach((item: any) => {
|
props.chartConfig.option.series.forEach((item: any) => {
|
||||||
if (item.type === 'effectScatter' && dataset.point) item.data = dataset.point
|
if (item.type === 'effectScatter') {
|
||||||
else if (item.type === 'lines' && dataset.line) {
|
item.data = dataset.point || []
|
||||||
item.data = dataset.line.map((it: any) => {
|
} else if (item.type === 'lines') {
|
||||||
return {
|
if (dataset.line) {
|
||||||
...it,
|
item.data = dataset.line.map((it: any) => {
|
||||||
lineStyle: {
|
return {
|
||||||
color: props.chartConfig.option.series[2].lineStyle.normal.color
|
...it,
|
||||||
|
lineStyle: {
|
||||||
|
color: props.chartConfig.option.series[2].lineStyle.normal.color
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
})
|
} else {
|
||||||
} else if (item.type === 'map' && dataset.map) item.data = dataset.map
|
item.data = []
|
||||||
|
}
|
||||||
|
} else if (item.type === 'map') {
|
||||||
|
item.data = dataset.map || []
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (dataset.pieces) props.chartConfig.option.visualMap.pieces = dataset.pieces
|
if (dataset.pieces){
|
||||||
|
props.chartConfig.option.visualMap.show = true
|
||||||
|
props.chartConfig.option.visualMap.pieces = dataset.pieces
|
||||||
|
}else {
|
||||||
|
props.chartConfig.option.visualMap.show = false
|
||||||
|
}
|
||||||
|
|
||||||
isPreview() && vEchartsSetOption()
|
isPreview() && vEchartsSetOption()
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user