From 9c21fea0cefd58ae8cd2bc98b06ba12ad98be8cb Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 27 Jan 2022 14:14:56 +0800 Subject: [PATCH 01/12] =?UTF-8?q?fix:=20=E4=B8=BB=E9=A2=98=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=87=8D=E5=A4=8D=E6=8F=90=E7=A4=BA=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/plugins/server/ThemeServer.java | 10 +++++++++- .../src/main/resources/i18n/messages_en_US.properties | 4 +++- .../src/main/resources/i18n/messages_zh_CN.properties | 2 ++ .../src/main/resources/i18n/messages_zh_TW.properties | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/plugins/server/ThemeServer.java b/backend/src/main/java/io/dataease/plugins/server/ThemeServer.java index 99dc4c5fec..5e1ee1769d 100644 --- a/backend/src/main/java/io/dataease/plugins/server/ThemeServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/ThemeServer.java @@ -2,6 +2,7 @@ package io.dataease.plugins.server; import java.util.List; +import org.apache.commons.lang3.ObjectUtils; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; @@ -11,6 +12,7 @@ import org.springframework.web.multipart.MultipartFile; import io.dataease.commons.exception.DEException; import io.dataease.commons.utils.LogUtil; +import io.dataease.i18n.Translator; import io.dataease.plugins.config.SpringContextUtil; import io.dataease.plugins.xpack.theme.dto.ThemeDto; import io.dataease.plugins.xpack.theme.dto.ThemeItem; @@ -42,7 +44,13 @@ public class ThemeServer { themeXpackService.save(request, bodyFile); } catch (Exception e) { LogUtil.error(e.getMessage(), e); - DEException.throwException(e); + if (ObjectUtils.isNotEmpty(e.getMessage()) && e.getMessage().indexOf("theme_name_repeat") != -1) { + DEException.throwException(Translator.get("theme_name_repeat")); + } else if (ObjectUtils.isNotEmpty(e.getMessage()) && e.getMessage().indexOf("theme_name_empty") != -1) { + DEException.throwException(Translator.get("theme_name_empty")); + } else { + DEException.throwException(e); + } } } diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index a4d73c1fec..8b8f3705cf 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -116,4 +116,6 @@ i18n_rp_exist=Row permission of the same type already exists i18n_field_name_repeat=Field name can't repeat i18n_calc_field_error=Field expression error i18n_cp_exist=Column permission of the same type already exists -connection_failed=Connection Failed \ No newline at end of file +connection_failed=Connection Failed +theme_name_repeat=name of theme has been existed +theme_name_empty=name can not be empty \ No newline at end of file diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 2179e63f7b..e52791f02a 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -116,3 +116,5 @@ i18n_field_name_repeat=字段名不能重复 i18n_calc_field_error=字段表达式语法错误 i18n_cp_exist=已有同类型的列权限存在 connection_failed=连接失败 +theme_name_repeat=名称已存在 +theme_name_empty=名称不能为空 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 49b17f5dde..c3f6464aaa 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -117,3 +117,5 @@ i18n_field_name_repeat=字段名不能重復 i18n_calc_field_error=字段表達式語法錯誤 i18n_cp_exist=已有同類型的列權限存在 connection_failed=連接失敗 +theme_name_repeat=名稱已存在 +theme_name_empty=名稱不能為空 From 0236972b90363bd9c0d5eabc8369baa3c10b2b53 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 27 Jan 2022 14:27:21 +0800 Subject: [PATCH 02/12] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E5=90=8E=EF=BC=8C=E5=88=86=E7=BB=84tree=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/group/Group.vue | 1 + frontend/src/views/dataset/group/Group.vue | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/src/views/chart/group/Group.vue b/frontend/src/views/chart/group/Group.vue index 8699cabcf3..59eb5bec06 100644 --- a/frontend/src/views/chart/group/Group.vue +++ b/frontend/src/views/chart/group/Group.vue @@ -550,6 +550,7 @@ export default { this.$refs['tableForm'].validate((valid) => { if (valid) { view.title = view.name + view.sceneId = view.pid post('/chart/view/save', view).then(response => { this.closeTable() this.$message({ diff --git a/frontend/src/views/dataset/group/Group.vue b/frontend/src/views/dataset/group/Group.vue index 58064ec647..456f8a01fd 100644 --- a/frontend/src/views/dataset/group/Group.vue +++ b/frontend/src/views/dataset/group/Group.vue @@ -426,6 +426,7 @@ export default { this.$refs['tableForm'].validate((valid) => { if (valid) { table.isRename = true + table.sceneId = table.pid alter(table).then(response => { this.closeTable() this.$message({ From 34f51e1487849b6b2860108205a3eea8e6b90a26 Mon Sep 17 00:00:00 2001 From: junjie Date: Thu, 27 Jan 2022 14:42:37 +0800 Subject: [PATCH 03/12] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E5=9C=B0?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E7=AD=BE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/chart/components/shape-attr/LabelSelector.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue index 3a5acfe09f..54258414cf 100644 --- a/frontend/src/views/chart/components/shape-attr/LabelSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/LabelSelector.vue @@ -17,7 +17,7 @@ - + From 945d10d20d8f31d2062a29ac44679f5da17120e3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 27 Jan 2022 16:01:20 +0800 Subject: [PATCH 04/12] =?UTF-8?q?fix:=20favicon=E8=BF=B7=E4=B9=8B=E6=B6=88?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/pom.xml b/backend/pom.xml index 6ec77230fd..996b364e26 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -284,6 +284,7 @@ static/**/*.woff static/**/*.woff2 static/**/*.ttf + static/**/*.ico @@ -294,6 +295,7 @@ static/**/*.woff static/**/*.woff2 static/**/*.ttf + static/**/*.ico From eb6fbc7b5cc589dc5c7b10bec4c5590369e042d1 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 27 Jan 2022 16:20:34 +0800 Subject: [PATCH 05/12] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=98=BE=E7=A4=BA=E7=A9=BA=E7=99=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/canvas/components/Editor/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue index c84b50d0b1..d87568af00 100644 --- a/frontend/src/components/canvas/components/Editor/index.vue +++ b/frontend/src/components/canvas/components/Editor/index.vue @@ -101,7 +101,7 @@ :id="'component' + item.id" ref="wrapperChild" class="component" - :filters="filterMap[item.propValue.viewId]" + :filters="filterMap[item.propValue && item.propValue.viewId]" :style="getComponentStyleDefault(item.style)" :prop-value="item.propValue" :element="item" From 02eb894b2856003d1c6616eb3afc2265665850e0 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 27 Jan 2022 16:55:17 +0800 Subject: [PATCH 06/12] =?UTF-8?q?refactor:=20=E4=BF=AE=E6=94=B9=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E6=89=93=E5=8C=85=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/pom.xml | 4 ++-- mobile/.gitignore | 2 +- mobile/package.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 996b364e26..8f5b619355 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -418,13 +418,13 @@ - + - + diff --git a/mobile/.gitignore b/mobile/.gitignore index 208913e4ed..f5439a7519 100644 --- a/mobile/.gitignore +++ b/mobile/.gitignore @@ -6,7 +6,7 @@ yarn-debug.log* yarn-error.log* package-lock.json tests/**/coverage/ - +.automator/ # Editor directories and files .hbuilderx .idea diff --git a/mobile/package.json b/mobile/package.json index 87114f95ee..73618117cb 100644 --- a/mobile/package.json +++ b/mobile/package.json @@ -7,7 +7,7 @@ "build": "npm run build:h5", "build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build", "build:custom": "cross-env NODE_ENV=production uniapp-cli custom", - "build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build", + "build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 UNI_OUTPUT_DIR=dist vue-cli-service uni-build", "build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build", "build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build", "build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build", From 31f9735ab238cd2a5eb45a0d3de2097eb215103e Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Thu, 27 Jan 2022 17:57:23 +0800 Subject: [PATCH 07/12] =?UTF-8?q?fix:=20=E6=95=B0=E5=AD=97=E5=8C=BA?= =?UTF-8?q?=E9=97=B4=E7=BB=84=E4=BB=B6=E4=B8=8D=E8=83=BD=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/widget/serviceImpl/NumberRangeServiceImpl.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js b/frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js index ab190766eb..65ba1b1354 100644 --- a/frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/NumberRangeServiceImpl.js @@ -99,6 +99,11 @@ class NumberRangeServiceImpl extends WidgetService { return param } } + return { + component: element, + value: [], + operator: 'eq' + } } } const numberRangeServiceImpl = new NumberRangeServiceImpl() From c8e15a2162baeddad9ec1dd88f1caeac49d5d9b8 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 28 Jan 2022 11:01:34 +0800 Subject: [PATCH 08/12] =?UTF-8?q?fix:=20=E6=97=A5=E6=9C=9F=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E5=8A=A8=E6=80=81=E6=97=B6=E9=97=B4=E5=AD=A3=E5=BA=A6?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/widget/serviceImpl/TimeDateRangeServiceImpl.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js b/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js index f69e9d36db..c078919a9e 100644 --- a/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TimeDateRangeServiceImpl.js @@ -125,7 +125,8 @@ class TimeDateRangeServiceImpl extends WidgetService { getEndQuarter() { var now = new Date() var nowMonth = now.getMonth() - const endMonth = Math.floor((nowMonth / 3)) * 3 + (nowMonth % 3) + const quar = Math.floor(nowMonth / 3) + const endMonth = quar * 3 + 2 const days = (endMonth === 5 || endMonth === 8) ? 30 : 31 return new Date(now.getFullYear(), endMonth, days) } From 6f5fec69286ee0468875c32c14c1ef4b62047807 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 28 Jan 2022 11:40:42 +0800 Subject: [PATCH 09/12] =?UTF-8?q?fix:=20=E6=96=87=E6=9C=AC=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E7=BB=84=E4=BB=B6=E7=A9=BA=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/widget/DeWidget/DeInputSearch.vue | 2 +- .../components/widget/serviceImpl/TextInputServiceImpl.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/widget/DeWidget/DeInputSearch.vue b/frontend/src/components/widget/DeWidget/DeInputSearch.vue index ec0e54a320..f38ddef05c 100644 --- a/frontend/src/components/widget/DeWidget/DeInputSearch.vue +++ b/frontend/src/components/widget/DeWidget/DeInputSearch.vue @@ -64,7 +64,7 @@ export default { }, created() { if (this.element.options.value) { - this.value = this.element.options.value + this.value = this.fillValueDerfault() this.search() } }, diff --git a/frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js b/frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js index 764c354bae..6d5ab5116d 100644 --- a/frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js +++ b/frontend/src/components/widget/serviceImpl/TextInputServiceImpl.js @@ -68,7 +68,7 @@ class TextInputServiceImpl extends WidgetService { }) } getParam(element) { - const value = element.options.value + const value = this.fillValueDerfault(element) const param = { component: element, value: !value ? [] : Array.isArray(value) ? value : [value], @@ -76,6 +76,11 @@ class TextInputServiceImpl extends WidgetService { } return param } + fillValueDerfault(element) { + const defaultV = element.options.value === null ? '' : element.options.value.toString() + if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') return null + return defaultV.split(',')[0] + } } const textInputServiceImpl = new TextInputServiceImpl() export default textInputServiceImpl From 496962a68eec2a43ea3793a5117f72db09b97f5c Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 28 Jan 2022 13:08:44 +0800 Subject: [PATCH 10/12] =?UTF-8?q?fix:=20=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E8=83=8C=E6=99=AF=E7=94=B1=E9=A2=9C=E8=89=B2=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E4=B8=BA=E5=9B=BE=E7=89=87=EF=BC=8C=E6=9C=AA=E5=8A=A0=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=97=B6=E8=83=8C=E6=99=AF=E9=A2=9C=E8=89=B2=E4=BE=9D?= =?UTF-8?q?=E7=84=B6=E5=AD=98=E5=9C=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/panel/edit/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue index 0dd9838701..905aee548b 100644 --- a/frontend/src/views/panel/edit/index.vue +++ b/frontend/src/views/panel/edit/index.vue @@ -368,7 +368,7 @@ export default { } if (this.canvasStyleData.openCommonStyle) { - if (this.canvasStyleData.panel.backgroundType === 'image' && this.canvasStyleData.panel.imageUrl) { + if (this.canvasStyleData.panel.backgroundType === 'image' && typeof (this.canvasStyleData.panel.imageUrl) === 'string') { style = { background: `url(${this.canvasStyleData.panel.imageUrl}) no-repeat`, ...style From 8d4519445c0fbc09bae761e99c1c07f8b1495185 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 28 Jan 2022 13:14:43 +0800 Subject: [PATCH 11/12] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E6=95=99=E5=AD=A6=E8=A7=86=E9=A2=91=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/wizard/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/views/wizard/index.vue b/frontend/src/views/wizard/index.vue index 8c8641ccc3..2700013857 100644 --- a/frontend/src/views/wizard/index.vue +++ b/frontend/src/views/wizard/index.vue @@ -54,9 +54,9 @@ export default { }, { head: this.$t('wizard.teaching_video'), - content: '40分钟带你玩转 DataEase
用DataEase开源工具可视化 ClickHouse数据', + content: '【DataEase教学视频】视图钻取
【DataEase教学视频】移动端布局设置', bottom: '', - href: 'https://e.vhall.com/v3/user/home/45637107', + href: 'https://space.bilibili.com/510493147/channel/collectiondetail?sid=150431', component: 'CardDetail' }, { From de581d22143b2aa024161363d0e85383fbdf89d7 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 28 Jan 2022 13:34:32 +0800 Subject: [PATCH 12/12] =?UTF-8?q?fix:=20=E6=96=B0tab=E9=A1=B5=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E4=BB=AA=E8=A1=A8=E6=9D=BF=E8=B7=B3=E8=BD=AC=E6=97=B6?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=BA=E5=BD=93=E5=89=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=89=93=E5=BC=80=E7=9B=AE=E6=A0=87=E4=BB=AA=E8=A1=A8=E6=9D=BF?= =?UTF-8?q?=E6=97=B6=EF=BC=8C=E9=A1=B5=E9=9D=A2=E6=9C=AA=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/canvas/components/Editor/PreviewEject.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frontend/src/components/canvas/components/Editor/PreviewEject.vue b/frontend/src/components/canvas/components/Editor/PreviewEject.vue index c742272618..12113d1d49 100644 --- a/frontend/src/components/canvas/components/Editor/PreviewEject.vue +++ b/frontend/src/components/canvas/components/Editor/PreviewEject.vue @@ -29,6 +29,11 @@ export default { } } }, + watch: { + '$route.params.reportId': function() { + this.restore() + } + }, mounted() { this.restore() },