diff --git a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java index 9674935d10..8e869e7cd4 100644 --- a/backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java +++ b/backend/src/main/java/io/dataease/controller/dataset/DataSetTableController.java @@ -109,7 +109,7 @@ public class DataSetTableController { } @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE) - @ApiOperation("详息") + @ApiOperation("详细信息") @PostMapping("get/{id}") public DatasetTable get(@ApiParam(name = "id", value = "数据集ID", required = true) @PathVariable String id) { return dataSetTableService.get(id); @@ -194,7 +194,7 @@ public class DataSetTableController { } @DePermission(type = DePermissionType.DATASET) - @ApiOperation("数据集详息") + @ApiOperation("数据集详细信息") @PostMapping("datasetDetail/{id}") public DataSetDetail datasetDetail(@PathVariable String id) { return dataSetTableService.getDatasetDetail(id); diff --git a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java index b361b5d725..217ab70c06 100644 --- a/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java +++ b/backend/src/main/java/io/dataease/controller/panel/PanelGroupController.java @@ -190,6 +190,7 @@ public class PanelGroupController { return panelGroupService.findPanelElementInfo(viewId); } @GetMapping("/export2AppCheck/{panelId}") + @I18n public PanelExport2App export2AppCheck(@PathVariable String panelId){ return panelGroupService.panelExport2AppCheck(panelId); } diff --git a/backend/src/main/java/io/dataease/controller/panel/PanelTemplateController.java b/backend/src/main/java/io/dataease/controller/panel/PanelTemplateController.java index 08fd57193b..f71fb56849 100644 --- a/backend/src/main/java/io/dataease/controller/panel/PanelTemplateController.java +++ b/backend/src/main/java/io/dataease/controller/panel/PanelTemplateController.java @@ -46,7 +46,7 @@ public class PanelTemplateController { panelTemplateService.delete(id); } - @ApiOperation("详息") + @ApiOperation("详细信息") @GetMapping("/findOne/{id}") public PanelTemplateWithBLOBs findOne(@PathVariable String id) throws Exception { return panelTemplateService.findOne(id); diff --git a/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java b/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java index 48fd91e51d..158e0abaca 100644 --- a/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java +++ b/backend/src/main/java/io/dataease/controller/panel/api/LinkApi.java @@ -51,11 +51,11 @@ public interface LinkApi { @PostMapping("/validatePwd") boolean validatePwd(PasswordRequest request) throws Exception; - @ApiOperation("资源详息") + @ApiOperation("资源详细信息") @GetMapping("/resourceDetail/{resourceId}") Object resourceDetail(@PathVariable String resourceId); - @ApiOperation("视图详息") + @ApiOperation("视图详细信息") @PostMapping("/viewDetail/{viewId}/{panelId}") Object viewDetail(@PathVariable("viewId") String viewId, @PathVariable("panelId") String panelId, @RequestBody ChartExtRequest requestList) throws Exception; diff --git a/backend/src/main/java/io/dataease/controller/request/panel/PanelTemplateRequest.java b/backend/src/main/java/io/dataease/controller/request/panel/PanelTemplateRequest.java index 7841a2512b..a58c0b0cf0 100644 --- a/backend/src/main/java/io/dataease/controller/request/panel/PanelTemplateRequest.java +++ b/backend/src/main/java/io/dataease/controller/request/panel/PanelTemplateRequest.java @@ -13,7 +13,7 @@ import lombok.Data; public class PanelTemplateRequest extends PanelTemplateWithBLOBs { @ApiModelProperty("排序") private String sort; - @ApiModelProperty("详息") + @ApiModelProperty("详细信息") private String withBlobs="Y"; @ApiModelProperty("操作类型") private String optType; diff --git a/backend/src/main/java/io/dataease/controller/sys/SysUserController.java b/backend/src/main/java/io/dataease/controller/sys/SysUserController.java index b528f45bb3..c43a59ceca 100644 --- a/backend/src/main/java/io/dataease/controller/sys/SysUserController.java +++ b/backend/src/main/java/io/dataease/controller/sys/SysUserController.java @@ -4,9 +4,12 @@ import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.xiaoymin.knife4j.annotations.ApiSupport; import io.dataease.auth.annotation.DeLog; +import io.dataease.auth.annotation.DePermission; import io.dataease.auth.api.dto.CurrentUserDto; import io.dataease.auth.entity.AccountLockStatus; import io.dataease.auth.service.AuthUserService; +import io.dataease.commons.constants.DePermissionType; +import io.dataease.commons.constants.ResourceAuthLevel; import io.dataease.commons.constants.SysLogConstants; import io.dataease.commons.exception.DEException; import io.dataease.commons.utils.BeanUtils; @@ -86,6 +89,17 @@ public class SysUserController { return PageUtils.setPageInfo(page, users); } + @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @PostMapping("/userGrid/{datasetId}") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "goPage", value = "页码", required = true, dataType = "Integer"), + @ApiImplicitParam(paramType = "path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "request", value = "查询条件", required = true) + }) + public Pager> userGrids(@PathVariable String datasetId, @RequestBody KeyGridRequest request) { + return userGrid(0, 0, request); + } + @ApiIgnore @PostMapping("/userLists") public List userLists(@RequestBody BaseGridRequest request) { diff --git a/backend/src/main/java/io/dataease/ext/CleaningRebotMapper.java b/backend/src/main/java/io/dataease/ext/CleaningRebotMapper.java new file mode 100644 index 0000000000..16361cefe6 --- /dev/null +++ b/backend/src/main/java/io/dataease/ext/CleaningRebotMapper.java @@ -0,0 +1,26 @@ +package io.dataease.ext; + +public interface CleaningRebotMapper { + + int delFloatingDept(); + + void updateUserDept(); + + void delFloatingRoleMapping(); + + void delFloatingPanelShare(); + + void delFloatingTargetShare(); + + void delFloatingPanelStore(); + + void delFloatingTargetStore(); + + void delFloatingPanelLink(); + + void delFloatingPanelLinkMapping(); + + void delFloatingCreatorLink(); + + void delFloatingCreatorLinkMapping(); +} diff --git a/backend/src/main/java/io/dataease/ext/CleaningRebotMapper.xml b/backend/src/main/java/io/dataease/ext/CleaningRebotMapper.xml new file mode 100644 index 0000000000..b4efc734b2 --- /dev/null +++ b/backend/src/main/java/io/dataease/ext/CleaningRebotMapper.xml @@ -0,0 +1,114 @@ + + + + + + delete + from sys_dept + where pid not in (select * from (select dept_id from sys_dept) a) + and pid != 0; + + + + update sys_user + set dept_id = 0 + where dept_id is not null + and dept_id not in (select * from (select dept_id from sys_dept) a) + and dept_id != 0; + + + + delete + from sys_users_roles + where user_id not in (select * from (select u.user_id from sys_user u) a) + or role_id not in (select * from (select r.role_id from sys_role r) b); + + + + delete + from panel_share + where share_id in (select * + from (SELECT s.share_id + FROM panel_share s + left join panel_group p on s.panel_group_id = p.id + where p.id is null) a) + + + + delete + from panel_share + where share_id in (select share_id + from (select s.share_id, + ( + CASE s.type + WHEN 0 THEN (select nick_name from sys_user where user_id = s.target_id) + WHEN 1 THEN (select name from sys_role where role_id = s.target_id) + WHEN 2 THEN (select name from sys_dept where dept_id = s.target_id) + END + ) as target_name + from panel_share s) query_temp + where target_name is null) + + + + delete + from panel_store + where store_id in (select * + from (SELECT s.store_id + FROM panel_store s + left join panel_group p on s.panel_group_id = p.id + where p.id is null) a) + + + + delete + from panel_store + where store_id in (select * + from (SELECT s.store_id + FROM panel_store s + left join sys_user u on s.user_id = u.user_id + where u.user_id is null) a) + + + + delete + from panel_link + where resource_id in (select * + from (SELECT l.resource_id + FROM panel_link l + left join panel_group p on l.resource_id = p.id + where p.id is null) a); + + + + + delete + from panel_link_mapping + where id in (select * + from (SELECT m.id + FROM panel_link_mapping m + left join panel_group p on m.resource_id = p.id + where p.id is null) a); + + + + delete + from panel_link + where resource_id in (select * + from (SELECT l.resource_id + FROM panel_link l + left join sys_user u on l.user_id = u.user_id + where u.user_id is null) a); + + + + + delete + from panel_link_mapping + where id in (select * + from (SELECT m.resource_id + FROM panel_link_mapping m + left join sys_user u on m.user_id = u.user_id + where u.user_id is null) a); + + diff --git a/backend/src/main/java/io/dataease/ext/ExtPanelShareMapper.xml b/backend/src/main/java/io/dataease/ext/ExtPanelShareMapper.xml index 1399a0a9d2..1bb175b653 100644 --- a/backend/src/main/java/io/dataease/ext/ExtPanelShareMapper.xml +++ b/backend/src/main/java/io/dataease/ext/ExtPanelShareMapper.xml @@ -3,20 +3,20 @@ - - - - - + + + + + - - - - - - + + + + + + @@ -27,10 +27,10 @@ - + delete from panel_share where share_id in - + #{shareId} @@ -61,51 +61,67 @@ - select s.* from panel_share s left join panel_group g on g.id = s.panel_group_id where s.panel_group_id = #{resourceId} - + and s.type = #{type} - and (( s.granter is not null and s.granter = #{currentUserName} ) or ( s.granter is null and g.create_by = #{currentUserName} )) + and (( s.granter is not null and s.granter = #{currentUserName} ) or ( s.granter is null and g.create_by = + #{currentUserName} )) order by s.create_time desc - + select s.share_id, + s.panel_group_id as panel_id, + s.type, + s.target_id, + s.create_time, + ( + CASE s.type + WHEN 0 THEN (select nick_name from sys_user where user_id = s.target_id) + WHEN 1 THEN (select name from sys_role where role_id = s.target_id) + WHEN 2 THEN (select name from sys_dept where dept_id = s.target_id) + END + ) as target_name from panel_share s where s.panel_group_id = #{panelId} - and s.granter = #{userName} - + and ( + (s.granter is not null and s.granter = #{userName}) + or + (#{userName} = 'admin' and s.granter is null) + ) - select user_id from sys_users_roles where role_id in @@ -115,7 +131,7 @@ - select user_id from sys_user where dept_id in @@ -133,6 +149,4 @@ - - diff --git a/backend/src/main/java/io/dataease/listener/CleaningRobotListener.java b/backend/src/main/java/io/dataease/listener/CleaningRobotListener.java new file mode 100644 index 0000000000..59b7032301 --- /dev/null +++ b/backend/src/main/java/io/dataease/listener/CleaningRobotListener.java @@ -0,0 +1,26 @@ +package io.dataease.listener; + +import io.dataease.commons.utils.LogUtil; +import io.dataease.service.CleaningRebotService; +import org.springframework.boot.context.event.ApplicationReadyEvent; +import org.springframework.context.ApplicationListener; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; + +@Component +public class CleaningRobotListener implements ApplicationListener { + + @Resource + private CleaningRebotService cleaningRebotService; + + @Override + public void onApplicationEvent(ApplicationReadyEvent event) { + try { + cleaningRebotService.execute(); + } catch (Exception e) { + LogUtil.error(e.getMessage(), e); + } + + } +} diff --git a/backend/src/main/java/io/dataease/plugins/server/XDeptServer.java b/backend/src/main/java/io/dataease/plugins/server/XDeptServer.java index 54e0282fa8..3ae19f3e62 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XDeptServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XDeptServer.java @@ -5,8 +5,11 @@ import cn.hutool.core.collection.CollectionUtil; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.dataease.auth.annotation.DeLog; +import io.dataease.auth.annotation.DePermission; import io.dataease.auth.service.ExtAuthService; import io.dataease.commons.constants.AuthConstants; +import io.dataease.commons.constants.DePermissionType; +import io.dataease.commons.constants.ResourceAuthLevel; import io.dataease.commons.constants.SysLogConstants; import io.dataease.commons.exception.DEException; import io.dataease.commons.utils.BeanUtils; @@ -160,6 +163,18 @@ public class XDeptServer { return setPageInfo; } + @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @ApiOperation("查询用户") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "goPage", value = "页码", required = true, dataType = "Integer"), + @ApiImplicitParam(paramType = "path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "request", value = "查询条件", required = true) + }) + @PostMapping("/userGrid/{datasetId}") + public Pager> userGrids(@PathVariable String datasetId, @RequestBody XpackDeptUserRequest request) { + return userGrid(0,0, request); + } + @RequiresPermissions({"dept:edit", "user:edit"}) @PostMapping("/bindUser") public void bindUser(@RequestBody XpackDeptBindRequest request) { diff --git a/backend/src/main/java/io/dataease/plugins/server/XRoleServer.java b/backend/src/main/java/io/dataease/plugins/server/XRoleServer.java index c9ed08f3a5..661a9e9012 100644 --- a/backend/src/main/java/io/dataease/plugins/server/XRoleServer.java +++ b/backend/src/main/java/io/dataease/plugins/server/XRoleServer.java @@ -4,8 +4,11 @@ package io.dataease.plugins.server; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import io.dataease.auth.annotation.DeLog; +import io.dataease.auth.annotation.DePermission; import io.dataease.auth.service.ExtAuthService; import io.dataease.commons.constants.AuthConstants; +import io.dataease.commons.constants.DePermissionType; +import io.dataease.commons.constants.ResourceAuthLevel; import io.dataease.commons.constants.SysLogConstants; import io.dataease.commons.utils.DeLogUtils; import io.dataease.commons.utils.PageUtils; @@ -120,6 +123,18 @@ public class XRoleServer { return setPageInfo; } + @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_MANAGE) + @ApiOperation("查询角色下用户") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "goPage", value = "页码", required = true, dataType = "Integer"), + @ApiImplicitParam(paramType = "path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"), + @ApiImplicitParam(name = "request", value = "查询条件", required = true) + }) + @PostMapping("/userGrid/{datasetId}") + public Pager> userGrids(@PathVariable String datasetId, @RequestBody RoleUserRequest request) { + return userGrid(0,0, request); + } + @RequiresPermissions({"role:edit", "user:edit"}) @ApiOperation("绑定用户") @PostMapping("/bindUser") diff --git a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java index d3f0661869..8b9a23b56d 100644 --- a/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/engine/doris/DorisQueryProvider.java @@ -125,7 +125,8 @@ public class DorisQueryProvider extends QueryProvider { } else if (f.getDeType() == 3) { fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT); } else if (f.getDeType() == 1) { - fieldName = String.format(DorisConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(f.getDateFormat()) ? f.getDateFormat() : DorisConstants.DEFAULT_DATE_FORMAT); + fieldName = StringUtils.isEmpty(f.getDateFormat()) ? String.format(DorisConstants.STR_TO_DATE, originField, DorisConstants.DEFAULT_DATE_FORMAT) : + String.format(DorisConstants.DATE_FORMAT, String.format(DorisConstants.STR_TO_DATE, originField, f.getDateFormat()), DorisConstants.DEFAULT_DATE_FORMAT); } else { fieldName = originField; } @@ -201,7 +202,8 @@ public class DorisQueryProvider extends QueryProvider { } else if (f.getDeType() == 3) { fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT); } else if (f.getDeType() == 1) { - fieldName = String.format(DorisConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(f.getDateFormat()) ? f.getDateFormat() : DorisConstants.DEFAULT_DATE_FORMAT); + fieldName = StringUtils.isEmpty(f.getDateFormat()) ? String.format(DorisConstants.STR_TO_DATE, originField, DorisConstants.DEFAULT_DATE_FORMAT) : + String.format(DorisConstants.DATE_FORMAT, String.format(DorisConstants.STR_TO_DATE, originField, f.getDateFormat()), DorisConstants.DEFAULT_DATE_FORMAT); } else { fieldName = originField; } diff --git a/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java b/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java index eca6a0bd45..cb426517e4 100644 --- a/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/engine/mysql/MysqlQueryProvider.java @@ -126,7 +126,8 @@ public class MysqlQueryProvider extends QueryProvider { } else if (f.getDeType() == 3) { fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_FLOAT_FORMAT); } else if (f.getDeType() == 1) { - fieldName = String.format(MysqlConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(f.getDateFormat()) ? f.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT); + fieldName = StringUtils.isEmpty(f.getDateFormat()) ? String.format(MysqlConstants.STR_TO_DATE, originField, MysqlConstants.DEFAULT_DATE_FORMAT) : + String.format(MysqlConstants.DATE_FORMAT, String.format(MysqlConstants.STR_TO_DATE, originField, f.getDateFormat()), MysqlConstants.DEFAULT_DATE_FORMAT); } else { fieldName = originField; } @@ -201,7 +202,8 @@ public class MysqlQueryProvider extends QueryProvider { } else if (f.getDeType() == 3) { fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_FLOAT_FORMAT); } else if (f.getDeType() == 1) { - fieldName = String.format(MysqlConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(f.getDateFormat()) ? f.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT); + fieldName = StringUtils.isEmpty(f.getDateFormat()) ? String.format(MysqlConstants.STR_TO_DATE, originField, MysqlConstants.DEFAULT_DATE_FORMAT) : + String.format(MysqlConstants.DATE_FORMAT, String.format(MysqlConstants.STR_TO_DATE, originField, f.getDateFormat()), MysqlConstants.DEFAULT_DATE_FORMAT); } else { fieldName = originField; } @@ -979,9 +981,9 @@ public class MysqlQueryProvider extends QueryProvider { } else { // Doris field type test /*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { - whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value); + whereValue = String.format(MysqlConstants.WHERE_NUMBER_VALUE, value); } else { - whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value); + whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value); }*/ whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value); } @@ -1089,9 +1091,9 @@ public class MysqlQueryProvider extends QueryProvider { } else { // doris field type test /*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { - whereValue = String.format(DorisConstants.WHERE_NUMBER_VALUE, value.get(0)); + whereValue = String.format(MysqlConstants.WHERE_NUMBER_VALUE, value.get(0)); } else { - whereValue = String.format(DorisConstants.WHERE_VALUE_VALUE, value.get(0)); + whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value.get(0)); }*/ whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value.get(0)); } diff --git a/backend/src/main/java/io/dataease/provider/query/mysql/MysqlQueryProvider.java b/backend/src/main/java/io/dataease/provider/query/mysql/MysqlQueryProvider.java index 3b39c4f600..de53211f92 100644 --- a/backend/src/main/java/io/dataease/provider/query/mysql/MysqlQueryProvider.java +++ b/backend/src/main/java/io/dataease/provider/query/mysql/MysqlQueryProvider.java @@ -129,7 +129,8 @@ public class MysqlQueryProvider extends QueryProvider { } else if (f.getDeType() == 3) { fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT); } else if (f.getDeType() == 1) { - fieldName = String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(f.getDateFormat()) ? f.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT); + fieldName = StringUtils.isEmpty(f.getDateFormat()) ? String.format(MySQLConstants.STR_TO_DATE, originField, MysqlConstants.DEFAULT_DATE_FORMAT) : + String.format(MySQLConstants.DATE_FORMAT, String.format(MySQLConstants.STR_TO_DATE, originField, f.getDateFormat()), MySQLConstants.DEFAULT_DATE_FORMAT); } else { fieldName = originField; } @@ -188,7 +189,8 @@ public class MysqlQueryProvider extends QueryProvider { } else if (f.getDeType() == 3) { fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT); } else if (f.getDeType() == 1) { - fieldName = String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(f.getDateFormat()) ? f.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT); + fieldName = StringUtils.isEmpty(f.getDateFormat()) ? String.format(MySQLConstants.STR_TO_DATE, originField, MysqlConstants.DEFAULT_DATE_FORMAT) : + String.format(MySQLConstants.DATE_FORMAT, String.format(MySQLConstants.STR_TO_DATE, originField, f.getDateFormat()), MySQLConstants.DEFAULT_DATE_FORMAT); } else { fieldName = originField; } diff --git a/backend/src/main/java/io/dataease/service/CleaningRebotService.java b/backend/src/main/java/io/dataease/service/CleaningRebotService.java new file mode 100644 index 0000000000..1c45468ce1 --- /dev/null +++ b/backend/src/main/java/io/dataease/service/CleaningRebotService.java @@ -0,0 +1,37 @@ +package io.dataease.service; + +import io.dataease.ext.CleaningRebotMapper; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; + + +@Service +public class CleaningRebotService { + + @Value("${dataease.clean-nobody-link:false}") + private Boolean cleanNobodyLink; + + @Resource + private CleaningRebotMapper cleaningRebotMapper; + + public void execute() { + int floatDept = 0; + do { + floatDept = cleaningRebotMapper.delFloatingDept(); + } while (floatDept > 0); + cleaningRebotMapper.updateUserDept(); + cleaningRebotMapper.delFloatingRoleMapping(); + cleaningRebotMapper.delFloatingPanelShare(); + cleaningRebotMapper.delFloatingTargetShare(); + cleaningRebotMapper.delFloatingPanelStore(); + cleaningRebotMapper.delFloatingTargetStore(); + cleaningRebotMapper.delFloatingPanelLink(); + cleaningRebotMapper.delFloatingPanelLinkMapping(); + if (cleanNobodyLink) { + cleaningRebotMapper.delFloatingCreatorLink(); + cleaningRebotMapper.delFloatingCreatorLinkMapping(); + } + } +} diff --git a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java index 9d628ed9ad..1592459766 100644 --- a/backend/src/main/java/io/dataease/service/chart/ChartViewService.java +++ b/backend/src/main/java/io/dataease/service/chart/ChartViewService.java @@ -788,9 +788,7 @@ public class ChartViewService { ChartExtFilterRequest drillFilter = new ChartExtFilterRequest(); drillFilter.setFieldId(dto.getId()); - drillFilter.setValue(new ArrayList() {{ - add(dto.getValue()); - }}); + drillFilter.setValue(Collections.singletonList(dto.getValue())); drillFilter.setOperator("in"); drillFilter.setDatasetTableField(datasetTableField); extFilterList.add(drillFilter); diff --git a/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java b/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java index 4e28040812..7d570a1a8b 100644 --- a/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java +++ b/backend/src/main/java/io/dataease/service/chart/util/ChartDataBuild.java @@ -202,6 +202,10 @@ public class ChartDataBuild { chartDimensionDTO.setValue(row[k]); dimensionList.add(chartDimensionDTO); } + ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO(); + chartDimensionDTO.setId(extStack.get(0).getId()); + chartDimensionDTO.setValue(row[xAxis.size()]); + dimensionList.add(chartDimensionDTO); axisChartDataDTO.setDimensionList(dimensionList); if (CollectionUtils.isNotEmpty(yAxis)) { @@ -1054,6 +1058,10 @@ public class ChartDataBuild { chartDimensionDTO.setValue(row[j]); dimensionList.add(chartDimensionDTO); } + ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO(); + chartDimensionDTO.setId(extStack.get(0).getId()); + chartDimensionDTO.setValue(row[xAxis.size()]); + dimensionList.add(chartDimensionDTO); axisChartDataDTO.setDimensionList(dimensionList); if (CollectionUtils.isNotEmpty(yAxis)) { 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 434d8c4410..82953e556d 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableService.java @@ -350,6 +350,7 @@ public class DataSetTableService { || StringUtils.equalsIgnoreCase(datasetTable.getType(), DatasetType.UNION.name())) { saveTableField(datasetTable); } + extractData(datasetTable); DeLogUtils.save(SysLogConstants.OPERATE_TYPE.MODIFY, SysLogConstants.SOURCE_TYPE.DATASET, datasetTable.getId(), datasetTable.getSceneId(), null, null); } } diff --git a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java index 758f7582c6..a0b34fe714 100644 --- a/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java +++ b/backend/src/main/java/io/dataease/service/dataset/DataSetTableTaskService.java @@ -84,7 +84,7 @@ public class DataSetTableTaskService { } datasetTableTaskMapper.insert(datasetTableTask); } else { - datasetTableTask.setStatus(null); + datasetTableTask.setStatus(TaskStatus.Underway.name()); datasetTableTask.setLastExecTime(null); datasetTableTask.setLastExecStatus(null); datasetTableTaskMapper.updateByPrimaryKeySelective(datasetTableTask); diff --git a/backend/src/main/java/io/dataease/service/message/SysMsgService.java b/backend/src/main/java/io/dataease/service/message/SysMsgService.java index 3621bf8d66..721a466c5b 100644 --- a/backend/src/main/java/io/dataease/service/message/SysMsgService.java +++ b/backend/src/main/java/io/dataease/service/message/SysMsgService.java @@ -1,5 +1,6 @@ package io.dataease.service.message; +import io.dataease.commons.utils.LogUtil; import io.dataease.ext.ExtSysMsgMapper; import io.dataease.commons.constants.SysMsgConstants; import io.dataease.commons.utils.AuthUtils; @@ -25,6 +26,7 @@ import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; + import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @@ -65,7 +67,7 @@ public class SysMsgService { orderClause = String.join(", ", orders); } - if (CollectionUtils.isNotEmpty(typeIds)){ + if (CollectionUtils.isNotEmpty(typeIds)) { criteria.andTypeIdIn(typeIds); } @@ -120,7 +122,7 @@ public class SysMsgService { return sysMsgTypeMapper.selectByExample(example); } - private List buildTree(List lists){ + private List buildTree(List lists) { List rootNodes = new ArrayList<>(); lists.forEach(node -> { SettingTreeNode settingTreeNode = convert(node); @@ -183,6 +185,7 @@ public class SysMsgService { /** * 修改了订阅信息 需要清除缓存 + * * @param request * @param userId */ @@ -241,22 +244,29 @@ public class SysMsgService { List subscribes = subscribes(userId); if (CollectionUtils.isNotEmpty(subscribes)) { - subscribes.stream().filter(item -> item.getTypeId().equals(typeId)).forEach(sub -> { - SendService sendService = serviceByChannel(sub.getChannelId()); - sendService.sendMsg(userId, typeId, content, param); - }); - + for (int i = 0; i < subscribes.size(); i++) { + SubscribeNode item = subscribes.get(i); + if (item.getTypeId().equals(typeId)) { + try { + SendService sendService = serviceByChannel(item.getChannelId()); + sendService.sendMsg(userId, typeId, content, param); + } catch (Exception e) { + LogUtil.error(e.getMessage(), e); + } + } + } } } - private SendService serviceByChannel(Long channelId){ + private SendService serviceByChannel(Long channelId) { String beanName = sysMsgChannelMapper.selectByPrimaryKey(channelId).getServiceName(); - return (SendService)CommonBeanFactory.getBean(beanName); + return (SendService) CommonBeanFactory.getBean(beanName); } /** * 查询用户订阅的消息 并缓存 + * * @param userId * @return */ @@ -280,7 +290,7 @@ public class SysMsgService { List defaultSettings = defaultSettings(); defaultSettings.forEach(setting -> { - if (!sourceLists.stream().anyMatch(item -> item.match(setting))){ + if (!sourceLists.stream().anyMatch(item -> item.match(setting))) { sourceLists.add(setting); } }); @@ -297,7 +307,7 @@ public class SysMsgService { public Long overTime() { String msgTimeOut = systemParameterService.basicInfo().getMsgTimeOut(); - if(StringUtils.isNotBlank(msgTimeOut)) { + if (StringUtils.isNotBlank(msgTimeOut)) { overDays = Integer.parseInt(msgTimeOut); } Long currentTime = System.currentTimeMillis(); @@ -307,9 +317,8 @@ public class SysMsgService { long temp = overDays * oneDayTime; return currentTime - (currentTime + 8 * 60 * 60 * 1000) % oneDayTime - temp; - + } - } diff --git a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java index 651b71c757..4e44e60753 100644 --- a/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java +++ b/backend/src/main/java/io/dataease/service/panel/PanelGroupService.java @@ -806,23 +806,23 @@ public class PanelGroupService { //校验标准 1.存在视图且所有视图的数据来源必须是dataset 2.存在数据集且没有excel数据集 3.存在数据源且是单数据源 //1.view check if (CollectionUtils.isEmpty(chartViewsInfo)) { - return new PanelExport2App("this panel don't have views"); + return new PanelExport2App(Translator.get("I18N_APP_NO_VIEW_ERROR")); } else if (chartViewsInfo.stream().filter(chartView -> chartView.getDataFrom().equals("template")).collect(Collectors.toList()).size() > 0) { - return new PanelExport2App("this panel have view from template"); + return new PanelExport2App(Translator.get("I18N_APP_TEMPLATE_VIEW_ERROR")); } // dataset check if (CollectionUtils.isEmpty(datasetTablesInfo)) { - return new PanelExport2App("this panel don't have dataset"); + return new PanelExport2App(Translator.get("I18N_APP_NO_DATASET_ERROR")); } else if (datasetTablesInfo.stream().filter(datasetTable -> datasetTable.getType().equals("excel") || datasetTable.getType().equals("api")).collect(Collectors.toList()).size() > 0) { - return new PanelExport2App("this panel have dataset witch type is excel or api"); + return new PanelExport2App(Translator.get("I18N_APP_ERROR_DATASET")); } //datasource check if (CollectionUtils.isEmpty(datasourceDTOS)) { - return new PanelExport2App("this panel don't have datasource"); + return new PanelExport2App(Translator.get("I18N_APP_NO_DATASOURCE")); } else if (datasourceDTOS.size() > 1) { - return new PanelExport2App("this panel should have only one dataset"); + return new PanelExport2App(Translator.get("I18N_APP_ONE_DATASOURCE_TIPS")); } return new PanelExport2App(chartViewsInfo, chartViewFieldsInfo, datasetTablesInfo, datasetTableFieldsInfo, dataSetTasksInfo, datasourceDTOS,panelViews); } diff --git a/backend/src/main/java/io/dataease/service/panel/ShareService.java b/backend/src/main/java/io/dataease/service/panel/ShareService.java index bc468c412d..143959f23d 100644 --- a/backend/src/main/java/io/dataease/service/panel/ShareService.java +++ b/backend/src/main/java/io/dataease/service/panel/ShareService.java @@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; + import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; @@ -171,8 +172,6 @@ public class ShareService { } - - // 以上是业务代码 // 下面是消息发送 Set addUserIdSet = AuthUtils.userIdsByURD(addAuthURD); @@ -212,7 +211,6 @@ public class ShareService { } /** - * * @param newTargets 新的分享目标 * @param shareNodes 已景分享目标 * @return @@ -349,7 +347,7 @@ public class ShareService { Map param = new HashMap<>(); param.put("userId", userId); param.put("deptId", deptId); - param.put("roleIds", CollectionUtils.isNotEmpty(roleIds)? roleIds: null); + param.put("roleIds", CollectionUtils.isNotEmpty(roleIds) ? roleIds : null); List data = extPanelShareMapper.query(param); List dtoLists = data.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po)) @@ -384,7 +382,7 @@ public class ShareService { if (CollectionUtils.isEmpty(targets)) return new ArrayList<>(); return targets.stream().filter(item -> StringUtils.isNotEmpty(item.getTargetName())) - .collect(Collectors.toList()); + .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(item -> item.getPanelId() + item.getType() + item.getTargetId()))), ArrayList::new)); } public void removeSharesyPanel(String panelId) { @@ -405,7 +403,7 @@ public class ShareService { AuthURD urd = new AuthURD(); for (Map.Entry> entry : listMap.entrySet()) { List dtoList = entry.getValue(); - if(CollectionUtils.isNotEmpty(dtoList)) { + if (CollectionUtils.isNotEmpty(dtoList)) { List curTargetIds = dtoList.stream().map(dto -> Long.parseLong(dto.getTargetId())).collect(Collectors.toList()); buildRedAuthURD(entry.getKey(), curTargetIds, urd); } @@ -429,7 +427,7 @@ public class ShareService { SysLogConstants.SOURCE_TYPE targetType = SysLogConstants.SOURCE_TYPE.USER; if (type == 1) { targetType = SysLogConstants.SOURCE_TYPE.ROLE; - }else if (type == 2) { + } else if (type == 2) { targetType = SysLogConstants.SOURCE_TYPE.DEPT; } return targetType; @@ -447,7 +445,9 @@ public class ShareService { DeLogUtils.save(SysLogConstants.OPERATE_TYPE.UNSHARE, SysLogConstants.SOURCE_TYPE.PANEL, panelId, panelGroup.getPid(), removeRequest.getTargetId(), targetType); AuthURD sharedAuthURD = new AuthURD(); - List removeIds = new ArrayList(){{add(removeRequest.getTargetId());}}; + List removeIds = new ArrayList() {{ + add(removeRequest.getTargetId()); + }}; buildRedAuthURD(removeRequest.getType(), removeIds, sharedAuthURD); CurrentUserDto user = AuthUtils.getUser(); Gson gson = new Gson(); diff --git a/backend/src/main/resources/db/migration/V42__1.16.sql b/backend/src/main/resources/db/migration/V42__1.16.sql index 06804d06f3..b0f41c8ed2 100644 --- a/backend/src/main/resources/db/migration/V42__1.16.sql +++ b/backend/src/main/resources/db/migration/V42__1.16.sql @@ -285,3 +285,6 @@ delimiter ; UPDATE `panel_subject` 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\":\"f9f46a50-58f5-11ed-889b-91ab7371e877\",\"chartInfo\":{\"chartTitle\":{\"show\":true,\"fontSize\":\"18\",\"color\":\"#FFFFFF\",\"hPosition\":\"left\",\"vPosition\":\"top\",\"isItalic\":false,\"isBolder\":true,\"remarkShow\":false,\"remark\":\"\",\"remarkBackgroundColor\":\"#5A5C62\",\"fontFamily\":\"Microsoft YaHei\",\"letterSpace\":\"0\",\"fontShadow\":false},\"chartColor\":{\"value\":\"default\",\"colors\":[\"#5470c6\",\"#91cc75\",\"#fac858\",\"#ee6666\",\"#73c0de\",\"#3ba272\",\"#fc8452\",\"#9a60b4\",\"#ea7ccc\"],\"alpha\":100,\"tableHeaderBgColor\":\"#5470C6\",\"tableItemBgColor\":\"#131E42\",\"tableFontColor\":\"#ffffff\",\"tableStripe\":true,\"dimensionColor\":\"#ffffff\",\"quotaColor\":\"#5470C6\",\"tableBorderColor\":\"#CCCCCC\",\"seriesColors\":[],\"areaBorderColor\":\"#EBEEF5\",\"tableHeaderFontColor\":\"#ffffff\",\"modifyName\":\"colors\"},\"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\":\"#FFFFFF\",\"headBorderActiveColor\":\"#FFFFFF\",\"headPosition\":\"left\"}}}' WHERE `id` = 'system_2'; + +UPDATE `dataset_table_function` SET `func` = 'CASE expr WHEN v1 THEN r1 [WHEN v2 THEN r2] [ELSE rn] END' WHERE `id` = 47; +UPDATE `dataset_table_function` SET `func` = 'CASE expr WHEN v1 THEN r1 [WHEN v2 THEN r2] [ELSE rn] END' WHERE `id` = 96; diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index df1effdcd3..dfe388f61f 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -240,3 +240,10 @@ I18N_PANEL_EXIST=The current panel name already exists under this directory I18N_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory I18N_NOT_JAR=File is not jar! +I18N_APP_NO_VIEW_ERROR=This panel don't have views +I18N_APP_TEMPLATE_VIEW_ERROR=This panel have view from template +I18N_APP_NO_DATASET_ERROR=This panel don't have dataset +I18N_APP_ERROR_DATASET=This panel have dataset witch type is excel or api +I18N_APP_NO_DATASOURCE=This panel don't have datasource +I18N_APP_ONE_DATASOURCE_TIPS=This panel should have only one datasource + diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index a0972f0da7..c3724a160f 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -194,7 +194,7 @@ I18N_DATASOURCE_LEVEL_GRANT=\u6388\u6743 I18N_NO_PERMISSION=\u5F53\u524D\u7528\u6237\u6CA1\u6709\u6743\u9650 I18N_PLEASE_CONCAT_ADMIN=\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A I18N_SQL_variable_limit=SQL \u53D8\u91CF\u53EA\u80FD\u5728 WHERE \u6761\u4EF6\u4E2D\u4F7F\u7528 -I18N_SQL_variable_direct_limit=SQL变量只能用于直连 +I18N_SQL_variable_direct_limit=SQL\u53D8\u91CF\u53EA\u80FD\u7528\u4E8E\u76F4\u8FDE I18N_EMAIL_CONFIG_ERROR=\u90AE\u4EF6\u914D\u7F6E\u9519\u8BEF I18N_EMAIL_HOST_ERROR=\u90AE\u4EF6\u4E3B\u673A\u4E0D\u80FD\u4E3A\u7A7A I18N_EMAIL_PORT_ERROR=\u90AE\u4EF6\u7AEF\u53E3\u4E0D\u80FD\u4E3A\u7A7A @@ -238,5 +238,11 @@ I18N_ACCOUNT_LOCKED=\u8D26\u53F7\u3010%s\u3011\u5DF2\u9501\u5B9A(\u8BF7\u8054\u7 I18N_PANEL_EXIST=\u5F53\u524D\u4EEA\u8868\u677F\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u5F53\u524D\u6570\u636E\u96C6\u5206\u7EC4\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 -I18N_NOT_JAR=文件不是 jar 包! +I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305! +I18N_APP_NO_VIEW_ERROR=\u8BE5\u4EEA\u8868\u677F\u6CA1\u6709\u89C6\u56FE +I18N_APP_TEMPLATE_VIEW_ERROR=\u8BE5\u4EEA\u8868\u677F\u5B58\u5728\u6A21\u677F\u4E2D\u7684\u89C6\u56FE +I18N_APP_NO_DATASET_ERROR=\u8BE5\u4EEA\u8868\u7248\u6CA1\u6709\u6570\u636E\u96C6 +I18N_APP_ERROR_DATASET=\u4EEA\u8868\u677F\u4E2D\u4E0D\u80FD\u5B58\u5728API\u6570\u636E\u6E90\u6216\u8005Excel\u6570\u636E\u96C6 +I18N_APP_NO_DATASOURCE=\u6CA1\u6709\u627E\u5230\u6570\u636E\u6E90 +I18N_APP_ONE_DATASOURCE_TIPS=\u8BE5\u4EEA\u8868\u677F\u53EA\u80FD\u5B58\u5728\u4E00\u4E2A\u6570\u636E\u6E90 diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index fb269a8bda..93400397eb 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -190,7 +190,7 @@ I18N_DATASOURCE_LEVEL_GRANT=\u6388\u6B0A I18N_NO_PERMISSION=\u7576\u524D\u7528\u6236\u6C92\u6709\u6B0A\u9650 I18N_PLEASE_CONCAT_ADMIN=\u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\u958B\u901A I18N_SQL_variable_limit=SQL\u8B8A\u6578\u53EA\u80FD\u5728WHERE\u689D\u4EF6\u4E2D\u4F7F\u7528 -I18N_SQL_variable_direct_limit=SQL變數只能用於直連 +I18N_SQL_variable_direct_limit=SQL\u8B8A\u6578\u53EA\u80FD\u7528\u65BC\u76F4\u9023 I18N_EMAIL_CONFIG_ERROR=\u90F5\u4EF6\u914D\u7F6E\u932F\u8AA4 I18N_EMAIL_HOST_ERROR=\u90F5\u4EF6\u4E3B\u6A5F\u4E0D\u80FD\u70BA\u7A7A I18N_EMAIL_PORT_ERROR=\u90F5\u4EF6\u7AEF\u53E3\u4E0D\u80FD\u70BA\u7A7A @@ -234,4 +234,10 @@ I18N_ACCOUNT_LOCKED=\u8CEC\u865F\u3010%s\u3011\u5DF2\u9396\u5B9A(\u8ACB\u806F\u7 I18N_PANEL_EXIST=\u7576\u524D\u5100\u9336\u95C6\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u7576\u524D\u6578\u64DA\u96C6\u5206\u7D44\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 -I18N_NOT_JAR=文件不是 jar 包! +I18N_NOT_JAR=\u6587\u4EF6\u4E0D\u662F jar \u5305! +I18N_APP_NO_VIEW_ERROR=\u8A72\u5100\u8868\u677F\u6C92\u6709\u8996\u5716 +I18N_APP_TEMPLATE_VIEW_ERROR=\u8A72\u5100\u8868\u677F\u5B58\u5728\u6A21\u677F\u4E2D\u7684\u8996\u5716 +I18N_APP_NO_DATASET_ERROR=\u8A72\u5100\u8868\u7248\u6C92\u6709\u6578\u64DA\u96C6 +I18N_APP_ERROR_DATASET=\u5100\u8868\u677F\u4E2D\u4E0D\u80FD\u5B58\u5728API\u6578\u64DA\u6E90\u6216\u8005Excel\u6578\u64DA\u96C6 +I18N_APP_NO_DATASOURCE=\u6C92\u6709\u627E\u5230\u6578\u64DA\u6E90 +I18N_APP_ONE_DATASOURCE_TIPS=\u8A72\u5100\u8868\u677F\u53EA\u80FD\u5B58\u5728\u4E00\u500B\u6578\u64DA\u6E90 diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue index 981cff69f9..c9412d7710 100644 --- a/frontend/src/components/canvas/components/TextAttr.vue +++ b/frontend/src/components/canvas/components/TextAttr.vue @@ -518,6 +518,7 @@ export default { ], // tab组件显示的属性 'de-tabs': [ + 'fontSize', 'borderStyle', 'borderWidth', 'borderColor', @@ -718,39 +719,42 @@ export default { diff --git a/frontend/src/components/canvas/custom-component/component-list.js b/frontend/src/components/canvas/custom-component/component-list.js index 844f31a2a7..0c79e78f02 100644 --- a/frontend/src/components/canvas/custom-component/component-list.js +++ b/frontend/src/components/canvas/custom-component/component-list.js @@ -388,7 +388,8 @@ const list = [ height: 200, borderStyle: 'solid', borderWidth: 0, - borderColor: '#000000' + borderColor: '#000000', + fontSize: 16 }, options: { tabList: [{ diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js index 09cb8cd0b2..aba32e1d9e 100644 --- a/frontend/src/components/canvas/utils/utils.js +++ b/frontend/src/components/canvas/utils/utils.js @@ -99,6 +99,9 @@ export function panelDataPrepare(componentData, componentStyle, callback) { item.options.attrs.accuracy = 'HH:mm' } } + if (item.type === 'de-tabs') { + item.style.fontSize = item.style.fontSize || 16 + } if (item.type === 'custom') { item.options.manualModify = false } diff --git a/frontend/src/components/widget/DeWidget/DeTabs.vue b/frontend/src/components/widget/DeWidget/DeTabs.vue index 68ae346e8c..d9526cad50 100644 --- a/frontend/src/components/widget/DeWidget/DeTabs.vue +++ b/frontend/src/components/widget/DeWidget/DeTabs.vue @@ -25,8 +25,7 @@ :name="item.name" > - {{ item.title }} - + {{ item.title }} - { if (node.colIndex === 0) { - node.label = customAttr.size.indexLabel + if (!customAttr.size.indexLabel) { + node.label = ' ' + } else { + node.label = customAttr.size.indexLabel + } } } + s2Options.dataCell = (viewMeta) => { + if (viewMeta.colIndex === 0) { + viewMeta.fieldValue = (pageInfo.pageSize * (pageInfo.page - 1)) + viewMeta.rowIndex + 1 + } + return new DataCell(viewMeta, viewMeta?.spreadsheet) + } } // 开始渲染 @@ -266,7 +276,11 @@ export function baseTableNormal(s2, container, chart, action, tableData) { if (s2Options.showSeriesNumber) { s2Options.colCell = (node) => { if (node.colIndex === 0) { - node.label = customAttr.size.indexLabel + if (!customAttr.size.indexLabel) { + node.label = ' ' + } else { + node.label = customAttr.size.indexLabel + } } } } diff --git a/frontend/src/views/chart/components/ChartComponentG2.vue b/frontend/src/views/chart/components/ChartComponentG2.vue index fe9cca5dfa..c0b4fcbf8f 100644 --- a/frontend/src/views/chart/components/ChartComponentG2.vue +++ b/frontend/src/views/chart/components/ChartComponentG2.vue @@ -18,11 +18,11 @@ :style="title_class" style="cursor: default;display: block;" > -
+
diff --git a/frontend/src/views/chart/components/ChartComponentS2.vue b/frontend/src/views/chart/components/ChartComponentS2.vue index dc66a0e7db..caf1e6a9bd 100644 --- a/frontend/src/views/chart/components/ChartComponentS2.vue +++ b/frontend/src/views/chart/components/ChartComponentS2.vue @@ -18,11 +18,11 @@ :style="title_class" style="cursor: default;display: block;" > -
+
@@ -250,7 +250,7 @@ export default { } } if (chart.type === 'table-info') { - this.myChart = baseTableInfo(this.myChart, this.chartId, chart, this.antVAction, this.tableData) + this.myChart = baseTableInfo(this.myChart, this.chartId, chart, this.antVAction, this.tableData, this.currentPage) } else if (chart.type === 'table-normal') { this.myChart = baseTableNormal(this.myChart, this.chartId, chart, this.antVAction, this.tableData) } else if (chart.type === 'table-pivot') { diff --git a/frontend/src/views/chart/components/ChartTitleUpdate.vue b/frontend/src/views/chart/components/ChartTitleUpdate.vue index 334c4d53bf..6470e26293 100644 --- a/frontend/src/views/chart/components/ChartTitleUpdate.vue +++ b/frontend/src/views/chart/components/ChartTitleUpdate.vue @@ -11,7 +11,7 @@ />

{{ chart.title }}

diff --git a/frontend/src/views/chart/components/component-style/TitleSelector.vue b/frontend/src/views/chart/components/component-style/TitleSelector.vue index b674de0668..d5691cc72e 100644 --- a/frontend/src/views/chart/components/component-style/TitleSelector.vue +++ b/frontend/src/views/chart/components/component-style/TitleSelector.vue @@ -12,10 +12,10 @@ :label="$t('chart.show')" class="form-item" > - + >{{ $t('chart.show') }}
- + >{{ $t('chart.show') }}
-
+
diff --git a/frontend/src/views/chart/components/normal/LabelNormalText.vue b/frontend/src/views/chart/components/normal/LabelNormalText.vue index a334114921..693d747dc2 100644 --- a/frontend/src/views/chart/components/normal/LabelNormalText.vue +++ b/frontend/src/views/chart/components/normal/LabelNormalText.vue @@ -17,11 +17,11 @@ :style="title_class" style="cursor: default;display: block;" > -
+
diff --git a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue index 4612570507..826db2e9fa 100644 --- a/frontend/src/views/chart/components/shape-attr/SizeSelector.vue +++ b/frontend/src/views/chart/components/shape-attr/SizeSelector.vue @@ -387,6 +387,7 @@ - + >{{ $t('chart.show') }}
this.$emit('templateDelete', template.id) } diff --git a/frontend/src/views/panel/list/PanelList.vue b/frontend/src/views/panel/list/PanelList.vue index 1ff274d29f..db3759ea47 100644 --- a/frontend/src/views/panel/list/PanelList.vue +++ b/frontend/src/views/panel/list/PanelList.vue @@ -104,7 +104,7 @@

@@ -333,7 +333,8 @@ @click="close()" >{{ $t('panel.cancel') - }} + }} + {{ $t('dataset.cancel') - }} + }} + 3) + ? this.defaultData.slice(0, 3) + : this.defaultData }, ...mapState(['nowPanelTrackInfo']) }, @@ -846,7 +848,8 @@ export default { this.defaultTree() }) }) - .catch(() => {}) + .catch(() => { + }) }, clearCanvas() { @@ -994,7 +997,8 @@ export default { } return data }, - newPanelSave(id) {}, + newPanelSave(id) { + }, // 激活并点击当前节点 activeNodeAndClick(panelInfo) { if (panelInfo) { @@ -1108,7 +1112,7 @@ export default { } -