Merge branch 'dev' into pr@dev_station_msg

This commit is contained in:
dataeaseShu 2022-08-31 16:16:06 +08:00
commit 6871a6b005
30 changed files with 140 additions and 98 deletions

View File

@ -168,9 +168,7 @@ public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrappe
// NOTE: It's highly recommended to use the ESAPI library and // NOTE: It's highly recommended to use the ESAPI library and
// uncomment the following line to // uncomment the following line to
// avoid encoded attacks. // avoid encoded attacks.
// value = ESAPI.encoder().canonicalize(value);
// Avoid null characters // Avoid null characters
/** value = value.replaceAll("", ""); ***/
// Avoid anything between script tags // Avoid anything between script tags
Pattern scriptPattern = Pattern.compile( Pattern scriptPattern = Pattern.compile(
"<[\r\n| | ]*script[\r\n| | ]*>(.*?)</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE); "<[\r\n| | ]*script[\r\n| | ]*>(.*?)</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE);

View File

@ -1,5 +1,6 @@
package io.dataease.job.sechedule; package io.dataease.job.sechedule;
import io.dataease.commons.utils.LogUtil;
import org.quartz.JobExecutionContext; import org.quartz.JobExecutionContext;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -12,6 +13,6 @@ import java.util.Date;
public class TestJob extends DeScheduleJob { public class TestJob extends DeScheduleJob {
@Override @Override
void businessExecute(JobExecutionContext context) { void businessExecute(JobExecutionContext context) {
System.out.println("Test Job -- " + new SimpleDateFormat("HH:mm:ss").format(new Date())); LogUtil.info("Test Job -- " + new SimpleDateFormat("HH:mm:ss").format(new Date()));
} }
} }

View File

@ -1,5 +1,6 @@
package io.dataease.listener; package io.dataease.listener;
import io.dataease.commons.utils.LogUtil;
import io.dataease.plugins.common.base.domain.DatasetTableTask; import io.dataease.plugins.common.base.domain.DatasetTableTask;
import io.dataease.commons.constants.ScheduleType; import io.dataease.commons.constants.ScheduleType;
import io.dataease.service.ScheduleService; import io.dataease.service.ScheduleService;
@ -23,7 +24,7 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
@Override @Override
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) { public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
System.out.println("================= Application start ================="); LogUtil.info("================= Application start =================");
// 项目启动从数据库读取任务加入到Quartz // 项目启动从数据库读取任务加入到Quartz
List<DatasetTableTask> list = dataSetTableTaskService.list(new DatasetTableTask()); List<DatasetTableTask> list = dataSetTableTaskService.list(new DatasetTableTask());
for (DatasetTableTask task : list) { for (DatasetTableTask task : list) {

View File

@ -31,12 +31,10 @@ public class RowPermissionMergeListener implements ApplicationListener<Applicati
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) { public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
Map<String, RowPermissionTreeService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((RowPermissionTreeService.class)); Map<String, RowPermissionTreeService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((RowPermissionTreeService.class));
if (beansOfType.keySet().size() > 0) { if (beansOfType.keySet().size() > 0) {
System.out.println("====row permissions merge [start]====");
logger.info("====row permissions merge [start]===="); logger.info("====row permissions merge [start]====");
SysStartupJob sysStartupJob = sysStartupJobMapper.selectByPrimaryKey(JOB_ID); SysStartupJob sysStartupJob = sysStartupJobMapper.selectByPrimaryKey(JOB_ID);
if (ObjectUtils.isNotEmpty(sysStartupJob) && StringUtils.equalsIgnoreCase(sysStartupJob.getStatus(), "ready")) { if (ObjectUtils.isNotEmpty(sysStartupJob) && StringUtils.equalsIgnoreCase(sysStartupJob.getStatus(), "ready")) {
System.out.println("====row permissions merge [doing]====");
logger.info("====row permissions merge [doing]===="); logger.info("====row permissions merge [doing]====");
RowPermissionTreeService rowPermissionTreeService = SpringContextUtil.getBean(RowPermissionTreeService.class); RowPermissionTreeService rowPermissionTreeService = SpringContextUtil.getBean(RowPermissionTreeService.class);
@ -44,7 +42,6 @@ public class RowPermissionMergeListener implements ApplicationListener<Applicati
sysStartupJob.setStatus("done"); sysStartupJob.setStatus("done");
sysStartupJobMapper.updateByPrimaryKey(sysStartupJob); sysStartupJobMapper.updateByPrimaryKey(sysStartupJob);
} }
System.out.println("====row permissions merge [end]====");
logger.info("====row permissions merge [end]===="); logger.info("====row permissions merge [end]====");
} }
} }

View File

@ -29,7 +29,6 @@ public class SystemInitListener implements ApplicationListener<ApplicationReadyE
@Override @Override
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) { public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
System.out.println("=====initSystem from code [Start]=====");
logger.info("=====initSystem from code [Start]====="); logger.info("=====initSystem from code [Start]=====");
Integer dataeseVersion = versionMapper.lastSuccessDataEaseVersion(); Integer dataeseVersion = versionMapper.lastSuccessDataEaseVersion();
Integer dataeseCodeVersion = versionMapper.lastDataEaseCodeVersion(); Integer dataeseCodeVersion = versionMapper.lastDataEaseCodeVersion();
@ -51,8 +50,6 @@ public class SystemInitListener implements ApplicationListener<ApplicationReadyE
codeVersionMapper.insert(codeVersion); codeVersionMapper.insert(codeVersion);
} }
logger.info("=====initSystem from code [End]====="); logger.info("=====initSystem from code [End]=====");
System.out.println("=====initSystem from code [End]=====");
} }
} }

View File

@ -64,7 +64,7 @@ public class CasServer {
sysUserService.saveCASUser(name, email); sysUserService.saveCASUser(name, email);
sysUserEntity = authUserService.getUserByName(name); sysUserEntity = authUserService.getUserByName(name);
} }
String realPwd = CodingUtil.md5(sysUserService.defaultPWD()); String realPwd = sysUserEntity.getPassword();
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build(); TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
String token = JWTUtils.sign(tokenInfo, realPwd); String token = JWTUtils.sign(tokenInfo, realPwd);
ServletUtils.setToken(token); ServletUtils.setToken(token);

View File

@ -78,7 +78,7 @@ public class SSOServer {
sysUserEntity = authUserService.getUserBySub(ssoUserInfo.getSub()); sysUserEntity = authUserService.getUserBySub(ssoUserInfo.getSub());
} }
TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build(); TokenInfo tokenInfo = TokenInfo.builder().userId(sysUserEntity.getUserId()).username(sysUserEntity.getUsername()).build();
String realPwd = CodingUtil.md5(sysUserService.defaultPWD()); String realPwd = sysUserEntity.getPassword();
String token = JWTUtils.sign(tokenInfo, realPwd); String token = JWTUtils.sign(tokenInfo, realPwd);
ServletUtils.setToken(token); ServletUtils.setToken(token);

View File

