From e1c00a1e0faaa49d40f9597c1c22470927457055 Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Wed, 24 Apr 2024 12:25:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=80=8F=E8=A7=86=E8=A1=A8=E8=A1=8C=E5=88=97=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=EF=BC=8C=E5=92=8C=20V1=20=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= =?UTF-8?q?=20#9238?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/db/desktop/V2.6__ddl.sql | 7 +++++++ .../src/main/resources/db/migration/V2.6__ddl.sql | 10 +++++++++- .../components/js/panel/charts/table/table-pivot.ts | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql b/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql index 939728e750..9561f682b3 100644 --- a/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql +++ b/core/core-backend/src/main/resources/db/desktop/V2.6__ddl.sql @@ -8,3 +8,10 @@ update data_visualization_info set version = 2; ALTER TABLE `visualization_template` ADD COLUMN `version` int NULL DEFAULT 3 COMMENT '使用资源的版本'; update visualization_template set version = 2; +update + core_chart_view as a, + core_chart_view as b +set + a.x_axis = b.x_axis_ext, + a.x_axis_ext = b.x_axis +where a.id = b.id and a.type = 'table-pivot'; diff --git a/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql b/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql index 4262de0620..393a0668c5 100644 --- a/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql +++ b/core/core-backend/src/main/resources/db/migration/V2.6__ddl.sql @@ -18,4 +18,12 @@ where `id` = '156330103'; UPDATE `area` set `id` = '156330114', `name` = '钱塘区' -where `id` = '156330104'; \ No newline at end of file +where `id` = '156330104'; + +update + core_chart_view as a, + core_chart_view as b +set + a.x_axis = b.x_axis_ext, + a.x_axis_ext = b.x_axis +where a.id = b.id and a.type = 'table-pivot'; diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts index 33e57528c8..74f6d9591e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-pivot.ts @@ -59,7 +59,7 @@ export class TablePivot extends S2ChartView { const { container, chart, chartObj, action } = drawOption const containerDom = document.getElementById(container) - const { xAxis: columnFields, xAxisExt: rowFields, yAxis: valueFields } = chart + const { xAxisExt: columnFields, xAxis: rowFields, yAxis: valueFields } = chart const [c, r, v] = [columnFields, rowFields, valueFields].map(arr => arr.map(i => i.dataeaseName) )