Merge branch 'dev-v2' into v2.10

This commit is contained in:
fit2cloud-chenyw 2024-11-07 09:54:10 +08:00
commit 1e1629c6d5
4 changed files with 8 additions and 6 deletions

View File

@ -19,7 +19,7 @@ import java.util.List;
@Component @Component
public class LinkInterceptor implements HandlerInterceptor { public class LinkInterceptor implements HandlerInterceptor {
private final static String whiteListText = "/user/ipInfo, /apisix/check"; private final static String whiteListText = "/user/ipInfo, /apisix/check, /datasetData/enumValueObj";
@Override @Override

View File

@ -135,7 +135,7 @@ export class BubbleMap extends L7PlotChartView<ChoroplethOptions, Choropleth> {
}) })
dotLayer.once('loaded', () => { dotLayer.once('loaded', () => {
chart.container = container chart.container = container
configCarouselTooltip(chart, view, chart.data?.data || [], null) configCarouselTooltip(chart, view, chart.data?.data || [], null, areaId)
}) })
}) })
return view return view

View File

@ -178,7 +178,7 @@ export class Map extends L7PlotChartView<ChoroplethOptions, Choropleth> {
}) })
}) })
chart.container = container chart.container = container
configCarouselTooltip(chart, view, data, null) configCarouselTooltip(chart, view, data, null, areaId)
}) })
return view return view
} }

View File

@ -6,16 +6,18 @@ import { parseJson } from '@/views/chart/components/js/util'
import { Scene } from '@antv/l7-scene' import { Scene } from '@antv/l7-scene'
import { deepCopy } from '@/utils/utils' import { deepCopy } from '@/utils/utils'
export const configCarouselTooltip = (chart, view, data, scene) => { export const configCarouselTooltip = (chart, view, data, scene, areaId?) => {
if (['bubble-map', 'map'].includes(chart.type)) { if (['bubble-map', 'map'].includes(chart.type)) {
data = view.source.data.dataArray data = view.source.data.dataArray
?.filter(i => i.dimensionList?.length > 0) ?.filter(i => i.dimensionList?.length > 0)
.reduce((acc, current) => { .reduce((acc, current) => {
const existingItem = acc.find(obj => { const existingItem = acc.find(obj => {
if (!obj.abbrev || obj.abbrev === 'China') { if (areaId.startsWith('000')) {
return obj.name === current.name
} else if (areaId.startsWith('156')) {
return obj.adcode === current.adcode return obj.adcode === current.adcode
} else { } else {
return obj.abbrev === current.abbrev return obj.name === current.name
} }
}) })
if (!existingItem) { if (!existingItem) {