diff --git a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts index c7f4c24755..dc1e81eac2 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -1026,7 +1026,10 @@ export const dvMainStore = defineStore('dataVisualization', { } }, trackFilterCursor(element, checkQDList, trackInfo, preActiveComponentIds, viewId) { - const currentFilters = element.linkageFilters || [] // 当前联动filter + let currentFilters = element.linkageFilters || [] // 当前联动filter + if (['table-info', 'table-normal'].includes(element.innerType)) { + currentFilters = [] + } // 联动的图表情况历史条件 // const currentFilters = [] checkQDList.forEach(QDItem => { diff --git a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue index c58bd797c3..b6e2d88815 100644 --- a/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue +++ b/core/core-frontend/src/views/chart/components/views/components/ChartComponentS2.vue @@ -334,6 +334,36 @@ const trackClick = trackAction => { dimensionList: state.pointParam.data.dimensionList, quotaList: state.pointParam.data.quotaList } + // 明细表 汇总表特殊处理 1.点击维度传递触发字段的值 2.点击指标传递的值非触发的维度字段值 + if (['table-info', 'table-normal'].includes(view.value.type)) { + linkageParam.quotaList = [] + const dimensionIds = [] + const quotaIds = [] + view.value.xAxis.forEach(xd => { + if (xd.groupType === 'd') { + dimensionIds.push(xd.id) + } else { + quotaIds.push(xd.id) + } + }) + view.value.yAxis.forEach(xd => { + if (xd.groupType === 'd') { + dimensionIds.push(xd.id) + } else { + quotaIds.push(xd.id) + } + }) + if (dimensionIds.includes(param.data.name)) { + linkageParam.dimensionList = linkageParam.dimensionList.filter( + dimension => dimension.id === param.data.name + ) + } else if (quotaIds.includes(param.data.name)) { + linkageParam.dimensionList = linkageParam.dimensionList.filter(dimension => + dimensionIds.includes(dimension.id) + ) + } + view.value + } const jumpParam = { option: 'jump', name: state.pointParam.data.name,