@ -213,8 +213,8 @@ public class ApiProvider extends Provider {
if (StringUtils.isNotEmpty(value) && value.startsWith("[")) { if (StringUtils.isNotEmpty(value) && value.startsWith("[")) {
JSONObject o = new JSONObject(); JSONObject o = new JSONObject();
JSONArray jsonArray = jsonObject.getJSONArray(s);
try { try {
JSONArray jsonArray = jsonObject.getJSONArray(s);
List<JSONObject> childrenField = new ArrayList<>(); List<JSONObject> childrenField = new ArrayList<>();
for (Object object: jsonArray) { for (Object object: jsonArray) {
JSONObject.parseObject(object.toString()); JSONObject.parseObject(object.toString());

View File

@ -294,7 +294,6 @@ public class MongoQueryProvider extends QueryProvider {
} }
if (CollectionUtils.isNotEmpty(yFields)) { if (CollectionUtils.isNotEmpty(yFields)) {
st_sql.add("aggregators", yFields); st_sql.add("aggregators", yFields);
// st_sql.add("notUseAs", true);
} }
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres); if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj); if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);
@ -497,7 +496,6 @@ public class MongoQueryProvider extends QueryProvider {
} }
if (CollectionUtils.isNotEmpty(yFields)) { if (CollectionUtils.isNotEmpty(yFields)) {
st_sql.add("aggregators", yFields); st_sql.add("aggregators", yFields);
// st_sql.add("notUseAs", true);
} }
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres); if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj); if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);
@ -616,7 +614,6 @@ public class MongoQueryProvider extends QueryProvider {
} }
if (CollectionUtils.isNotEmpty(yFields)) { if (CollectionUtils.isNotEmpty(yFields)) {
st_sql.add("aggregators", yFields); st_sql.add("aggregators", yFields);
// st_sql.add("notUseAs", true);
} }
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres); if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj); if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);
@ -704,7 +701,6 @@ public class MongoQueryProvider extends QueryProvider {
ST st_sql = stg.getInstanceOf("querySql"); ST st_sql = stg.getInstanceOf("querySql");
if (CollectionUtils.isNotEmpty(yFields)) { if (CollectionUtils.isNotEmpty(yFields)) {
st_sql.add("aggregators", yFields); st_sql.add("aggregators", yFields);
// st_sql.add("notUseAs", true);
} }
if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres); if (CollectionUtils.isNotEmpty(wheres)) st_sql.add("filters", wheres);
if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj); if (ObjectUtils.isNotEmpty(tableObj)) st_sql.add("table", tableObj);

View File

