From 100e4cedfd1db5a986c2a7182f762f0f446dc045 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Thu, 30 May 2024 10:48:02 +0800 Subject: [PATCH 1/8] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF):=20?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=8F=90=E7=A4=BA=E5=8E=BB=E6=8E=89=E5=85=B3?= =?UTF-8?q?=E9=97=AD=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/visualization/CanvasCacheDialog.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue b/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue index e39d4034b6..e85cefaea3 100644 --- a/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue +++ b/core/core-frontend/src/components/visualization/CanvasCacheDialog.vue @@ -4,6 +4,7 @@ :append-to-body="true" v-model="dialogShow" width="340px" + :show-close="false" trigger="click" > From 623174fd432aebb672ec933b86f443b58724dc8b Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 30 May 2024 12:16:28 +0800 Subject: [PATCH 2/8] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=B8=AD=E5=BF=83=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-backend/pom.xml | 4 ++++ pom.xml | 8 +++++++- sdk/common/pom.xml | 19 ++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/core/core-backend/pom.xml b/core/core-backend/pom.xml index 213bed5cfa..f648cd5038 100644 --- a/core/core-backend/pom.xml +++ b/core/core-backend/pom.xml @@ -48,6 +48,10 @@ com.google.guava guava + + commons-io + commons-io + de diff --git a/pom.xml b/pom.xml index 2963b349bd..e27d302443 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,7 @@ 4.5.14 4.4.16 3.3.4 + 2.16.1 1.3.0 3.1.0 33.0.0-jre @@ -50,7 +51,7 @@ 8.0.4 0.62.2 3.0.3 - 1.19 + 1.26.2 @@ -127,6 +128,11 @@ commons-compress ${commons-compress.version} + + commons-io + commons-io + ${commons-io.version} + com.alibaba easyexcel diff --git a/sdk/common/pom.xml b/sdk/common/pom.xml index 35d69ec4f5..1f3dbc8095 100644 --- a/sdk/common/pom.xml +++ b/sdk/common/pom.xml @@ -85,6 +85,17 @@ org.ehcache ehcache jakarta + + + commons-io + commons-io + + + + + + commons-io + commons-io @@ -105,8 +116,14 @@ com.alibaba easyexcel + + + commons-io + commons-io + + - \ No newline at end of file + From c005d682f109196e053354a18faeaba76717c274 Mon Sep 17 00:00:00 2001 From: fit2cloudrd Date: Thu, 30 May 2024 14:00:34 +0800 Subject: [PATCH 3/8] =?UTF-8?q?chore:=20=E5=8D=87=E7=BA=A7=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E5=88=B02.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e27d302443..5f7db4a8a7 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ - 2.6.1 + 2.7.0 21 UTF-8 2023.0.1.0 From 1fe8436826052efb3e8e2a68be3f709e075e35d7 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 30 May 2024 14:43:26 +0800 Subject: [PATCH 4/8] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/dataset/manage/DatasetDataManage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java index 97ed061b71..254a978442 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java @@ -207,7 +207,7 @@ public class DatasetDataManage { Order2SQLObj.getOrders(sqlMeta, fields, datasetGroupInfoDTO.getSortFields(), crossDs, dsMap); String querySQL; if (start == null || count == null) { - querySQL = SQLProvider.createQuerySQL(sqlMeta, false, false, needOrder); + querySQL = SQLProvider.createQuerySQL(sqlMeta, false, needOrder, false); } else { querySQL = SQLProvider.createQuerySQLWithLimit(sqlMeta, false, needOrder, false, start, count); } @@ -231,7 +231,7 @@ public class DatasetDataManage { map.put("allFields", fieldList); } map.put("sql", Base64.getEncoder().encodeToString(querySQL.getBytes())); - String replaceSql = SqlUtils.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, false, needOrder), sqlMeta, crossDs, dsMap); + String replaceSql = SqlUtils.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, needOrder, false), sqlMeta, crossDs, dsMap); map.put("total", getDatasetTotal(datasetGroupInfoDTO, replaceSql, null)); return map; } From a5f0029a85843882c473ddef2741aaf2154f60ee Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 30 May 2024 15:03:06 +0800 Subject: [PATCH 5/8] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/dataset/manage/DatasetDataManage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java index 254a978442..8259c8727e 100644 --- a/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java +++ b/core/core-backend/src/main/java/io/dataease/dataset/manage/DatasetDataManage.java @@ -231,7 +231,7 @@ public class DatasetDataManage { map.put("allFields", fieldList); } map.put("sql", Base64.getEncoder().encodeToString(querySQL.getBytes())); - String replaceSql = SqlUtils.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, needOrder, false), sqlMeta, crossDs, dsMap); + String replaceSql = SqlUtils.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, false, false), sqlMeta, crossDs, dsMap); map.put("total", getDatasetTotal(datasetGroupInfoDTO, replaceSql, null)); return map; } From f5538ff56173da1801125f7821df2357483bf682 Mon Sep 17 00:00:00 2001 From: junjun Date: Thu, 30 May 2024 16:25:21 +0800 Subject: [PATCH 6/8] =?UTF-8?q?build:=20=E5=8D=87=E7=BA=A7calcite?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5f7db4a8a7..e1d9582d8e 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 3.5.6 2.2.220 4.4.0 - 1.35.9 + 1.35.10 2.6.0 3.5.2 3.12.1 From 0a8da25f6ca64511e11d9f1a8e1d2e124884416a Mon Sep 17 00:00:00 2001 From: wisonic-s Date: Thu, 30 May 2024 17:28:58 +0800 Subject: [PATCH 7/8] =?UTF-8?q?feat(=E5=9B=BE=E8=A1=A8):=20=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E6=8F=90=E7=A4=BA=E5=8F=AF=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E5=92=8C=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E3=80=81=E9=A2=9C=E8=89=B2=20#9675=20#9834?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/locales/zh-CN.ts | 1 + .../editor/editor-style/ChartStyle.vue | 11 +++++----- .../components/table/TableHeaderSelector.vue | 6 ++++- .../components/js/panel/charts/bar/bar.ts | 6 ++--- .../js/panel/charts/bar/bidirectional-bar.ts | 12 +++++++++- .../components/js/panel/charts/bar/common.ts | 2 +- .../js/panel/charts/bar/horizontal-bar.ts | 6 ++--- .../js/panel/charts/bar/progress-bar.ts | 2 +- .../js/panel/charts/bar/range-bar.ts | 11 ++++++++-- .../js/panel/charts/bar/waterfall.ts | 2 +- .../components/js/panel/charts/line/area.ts | 2 +- .../components/js/panel/charts/line/common.ts | 2 +- .../components/js/panel/charts/map/common.ts | 2 +- .../panel/charts/others/chart-mix-common.ts | 2 +- .../js/panel/charts/others/funnel.ts | 2 +- .../js/panel/charts/others/quadrant.ts | 2 +- .../js/panel/charts/others/radar.ts | 3 ++- .../js/panel/charts/others/sankey.ts | 2 +- .../js/panel/charts/others/scatter.ts | 2 +- .../js/panel/charts/others/treemap.ts | 2 +- .../js/panel/charts/others/word-cloud.ts | 2 +- .../components/js/panel/charts/pie/common.ts | 2 +- .../js/panel/charts/table/common.ts | 2 ++ .../js/panel/charts/table/table-info.ts | 7 +++--- .../js/panel/charts/table/table-normal.ts | 11 +++++++--- .../js/panel/charts/table/table-pivot.ts | 12 +++++++--- .../js/panel/common/common_table.ts | 22 ++++++++++++++----- .../components/js/panel/types/impl/s2.ts | 13 ++++++++--- .../chart/components/js/panel/types/index.ts | 6 +++++ 29 files changed, 110 insertions(+), 47 deletions(-) diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 1906e84237..651d34fae2 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -686,6 +686,7 @@ export default { table_show_row_tooltip: '开启行头提示', table_show_col_tooltip: '开启列头提示', table_show_cell_tooltip: '开启单元格提示', + table_show_header_tooltip: '开启表头提示', stripe: '斑马纹', start_angle: '起始角度', end_angle: '结束角度', diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue index 9c9e73a427..4480a36c4d 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyle.vue @@ -354,13 +354,14 @@ watch( /> { v-model="state.tableHeaderForm.showColTooltip" @change="changeTableHeader('showColTooltip')" > - {{ t('chart.table_show_col_tooltip') }} + {{ + chart.type === 'table-pivot' + ? t('chart.table_show_col_tooltip') + : t('chart.table_show_header_tooltip') + }} { propertyInner = { ...BAR_EDITOR_PROPERTY_INNER, 'label-selector': ['vPosition', 'seriesLabelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'y-axis-selector': [...BAR_EDITOR_PROPERTY_INNER['y-axis-selector'], 'axisLabelFormatter'] } protected baseOptions: ColumnOptions = { @@ -236,7 +236,7 @@ export class StackBar extends Bar { propertyInner = { ...this['propertyInner'], 'label-selector': [...BAR_EDITOR_PROPERTY_INNER['label-selector'], 'vPosition'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter'] + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'] } protected configLabel(chart: Chart, options: ColumnOptions): ColumnOptions { const baseOptions = super.configLabel(chart, options) @@ -372,7 +372,7 @@ export class PercentageStackBar extends GroupStackBar { propertyInner = { ...this['propertyInner'], 'label-selector': ['color', 'fontSize', 'vPosition', 'reserveDecimalCount'], - 'tooltip-selector': ['color', 'fontSize'] + 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'show'] } protected configLabel(chart: Chart, options: ColumnOptions): ColumnOptions { const baseOptions = super.configLabel(chart, options) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bidirectional-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bidirectional-bar.ts index e35acd82cc..0a9c5cc4b0 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bidirectional-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/bidirectional-bar.ts @@ -88,7 +88,17 @@ export class BidirectionalHorizontalBar extends G2PlotChartView< 'legend-selector': ['icon', 'orient', 'fontSize', 'color', 'hPosition', 'vPosition'], 'function-cfg': ['emptyDataStrategy'], 'label-selector': ['hPosition', 'seriesLabelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'] + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'] + } + + selectorSpec: EditorSelectorSpec = { + ...this['selectorSpec'], + 'dual-y-axis-selector': { + title: `${t('chart.xAxis')}` + }, + 'x-axis-selector': { + title: `${t('chart.yAxis')}` + } } drawChart(drawOptions: G2PlotDrawOptions): G2BidirectionalBar { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/common.ts index 937017e007..d48243e348 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/common.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/common.ts @@ -30,7 +30,7 @@ export const BAR_EDITOR_PROPERTY_INNER: EditorPropertyInner = { 'background-overall-component': ['all'], 'basic-style-selector': ['colors', 'alpha', 'gradient'], 'label-selector': ['fontSize', 'color', 'labelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter', 'show'], 'x-axis-selector': [ 'name', 'color', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts index f7764d10ee..da39748f56 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/horizontal-bar.ts @@ -34,7 +34,7 @@ export class HorizontalBar extends G2PlotChartView { propertyInner = { ...BAR_EDITOR_PROPERTY_INNER, 'label-selector': ['hPosition', 'seriesLabelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'x-axis-selector': [...BAR_EDITOR_PROPERTY_INNER['x-axis-selector'], 'axisLabelFormatter'] } axis: AxisType[] = [...BAR_AXIS_TYPE] @@ -267,7 +267,7 @@ export class HorizontalStackBar extends HorizontalBar { propertyInner = { ...this['propertyInner'], 'label-selector': ['color', 'fontSize', 'hPosition', 'labelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter'] + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'] } protected configLabel(chart: Chart, options: BarOptions): BarOptions { const baseOptions = super.configLabel(chart, options) @@ -328,7 +328,7 @@ export class HorizontalPercentageStackBar extends HorizontalStackBar { propertyInner = { ...this['propertyInner'], 'label-selector': ['color', 'fontSize', 'hPosition', 'reserveDecimalCount'], - 'tooltip-selector': ['color', 'fontSize'] + 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'show'] } protected configLabel(chart: Chart, options: BarOptions): BarOptions { const baseOptions = super.configLabel(chart, options) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/progress-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/progress-bar.ts index e7b61e6ba4..3a853fbe5e 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/progress-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/progress-bar.ts @@ -49,7 +49,7 @@ export class ProgressBar extends G2PlotChartView { 'background-overall-component': ['all'], 'basic-style-selector': ['colors', 'alpha', 'gradient'], 'label-selector': ['hPosition', 'color', 'fontSize'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'], 'y-axis-selector': ['name', 'color', 'fontSize', 'axisForm', 'axisLabel', 'position'], 'function-cfg': ['emptyDataStrategy'] } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/range-bar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/range-bar.ts index 5d4f5ab07a..30a1b4cebc 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/range-bar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/range-bar.ts @@ -39,7 +39,14 @@ export class RangeBar extends G2PlotChartView { propertyInner = { ...BAR_EDITOR_PROPERTY_INNER, 'label-selector': ['hPosition', 'color', 'fontSize', 'labelFormatter', 'showGap'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'showGap'], + 'tooltip-selector': [ + 'fontSize', + 'color', + 'backgroundColor', + 'tooltipFormatter', + 'showGap', + 'show' + ], 'x-axis-selector': [...BAR_EDITOR_PROPERTY_INNER['x-axis-selector'], 'axisLabelFormatter'] } axis: AxisType[] = [...BAR_AXIS_TYPE, 'yAxisExt'] @@ -47,7 +54,7 @@ export class RangeBar extends G2PlotChartView { data: [], xField: 'values', yField: 'field', - colorFiled: 'category', + colorField: 'category', isGroup: true, interactions: [ { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/waterfall.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/waterfall.ts index 8a301037e1..f327d38041 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/bar/waterfall.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/bar/waterfall.ts @@ -23,7 +23,7 @@ export class Waterfall extends G2PlotChartView { 'background-overall-component': ['all'], 'basic-style-selector': ['colors', 'alpha', 'gradient'], 'label-selector': ['fontSize', 'color', 'vPosition', 'labelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'title-selector': [ 'title', 'fontSize', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts index 777e024bfe..5b5c376214 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/area.ts @@ -261,7 +261,7 @@ export class StackArea extends Area { propertyInner = { ...this['propertyInner'], 'label-selector': ['fontSize', 'color', 'labelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter'] + 'tooltip-selector': ['fontSize', 'color', 'tooltipFormatter', 'show'] } protected configLabel(chart: Chart, options: AreaOptions): AreaOptions { const customAttr = parseJson(chart.customAttr) diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/line/common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/line/common.ts index eaf0a9e484..f1f7a5ed9c 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/line/common.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/line/common.ts @@ -15,7 +15,7 @@ export const LINE_EDITOR_PROPERTY: EditorProperty[] = [ export const LINE_EDITOR_PROPERTY_INNER: EditorPropertyInner = { 'background-overall-component': ['all'], 'label-selector': ['fontSize', 'color'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'show'], 'basic-style-selector': [ 'colors', 'alpha', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/map/common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/map/common.ts index a60b06756f..0fce5e2a71 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/map/common.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/map/common.ts @@ -34,7 +34,7 @@ export const MAP_EDITOR_PROPERTY_INNER: EditorPropertyInner = { 'showDimension', 'showQuota' ], - 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'tooltipFormatter'], + 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'tooltipFormatter', 'show'], 'function-cfg': ['emptyDataStrategy'], 'map-mapping': [''] } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix-common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix-common.ts index afca7d9f24..f094348493 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix-common.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/chart-mix-common.ts @@ -15,7 +15,7 @@ export const CHART_MIX_EDITOR_PROPERTY: EditorProperty[] = [ export const CHART_MIX_EDITOR_PROPERTY_INNER: EditorPropertyInner = { 'background-overall-component': ['all'], 'label-selector': ['fontSize', 'color'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'show'], 'basic-style-selector': [ 'colors', 'alpha', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts index 39beb3d0a0..7ab8895c06 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/funnel.ts @@ -24,7 +24,7 @@ export class Funnel extends G2PlotChartView { 'background-overall-component': ['all'], 'basic-style-selector': ['colors', 'alpha'], 'label-selector': ['fontSize', 'color', 'hPosition', 'labelFormatter'], - 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'title-selector': [ 'show', 'title', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts index e447f1a3ec..d6303d6f87 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/quadrant.ts @@ -30,7 +30,7 @@ export class Quadrant extends G2PlotChartView { propertyInner: EditorPropertyInner = { 'basic-style-selector': ['colors', 'alpha', 'scatterSymbol', 'scatterSymbolSize'], 'label-selector': ['fontSize', 'color'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'x-axis-selector': [ 'position', 'name', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts index 9ac62e92dc..d054184e5b 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/radar.ts @@ -24,7 +24,7 @@ export class Radar extends G2PlotChartView { propertyInner: EditorPropertyInner = { 'basic-style-selector': ['colors', 'alpha', 'radarShape'], 'label-selector': ['seriesLabelFormatter'], - 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'misc-style-selector': ['showName', 'color', 'fontSize', 'axisColor'], 'title-selector': [ 'show', @@ -42,6 +42,7 @@ export class Radar extends G2PlotChartView { 'legend-selector': ['icon', 'orient', 'color', 'fontSize', 'hPosition', 'vPosition'] } selectorSpec: EditorSelectorSpec = { + ...this['selectorSpec'], 'misc-style-selector': { title: `${t('chart.tooltip_axis')}` } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/sankey.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/sankey.ts index 0d8d9fe0c9..e7c0ce11a1 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/sankey.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/sankey.ts @@ -45,7 +45,7 @@ export class RangeBar extends G2PlotChartView { propertyInner = { ...SANKEY_EDITOR_PROPERTY_INNER, 'label-selector': ['color', 'fontSize'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter'] + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'tooltipFormatter', 'show'] } axis: AxisType[] = [...SANKEY_AXIS_TYPE] protected baseOptions: SankeyOptions = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts index 3cfe886394..70ebf7a9ba 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/scatter.ts @@ -29,7 +29,7 @@ export class Scatter extends G2PlotChartView { propertyInner: EditorPropertyInner = { 'basic-style-selector': ['colors', 'alpha', 'scatterSymbol', 'scatterSymbolSize'], 'label-selector': ['fontSize', 'color', 'labelFormatter'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'x-axis-selector': [ 'position', 'name', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/treemap.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/treemap.ts index 4dd3e81e85..11be3a4663 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/treemap.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/treemap.ts @@ -29,7 +29,7 @@ export class Treemap extends G2PlotChartView { 'basic-style-selector': ['colors', 'alpha'], 'label-selector': ['fontSize', 'color', 'showDimension', 'showQuota', 'showProportion'], 'legend-selector': ['icon', 'orient', 'fontSize', 'color', 'hPosition', 'vPosition'], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'title-selector': [ 'title', 'fontSize', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts index f75194b04d..44b1563586 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/others/word-cloud.ts @@ -41,7 +41,7 @@ export class WordCloud extends G2PlotChartView { 'fontShadow' ], 'misc-selector': ['wordSizeRange', 'wordSpacing'], - 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter'] + 'tooltip-selector': ['color', 'fontSize', 'backgroundColor', 'seriesTooltipFormatter', 'show'] } axis: AxisType[] = ['xAxis', 'yAxis', 'filter'] axisConfig: AxisConfig = { diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts index 567c449b00..8eb5a51484 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/pie/common.ts @@ -22,7 +22,7 @@ export const PIE_EDITOR_PROPERTY_INNER: EditorPropertyInner = { 'showQuota', 'showProportion' ], - 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter'], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor', 'seriesTooltipFormatter', 'show'], 'basic-style-selector': ['colors', 'alpha', 'radius'], 'title-selector': [ 'title', diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/common.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/common.ts index 2d0f999147..4fa610f969 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/common.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/common.ts @@ -4,6 +4,7 @@ export const TABLE_EDITOR_PROPERTY: EditorProperty[] = [ 'table-header-selector', 'table-cell-selector', 'title-selector', + 'tooltip-selector', 'function-cfg', 'threshold', 'scroll-cfg', @@ -45,6 +46,7 @@ export const TABLE_EDITOR_PROPERTY_INNER: EditorPropertyInner = { 'letterSpace', 'fontShadow' ], + 'tooltip-selector': ['fontSize', 'color', 'backgroundColor'], 'function-cfg': ['emptyDataStrategy'], threshold: ['tableThreshold'] } diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts index 082bf54099..36afc49597 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-info.ts @@ -5,7 +5,7 @@ import { S2ChartView, S2DrawOptions } from '../../types/impl/s2' import { TABLE_EDITOR_PROPERTY, TABLE_EDITOR_PROPERTY_INNER } from './common' import { useI18n } from '@/hooks/web/useI18n' import { isNumber } from 'lodash-es' -import { copyContent } from '@/views/chart/components/js/panel/common/common_table' +import { copyContent, SortTooltip } from '@/views/chart/components/js/panel/common/common_table' const { t } = useI18n() @@ -108,7 +108,8 @@ export class TableInfo extends S2ChartView { style: this.configStyle(chart), conditions: this.configConditions(chart), tooltip: { - getContainer: () => containerDom + getContainer: () => containerDom, + renderTooltip: sheet => new SortTooltip(sheet) } } // 开启序号之后,第一列就是序号列,修改 label 即可 @@ -135,7 +136,7 @@ export class TableInfo extends S2ChartView { } } // tooltip - this.configTooltip(s2Options) + this.configTooltip(chart, s2Options) // 隐藏表头,保留顶部的分割线, 禁用表头横向 resize if (customAttr.tableHeader.showTableHeader === false) { s2Options.style.colCfg.height = 1 diff --git a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts index 2bdaa5ca23..16a5dbf584 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/charts/table/table-normal.ts @@ -2,7 +2,11 @@ import { S2ChartView, S2DrawOptions } from '@/views/chart/components/js/panel/ty import { S2Event, S2Options, TableSheet, TableColCell, ViewMeta, TableDataCell } from '@antv/s2' import { parseJson } from '@/views/chart/components/js/util' import { formatterItem, valueFormatter } from '@/views/chart/components/js/formatter' -import { copyContent, getCurrentField } from '@/views/chart/components/js/panel/common/common_table' +import { + copyContent, + getCurrentField, + SortTooltip +} from '@/views/chart/components/js/panel/common/common_table' import { TABLE_EDITOR_PROPERTY, TABLE_EDITOR_PROPERTY_INNER } from './common' import { useI18n } from '@/hooks/web/useI18n' import { isNumber } from 'lodash-es' @@ -111,7 +115,8 @@ export class TableNormal extends S2ChartView { style: this.configStyle(chart), conditions: this.configConditions(chart), tooltip: { - getContainer: () => containerDom + getContainer: () => containerDom, + renderTooltip: sheet => new SortTooltip(sheet) } } // 开启序号之后,第一列就是序号列,修改 label 即可 @@ -134,7 +139,7 @@ export class TableNormal extends S2ChartView { } } // tooltip - this.configTooltip(s2Options) + this.configTooltip(chart, s2Options) // 隐藏表头,保留顶部的分割线, 禁用表头横向 resize if (customAttr.tableHeader.showTableHeader === false) { s2Options.style.colCfg.height = 1 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 a90a8d5f80..8bd20dc78b 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 @@ -1,4 +1,4 @@ -import { EXTRA_FIELD, PivotSheet, S2Event, S2Options, TOTAL_VALUE, S2Theme } from '@antv/s2' +import { EXTRA_FIELD, PivotSheet, S2Event, S2Options, TOTAL_VALUE, S2Theme, Totals } from '@antv/s2' import { formatterItem, valueFormatter } from '../../../formatter' import { hexColorToRGBA, parseJson } from '../../../util' import { S2ChartView, S2DrawOptions } from '../../types/impl/s2' @@ -20,6 +20,7 @@ export class TablePivot extends S2ChartView { 'table-cell-selector', 'table-total-selector', 'title-selector', + 'tooltip-selector', 'function-cfg', 'threshold', 'linkage', @@ -183,15 +184,20 @@ export class TablePivot extends S2ChartView { sortParams: sortParams } // options - const s2Options = { + const s2Options: S2Options = { width: containerDom.offsetWidth, height: containerDom.offsetHeight, style: this.configStyle(chart), - totals: tableTotal, + totals: tableTotal as Totals, conditions: this.configConditions(chart), + tooltip: { + getContainer: () => containerDom + }, hierarchyType: basicStyle.tableLayoutMode ?? 'grid' } + // tooltip + this.configTooltip(chart, s2Options) // 开始渲染 const s2 = new PivotSheet(containerDom, s2DataConfig, s2Options as unknown as S2Options) // hover diff --git a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts index a3afdc168b..9ed7a1a3a7 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/common/common_table.ts @@ -611,7 +611,7 @@ export function handleTableEmptyStrategy(chart: Chart) { } return newData } -class SortTooltip extends BaseTooltip { +export class SortTooltip extends BaseTooltip { show(showOptions) { const { iconName } = showOptions if (iconName) { @@ -656,7 +656,10 @@ class SortTooltip extends BaseTooltip { top: `${this.position?.y}px`, pointerEvents: enterable ? 'all' : 'none', zIndex: 9999, - position: 'absolute' + position: 'absolute', + color: 'black', + background: 'white', + fontSize: '16px' }, visible: true }) @@ -736,13 +739,22 @@ export function configHeaderInteraction(chart: Chart, option: S2Options) { ] } -export function configTooltip(option: S2Options) { +export function configTooltip(chart: Chart, option: S2Options) { + const { tooltip } = parseJson(chart.customAttr) option.tooltip = { ...option.tooltip, + style: { + background: tooltip.backgroundColor, + fontSize: tooltip.fontSize + 'px', + color: tooltip.color, + boxShadow: 'rgba(0, 0, 0, 0.1) 0px 4px 8px 0px', + borderRadius: '3px', + padding: '4px 12px', + opacity: 0.95 + }, adjustPosition: ({ event }) => { return getTooltipPosition(event) - }, - renderTooltip: sheet => new SortTooltip(sheet) + } } } diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts b/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts index 2fc026a84d..89e8b95166 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/impl/s2.ts @@ -3,7 +3,7 @@ import { AntVDrawOptions, ChartLibraryType } from '@/views/chart/components/js/panel/types' -import { S2Theme, SpreadSheet, Style, S2Options, Meta } from '@antv/s2' +import { S2Theme, SpreadSheet, Style, S2Options, Meta, SERIES_NUMBER_FIELD } from '@antv/s2' import { configHeaderInteraction, configTooltip, @@ -42,8 +42,8 @@ export abstract class S2ChartView

