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;
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
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) {
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
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: '自定义',
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/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'
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
}