Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangjiahao 2022-08-23 13:30:56 +08:00
commit 945d99336c
15 changed files with 48 additions and 26 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M960 80H64c-35.3 0-64 28.6-64 64v576c0 35.3 28.7 64 64 64h312c4.4 0 8 3.6 8 8v84c0 2.2-1.8 4-4 4h-60c-17.7 0-32 14.3-32 32v32h448v-32c0-17.7-14.3-32-32-32h-60c-2.2 0-4-1.8-4-4v-84c0-4.4 3.6-8 8-8h312c35.3 0 64-28.7 64-64V144c0-35.4-28.7-64-64-64zM576 876c0 2.2-1.8 4-4 4H452c-2.2 0-4-1.8-4-4v-52c0-4.4 3.6-8 8-8h112c4.4 0 8 3.6 8 8v52z m384-172c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16v-44c0-2.2 1.8-4 4-4h888c2.2 0 4 1.8 4 4v44z m-4-112H68c-2.2 0-4-1.8-4-4V160c0-8.8 7.2-16 16-16h864c8.8 0 16 7.2 16 16v428c0 2.2-1.8 4-4 4z" /></svg>

After

Width:  |  Height:  |  Size: 802 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M903.5 98.2H119.3c-30.9 0-56 25.1-56 56v606.1c0 30.9 25.1 56 56 56h224v56c0 30.9 25.1 56 56 56h224c30.9 0 56-25.1 56-56v-56h224c30.9 0 56-25.1 56-56V154.2c0.2-31-24.9-56-55.8-56z m-1.8 648.4H126.6V168.5h769.1l6 578.1zM567.3 326.7h-308c-15.4 0-28-12.6-28-28s12.6-28 28-28h308c15.4 0 28 12.6 28 28s-12.6 28-28 28z m56 148.9h-364c-15.4 0-28-12.6-28-28s12.6-28 28-28h364c15.4 0 28 12.6 28 28s-12.6 28-28 28z m140 149h-504c-15.4 0-28-12.6-28-28s12.6-28 28-28h504c15.4 0 28 12.6 28 28s-12.6 28-28 28z" /></svg>

After

Width:  |  Height:  |  Size: 771 B

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg class="icon" width="200px" height="200.00px" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M992.6 404.1 897.9 404.1C889.2 372.8 876.9 343.1 861.3 315.4L928.2 248.5C940.4 236.3 940.4 216.3 928.2 204L820 95.9C813.9 89.8 805.8 86.7 797.8 86.7 789.8 86.7 781.7 89.8 775.6 95.9L708.7 162.8C681 147.2 651.3 134.9 620 126.2L620 31.4C620 14.1 605.8 0 588.6 0L435.6 0C418.3 0 404.2 14.2 404.2 31.4L404.2 126.1C372.9 134.8 343.2 147.1 315.5 162.7L248.6 95.8C242.5 89.7 234.4 86.6 226.4 86.6 218.4 86.6 210.3 89.7 204.2 95.8L95.9 204C83.7 216.2 83.7 236.2 95.9 248.5L162.8 315.4C147.2 343.1 134.9 372.8 126.2 404.1L31.4 404.1C14.2 404.1 0 418.3 0 435.6L0 588.5C0 605.8 14.2 619.9 31.4 619.9L126.1 619.9C134.8 651.2 147.1 680.9 162.7 708.6L95.8 775.5C83.6 787.7 83.6 807.7 95.8 820L204 928.1C210.1 934.2 218.2 937.3 226.2 937.3 234.2 937.3 242.3 934.2 248.4 928.1L315.3 861.2C343 876.8 372.7 889.1 404 897.8L404 992.5C404 1009.8 418.2 1023.9 435.4 1023.9L588.3 1023.9C605.6 1023.9 619.7 1009.7 619.7 992.5L619.7 897.8C651 889.1 680.7 876.8 708.4 861.2L775.3 928.1C781.4 934.2 789.5 937.3 797.5 937.3 805.5 937.3 813.6 934.2 819.7 928.1L928.1 820C940.3 807.8 940.3 787.8 928.1 775.5L861.2 708.6C876.8 680.9 889.1 651.2 897.8 619.9L992.5 619.9C1009.8 619.9 1023.9 605.7 1023.9 588.5L1023.9 435.6C1024 418.3 1009.9 404.1 992.6 404.1L992.6 404.1ZM960 555.9 897.8 555.9 849.2 555.9 836.1 602.7C828.8 629 818.4 654.1 805.4 677.2L781.5 719.5 815.9 753.9 859.8 797.8 797.7 859.9 753.8 816 719.4 781.6 677.1 805.5C654 818.5 628.9 828.9 602.6 836.2L555.8 849.3 555.8 897.9 555.8 960 468 960 468 897.8 468 849.2 421.2 836.1C394.9 828.8 369.8 818.4 346.7 805.4L304.4 781.5 270 815.9 226.1 859.8 164 797.7 207.9 753.8 242.3 719.4 218.4 677.1C205.4 654 195 628.9 187.7 602.6L174.6 555.8 126 555.8 64 555.8 64 468 126.2 468 174.8 468 187.9 421.2C195.2 394.9 205.6 369.8 218.6 346.7L242.5 304.4 208.1 270 164.2 226.1 226.3 164 270.2 207.9 304.6 242.3 346.9 218.4C370 205.4 395.1 195 421.4 187.7L468.2 174.6 468.2 126 468.2 64 556 64 556 126.2 556 174.8 602.8 187.9C629.1 195.2 654.2 205.6 677.3 218.6L719.6 242.5 754 208.1 797.9 164.2 860 226.3 816.1 270.2 781.7 304.6 805.6 346.9C818.6 370 829 395.1 836.3 421.4L849.4 468.2 898 468.2 960 468.2 960 555.9 960 555.9Z" /><path d="M512 320C406 320 320 406 320 512 320 618 406 704 512 704 618 704 704 618 704 512 704 406 618 320 512 320L512 320ZM512 640C477.8 640 445.7 626.7 421.5 602.5 397.3 578.3 384 546.2 384 512 384 477.8 397.3 445.7 421.5 421.5 445.7 397.3 477.8 384 512 384 546.2 384 578.3 397.3 602.5 421.5 626.7 445.7 640 477.8 640 512 640 546.2 626.7 578.3 602.5 602.5 578.3 626.7 546.2 640 512 640Z" /></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -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',

View File

@ -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: '自定義',

View File

@ -1992,14 +1992,10 @@ export default {
title: '系统名称',
advice_size: '建议图片大小',
theme: '主题颜色',
favicon: '网站图标',
topMenuColor: '头部背景',
topMenuActiveColor: '头部选中背景',
topMenuTextColor: '头部字体颜色',
topMenuTextActiveColor: '头部字体选中颜色',
themeLight: '浅色',
themeDark: '深色',
themeCustom: '自定义',

View File

@ -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
}

View File

@ -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)
}

View File

@ -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() {

View File

@ -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'

View File

@ -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
}