@ -41,6 +41,9 @@ public class VAuthModelService {
} }
private List<VAuthModelDTO> filterPrivileges(VAuthModelRequest request, List<VAuthModelDTO> result) { private List<VAuthModelDTO> filterPrivileges(VAuthModelRequest request, List<VAuthModelDTO> result) {
if(AuthUtils.getUser().getIsAdmin()){
return result;
}
if (request.getPrivileges() != null) { if (request.getPrivileges() != null) {
result = result.stream().filter(vAuthModelDTO -> { result = result.stream().filter(vAuthModelDTO -> {
if (vAuthModelDTO.getNodeType().equalsIgnoreCase("spine") || (vAuthModelDTO.getNodeType().equalsIgnoreCase("leaf") && vAuthModelDTO.getPrivileges() != null && vAuthModelDTO.getPrivileges().contains(request.getPrivileges()))) { if (vAuthModelDTO.getNodeType().equalsIgnoreCase("spine") || (vAuthModelDTO.getNodeType().equalsIgnoreCase("leaf") && vAuthModelDTO.getPrivileges() != null && vAuthModelDTO.getPrivileges().contains(request.getPrivileges()))) {

View File

@ -830,14 +830,12 @@ public class ChartViewService {
//如果不是插件视图 走原生逻辑 //如果不是插件视图 走原生逻辑
if (table.getMode() == 0) {// 直连 if (table.getMode() == 0) {// 直连
// Datasource ds = datasourceService.get(table.getDataSourceId());
if (ObjectUtils.isEmpty(ds)) { if (ObjectUtils.isEmpty(ds)) {
throw new RuntimeException(Translator.get("i18n_datasource_delete")); throw new RuntimeException(Translator.get("i18n_datasource_delete"));
} }
if (StringUtils.isNotEmpty(ds.getStatus()) && ds.getStatus().equalsIgnoreCase("Error")) { if (StringUtils.isNotEmpty(ds.getStatus()) && ds.getStatus().equalsIgnoreCase("Error")) {
throw new Exception(Translator.get("i18n_invalid_ds")); throw new Exception(Translator.get("i18n_invalid_ds"));
} }
// DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
datasourceRequest.setDatasource(ds); datasourceRequest.setDatasource(ds);
DataTableInfoDTO dataTableInfoDTO = gson.fromJson(table.getInfo(), DataTableInfoDTO.class); DataTableInfoDTO dataTableInfoDTO = gson.fromJson(table.getInfo(), DataTableInfoDTO.class);
QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType()); QueryProvider qp = ProviderFactory.getQueryProvider(ds.getType());
@ -903,8 +901,6 @@ public class ChartViewService {
data = datasourceProvider.getData(datasourceRequest); data = datasourceProvider.getData(datasourceRequest);
} else if (table.getMode() == 1) {// 抽取 } else if (table.getMode() == 1) {// 抽取
// 连接doris构建doris数据源查询 // 连接doris构建doris数据源查询
// Datasource ds = engineService.getDeEngine();
// DatasourceProvider datasourceProvider = ProviderFactory.getProvider(ds.getType());
datasourceRequest.setDatasource(ds); datasourceRequest.setDatasource(ds);
String tableName = "ds_" + table.getId().replaceAll("-", "_"); String tableName = "ds_" + table.getId().replaceAll("-", "_");
datasourceRequest.setTable(tableName); datasourceRequest.setTable(tableName);
@ -1154,7 +1150,6 @@ public class ChartViewService {
pluginViewParam.setPluginChartFieldCustomFilters(fieldFilters); pluginViewParam.setPluginChartFieldCustomFilters(fieldFilters);
pluginViewParam.setPluginChartExtFilters(panelFilters); pluginViewParam.setPluginChartExtFilters(panelFilters);
pluginViewParam.setPluginViewLimit(pluginViewLimit); pluginViewParam.setPluginViewLimit(pluginViewLimit);
// pluginViewParam.setUserId(AuthUtils.getUser().getUserId());
return pluginViewParam; return pluginViewParam;
} }

View File

@ -38,6 +38,9 @@ public class ViewExportExcel {
private Type tokenType = new TypeToken<List<Map<String, Object>>>() { private Type tokenType = new TypeToken<List<Map<String, Object>>>() {
}.getType(); }.getType();
private Type fieldTokenType = new TypeToken<List<ChartViewFieldDTO>>() {
}.getType();
@DePermissionProxy(paramIndex = 2) @DePermissionProxy(paramIndex = 2)
public List<File> export(String panelId, List<String> viewIds, PermissionProxy proxy) throws Exception { public List<File> export(String panelId, List<String> viewIds, PermissionProxy proxy) throws Exception {
if (CollectionUtils.isEmpty(viewIds)) { if (CollectionUtils.isEmpty(viewIds)) {
@ -91,7 +94,7 @@ public class ViewExportExcel {
Map<String, Object> chart = chartViewDTO.getData(); Map<String, Object> chart = chartViewDTO.getData();
Object objectFields = chart.get("fields"); Object objectFields = chart.get("fields");
List<ChartViewFieldDTO> fields = (List<ChartViewFieldDTO>) objectFields; List<ChartViewFieldDTO> fields = gson.fromJson(gson.toJson(objectFields), fieldTokenType);
List<String> heads = new ArrayList<>(); List<String> heads = new ArrayList<>();
List<String> headKeys = new ArrayList<>(); List<String> headKeys = new ArrayList<>();
fields.forEach(field -> { fields.forEach(field -> {

View File

@ -952,9 +952,10 @@ public class DataSetTableService {
List<String> sqlVariableNames = new ArrayList<>(); List<String> sqlVariableNames = new ArrayList<>();
datasetTables.forEach(datasetTable -> { datasetTables.forEach(datasetTable -> {
if (StringUtils.isNotEmpty(datasetTable.getSqlVariableDetails())) { if (StringUtils.isNotEmpty(datasetTable.getSqlVariableDetails())) {
List<SqlVariableDetails> sqlVariables = new Gson().fromJson(datasetTable.getSqlVariableDetails(), new TypeToken<List<SqlVariableDetails>>() {}.getType()); List<SqlVariableDetails> sqlVariables = new Gson().fromJson(datasetTable.getSqlVariableDetails(), new TypeToken<List<SqlVariableDetails>>() {
}.getType());
for (SqlVariableDetails sqlVariable : sqlVariables) { for (SqlVariableDetails sqlVariable : sqlVariables) {
if(!sqlVariableNames.contains(sqlVariable.getVariableName())){ if (!sqlVariableNames.contains(sqlVariable.getVariableName())) {
sqlVariableNames.add(sqlVariable.getVariableName()); sqlVariableNames.add(sqlVariable.getVariableName());
sqlVariableDetails.add(sqlVariable); sqlVariableDetails.add(sqlVariable);
} }
@ -1023,7 +1024,7 @@ public class DataSetTableService {
if (fromItem instanceof SubSelect) { if (fromItem instanceof SubSelect) {
SelectBody selectBody = ((SubSelect) fromItem).getSelectBody(); SelectBody selectBody = ((SubSelect) fromItem).getSelectBody();
SubSelect subSelect = new SubSelect(); SubSelect subSelect = new SubSelect();
Select subSelectTmp = (Select)CCJSqlParserUtil.parse(removeVariables(selectBody.toString())); Select subSelectTmp = (Select) CCJSqlParserUtil.parse(removeVariables(selectBody.toString()));
PlainSelect subPlainSelect = ((PlainSelect) subSelectTmp.getSelectBody()); PlainSelect subPlainSelect = ((PlainSelect) subSelectTmp.getSelectBody());
subSelect.setSelectBody(subPlainSelect); subSelect.setSelectBody(subPlainSelect);
subSelect.setAlias(new Alias(fromItem.getAlias().toString())); subSelect.setAlias(new Alias(fromItem.getAlias().toString()));
@ -1488,7 +1489,7 @@ public class DataSetTableService {
TableUtils.tableName(union.get(0).getCurrentDs().getId())); TableUtils.tableName(union.get(0).getCurrentDs().getId()));
} }
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("sql", java.util.Base64.getEncoder().encodeToString(sql.getBytes())); map.put("sql", sql);
map.put("field", checkedFields); map.put("field", checkedFields);
map.put("join", unionList); map.put("join", unionList);
return map; return map;
@ -2603,60 +2604,60 @@ public class DataSetTableService {
@Override @Override
public void visit(Between between) { public void visit(Between between) {
if(hasVarible(between.getBetweenExpressionStart().toString()) || hasVarible(between.getBetweenExpressionEnd().toString())){ if (hasVarible(between.getBetweenExpressionStart().toString()) || hasVarible(between.getBetweenExpressionEnd().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
}else { } else {
getBuffer().append(between.getLeftExpression()).append(" BETWEEN ").append(between.getBetweenExpressionStart()).append(" AND ").append(between.getBetweenExpressionEnd()); getBuffer().append(between.getLeftExpression()).append(" BETWEEN ").append(between.getBetweenExpressionStart()).append(" AND ").append(between.getBetweenExpressionEnd());
} }
} }
@Override @Override
public void visit(MinorThan minorThan) { public void visit(MinorThan minorThan) {
if(hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())){ if (hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
return; return;
} }
getBuffer().append(minorThan.getLeftExpression()); getBuffer().append(minorThan.getLeftExpression());
getBuffer().append(" < "); getBuffer().append(" < ");
getBuffer().append( minorThan.getRightExpression()); getBuffer().append(minorThan.getRightExpression());
} }
@Override @Override
public void visit(MinorThanEquals minorThan) { public void visit(MinorThanEquals minorThan) {
if(hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())){ if (hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
return; return;
} }
getBuffer().append(minorThan.getLeftExpression()); getBuffer().append(minorThan.getLeftExpression());
getBuffer().append(" <= "); getBuffer().append(" <= ");
getBuffer().append( minorThan.getRightExpression()); getBuffer().append(minorThan.getRightExpression());
} }
@Override @Override
public void visit(GreaterThanEquals minorThan) { public void visit(GreaterThanEquals minorThan) {
if(hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())){ if (hasVarible(minorThan.getLeftExpression().toString()) || hasVarible(minorThan.getRightExpression().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
return; return;
} }
getBuffer().append(minorThan.getLeftExpression()); getBuffer().append(minorThan.getLeftExpression());
getBuffer().append(" >= "); getBuffer().append(" >= ");
getBuffer().append( minorThan.getRightExpression()); getBuffer().append(minorThan.getRightExpression());
} }
@Override @Override
public void visit(GreaterThan greaterThan) { public void visit(GreaterThan greaterThan) {
if(hasVarible(greaterThan.getLeftExpression().toString()) || hasVarible(greaterThan.getRightExpression().toString())){ if (hasVarible(greaterThan.getLeftExpression().toString()) || hasVarible(greaterThan.getRightExpression().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
return; return;
} }
getBuffer().append(greaterThan.getLeftExpression()); getBuffer().append(greaterThan.getLeftExpression());
getBuffer().append(" > "); getBuffer().append(" > ");
getBuffer().append( greaterThan.getRightExpression()); getBuffer().append(greaterThan.getRightExpression());
} }
@Override @Override
public void visit(ExpressionList expressionList) { public void visit(ExpressionList expressionList) {
for (Iterator<Expression> iter = expressionList.getExpressions().iterator(); iter.hasNext();) { for (Iterator<Expression> iter = expressionList.getExpressions().iterator(); iter.hasNext(); ) {
Expression expression = iter.next(); Expression expression = iter.next();
expression.accept(this); expression.accept(this);
if (iter.hasNext()) { if (iter.hasNext()) {
@ -2732,7 +2733,9 @@ public class DataSetTableService {
try { try {
BinaryExpression leftBinaryExpression = (BinaryExpression) expr.getLeftExpression(); BinaryExpression leftBinaryExpression = (BinaryExpression) expr.getLeftExpression();
hasSubBinaryExpression = leftBinaryExpression.getLeftExpression() instanceof BinaryExpression; hasSubBinaryExpression = leftBinaryExpression.getLeftExpression() instanceof BinaryExpression;
} catch (Exception e) {e.printStackTrace();} } catch (Exception e) {
e.printStackTrace();
}
if (expr.getLeftExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVarible(expr.getLeftExpression().toString())) { if (expr.getLeftExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVarible(expr.getLeftExpression().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
@ -2750,7 +2753,7 @@ public class DataSetTableService {
} }
if (expr.getRightExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVarible(expr.getRightExpression().toString())) { if (expr.getRightExpression() instanceof BinaryExpression && !hasSubBinaryExpression && hasVarible(expr.getRightExpression().toString())) {
getBuffer().append(SubstitutedSql); getBuffer().append(SubstitutedSql);
} else { } else {
expr.getRightExpression().accept(this); expr.getRightExpression().accept(this);
} }
} }

View File

@ -325,27 +325,27 @@ public class ExtractDataService {
try { try {
deleteFile("all_scope", datasetTableId); deleteFile("all_scope", datasetTableId);
} catch (Exception ignore) { } catch (Exception ignore) {
System.out.println(ignore.getMessage()); LogUtil.error(ignore);
} }
try { try {
sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, msg); sendWebMsg(datasetTable, datasetTableTask, datasetTableTaskLog, msg);
} catch (Exception ignore) { } catch (Exception ignore) {
System.out.println(ignore.getMessage()); LogUtil.error(ignore);
} }
try { try {
updateTableStatus(datasetTableId, lastExecStatus, execTime); updateTableStatus(datasetTableId, lastExecStatus, execTime);
} catch (Exception ignore) { } catch (Exception ignore) {
System.out.println(ignore.getMessage()); LogUtil.error(ignore);
} }
try { try {
dataSetTableTaskService.updateTaskStatus(datasetTableTask, lastExecStatus); dataSetTableTaskService.updateTaskStatus(datasetTableTask, lastExecStatus);
} catch (Exception ignore) { } catch (Exception ignore) {
System.out.println(ignore.getMessage()); LogUtil.error(ignore);
} }
try { try {
dropDorisTable(TableUtils.tmpName(TableUtils.tableName(datasetTableId))); dropDorisTable(TableUtils.tmpName(TableUtils.tableName(datasetTableId)));
} catch (Exception ignore) { } catch (Exception ignore) {
System.out.println(ignore.getMessage()); LogUtil.error(ignore);
} }
} }
break; break;

View File

@ -51,7 +51,6 @@ public class PermissionService {
lists.forEach(chartCustomFilterDTO -> { lists.forEach(chartCustomFilterDTO -> {
chartCustomFilterDTO.setFieldId(field.getId()); chartCustomFilterDTO.setFieldId(field.getId());
if(datasetRowPermissions.getAuthTargetType().equalsIgnoreCase("sysParams")){ if(datasetRowPermissions.getAuthTargetType().equalsIgnoreCase("sysParams")){
System.out.println(values.get(chartCustomFilterDTO.getValue()).toString());
chartCustomFilterDTO.setValue(values.get(chartCustomFilterDTO.getValue()).toString()); chartCustomFilterDTO.setValue(values.get(chartCustomFilterDTO.getValue()).toString());
} }
}); });

View File

@ -78,12 +78,10 @@ public class PluginService {
String folder = pluginDir + "folder/"; String folder = pluginDir + "folder/";
try { try {
ZipUtil.unzip(dest.getAbsolutePath(), folder); ZipUtil.unzip(dest.getAbsolutePath(), folder);
// ZipUtils.unzip(dest, folder);
} catch (Exception e) { } catch (Exception e) {
DeFileUtils.deleteFile(pluginDir + "temp/"); DeFileUtils.deleteFile(pluginDir + "temp/");
DeFileUtils.deleteFile(folder); DeFileUtils.deleteFile(folder);
// 需要删除文件 // 需要删除文件
// e.printStackTrace();
LogUtil.error(e.getMessage(), e); LogUtil.error(e.getMessage(), e);
DEException.throwException(e); DEException.throwException(e);
} }
@ -261,7 +259,6 @@ public class PluginService {
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
e.printStackTrace(); e.printStackTrace();
} }
//BeanUtils.copyBean(result, myPlugin);
if(result.getCategory().equalsIgnoreCase("datasource") && (StringUtils.isEmpty(result.getStore()) || !result.getStore().equalsIgnoreCase("default"))){ if(result.getCategory().equalsIgnoreCase("datasource") && (StringUtils.isEmpty(result.getStore()) || !result.getStore().equalsIgnoreCase("default"))){
result.setStore("thirdpart"); result.setStore("thirdpart");
} }

View File

@ -140,7 +140,6 @@ public class SysUserService {
sysUser.setLanguage("zh_CN"); sysUser.setLanguage("zh_CN");
sysUser.setFrom(3); sysUser.setFrom(3);
sysUser.setIsAdmin(false); sysUser.setIsAdmin(false);
// sysUser.setSub(ssoUserInfo.getSub());
sysUserMapper.insert(sysUser); sysUserMapper.insert(sysUser);
SysUser dbUser = findOne(sysUser); SysUser dbUser = findOne(sysUser);
if (null != dbUser && null != dbUser.getUserId()) { if (null != dbUser && null != dbUser.getUserId()) {

View File

@ -246,7 +246,6 @@ public class LogService {
} }
public void saveLog(SysLogDTO sysLogDTO) { public void saveLog(SysLogDTO sysLogDTO) {
// String ip = "";
CurrentUserDto user = AuthUtils.getUser(); CurrentUserDto user = AuthUtils.getUser();
SysLogWithBLOBs sysLogWithBLOBs = BeanUtils.copyBean(new SysLogWithBLOBs(), sysLogDTO); SysLogWithBLOBs sysLogWithBLOBs = BeanUtils.copyBean(new SysLogWithBLOBs(), sysLogDTO);
if (CollectionUtils.isNotEmpty(sysLogDTO.getPositions())) { if (CollectionUtils.isNotEmpty(sysLogDTO.getPositions())) {
@ -266,7 +265,6 @@ public class LogService {
sysLogWithBLOBs.setNickName(sysLogDTO.getSourceName()); sysLogWithBLOBs.setNickName(sysLogDTO.getSourceName());
} }
// sysLogWithBLOBs.setIp(ip);
sysLogMapper.insert(sysLogWithBLOBs); sysLogMapper.insert(sysLogWithBLOBs);
} }

View File

@ -79,3 +79,8 @@ SET
`details` = '{\"width\":1600,\"height\":900,\"scale\":100,\"scaleWidth\":100,\"scaleHeight\":100,\"selfAdaption\":true,\"auxiliaryMatrix\":true,\"openCommonStyle\":true,\"panel\":{\"themeColor\":\"dark\",\"color\":\"#030B2E\",\"imageUrl\":{},\"backgroundType\":\"color\",\"gap\":\"yes\",\"resultMode\":\"all\",\"resultCount\":1000},\"aidedDesign\":{\"showGrid\":false,\"matrixBase\":4},\"refreshViewLoading\":true,\"refreshUnit\":\"minute\",\"refreshTime\":5,\"themeId\":\"c9d63e10-2827-11ed-afd9-69d86fea45a0\",\"chartInfo\":{\"chartTitle\":{\"show\":true,\"fontSize\":\"18\",\"color\":\"#FFFFFF\",\"hPosition\":\"left\",\"vPosition\":\"top\",\"isItalic\":false,\"isBolder\":true,\"remarkShow\":false,\"remark\":\"\",\"remarkBackgroundColor\":\"#ffffffff\",\"fontFamily\":\"Microsoft YaHei\",\"letterSpace\":\"0\",\"fontShadow\":false},\"chartColor\":{\"value\":\"default\",\"colors\":[\"#5470c6\",\"#91cc75\",\"#fac858\",\"#ee6666\",\"#73c0de\",\"#3ba272\",\"#fc8452\",\"#9a60b4\",\"#ea7ccc\"],\"alpha\":100,\"tableHeaderBgColor\":\"#4E81BB\",\"tableItemBgColor\":\"#131E42\",\"tableFontColor\":\"#ffffff\",\"tableStripe\":true,\"dimensionColor\":\"#ffffff\",\"quotaColor\":\"#4E81BB\",\"tableBorderColor\":\"#CCCCCC\",\"seriesColors\":[],\"areaBorderColor\":\"#EBEEF5\"},\"chartCommonStyle\":{\"backgroundColorSelect\":true,\"color\":\"#131E42\",\"alpha\":100,\"borderRadius\":5,\"innerPadding\":0},\"filterStyle\":{\"horizontal\":\"left\",\"vertical\":\"top\",\"color\":\"#FFFFFF\",\"brColor\":\"#4E4B4B\",\"wordColor\":\"#FFFFFF\",\"innerBgColor\":\"#131E42\"},\"tabStyle\":{\"headFontColor\":\"#FFFFFF\",\"headFontActiveColor\":\"#FFFFFF\",\"headBorderColor\":\"\",\"headBorderActiveColor\":\"\"}}}' `details` = '{\"width\":1600,\"height\":900,\"scale\":100,\"scaleWidth\":100,\"scaleHeight\":100,\"selfAdaption\":true,\"auxiliaryMatrix\":true,\"openCommonStyle\":true,\"panel\":{\"themeColor\":\"dark\",\"color\":\"#030B2E\",\"imageUrl\":{},\"backgroundType\":\"color\",\"gap\":\"yes\",\"resultMode\":\"all\",\"resultCount\":1000},\"aidedDesign\":{\"showGrid\":false,\"matrixBase\":4},\"refreshViewLoading\":true,\"refreshUnit\":\"minute\",\"refreshTime\":5,\"themeId\":\"c9d63e10-2827-11ed-afd9-69d86fea45a0\",\"chartInfo\":{\"chartTitle\":{\"show\":true,\"fontSize\":\"18\",\"color\":\"#FFFFFF\",\"hPosition\":\"left\",\"vPosition\":\"top\",\"isItalic\":false,\"isBolder\":true,\"remarkShow\":false,\"remark\":\"\",\"remarkBackgroundColor\":\"#ffffffff\",\"fontFamily\":\"Microsoft YaHei\",\"letterSpace\":\"0\",\"fontShadow\":false},\"chartColor\":{\"value\":\"default\",\"colors\":[\"#5470c6\",\"#91cc75\",\"#fac858\",\"#ee6666\",\"#73c0de\",\"#3ba272\",\"#fc8452\",\"#9a60b4\",\"#ea7ccc\"],\"alpha\":100,\"tableHeaderBgColor\":\"#4E81BB\",\"tableItemBgColor\":\"#131E42\",\"tableFontColor\":\"#ffffff\",\"tableStripe\":true,\"dimensionColor\":\"#ffffff\",\"quotaColor\":\"#4E81BB\",\"tableBorderColor\":\"#CCCCCC\",\"seriesColors\":[],\"areaBorderColor\":\"#EBEEF5\"},\"chartCommonStyle\":{\"backgroundColorSelect\":true,\"color\":\"#131E42\",\"alpha\":100,\"borderRadius\":5,\"innerPadding\":0},\"filterStyle\":{\"horizontal\":\"left\",\"vertical\":\"top\",\"color\":\"#FFFFFF\",\"brColor\":\"#4E4B4B\",\"wordColor\":\"#FFFFFF\",\"innerBgColor\":\"#131E42\"},\"tabStyle\":{\"headFontColor\":\"#FFFFFF\",\"headFontActiveColor\":\"#FFFFFF\",\"headBorderColor\":\"\",\"headBorderActiveColor\":\"\"}}}'
WHERE WHERE
`id` = 'system_2'; `id` = 'system_2';
BEGIN;
DELETE from `sys_menu` where `menu_id` = 55;
DELETE from `sys_menu` where `menu_id` = 56;
COMMIT;

View File

@ -85,7 +85,7 @@ i18n_no_all_delete_privilege_folder=This folder have sources which have no manag
i18n_excel_field_repeat=Duplicate fields exist, please modify and try again. i18n_excel_field_repeat=Duplicate fields exist, please modify and try again.
i18n_schema_is_empty=Database schema is empty i18n_schema_is_empty=Database schema is empty
\u7AD9\u5185\u6D88\u606F=Internal Messages \u7AD9\u5185\u6D88\u606F=Internal Messages
\u6240\u6709\u6D88\u606F==All Messages \u6240\u6709\u6D88\u606F=All Messages
\u672A\u8BFB\u6D88\u606F=Unread Messages \u672A\u8BFB\u6D88\u606F=Unread Messages
\u5DF2\u8BFB\u6D88\u606F==Read Messages \u5DF2\u8BFB\u6D88\u606F==Read Messages
\u63A5\u6536\u7BA1\u7406=Receive Manage \u63A5\u6536\u7BA1\u7406=Receive Manage

View File

@ -214,6 +214,8 @@ export default {
methods: { methods: {
clearHandler() { clearHandler() {
this.value = this.element.options.attrs.multiple ? [] : null this.value = this.element.options.attrs.multiple ? [] : null
this.checkAll = false
this.isIndeterminate = false
}, },
resetDefaultValue(id) { resetDefaultValue(id) {
if (this.inDraw && this.manualModify && this.element.id === id) { if (this.inDraw && this.manualModify && this.element.id === id) {

View File

@ -133,12 +133,12 @@ export default {
commons: { commons: {
no_result: 'No Result', no_result: 'No Result',
manage_member: 'Managing members', manage_member: 'Managing members',
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?',
confirm_remove_cancel: 'Are you sure to delete the role?', confirm_remove_cancel: 'Are you sure to delete the role?',
user_confirm_remove_cancel: 'Are you sure you want to remove the user from the role?',
default_value: 'Default Value', default_value: 'Default Value',
params_value: 'Param Value', params_value: 'Param Value',
publish: 'publish',
input_role_name: 'Enter a role name', input_role_name: 'Enter a role name',
publish: 'publish',
unpublished: 'unpublished', unpublished: 'unpublished',
default_pwd: 'Default Pwd', default_pwd: 'Default Pwd',
stop: 'Stop', stop: 'Stop',
@ -159,9 +159,9 @@ export default {
yes: 'Yes', yes: 'Yes',
no: 'No', no: 'No',
reset: 'Reset', reset: 'Reset',
gender: 'Gender',
catalogue: 'Catalogue', catalogue: 'Catalogue',
button: 'Button', button: 'Button',
gender: 'Gender',
man: 'Man', man: 'Man',
woman: 'Woman', woman: 'Woman',
keep_secret: 'keep secret', keep_secret: 'keep secret',
@ -192,6 +192,7 @@ export default {
annotation: 'Annotation', annotation: 'Annotation',
clear: 'Clean', clear: 'Clean',
save: 'Save', save: 'Save',
otherSave: 'Save as',
update: 'Update', update: 'Update',
save_success: 'Saved successfully', save_success: 'Saved successfully',
delete_success: 'deleted successfully', delete_success: 'deleted successfully',
@ -400,6 +401,7 @@ export default {
continue: 'continue', continue: 'continue',
hour: 'hour', hour: 'hour',
minute: 'minute', minute: 'minute',
day: 'day',
by_task_name: 'Search by task name', by_task_name: 'Search by task name',
message_receiving_management: 'Message receiving management', message_receiving_management: 'Message receiving management',
upload_failed: 'Upload failed', upload_failed: 'Upload failed',
@ -423,7 +425,6 @@ export default {
uninstall: 'uninstall', uninstall: 'uninstall',
relevant_content_found: 'No relevant content found', relevant_content_found: 'No relevant content found',
view_tasks: 'View tasks', view_tasks: 'View tasks',
day: 'day',
no_classification: 'No classification', no_classification: 'No classification',
no_template: 'No template', no_template: 'No template',
data_set_required: 'Data set (required)', data_set_required: 'Data set (required)',
@ -602,6 +603,7 @@ export default {
confirm_passwd: 'Confirm Password', confirm_passwd: 'Confirm Password',
change_password: 'Change Password', change_password: 'Change Password',
search_by_name: 'Search by name', search_by_name: 'Search by name',
import_ldap: 'Import LDAP users',
result_one: 'Results', result_one: 'Results',
clear_filter: 'Empty condition', clear_filter: 'Empty condition',
recover_pwd: 'Restore to the original password?', recover_pwd: 'Restore to the original password?',
@ -1541,8 +1543,9 @@ export default {
column_permission: { column_permission: {
add: 'Add', add: 'Add',
edit: 'Edit', edit: 'Edit',
please_select_field: 'Please select field',
please_select_auth_type: 'Please select the authorization type', please_select_auth_type: 'Please select the authorization type',
please_select_auth_id: '请选择授权目标', please_select_auth_id: 'Please select authorization obj',
column_permission_not_empty: 'Please select authorization target', column_permission_not_empty: 'Please select authorization target',
auth_type: 'Authorization type', auth_type: 'Authorization type',
auth_obj: 'Authorized object', auth_obj: 'Authorized object',
@ -1594,14 +1597,19 @@ export default {
create: 'Create Data Source', create: 'Create Data Source',
type: 'Type', type: 'Type',
please_choose_type: 'Please select data source type', please_choose_type: 'Please select data source type',
please_choose_data_type: 'Please select the calculation mode',
data_base: 'Database name', data_base: 'Database name',
user_name: 'User Name', user_name: 'User Name',
password: 'Password', password: 'Password',
host: 'Host name / IP address', host: 'Host name / IP address',
doris_host: 'Doris Addr',
query_port: 'Query Port',
http_port: 'Http Port',
port: 'Port', port: 'Port',
datasource_url: 'URL address', datasource_url: 'URL address',
please_input_datasource_url: 'Please enter Elasticsearch 地址e.g: http://es_host:es_port', please_input_datasource_url: 'Please enter Elasticsearch 地址e.g: http://es_host:es_port',
please_input_data_base: 'Please enter the database name', please_input_data_base: 'Please enter the database name',
please_select_oracle_type: 'Select connection type',
please_input_user_name: 'Please enter user name', please_input_user_name: 'Please enter user name',
please_input_password: 'Please enter Password', please_input_password: 'Please enter Password',
please_input_host: 'Please enter host', please_input_host: 'Please enter host',
@ -1633,9 +1641,6 @@ export default {
min_pool_size: 'Minimum of connections', min_pool_size: 'Minimum of connections',
max_pool_size: 'Maximum connection', max_pool_size: 'Maximum connection',
max_idle_time: 'Maximum idle (seconds)', max_idle_time: 'Maximum idle (seconds)',
doris_host: 'Doris Address',
query_port: 'Query Port',
http_port: 'Http Port',
bucket_num: 'Bucket number', bucket_num: 'Bucket number',
replication_num: 'Replication number', replication_num: 'Replication number',
please_input_bucket_num: 'Please enter Bucket number', please_input_bucket_num: 'Please enter Bucket number',
@ -1648,10 +1653,15 @@ export default {
please_input_max_pool_size: 'Please enter the maximum number of connections', please_input_max_pool_size: 'Please enter the maximum number of connections',
please_input_max_idle_time: 'Please enter the maximum idle (seconds)', please_input_max_idle_time: 'Please enter the maximum idle (seconds)',
please_input_acquire_increment: 'Please enter the growth number', please_input_acquire_increment: 'Please enter the growth number',
please_input_query_timeout: 'Please enter query timeout',
please_input_connect_timeout: 'Please enter the connection timeout (seconds)', please_input_connect_timeout: 'Please enter the connection timeout (seconds)',
no_less_then_0: 'Parameters in advanced settings cannot be less than zero', no_less_then_0: 'Parameters in advanced settings cannot be less than zero',
port_no_less_then_0: 'Port cannot be less than zero', port_no_less_then_0: 'Port cannot be less than zero',
priority: 'Advanced setting', priority: 'Advanced setting',
data_mode: 'Data mode',
direct: 'Direct Mode',
extract: 'Extraction mode',
all_compute_mode: 'Direct connection and extraction mode',
extra_params: 'Extra JDBC connection string', extra_params: 'Extra JDBC connection string',
please_input_dataPath: 'Please enter the JsonPath data path', please_input_dataPath: 'Please enter the JsonPath data path',
warning: 'Contains invalid table', warning: 'Contains invalid table',
@ -1909,6 +1919,8 @@ export default {
fontWeight: 'FontWeight', fontWeight: 'FontWeight',
lineHeight: 'LineHeight', lineHeight: 'LineHeight',
letterSpacing: 'LetterSpacing', letterSpacing: 'LetterSpacing',
padding: 'Internal spacing',
margin: 'Outer space',
textAlign: 'TextAlign', textAlign: 'TextAlign',
opacity: 'Opacity', opacity: 'Opacity',
verticalAlign: 'Vertical Align', verticalAlign: 'Vertical Align',
@ -1997,6 +2009,9 @@ export default {
default_settings: 'Default Settings', default_settings: 'Default Settings',
choose_background: 'Choose Component Background', choose_background: 'Choose Component Background',
choose_background_tips: 'The component`s own background settings will overwrite the current settings', choose_background_tips: 'The component`s own background settings will overwrite the current settings',
setting_background: 'Set background',
setting_jump: 'Jump settings',
select_view: 'Please select a view...',
visual: 'Visual', visual: 'Visual',
prohibit_multiple: 'Prohibit multiple fields in the same dataset', prohibit_multiple: 'Prohibit multiple fields in the same dataset',
be_empty_dir: 'is empty dir' be_empty_dir: 'is empty dir'
@ -2015,9 +2030,6 @@ export default {
un_install: 'Uninstall', un_install: 'Uninstall',
uninstall_confirm: 'Comfirm to uninstall the plugin?', uninstall_confirm: 'Comfirm to uninstall the plugin?',
uninstall_cancel: 'Cancel uninstall plugin', uninstall_cancel: 'Cancel uninstall plugin',
setting_background: 'BackGround',
setting_jump: 'Jump Setting',
select_view: 'Select View',
un_install_success: 'Uninstall is successful and restart takes effect', un_install_success: 'Uninstall is successful and restart takes effect',
un_install_error: 'Uninstall failed, please contact the administrator' un_install_error: 'Uninstall failed, please contact the administrator'
}, },
@ -2029,6 +2041,11 @@ export default {
loginTitle: 'Login page title', loginTitle: 'Login page title',
title: 'System name', title: 'System name',
advice_size: 'Advice picture size', advice_size: 'Advice picture size',
theme: 'Theme color',
topMenuColor: 'Head background',
topMenuActiveColor: 'Head selection background',
topMenuTextColor: 'Head font color',
topMenuTextActiveColor: 'Head font selected color',
themeLight: 'Light', themeLight: 'Light',
themeDark: 'Dark', themeDark: 'Dark',
themeCustom: 'Custom', themeCustom: 'Custom',
@ -2040,7 +2057,6 @@ export default {
defaultHomeLink: 'Default is the system built-in home page', defaultHomeLink: 'Default is the system built-in home page',
showFoot: 'Show login page footer', showFoot: 'Show login page footer',
footContent: 'Foot content' footContent: 'Foot content'
}, },
auth: { auth: {
no_item_selected: 'Please select organization、user or role on the left', no_item_selected: 'Please select organization、user or role on the left',
@ -2056,6 +2072,7 @@ export default {
role: 'Role', role: 'Role',
user: 'User', user: 'User',
set_rules: 'Set rules', set_rules: 'Set rules',
sysParams: 'System variable',
sysParams_type: { sysParams_type: {
user_id: 'User ID', user_id: 'User ID',
user_name: 'User Name', user_name: 'User Name',
@ -2076,6 +2093,7 @@ export default {
datasetAuthHead: 'All Dataset', datasetAuthHead: 'All Dataset',
chartAuthHead: 'All Chart', chartAuthHead: 'All Chart',
panelAuthHead: 'All Chart', panelAuthHead: 'All Chart',
menuAuthHead: 'All menus and actions',
view: 'View', view: 'View',
use: 'Use', use: 'Use',
export: 'Export', export: 'Export',
@ -2083,14 +2101,14 @@ export default {
row_column: 'Row and column permission settings', row_column: 'Row and column permission settings',
row_permission: 'Row permission rules', row_permission: 'Row permission rules',
enable_row: 'Enable row permissions', enable_row: 'Enable row permissions',
add_condition: 'Add condition',
add_relationship: 'Add relationship',
white_list: 'White list', white_list: 'White list',
white_user_not: 'The above permission rules do not take effect for white list users', white_user_not: 'The above permission rules do not take effect for white list users',
organization_or_role: 'Please select an organization or role', organization_or_role: 'Please select an organization or role',
column_permission: 'Column permission rule', column_permission: 'Column permission rule',
enable_column: 'Enable column permissions', enable_column: 'Enable column permissions',
search_by_field: 'Search by field name', search_by_field: 'Search by field name',
add_condition: 'Add condition',
add_relationship: 'Add relationship',
filter_fields: 'Filter fields', filter_fields: 'Filter fields',
selct_filter_fields: 'Please select a filter field', selct_filter_fields: 'Please select a filter field',
enter_keywords: 'Please enter keywords', enter_keywords: 'Please enter keywords',
@ -2201,7 +2219,7 @@ export default {
i18n_msg_type_all: 'All type', i18n_msg_type_all: 'All type',
i18n_msg_type_ds_invalid: 'Datasource invalid', i18n_msg_type_ds_invalid: 'Datasource invalid',
channel_inner_msg: 'On site news', channel_inner_msg: 'On site news',
channel_email_msg: 'Mail notification' channel_email_msg: 'Email reminder'
}, },
denumberrange: { denumberrange: {
label: 'Number range', label: 'Number range',
@ -2357,8 +2375,7 @@ export default {
cmonth: 'This Month', cmonth: 'This Month',
cquarter: 'This Quarter', cquarter: 'This Quarter',
lquarter: 'Last Quarter', lquarter: 'Last Quarter',
cyear: 'This Year', cyear: 'This Year'
openHomePage: 'Show Home Page'
}, },
dynamic_year: { dynamic_year: {
fix: 'Fixed Year', fix: 'Fixed Year',
@ -2371,7 +2388,8 @@ export default {
dynamic: 'Dynamic Month', dynamic: 'Dynamic Month',
current: 'This Month', current: 'This Month',
last: 'Last Month', last: 'Last Month',
firstOfYear: 'First month of this year' firstOfYear: 'First month of this year',
sameMonthLastYear: 'Same month last year'
}, },
wizard: { wizard: {
welcome_title: 'Welcome To Use DataEase', welcome_title: 'Welcome To Use DataEase',
@ -2420,7 +2438,9 @@ export default {
plugin_style: { plugin_style: {
border: 'Border' border: 'Border'
}, },
sql_variable: {
variable_mgm: 'Parameter setting'
},
map_setting: { map_setting: {
area_level: 'Area Level', area_level: 'Area Level',
area_code: 'Area Code', area_code: 'Area Code',
@ -2440,5 +2460,4 @@ export default {
empty: 'Empty', empty: 'Empty',
please_select_map: 'Please select a range of map' please_select_map: 'Please select a range of map'
} }
} }

View File

@ -244,6 +244,21 @@ const data = {
}) })
}, },
clearAllViewFilter(state) {
state.componentData.forEach(item => {
if (item.type === 'view' && item.filters && item.filters.length) {
item.filters = []
}
if (item.type === 'de-tabs' && item.options.tabList && item.options.tabList.length) {
item.options.tabList.forEach(tab => {
if (tab.content && tab.content.type === 'view' && tab.content.filters && tab.content.filters.length) {
tab.content.filters = []
}
})
}
})
},
addViewFilter(state, data) { addViewFilter(state, data) {
const condition = formatCondition(data) const condition = formatCondition(data)
const vValid = valueValid(condition) const vValid = valueValid(condition)
@ -505,6 +520,7 @@ const data = {
}, },
// 启用移动端布局 // 启用移动端布局
openMobileLayout(state) { openMobileLayout(state) {
this.commit('clearAllViewFilter')
state.componentDataCache = null state.componentDataCache = null
state.componentDataCache = JSON.stringify(state.componentData) state.componentDataCache = JSON.stringify(state.componentData)
state.pcComponentData = state.componentData state.pcComponentData = state.componentData

View File

@ -7,7 +7,7 @@ import { valueFormatter } from '@/views/chart/chart/formatter'
let labelFormatter = null let labelFormatter = null
export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) { export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
let min, max, labelContent, startAngel, endAngel, tickCount let min, max, labelContent, startAngel, endAngel
// theme // theme
const theme = getTheme(chart) const theme = getTheme(chart)
// data // data
@ -31,7 +31,6 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
min = size.gaugeMin ? size.gaugeMin : DEFAULT_SIZE.gaugeMin min = size.gaugeMin ? size.gaugeMin : DEFAULT_SIZE.gaugeMin
max = size.gaugeMax ? size.gaugeMax : DEFAULT_SIZE.gaugeMax max = size.gaugeMax ? size.gaugeMax : DEFAULT_SIZE.gaugeMax
} }
tickCount = size.gaugeTickCount ? size.gaugeTickCount : DEFAULT_SIZE.gaugeTickCount
startAngel = parseInt(size.gaugeStartAngle) * Math.PI / 180 startAngel = parseInt(size.gaugeStartAngle) * Math.PI / 180
endAngel = parseInt(size.gaugeEndAngle) * Math.PI / 180 endAngel = parseInt(size.gaugeEndAngle) * Math.PI / 180
} }
@ -101,13 +100,13 @@ export function baseGaugeOptionAntV(plot, container, chart, action, scale = 1) {
content: labelContent content: labelContent
}, },
axis: { axis: {
tickInterval: 1 / tickCount, tickInterval: 0.2,
label: { label: {
style: { style: {
fontSize: getScaleValue(14, scale) // 刻度值字体大小 fontSize: getScaleValue(14, scale) // 刻度值字体大小
}, },
formatter: function(v) { formatter: function(v) {
return Number(v) * (max - min) + min return v === '0' ? v : (v * 100 + '%')
} }
}, },
tickLine: { tickLine: {

View File

@ -581,8 +581,8 @@ function mappingColor(value, defaultColor, field, type) {
} }
} else { } else {
// time // time
const tv = new Date(t.value + ' GMT+8').getTime() const tv = new Date(t.value.replace(/-/g, '/') + ' GMT+8').getTime()
const v = new Date(value + ' GMT+8').getTime() const v = new Date(value.replace(/-/g, '/') + ' GMT+8').getTime()
if (t.term === 'eq') { if (t.term === 'eq') {
if (v === tv) { if (v === tv) {
color = t[type] color = t[type]

View File

@ -384,9 +384,9 @@
@change="changeBarSizeCase('gaugeEndAngle')" @change="changeBarSizeCase('gaugeEndAngle')"
/> />
</el-form-item> </el-form-item>
<el-form-item v-show="showProperty('gaugeTickCount')" :label="$t('chart.tick_count')" class="form-item form-item-slider"> <!-- <el-form-item v-show="showProperty('gaugeTickCount')" :label="$t('chart.tick_count')" class="form-item form-item-slider">-->
<el-input-number v-model="sizeForm.gaugeTickCount" :min="1" :step="1" :precision="0" size="mini" @change="changeBarSizeCase('gaugeTickCount')" /> <!-- <el-input-number v-model="sizeForm.gaugeTickCount" :min="1" :step="1" :precision="0" size="mini" @change="changeBarSizeCase('gaugeTickCount')" />-->
</el-form-item> <!-- </el-form-item>-->
</el-form> </el-form>
<!--gauge-end--> <!--gauge-end-->

View File

@ -375,7 +375,7 @@
$t('chart.drag_block_word_cloud_label') $t('chart.drag_block_word_cloud_label')
}}</span> }}</span>
<span v-else-if="view.type && view.type === 'label'">{{ $t('chart.drag_block_label') }}</span> <span v-else-if="view.type && view.type === 'label'">{{ $t('chart.drag_block_label') }}</span>
/ <span v-show="view.type !== 'richTextView'"> / </span>
<span v-if="view.type && view.type !== 'table-info'">{{ $t('chart.dimension') }}</span> <span v-if="view.type && view.type !== 'table-info'">{{ $t('chart.dimension') }}</span>
<span <span
v-else-if="view.type && view.type === 'table-info'" v-else-if="view.type && view.type === 'table-info'"
@ -502,7 +502,7 @@
<span v-else-if="view.type && view.type === 'word-cloud'">{{ <span v-else-if="view.type && view.type === 'word-cloud'">{{
$t('chart.drag_block_word_cloud_size') $t('chart.drag_block_word_cloud_size')
}}</span> }}</span>
/ <span v-show="view.type !== 'richTextView'"> / </span>
<span>{{ $t('chart.quota') }}</span> <span>{{ $t('chart.quota') }}</span>
</span> </span>
<draggable <draggable

View File

@ -181,7 +181,7 @@
<de-main-container class="ms-main-container"> <de-main-container class="ms-main-container">
<div v-if="currentElement.options && currentElement.options.attrs"> <div v-if="currentElement.options && currentElement.options.attrs">
<filter-head :element="currentElement" :table-fields-map="tableFieldsMap" :widget="widget" /> <filter-head :element="currentElement" :widget="widget" />
<filter-control :element="currentElement" :widget="widget" :control-attrs="myAttrs" :child-views="childViews" /> <filter-control :element="currentElement" :widget="widget" :control-attrs="myAttrs" :child-views="childViews" />
@ -297,7 +297,6 @@ export default {
datasetParams: [] datasetParams: []
}, },
currentElement: null, currentElement: null,
tableFieldsMap: {},
tempTreeDatas: null, tempTreeDatas: null,
showTips: false showTips: false
} }
@ -632,7 +631,6 @@ export default {
loadField(tableId) { loadField(tableId) {
fieldListWithPermission(tableId).then(res => { fieldListWithPermission(tableId).then(res => {
let datas = res.data let datas = res.data
this.$set(this.tableFieldsMap, tableId, JSON.parse(JSON.stringify(datas)))
if (this.widget && this.widget.filterFieldMethod) { if (this.widget && this.widget.filterFieldMethod) {
datas = this.widget.filterFieldMethod(datas) datas = this.widget.filterFieldMethod(datas)
} }
@ -643,7 +641,6 @@ export default {
comLoadField(tableId) { comLoadField(tableId) {
fieldListWithPermission(tableId).then(res => { fieldListWithPermission(tableId).then(res => {
let datas = res.data let datas = res.data
this.$set(this.tableFieldsMap, tableId, JSON.parse(JSON.stringify(datas)))
if (this.widget && this.widget.filterFieldMethod) { if (this.widget && this.widget.filterFieldMethod) {
datas = this.widget.filterFieldMethod(datas) datas = this.widget.filterFieldMethod(datas)
} }

View File

@ -18,7 +18,7 @@
> >
<v-flex v-for="(item,index) in element.options.attrs.dragItems" :key="item.id"> <v-flex v-for="(item,index) in element.options.attrs.dragItems" :key="item.id">
<drag-item :key="item.id" :is-sort-widget="isSortWidget" :item="item" :index="index" :sort="element.options.attrs.sort" :all-fields="index ? [] : fieldsMap[item.tableId]" @closeItem="closeItem" @sort-change="sortChange" /> <drag-item :key="item.id" :is-sort-widget="isSortWidget" :item="item" :index="index" :sort="element.options.attrs.sort" :all-fields="index ? [] : tableFields" @closeItem="closeItem" @sort-change="sortChange" />
</v-flex> </v-flex>
<span solt="footer">{{ $t('panel.drag_here') }}</span> <span solt="footer">{{ $t('panel.drag_here') }}</span>
@ -34,6 +34,8 @@
<script> <script>
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import DragItem from '@/components/DragItem' import DragItem from '@/components/DragItem'
import { fieldListWithPermission } from '@/api/dataset/dataset'
export default { export default {
name: 'FilterHead', name: 'FilterHead',
components: { components: {
@ -45,10 +47,7 @@ export default {
type: Object, type: Object,
default: () => {} default: () => {}
}, },
tableFieldsMap: {
type: Object,
default: () => {}
},
widget: { widget: {
type: Object, type: Object,
default: null default: null
@ -56,25 +55,42 @@ export default {
}, },
data() { data() {
return { return {
targets: [] targets: [],
tableFields: []
} }
}, },
computed: { computed: {
isSortWidget() { isSortWidget() {
return this.widget && this.widget.isSortWidget && this.widget.isSortWidget() return this.widget && this.widget.isSortWidget && this.widget.isSortWidget()
}, },
fieldsMap() {
return JSON.parse(JSON.stringify(this.tableFieldsMap)) firstTableId() {
if (!this.isSortWidget) return null
if (this.element.options.attrs.dragItems && this.element.options.attrs.dragItems.length) {
return this.element.options.attrs.dragItems[0].tableId
}
return null
} }
}, },
watch: { watch: {
firstTableId(val, old) {
if (val !== old) {
this.loadFields()
}
}
}, },
created() { created() {
if (this.isSortWidget && this.element.options.attrs.dragItems && this.element.options.attrs.dragItems.length) {
this.loadFields()
}
}, },
methods: { methods: {
loadFields() {
fieldListWithPermission(this.firstTableId).then(res => {
this.tableFields = JSON.parse(JSON.stringify(res.data))
})
},
onMove(e, originalEvent) { onMove(e, originalEvent) {
return true return true
}, },

View File

@ -114,6 +114,7 @@
controls-position="right" controls-position="right"
:min="1" :min="1"
size="small" size="small"
@change="onSimpleCronChange()"
></el-input-number> ></el-input-number>
<el-select <el-select
v-model="taskForm.extraData.simple_cron_type" v-model="taskForm.extraData.simple_cron_type"