From 3dc5722fffb923309c6407c1a6297d0860ede2af Mon Sep 17 00:00:00 2001 From: wisonic Date: Thu, 15 Aug 2024 11:23:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E5=9B=BE=E8=A1=A8):=20URL=20=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E8=81=9A=E5=90=88=E6=96=B9=E5=BC=8F=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chart/manage/ChartViewManege.java | 2 +- .../dataease/chart/utils/ChartDataBuild.java | 2 +- .../src/assets/svg/icon_url_outlined.svg | 1 + .../src/components/icon-custom/src/Icon.vue | 2 + .../components/editor/drag-item/QuotaItem.vue | 42 +++---------------- .../data/dataset/form/FieldMore.vue | 14 +++++-- 6 files changed, 22 insertions(+), 41 deletions(-) create mode 100644 core/core-frontend/src/assets/svg/icon_url_outlined.svg diff --git a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java index ff50bd340e..ab1f3c525b 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java +++ b/core/core-backend/src/main/java/io/dataease/chart/manage/ChartViewManege.java @@ -274,7 +274,7 @@ public class ChartViewManege { dto.setDatePattern("date_sub"); dto.setChartType("bar"); - if (dto.getId() == -1L || dto.getDeType() == 0 || dto.getDeType() == 1) { + if (dto.getId() == -1L || dto.getDeType() == 0 || dto.getDeType() == 1 || dto.getDeType() == 7) { dto.setSummary("count"); } else { dto.setSummary("sum"); diff --git a/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java b/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java index 6e7eeb0b51..94d2f1b99b 100644 --- a/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java +++ b/core/core-backend/src/main/java/io/dataease/chart/utils/ChartDataBuild.java @@ -1305,7 +1305,7 @@ public class ChartDataBuild { } if (i == ele.length) break; ChartViewFieldDTO chartViewFieldDTO = fields.get(i); - if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5) { + if (chartViewFieldDTO.getDeType() == 0 || chartViewFieldDTO.getDeType() == 1 || chartViewFieldDTO.getDeType() == 5 || chartViewFieldDTO.getDeType() == 7) { d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? "" : ele[i]); } else if (chartViewFieldDTO.getDeType() == 2 || chartViewFieldDTO.getDeType() == 3 || chartViewFieldDTO.getDeType() == 4) { d.put(fields.get(i).getDataeaseName(), StringUtils.isEmpty(ele[i]) ? null : new BigDecimal(ele[i]).setScale(8, RoundingMode.HALF_UP)); diff --git a/core/core-frontend/src/assets/svg/icon_url_outlined.svg b/core/core-frontend/src/assets/svg/icon_url_outlined.svg new file mode 100644 index 0000000000..4d6d540892 --- /dev/null +++ b/core/core-frontend/src/assets/svg/icon_url_outlined.svg @@ -0,0 +1 @@ + diff --git a/core/core-frontend/src/components/icon-custom/src/Icon.vue b/core/core-frontend/src/components/icon-custom/src/Icon.vue index c7bf9d501d..a3235e406c 100644 --- a/core/core-frontend/src/components/icon-custom/src/Icon.vue +++ b/core/core-frontend/src/components/icon-custom/src/Icon.vue @@ -383,6 +383,7 @@ import icon_moreVertical_outlined from '@/assets/svg/icon_more-vertical_outlined import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg' import icon_newItem_outlined from '@/assets/svg/icon_new-item_outlined.svg' import icon_number_outlined from '@/assets/svg/icon_number_outlined.svg' +import icon_url_outlined from '@/assets/svg/icon_url_outlined.svg' import icon_operationAnalysis_outlined from '@/assets/svg/icon_operation-analysis_outlined.svg' import icon_ordeList_outlined from '@/assets/svg/icon_orde-list_outlined.svg' import icon_organization_outlined from '@/assets/svg/icon_organization_outlined.svg' @@ -1054,6 +1055,7 @@ const iconMap = { icon_more_outlined: icon_more_outlined, 'icon_new-item_outlined': icon_newItem_outlined, icon_number_outlined: icon_number_outlined, + icon_url_outlined: icon_url_outlined, 'icon_operation-analysis_outlined': icon_operationAnalysis_outlined, 'icon_orde-list_outlined': icon_ordeList_outlined, icon_organization_outlined: icon_organization_outlined, diff --git a/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue b/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue index d73d656a8c..ef070a098b 100644 --- a/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue +++ b/core/core-frontend/src/views/chart/components/editor/drag-item/QuotaItem.vue @@ -426,12 +426,7 @@ onMounted(() => { > { { { { { { label: t('data_set.numeric_value_decimal'), icon: 'icon_number_outlined', value: 'float' + }, + { + label: 'URL', + icon: 'icon_url_outlined', + value: 'url' } ] }, @@ -147,13 +152,13 @@ const handleChange = () => {