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 50fa160719..c39f276165 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -126,6 +126,8 @@ export const dvMainStore = defineStore('dataVisualization', { mobileLayoutStatus: false, // 公共链接状态(当前是否是公共链接打开) publicLinkStatus: false, + // 不带钻取的原始数据 + pureCanvasViewDataInfo: {}, pcTabMatrixCount: { x: 36, y: 36 @@ -204,6 +206,12 @@ export const dvMainStore = defineStore('dataVisualization', { } }, actions: { + setPureCanvasViewDataInfo(viewId, chartDataInfo) { + this.pureCanvasViewDataInfo[viewId] = chartDataInfo.data + }, + getPureCanvasViewDataInfo(viewId) { + return this.pureCanvasViewDataInfo[viewId] + }, setLastHiddenComponent(value?) { if (value) { this.lastHiddenComponent = [value] diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableHeaderGroupConfig.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableHeaderGroupConfig.vue index 2b386bb022..f00326950c 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableHeaderGroupConfig.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/components/table/TableHeaderGroupConfig.vue @@ -125,7 +125,7 @@ const groupMenu = ref() const tableContainer = ref() let s2: TableSheet const renderTable = (chart: ChartObj) => { - const data = dvMainStore.getViewDataDetails(chart.id) + const data = dvMainStore.getPureCanvasViewDataInfo(chart.id) const containerDom = document.getElementById(containerId.value) let realData = [] if (data?.tableRow?.length) { 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 b76f007225..a2bdb7e8b3 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 @@ -157,6 +157,9 @@ const calcData = (viewInfo: Chart, callback, resetPageInfo = true) => { chartData.value = res?.data as Partial state.totalItems = res?.totalItems dvMainStore.setViewDataDetails(viewInfo.id, res) + if (!res.drill) { + dvMainStore.setPureCanvasViewDataInfo(viewInfo.id, res) + } emit('onDrillFilters', res?.drillFilters) renderChart(res as unknown as Chart, resetPageInfo) }