extends AntVAbstractCha return handleTableEmptyStrategy(chart) } - protected configTooltip(option: S2Options) { - configTooltip(option) + protected configTooltip(chart: Chart, option: S2Options) { + configTooltip(chart, option) } protected configHeaderInteraction(chart: Chart, option: S2Options) { @@ -62,12 +62,19 @@ export abstract class S2ChartView

extends AntVAbstractCha switch (cell.cellType) { case 'dataCell': field = find(metaConfig, item => item.field === meta.valueField) + if (meta.fieldValue === 0) { + content = '0' + } if (meta.fieldValue) { content = field?.formatter?.(meta.fieldValue) } break case 'rowCell': case 'colCell': + if (meta.field === SERIES_NUMBER_FIELD) { + content = cell.getTextShape()['attrs'].text + break + } content = meta.label field = find(metaConfig, item => item.field === content) if (field) { diff --git a/core/core-frontend/src/views/chart/components/js/panel/types/index.ts b/core/core-frontend/src/views/chart/components/js/panel/types/index.ts index b527c00c95..62b240473a 100644 --- a/core/core-frontend/src/views/chart/components/js/panel/types/index.ts +++ b/core/core-frontend/src/views/chart/components/js/panel/types/index.ts @@ -100,6 +100,12 @@ export abstract class AntVAbstractChartView extends AbstractChartView { selectorSpec: EditorSelectorSpec = { 'misc-style-selector': { title: `${t('chart.size')}` + }, + 'dual-y-axis-selector': { + title: `${t('chart.yAxis')}` + }, + 'x-axis-selector': { + title: `${t('chart.xAxis')}` } } protected constructor(library: ChartLibraryType, name: string, defaultData?: any[]) { From f046a9fda9fb64427e389bc7b923b1f129f7e822 Mon Sep 17 00:00:00 2001 From: jianneng-fit2cloud Date: Thu, 30 May 2024 17:53:03 +0800 Subject: [PATCH 8/8] =?UTF-8?q?feat(=E5=90=8C=E6=AD=A5=E7=AE=A1=E7=90=86):?= =?UTF-8?q?=20Doris=E6=94=AF=E6=8C=81=E8=87=AA=E5=AE=9A=E4=B9=89BE?= =?UTF-8?q?=E7=AB=AF=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core-frontend/src/locales/zh-CN.ts | 1 + de-xpack | 2 +- .../io/dataease/api/sync/datasource/api/SyncDatasourceApi.java | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/core-frontend/src/locales/zh-CN.ts b/core/core-frontend/src/locales/zh-CN.ts index 651d34fae2..bc0bcaf73f 100644 --- a/core/core-frontend/src/locales/zh-CN.ts +++ b/core/core-frontend/src/locales/zh-CN.ts @@ -322,6 +322,7 @@ export default { please_input_host: '请输入主机', please_input_url: '请输入URL地址', please_input_port: '请输入端口', + please_input_be_port: '请输入BE端口', modify: '编辑数据源', copy: '复制数据源', validate_success: '校验成功', diff --git a/de-xpack b/de-xpack index 4f83c4df67..9fc2ea38ac 160000 --- a/de-xpack +++ b/de-xpack @@ -1 +1 @@ -Subproject commit 4f83c4df67befbd90eb219b2d6d04c04e213179f +Subproject commit 9fc2ea38acf78daaa07c94f978a2727c01e58c9a diff --git a/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java b/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java index 8c261f29dc..d1c7d6427e 100644 --- a/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java +++ b/sdk/api/api-sync/src/main/java/io/dataease/api/sync/datasource/api/SyncDatasourceApi.java @@ -36,7 +36,7 @@ public interface SyncDatasourceApi { void save(@RequestBody SyncDatasourceDTO dataSourceDTO) throws DEException; @PostMapping("/update") - void update(@RequestBody SyncDatasourceDTO dataSourceDTO) throws DEException; + Map update(@RequestBody SyncDatasourceDTO dataSourceDTO) throws DEException; @PostMapping("/delete/{datasourceId}") void delete(@PathVariable("datasourceId") String datasourceId) throws DEException;