From 5c7fe6dd07309c84ed103d80450c10068d315f80 Mon Sep 17 00:00:00 2001 From: junjun Date: Tue, 23 Aug 2022 11:13:15 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat(=E8=A7=86=E5=9B=BE):=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=88=86=E7=BB=84=E6=9F=B1=E7=8A=B6=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/chart/view/ChartEdit.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/chart/view/ChartEdit.vue b/frontend/src/views/chart/view/ChartEdit.vue index 2eb95833b0..5a898c8394 100644 --- a/frontend/src/views/chart/view/ChartEdit.vue +++ b/frontend/src/views/chart/view/ChartEdit.vue @@ -1610,7 +1610,7 @@ export default { ele.filter = [] } }) - if (view.type === 'table-pivot') { + if (view.type === 'table-pivot' || view.type === 'bar-group') { view.xaxisExt.forEach(function(ele) { if (!ele.dateStyle || ele.dateStyle === '') { ele.dateStyle = 'y_M_d' From c92ac374ba95c0146dc71cd87d078e5d668b00f9 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 22 Aug 2022 23:25:27 -0400 Subject: [PATCH 2/7] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=A4=96=E8=A7=82=E9=85=8D=E7=BD=AE):=20uiinfo=E8=BF=87?= =?UTF-8?q?=E5=A4=A7=E5=AF=BC=E8=87=B4=E5=AD=98=E5=82=A8=E5=9C=A8=E5=89=8D?= =?UTF-8?q?=E7=AB=AFcookie=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/layout/components/Topbar.vue | 5 ++++- frontend/src/permission.js | 2 +- frontend/src/utils/auth.js | 4 ++-- frontend/src/views/login/index.vue | 9 ++++++--- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index caa4875664..f580b1a2c3 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -334,8 +334,11 @@ export default { } }, loadUiInfo() { - this.$store.dispatch('user/getUI').then(() => { + this.$store.dispatch('user/getUI').then((res) => { this.uiInfo = getSysUI() + if (!this.uiInfo || Object.keys(this.uiInfo).length === 0) { + this.uiInfo = res + } if (this.uiInfo['ui.logo'] && this.uiInfo['ui.logo'].paramValue) { this.logoUrl = '/system/ui/image/' + this.uiInfo['ui.logo'].paramValue } diff --git a/frontend/src/permission.js b/frontend/src/permission.js index 92430d23ef..8b983c5449 100644 --- a/frontend/src/permission.js +++ b/frontend/src/permission.js @@ -46,7 +46,7 @@ const routeBefore = (callBack) => { }) } else { document.title = getPageTitle() - if (uiInfo['ui.favicon'] && uiInfo['ui.favicon'].paramValue) { + if (!!uiInfo && uiInfo['ui.favicon'] && uiInfo['ui.favicon'].paramValue) { const faviconUrl = '/system/ui/image/' + uiInfo['ui.favicon'].paramValue changeFavicon(faviconUrl) } diff --git a/frontend/src/utils/auth.js b/frontend/src/utils/auth.js index b5d3ed9f7f..680a502d86 100644 --- a/frontend/src/utils/auth.js +++ b/frontend/src/utils/auth.js @@ -1,6 +1,6 @@ import Cookies from 'js-cookie' import Config from '@/settings' - +import store from '@/store' const TokenKey = Config.TokenKey const IdTokenKey = Config.IdTokenKey @@ -48,7 +48,7 @@ export function setSysUI(uiInfo) { export function getSysUI() { const json = Cookies.get('sysUiInfo') - return json ? JSON.parse(json) : null + return json ? JSON.parse(json) : store.getters.uiInfo } export function getTimeOut() { diff --git a/frontend/src/views/login/index.vue b/frontend/src/views/login/index.vue index f86ab4e39a..d606534438 100644 --- a/frontend/src/views/login/index.vue +++ b/frontend/src/views/login/index.vue @@ -164,9 +164,9 @@ export default { }, created() { - this.$store.dispatch('user/getUI').then(() => { + this.$store.dispatch('user/getUI').then((res) => { this.axiosFinished = true - this.showLoginImage() + this.showLoginImage(res) }).catch(err => { console.error(err) }) @@ -191,8 +191,11 @@ export default { Cookies.remove('OidcError') Cookies.remove('IdToken') }, - showLoginImage() { + showLoginImage(uiInfo) { this.uiInfo = getSysUI() + if (!this.uiInfo || Object.keys(this.uiInfo).length === 0) { + this.uiInfo = uiInfo + } if (this.uiInfo['ui.loginImage'] && this.uiInfo['ui.loginImage'].paramValue) { this.loginImageUrl = '/system/ui/image/' + this.uiInfo['ui.loginImage'].paramValue } From ed55854e351865c40602c77140b131362ecacf5a Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Mon, 22 Aug 2022 23:59:57 -0400 Subject: [PATCH 3/7] =?UTF-8?q?fix(=E4=BB=AA=E8=A1=A8=E6=9D=BF-=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E5=99=A8):=20=E6=95=B0=E5=AD=97=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=99=A8=E6=A0=87=E9=A2=98=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/dataease/DeOutWidget.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/src/components/dataease/DeOutWidget.vue b/frontend/src/components/dataease/DeOutWidget.vue index fe349cd352..b1c3bd26e5 100644 --- a/frontend/src/components/dataease/DeOutWidget.vue +++ b/frontend/src/components/dataease/DeOutWidget.vue @@ -157,6 +157,13 @@ export default { alignItems: 'center' } } + + if (vertical !== 'top' && this.element.component === 'de-number-range') { + if (!this.titleStyle) { + this.titleStyle = {} + } + this.titleStyle.marginTop = '-20px' + } }, getCondition() { if (this.$refs && this.$refs['deOutWidget'] && this.$refs['deOutWidget'].getCondition) { From 46d6973fd840dd45d3473744439f08cabe511900 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 23 Aug 2022 00:36:58 -0400 Subject: [PATCH 4/7] =?UTF-8?q?style(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E8=8F=9C=E5=8D=95=E5=9B=BE?= =?UTF-8?q?=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/icons/svg/display-setting.svg | 1 + frontend/src/icons/svg/plugins-new.svg | 1 + frontend/src/icons/svg/sys-param.svg | 1 + frontend/src/icons/svg/sys-setting.svg | 1 + 4 files changed, 4 insertions(+) create mode 100644 frontend/src/icons/svg/display-setting.svg create mode 100644 frontend/src/icons/svg/plugins-new.svg create mode 100644 frontend/src/icons/svg/sys-param.svg create mode 100644 frontend/src/icons/svg/sys-setting.svg diff --git a/frontend/src/icons/svg/display-setting.svg b/frontend/src/icons/svg/display-setting.svg new file mode 100644 index 0000000000..3f590542f8 --- /dev/null +++ b/frontend/src/icons/svg/display-setting.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/icons/svg/plugins-new.svg b/frontend/src/icons/svg/plugins-new.svg new file mode 100644 index 0000000000..8dcbb26a29 --- /dev/null +++ b/frontend/src/icons/svg/plugins-new.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/icons/svg/sys-param.svg b/frontend/src/icons/svg/sys-param.svg new file mode 100644 index 0000000000..f6c6f02c94 --- /dev/null +++ b/frontend/src/icons/svg/sys-param.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/src/icons/svg/sys-setting.svg b/frontend/src/icons/svg/sys-setting.svg new file mode 100644 index 0000000000..171c06129c --- /dev/null +++ b/frontend/src/icons/svg/sys-setting.svg @@ -0,0 +1 @@ + \ No newline at end of file From a889f92d8768c90418e906577842c7a0759c87f6 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 23 Aug 2022 12:40:33 +0800 Subject: [PATCH 5/7] =?UTF-8?q?fix(=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86):=20=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E8=8F=9C=E5=8D=95=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/resources/db/migration/V39__1.14.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/src/main/resources/db/migration/V39__1.14.sql b/backend/src/main/resources/db/migration/V39__1.14.sql index bf26183ab8..e1fba79f28 100644 --- a/backend/src/main/resources/db/migration/V39__1.14.sql +++ b/backend/src/main/resources/db/migration/V39__1.14.sql @@ -35,3 +35,9 @@ CREATE TABLE IF NOT EXISTS `sys_param_assist` ( ALTER TABLE `sys_task_email` MODIFY COLUMN `view_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '关联视图' AFTER `task_id`; +BEGIN; +update `sys_menu` set icon = 'plugins-new' where `menu_id` = 101; +update `sys_menu` set icon = 'sys-setting' where `menu_id` = 700; +update `sys_menu` set icon = 'sys-param' where `menu_id` = 6; +update `sys_menu` set icon = 'display-setting' where `menu_id` = 710; +COMMIT; \ No newline at end of file From 93cee7a8da8ce2d6a789adfd4c46866cca31edbd Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 23 Aug 2022 12:46:14 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feat(=E6=95=B0=E6=8D=AE=E9=9B=86):=20SQL?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E5=8F=82=E6=95=B0=E5=8C=96=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=AD=90=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/dataset/DataSetTableService.java | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java index 5e2ea85f25..5c8b63a487 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -44,6 +44,7 @@ import io.dataease.provider.datasource.JdbcProvider; import io.dataease.service.datasource.DatasourceService; import io.dataease.service.engine.EngineService; import io.dataease.service.sys.SysAuthService; +import net.sf.jsqlparser.expression.Alias; import net.sf.jsqlparser.expression.BinaryExpression; import net.sf.jsqlparser.expression.Expression; import net.sf.jsqlparser.expression.Parenthesis; @@ -52,10 +53,7 @@ import net.sf.jsqlparser.expression.operators.conditional.OrExpression; import net.sf.jsqlparser.expression.operators.relational.*; import net.sf.jsqlparser.parser.CCJSqlParserUtil; import net.sf.jsqlparser.statement.Statement; -import net.sf.jsqlparser.statement.select.PlainSelect; -import net.sf.jsqlparser.statement.select.Select; -import net.sf.jsqlparser.statement.select.SubSelect; -import net.sf.jsqlparser.statement.select.WithItem; +import net.sf.jsqlparser.statement.select.*; import net.sf.jsqlparser.util.deparser.ExpressionDeParser; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.ObjectUtils; @@ -959,6 +957,7 @@ public class DataSetTableService { public void checkVariable(final String sql) throws Exception { String tmpSql = removeVariables(sql); + System.out.println(tmpSql); if (tmpSql.contains(SubstitutedParams)) { throw new Exception(Translator.get("I18N_SQL_variable_limit")); } @@ -1003,16 +1002,27 @@ public class DataSetTableService { hasVariables = true; sql = sql.replace(matcher.group(), SubstitutedParams); } - if (!hasVariables) { + if (!hasVariables && !sql.contains(SubstitutedParams)) { return sql; } CCJSqlParserUtil.parse(sql, parser -> parser.withSquareBracketQuotation(true)); Statement statement = CCJSqlParserUtil.parse(sql); Select select = (Select) statement; PlainSelect plainSelect = ((PlainSelect) select.getSelectBody()); + // 访问from + FromItem fromItem = plainSelect.getFromItem(); + if (fromItem instanceof SubSelect) { + SelectBody selectBody = ((SubSelect) fromItem).getSelectBody(); + SubSelect subSelect = new SubSelect(); + Select subSelectTmp = (Select)CCJSqlParserUtil.parse(removeVariables(selectBody.toString())); + PlainSelect subPlainSelect = ((PlainSelect) subSelectTmp.getSelectBody()); + subSelect.setSelectBody(subPlainSelect); + subSelect.setAlias(new Alias(fromItem.getAlias().toString())); + plainSelect.setFromItem(subSelect); + } Expression expr = plainSelect.getWhere(); if (expr == null) { - return sql; + return plainSelect.toString(); } StringBuilder stringBuilder = new StringBuilder(); BinaryExpression binaryExpression = null; From e7e71f4526f39733d6b19712346bf92b55a150cf Mon Sep 17 00:00:00 2001 From: taojinlong Date: Tue, 23 Aug 2022 12:50:34 +0800 Subject: [PATCH 7/7] =?UTF-8?q?refactor(=E6=95=B0=E6=8D=AE=E9=9B=86):=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lang/en.js | 4 +--- frontend/src/lang/tw.js | 5 ----- frontend/src/lang/zh.js | 4 ---- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/frontend/src/lang/en.js b/frontend/src/lang/en.js index aaeab5a13d..c2079eb1ba 100644 --- a/frontend/src/lang/en.js +++ b/frontend/src/lang/en.js @@ -1439,7 +1439,6 @@ export default { stopped: 'End', exec: 'underway', pending: 'Pause', - exec: 'Execute Once', confirm_exec: 'Manual trigger execution?', change_success: 'State switch successful', excel_replace_msg: 'Calculation fields, custom datasets, associated datasets, dashboards, etc. may be affected. Confirm the replacement?', @@ -1975,14 +1974,13 @@ export default { un_install_error: 'Uninstall failed, please contact the administrator' }, display: { - favicon: 'Favicon', + favicon: 'System Icon', logo: 'Head system logo', loginLogo: 'Login page header logo', loginImage: 'Picture on the right side of the login page', loginTitle: 'Login page title', title: 'System name', advice_size: 'Advice picture size', - themeLight: 'Light', themeDark: 'Dark', themeCustom: 'Custom', diff --git a/frontend/src/lang/tw.js b/frontend/src/lang/tw.js index 86fe0f2910..a0ac1a9354 100644 --- a/frontend/src/lang/tw.js +++ b/frontend/src/lang/tw.js @@ -1438,7 +1438,6 @@ export default { stopped: '執行結束', exec: '執行中', pending: '暫停', - exec: '執行一次', confirm_exec: '手動觸發執行?', change_success: '狀態切換成功', excel_replace_msg: '可能會影響計算欄位、自定義數據集、關聯數據集、儀錶板等,確認替換?', @@ -1983,14 +1982,10 @@ export default { title: '繫統名稱', advice_size: '建議圖片大小', theme: '主題顔色', - topMenuColor: '頭部背景', topMenuActiveColor: '頭部選中背景', - topMenuTextColor: '頭部字體顔色', - topMenuTextActiveColor: '頭部字體選中顔色', - themeLight: '淺色', themeDark: '深色', themeCustom: '自定義', diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index 0e2e2f29f9..0725e2c715 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1992,14 +1992,10 @@ export default { title: '系统名称', advice_size: '建议图片大小', theme: '主题颜色', - favicon: '网站图标', topMenuColor: '头部背景', topMenuActiveColor: '头部选中背景', - topMenuTextColor: '头部字体颜色', - topMenuTextActiveColor: '头部字体选中颜色', - themeLight: '浅色', themeDark: '深色', themeCustom: '自定义',