From cf99af536c03559de3c002b5275de676d6a84b1d Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 23 Sep 2024 11:50:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E6=BA=90):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DClickHouse=E6=97=A5=E6=9C=9F=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../extensions/datasource/dto/DatasourceDTO.java | 14 ++++++++------ .../extensions/datasource/provider/Provider.java | 6 +++++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 7e3357dafb..db82b06709 100644 --- a/pom.xml +++ b/pom.xml @@ -30,7 +30,7 @@ 3.5.6 2.2.220 4.4.0 - 1.35.13 + 1.35.14 2.6.0 3.5.2 3.12.1 diff --git a/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/dto/DatasourceDTO.java b/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/dto/DatasourceDTO.java index 79af9509e6..9d22db96ec 100644 --- a/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/dto/DatasourceDTO.java +++ b/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/dto/DatasourceDTO.java @@ -14,10 +14,10 @@ public class DatasourceDTO implements Serializable { @Serial private static final long serialVersionUID = 1175287571828910222L; - @JsonSerialize(using= ToStringSerializer.class) + @JsonSerialize(using = ToStringSerializer.class) private Long id; - @JsonSerialize(using= ToStringSerializer.class) + @JsonSerialize(using = ToStringSerializer.class) private Long pid; /** * 数据源名称 @@ -73,10 +73,10 @@ public class DatasourceDTO implements Serializable { private TaskDTO syncSetting; private Integer editType; - private String nodeType; - private String action; - private String fileName; - private String size; + private String nodeType; + private String action; + private String fileName; + private String size; /** * 上次成功更新时间 */ @@ -91,4 +91,6 @@ public class DatasourceDTO implements Serializable { private String taskStatus; private Boolean enableDataFill; + + private int dsVersion = -1; } diff --git a/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java b/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java index 7319454e57..78c6075039 100644 --- a/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java +++ b/sdk/extensions/extensions-datasource/src/main/java/io/dataease/extensions/datasource/provider/Provider.java @@ -136,6 +136,10 @@ public abstract class Provider { try { DatasourceSchemaDTO value = dsMap.entrySet().iterator().next().getValue(); + // 获取数据库version + ConnectionObj connection = getConnection(value); + value.setDsVersion(connection.getConnection().getMetaData().getDatabaseMajorVersion()); + SqlParser parser = SqlParser.create(sql, SqlParser.Config.DEFAULT.withLex(Lex.JAVA)); SqlNode sqlNode = parser.parseStmt(); return sqlNode.toSqlString(getDialect(value)).toString(); @@ -218,7 +222,7 @@ public abstract class Provider { sqlDialect = RedshiftSqlDialect.DEFAULT; break; case ck: - sqlDialect = ClickHouseSqlDialect.DEFAULT; + sqlDialect = new ClickHouseSqlDialect(ClickHouseSqlDialect.DEFAULT_CONTEXT, coreDatasource.getDsVersion()); break; case h2: sqlDialect = H2SqlDialect.DEFAULT; From 52c722720fb5921c41bc7e9f609b8abb0df12732 Mon Sep 17 00:00:00 2001 From: ulleo Date: Mon, 23 Sep 2024 13:43:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(=E5=9B=BE=E8=A1=A8):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8F=8C=E8=BD=B4=E5=9B=BE=E6=89=B9=E9=87=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=9F=BA=E7=A1=80=E6=A0=B7=E5=BC=8F=E5=92=8C=E7=BA=B5?= =?UTF-8?q?=E8=BD=B4=E4=B8=8D=E7=94=9F=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/data-visualization/dvMain.ts | 45 ++++++++++++++++++- .../editor-style/ChartStyleBatchSet.vue | 4 ++ 2 files changed, 48 insertions(+), 1 deletion(-) 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 20161b8722..f063f34af6 100644 --- a/core/core-frontend/src/store/modules/data-visualization/dvMain.ts +++ b/core/core-frontend/src/store/modules/data-visualization/dvMain.ts @@ -731,7 +731,50 @@ export const dvMainStore = defineStore('dataVisualization', { // 修改对应图表的参数 this.curBatchOptComponents.forEach(viewId => { const viewInfo = this.canvasViewInfo[viewId] - if (propertyInfo.subProp) { + //针对双轴图chart-mix + if ( + viewInfo.type.includes('chart-mix') && + propertyInfo.property === 'basicStyle' && + propertyInfo.subProp + ) { + const subValue = get(propertyInfo.value, propertyInfo.subProp) + const target = viewInfo[propertyInfo.custom][propertyInfo.property] + set(target, propertyInfo.subProp, subValue) + switch (propertyInfo.subProp) { + case 'alpha': + const subAlpha = get(propertyInfo.value, 'subAlpha') + set(target, 'subAlpha', subAlpha) + break + case 'colorScheme': + const subColorScheme = get(propertyInfo.value, 'subColorScheme') + set(target, 'subColorScheme', subColorScheme) + break + case 'seriesColor': + const subSeriesColor = get(propertyInfo.value, 'subSeriesColor') + set(target, 'subSeriesColor', subSeriesColor) + break + case 'colors': + const subColors = get(propertyInfo.value, 'subColors') + set(target, 'subColors', subColors) + break + case 'lineWidth': + const leftLineWidth = get(propertyInfo.value, 'leftLineWidth') + set(target, 'leftLineWidth', leftLineWidth) + break + case 'lineSymbol': + const leftLineSymbol = get(propertyInfo.value, 'leftLineSymbol') + set(target, 'leftLineSymbol', leftLineSymbol) + break + case 'lineSymbolSize': + const leftLineSymbolSize = get(propertyInfo.value, 'leftLineSymbolSize') + set(target, 'leftLineSymbolSize', leftLineSymbolSize) + break + case 'lineSmooth': + const leftLineSmooth = get(propertyInfo.value, 'leftLineSmooth') + set(target, 'leftLineSmooth', leftLineSmooth) + break + } + } else if (propertyInfo.subProp) { const subValue = get(propertyInfo.value, propertyInfo.subProp) const target = viewInfo[propertyInfo.custom][propertyInfo.property] set(target, propertyInfo.subProp, subValue) diff --git a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue index d384b1755e..29a18f7bda 100644 --- a/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue +++ b/core/core-frontend/src/views/chart/components/editor/editor-style/ChartStyleBatchSet.vue @@ -17,6 +17,7 @@ @onTooltipChange="onTooltipChange" @onChangeXAxisForm="onChangeXAxisForm" @onChangeYAxisForm="onChangeYAxisForm" + @onChangeYAxisExtForm="onChangeYAxisExtForm" @onTextChange="onTextChange" @onLegendChange="onLegendChange" @onBackgroundChange="onBackgroundChange" @@ -87,6 +88,9 @@ const onChangeXAxisForm = (val, prop) => { const onChangeYAxisForm = (val, prop) => { batchOptChange('customStyle', 'yAxis', val, prop) } +const onChangeYAxisExtForm = (val, prop) => { + batchOptChange('customStyle', 'yAxisExt', val, prop) +} const onIndicatorChange = (val, prop) => { batchOptChange('customAttr', 'indicator', val.indicatorValue, prop)