From 9ae93df8fbb9179d2c8c9928bfca9e116e1a32a8 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 11 Mar 2021 15:57:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20css=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/chart/components/DimensionItem.vue | 29 +++++----- .../src/views/chart/components/QuotaItem.vue | 53 +++++++++---------- 2 files changed, 36 insertions(+), 46 deletions(-) diff --git a/frontend/src/views/chart/components/DimensionItem.vue b/frontend/src/views/chart/components/DimensionItem.vue index 06abf94802..4c6c800017 100644 --- a/frontend/src/views/chart/components/DimensionItem.vue +++ b/frontend/src/views/chart/components/DimensionItem.vue @@ -2,22 +2,20 @@ - + {{ item.name }} - - - - item1 - - - item2 - - - + + + + item1 + + + item2 + + - + + @@ -43,13 +41,10 @@ export default { .item-axis { padding: 1px 6px; margin: 0 3px 2px 3px; - border: solid 1px #eee; - background-color: #f1f1f1; text-align: left; height: 24px; line-height: 22px; display: inline-block; - color: #1890ff; border-radius: 4px; box-sizing: border-box; white-space: nowrap; diff --git a/frontend/src/views/chart/components/QuotaItem.vue b/frontend/src/views/chart/components/QuotaItem.vue index 3e0c405781..a9bbf893c5 100644 --- a/frontend/src/views/chart/components/QuotaItem.vue +++ b/frontend/src/views/chart/components/QuotaItem.vue @@ -2,34 +2,32 @@ - + {{ item.name }}{{ $t('chart.'+item.summary) }} - - - - - - {{ $t('chart.summary') }}({{ $t('chart.'+item.summary) }}) - - - {{ $t('chart.sum') }} - {{ $t('chart.avg') }} - {{ $t('chart.max') }} - {{ $t('chart.min') }} - {{ $t('chart.std') }} - {{ $t('chart.var_samp') }} - - - - - item4 - - - + + + + + + {{ $t('chart.summary') }}({{ $t('chart.'+item.summary) }}) + + + {{ $t('chart.sum') }} + {{ $t('chart.avg') }} + {{ $t('chart.max') }} + {{ $t('chart.min') }} + {{ $t('chart.std') }} + {{ $t('chart.var_samp') }} + + + + + item4 + + - + + @@ -67,13 +65,10 @@ export default { .item-axis { padding: 1px 6px; margin: 0 3px 2px 3px; - border: solid 1px #eee; - background-color: #f1f1f1; text-align: left; height: 24px; line-height: 22px; display: inline-block; - color: #1890ff; border-radius: 4px; box-sizing: border-box; white-space: nowrap; From b0e42fd75cafcdb1c75098bf86ad3f63900b6c2f Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 11 Mar 2021 16:02:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20chart=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/chart/ChartViewService.java | 2 +- frontend/src/views/chart/components/DimensionItem.vue | 3 +-- frontend/src/views/chart/components/QuotaItem.vue | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 7c458d51d3..9dd307c471 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -153,7 +153,7 @@ public class ChartViewService { public String transMysqlSQL(String table, List xAxis, List yAxis) { // TODO 字段汇总 排序等 - String[] field = yAxis.stream().map(y -> "CAST(" + y.getSummary() + "(" + y.getOriginName() + ") AS DECIMAL(10,2))").toArray(String[]::new); + String[] field = yAxis.stream().map(y -> "CAST(" + y.getSummary() + "(" + y.getOriginName() + ") AS DECIMAL(20,2))").toArray(String[]::new); String[] group = xAxis.stream().map(ChartViewFieldDTO::getOriginName).toArray(String[]::new); return MessageFormat.format("SELECT {0},{1} FROM {2} GROUP BY {3}", StringUtils.join(group, ","), StringUtils.join(field, ","), table, StringUtils.join(group, ",")); } diff --git a/frontend/src/views/chart/components/DimensionItem.vue b/frontend/src/views/chart/components/DimensionItem.vue index 4c6c800017..e9812f5c10 100644 --- a/frontend/src/views/chart/components/DimensionItem.vue +++ b/frontend/src/views/chart/components/DimensionItem.vue @@ -14,8 +14,7 @@ - - + diff --git a/frontend/src/views/chart/components/QuotaItem.vue b/frontend/src/views/chart/components/QuotaItem.vue index a9bbf893c5..dcf0f26220 100644 --- a/frontend/src/views/chart/components/QuotaItem.vue +++ b/frontend/src/views/chart/components/QuotaItem.vue @@ -26,8 +26,7 @@ - - +