Merge branch 'dev' into pr@dev_eslint_auto_fix

This commit is contained in:
dataeaseShu 2022-11-01 14:29:28 +08:00
commit 09d67c8952
54 changed files with 544 additions and 174 deletions

View File

@ -109,7 +109,7 @@ public class DataSetTableController {
} }
@DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE) @DePermission(type = DePermissionType.DATASET, level = ResourceAuthLevel.DATASET_LEVEL_USE)
@ApiOperation("") @ApiOperation("细信")
@PostMapping("get/{id}") @PostMapping("get/{id}")
public DatasetTable get(@ApiParam(name = "id", value = "数据集ID", required = true) @PathVariable String id) { public DatasetTable get(@ApiParam(name = "id", value = "数据集ID", required = true) @PathVariable String id) {
return dataSetTableService.get(id); return dataSetTableService.get(id);
@ -194,7 +194,7 @@ public class DataSetTableController {
} }
@DePermission(type = DePermissionType.DATASET) @DePermission(type = DePermissionType.DATASET)
@ApiOperation("数据集详") @ApiOperation("数据集详细信")
@PostMapping("datasetDetail/{id}") @PostMapping("datasetDetail/{id}")
public DataSetDetail datasetDetail(@PathVariable String id) { public DataSetDetail datasetDetail(@PathVariable String id) {
return dataSetTableService.getDatasetDetail(id); return dataSetTableService.getDatasetDetail(id);

View File

@ -190,6 +190,7 @@ public class PanelGroupController {
return panelGroupService.findPanelElementInfo(viewId); return panelGroupService.findPanelElementInfo(viewId);
} }
@GetMapping("/export2AppCheck/{panelId}") @GetMapping("/export2AppCheck/{panelId}")
@I18n
public PanelExport2App export2AppCheck(@PathVariable String panelId){ public PanelExport2App export2AppCheck(@PathVariable String panelId){
return panelGroupService.panelExport2AppCheck(panelId); return panelGroupService.panelExport2AppCheck(panelId);
} }

View File

@ -46,7 +46,7 @@ public class PanelTemplateController {
panelTemplateService.delete(id); panelTemplateService.delete(id);
} }
@ApiOperation("") @ApiOperation("细信")
@GetMapping("/findOne/{id}") @GetMapping("/findOne/{id}")
public PanelTemplateWithBLOBs findOne(@PathVariable String id) throws Exception { public PanelTemplateWithBLOBs findOne(@PathVariable String id) throws Exception {
return panelTemplateService.findOne(id); return panelTemplateService.findOne(id);

View File

@ -51,11 +51,11 @@ public interface LinkApi {
@PostMapping("/validatePwd") @PostMapping("/validatePwd")
boolean validatePwd(PasswordRequest request) throws Exception; boolean validatePwd(PasswordRequest request) throws Exception;
@ApiOperation("资源详") @ApiOperation("资源详细信")
@GetMapping("/resourceDetail/{resourceId}") @GetMapping("/resourceDetail/{resourceId}")
Object resourceDetail(@PathVariable String resourceId); Object resourceDetail(@PathVariable String resourceId);
@ApiOperation("视图详") @ApiOperation("视图详细信")
@PostMapping("/viewDetail/{viewId}/{panelId}") @PostMapping("/viewDetail/{viewId}/{panelId}")
Object viewDetail(@PathVariable("viewId") String viewId, @PathVariable("panelId") String panelId, Object viewDetail(@PathVariable("viewId") String viewId, @PathVariable("panelId") String panelId,
@RequestBody ChartExtRequest requestList) throws Exception; @RequestBody ChartExtRequest requestList) throws Exception;

View File

@ -13,7 +13,7 @@ import lombok.Data;
public class PanelTemplateRequest extends PanelTemplateWithBLOBs { public class PanelTemplateRequest extends PanelTemplateWithBLOBs {
@ApiModelProperty("排序") @ApiModelProperty("排序")
private String sort; private String sort;
@ApiModelProperty("") @ApiModelProperty("细信")
private String withBlobs="Y"; private String withBlobs="Y";
@ApiModelProperty("操作类型") @ApiModelProperty("操作类型")
private String optType; private String optType;

View File

@ -4,9 +4,12 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.xiaoymin.knife4j.annotations.ApiSupport; import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.dataease.auth.annotation.DeLog; import io.dataease.auth.annotation.DeLog;
import io.dataease.auth.annotation.DePermission;
import io.dataease.auth.api.dto.CurrentUserDto; import io.dataease.auth.api.dto.CurrentUserDto;
import io.dataease.auth.entity.AccountLockStatus; import io.dataease.auth.entity.AccountLockStatus;
import io.dataease.auth.service.AuthUserService; 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.constants.SysLogConstants;
import io.dataease.commons.exception.DEException; import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.BeanUtils; import io.dataease.commons.utils.BeanUtils;
@ -86,6 +89,17 @@ public class SysUserController {
return PageUtils.setPageInfo(page, users); 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<List<SysUserGridResponse>> userGrids(@PathVariable String datasetId, @RequestBody KeyGridRequest request) {
return userGrid(0, 0, request);
}
@ApiIgnore @ApiIgnore
@PostMapping("/userLists") @PostMapping("/userLists")
public List<SysUserGridResponse> userLists(@RequestBody BaseGridRequest request) { public List<SysUserGridResponse> userLists(@RequestBody BaseGridRequest request) {

View File

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

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="io.dataease.ext.CleaningRebotMapper">
<delete id="delFloatingDept">
delete
from sys_dept
where pid not in (select * from (select dept_id from sys_dept) a)
and pid != 0;
</delete>
<update id="updateUserDept">
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;
</update>
<delete id="delFloatingRoleMapping">
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>
<delete id="delFloatingPanelShare">
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>
<delete id="delFloatingTargetShare">
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>
<delete id="delFloatingPanelStore">
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>
<delete id="delFloatingTargetStore">
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>
<delete id="delFloatingPanelLink">
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>
<delete id="delFloatingPanelLinkMapping">
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>
<delete id="delFloatingCreatorLink">
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>
<delete id="delFloatingCreatorLinkMapping">
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);
</delete>
</mapper>

View File

@ -3,20 +3,20 @@
<mapper namespace="io.dataease.ext.ExtPanelShareMapper"> <mapper namespace="io.dataease.ext.ExtPanelShareMapper">
<resultMap id="treeNodeMap" type="io.dataease.dto.panel.PanelSharePo"> <resultMap id="treeNodeMap" type="io.dataease.dto.panel.PanelSharePo">
<id column="id" property="id" /> <id column="id" property="id"/>
<result column="name" property="name" /> <result column="name" property="name"/>
<result column="status" property="status" /> <result column="status" property="status"/>
<result column="creator" property="creator" /> <result column="creator" property="creator"/>
<result column="user_id" jdbcType="BIGINT" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId"/>
</resultMap> </resultMap>
<resultMap id="targetMap" type="io.dataease.dto.panel.PanelShareOutDTO"> <resultMap id="targetMap" type="io.dataease.dto.panel.PanelShareOutDTO">
<result column="panel_id" property="panelId" /> <result column="panel_id" property="panelId"/>
<result column="share_id" property="shareId" /> <result column="share_id" property="shareId"/>
<result column="type" property="type" /> <result column="type" property="type"/>
<result column="target_Id" property="targetId" /> <result column="target_Id" property="targetId"/>
<result column="target_Name" property="targetName" /> <result column="target_Name" property="targetName"/>
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime"/>
</resultMap> </resultMap>
<insert id="batchInsert" parameterType="io.dataease.plugins.common.base.domain.PanelShare"> <insert id="batchInsert" parameterType="io.dataease.plugins.common.base.domain.PanelShare">
@ -27,10 +27,10 @@
</foreach> </foreach>
</insert> </insert>
<delete id="batchDelete" parameterType="java.lang.Long" > <delete id="batchDelete" parameterType="java.lang.Long">
delete from panel_share delete from panel_share
where share_id in where share_id in
<foreach collection="shareIds" item="shareId" open="(" separator="," close=")" > <foreach collection="shareIds" item="shareId" open="(" separator="," close=")">
#{shareId} #{shareId}
</foreach> </foreach>
</delete> </delete>
@ -61,51 +61,67 @@
</select> </select>
<select id="queryOut" resultMap="treeNodeMap"> <select id="queryOut" resultMap="treeNodeMap">
select distinct s.panel_group_id as id, g.name, g.status select distinct id, name, status
from panel_share s from (select distinct s.panel_group_id as id,
left join panel_group g on g.id = s.panel_group_id g.name,
where ( s.granter is not null and s.granter = #{userName} ) or ( s.granter is null and g.create_by = #{userName} ) g.status,
order by s.create_time desc (
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
left join panel_group g on g.id = s.panel_group_id
where (s.granter is not null and s.granter = #{userName})
or (s.granter is null and g.create_by = #{userName})
order by s.create_time desc) query_temp
where target_name is not null
</select> </select>
<select id="queryWithResource" parameterType="io.dataease.controller.request.panel.PanelShareSearchRequest" resultMap="io.dataease.plugins.common.base.mapper.PanelShareMapper.BaseResultMap"> <select id="queryWithResource" parameterType="io.dataease.controller.request.panel.PanelShareSearchRequest"
resultMap="io.dataease.plugins.common.base.mapper.PanelShareMapper.BaseResultMap">
select s.* select s.*
from panel_share s from panel_share s
left join panel_group g on g.id = s.panel_group_id left join panel_group g on g.id = s.panel_group_id
where where
s.panel_group_id = #{resourceId} s.panel_group_id = #{resourceId}
<if test="type != null"> <if test="type != null">
and s.type = #{type} and s.type = #{type}
</if> </if>
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 order by s.create_time desc
</select> </select>
<select id="queryTargets" resultMap="targetMap"> <select id="queryTargets" resultMap="targetMap">
select select s.share_id,
s.share_id, s.panel_group_id as panel_id,
s.panel_group_id as panel_id, s.type,
s.type, s.target_id,
s.target_id, s.create_time,
s.create_time, (
( CASE s.type
CASE s.type WHEN 0 THEN (select nick_name from sys_user where user_id = s.target_id)
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 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)
WHEN 2 THEN (select name from sys_dept where dept_id = s.target_id) END
END ) as target_name
) as target_name
from panel_share s from panel_share s
where s.panel_group_id = #{panelId} 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> </select>
<select id="queryUserIdWithRoleIds" resultType="java.lang.Long" > <select id="queryUserIdWithRoleIds" resultType="java.lang.Long">
select user_id select user_id
from sys_users_roles from sys_users_roles
where role_id in where role_id in
@ -115,7 +131,7 @@
</select> </select>
<select id="queryUserIdWithDeptIds" resultType="java.lang.Long" > <select id="queryUserIdWithDeptIds" resultType="java.lang.Long">
select user_id select user_id
from sys_user from sys_user
where dept_id in where dept_id in
@ -133,6 +149,4 @@
</delete> </delete>
</mapper> </mapper>

View File

@ -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<ApplicationReadyEvent> {
@Resource
private CleaningRebotService cleaningRebotService;
@Override
public void onApplicationEvent(ApplicationReadyEvent event) {
try {
cleaningRebotService.execute();
} catch (Exception e) {
LogUtil.error(e.getMessage(), e);
}
}
}

View File

@ -5,8 +5,11 @@ import cn.hutool.core.collection.CollectionUtil;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import io.dataease.auth.annotation.DeLog; import io.dataease.auth.annotation.DeLog;
import io.dataease.auth.annotation.DePermission;
import io.dataease.auth.service.ExtAuthService; import io.dataease.auth.service.ExtAuthService;
import io.dataease.commons.constants.AuthConstants; 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.constants.SysLogConstants;
import io.dataease.commons.exception.DEException; import io.dataease.commons.exception.DEException;
import io.dataease.commons.utils.BeanUtils; import io.dataease.commons.utils.BeanUtils;
@ -160,6 +163,18 @@ public class XDeptServer {
return setPageInfo; 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<List<DeptUserItemDTO>> userGrids(@PathVariable String datasetId, @RequestBody XpackDeptUserRequest request) {
return userGrid(0,0, request);
}
@RequiresPermissions({"dept:edit", "user:edit"}) @RequiresPermissions({"dept:edit", "user:edit"})
@PostMapping("/bindUser") @PostMapping("/bindUser")
public void bindUser(@RequestBody XpackDeptBindRequest request) { public void bindUser(@RequestBody XpackDeptBindRequest request) {

View File

@ -4,8 +4,11 @@ package io.dataease.plugins.server;
import com.github.pagehelper.Page; import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import io.dataease.auth.annotation.DeLog; import io.dataease.auth.annotation.DeLog;
import io.dataease.auth.annotation.DePermission;
import io.dataease.auth.service.ExtAuthService; import io.dataease.auth.service.ExtAuthService;
import io.dataease.commons.constants.AuthConstants; 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.constants.SysLogConstants;
import io.dataease.commons.utils.DeLogUtils; import io.dataease.commons.utils.DeLogUtils;
import io.dataease.commons.utils.PageUtils; import io.dataease.commons.utils.PageUtils;
@ -120,6 +123,18 @@ public class XRoleServer {
return setPageInfo; 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<List<RoleUserItem>> userGrids(@PathVariable String datasetId, @RequestBody RoleUserRequest request) {
return userGrid(0,0, request);
}
@RequiresPermissions({"role:edit", "user:edit"}) @RequiresPermissions({"role:edit", "user:edit"})
@ApiOperation("绑定用户") @ApiOperation("绑定用户")
@PostMapping("/bindUser") @PostMapping("/bindUser")

View File

@ -125,7 +125,8 @@ public class DorisQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) { } else if (f.getDeType() == 3) {
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT); fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT);
} else if (f.getDeType() == 1) { } 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 { } else {
fieldName = originField; fieldName = originField;
} }
@ -201,7 +202,8 @@ public class DorisQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) { } else if (f.getDeType() == 3) {
fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT); fieldName = String.format(DorisConstants.CAST, originField, DorisConstants.DEFAULT_FLOAT_FORMAT);
} else if (f.getDeType() == 1) { } 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 { } else {
fieldName = originField; fieldName = originField;
} }

View File

@ -126,7 +126,8 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) { } else if (f.getDeType() == 3) {
fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_FLOAT_FORMAT); fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_FLOAT_FORMAT);
} else if (f.getDeType() == 1) { } 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 { } else {
fieldName = originField; fieldName = originField;
} }
@ -201,7 +202,8 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) { } else if (f.getDeType() == 3) {
fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_FLOAT_FORMAT); fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_FLOAT_FORMAT);
} else if (f.getDeType() == 1) { } 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 { } else {
fieldName = originField; fieldName = originField;
} }
@ -979,9 +981,9 @@ public class MysqlQueryProvider extends QueryProvider {
} else { } else {
// Doris field type test // Doris field type test
/*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { /*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 { } 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); whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value);
} }
@ -1089,9 +1091,9 @@ public class MysqlQueryProvider extends QueryProvider {
} else { } else {
// doris field type test // doris field type test
/*if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) { /*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 { } 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)); whereValue = String.format(MysqlConstants.WHERE_VALUE_VALUE, value.get(0));
} }

View File

@ -129,7 +129,8 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) { } else if (f.getDeType() == 3) {
fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT); fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT);
} else if (f.getDeType() == 1) { } 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 { } else {
fieldName = originField; fieldName = originField;
} }
@ -188,7 +189,8 @@ public class MysqlQueryProvider extends QueryProvider {
} else if (f.getDeType() == 3) { } else if (f.getDeType() == 3) {
fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT); fieldName = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_FLOAT_FORMAT);
} else if (f.getDeType() == 1) { } 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 { } else {
fieldName = originField; fieldName = originField;
} }

View File

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

View File

@ -788,9 +788,7 @@ public class ChartViewService {
ChartExtFilterRequest drillFilter = new ChartExtFilterRequest(); ChartExtFilterRequest drillFilter = new ChartExtFilterRequest();
drillFilter.setFieldId(dto.getId()); drillFilter.setFieldId(dto.getId());
drillFilter.setValue(new ArrayList<String>() {{ drillFilter.setValue(Collections.singletonList(dto.getValue()));
add(dto.getValue());
}});
drillFilter.setOperator("in"); drillFilter.setOperator("in");
drillFilter.setDatasetTableField(datasetTableField); drillFilter.setDatasetTableField(datasetTableField);
extFilterList.add(drillFilter); extFilterList.add(drillFilter);

View File

@ -202,6 +202,10 @@ public class ChartDataBuild {
chartDimensionDTO.setValue(row[k]); chartDimensionDTO.setValue(row[k]);
dimensionList.add(chartDimensionDTO); dimensionList.add(chartDimensionDTO);
} }
ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO();
chartDimensionDTO.setId(extStack.get(0).getId());
chartDimensionDTO.setValue(row[xAxis.size()]);
dimensionList.add(chartDimensionDTO);
axisChartDataDTO.setDimensionList(dimensionList); axisChartDataDTO.setDimensionList(dimensionList);
if (CollectionUtils.isNotEmpty(yAxis)) { if (CollectionUtils.isNotEmpty(yAxis)) {
@ -1054,6 +1058,10 @@ public class ChartDataBuild {
chartDimensionDTO.setValue(row[j]); chartDimensionDTO.setValue(row[j]);
dimensionList.add(chartDimensionDTO); dimensionList.add(chartDimensionDTO);
} }
ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO();
chartDimensionDTO.setId(extStack.get(0).getId());
chartDimensionDTO.setValue(row[xAxis.size()]);
dimensionList.add(chartDimensionDTO);
axisChartDataDTO.setDimensionList(dimensionList); axisChartDataDTO.setDimensionList(dimensionList);
if (CollectionUtils.isNotEmpty(yAxis)) { if (CollectionUtils.isNotEmpty(yAxis)) {

View File

@ -350,6 +350,7 @@ public class DataSetTableService {
|| StringUtils.equalsIgnoreCase(datasetTable.getType(), DatasetType.UNION.name())) { || StringUtils.equalsIgnoreCase(datasetTable.getType(), DatasetType.UNION.name())) {
saveTableField(datasetTable); saveTableField(datasetTable);
} }
extractData(datasetTable);
DeLogUtils.save(SysLogConstants.OPERATE_TYPE.MODIFY, SysLogConstants.SOURCE_TYPE.DATASET, datasetTable.getId(), datasetTable.getSceneId(), null, null); DeLogUtils.save(SysLogConstants.OPERATE_TYPE.MODIFY, SysLogConstants.SOURCE_TYPE.DATASET, datasetTable.getId(), datasetTable.getSceneId(), null, null);
} }
} }

View File

@ -84,7 +84,7 @@ public class DataSetTableTaskService {
} }
datasetTableTaskMapper.insert(datasetTableTask); datasetTableTaskMapper.insert(datasetTableTask);
} else { } else {
datasetTableTask.setStatus(null); datasetTableTask.setStatus(TaskStatus.Underway.name());
datasetTableTask.setLastExecTime(null); datasetTableTask.setLastExecTime(null);
datasetTableTask.setLastExecStatus(null); datasetTableTask.setLastExecStatus(null);
datasetTableTaskMapper.updateByPrimaryKeySelective(datasetTableTask); datasetTableTaskMapper.updateByPrimaryKeySelective(datasetTableTask);

View File

@ -1,5 +1,6 @@
package io.dataease.service.message; package io.dataease.service.message;
import io.dataease.commons.utils.LogUtil;
import io.dataease.ext.ExtSysMsgMapper; import io.dataease.ext.ExtSysMsgMapper;
import io.dataease.commons.constants.SysMsgConstants; import io.dataease.commons.constants.SysMsgConstants;
import io.dataease.commons.utils.AuthUtils; 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.cache.annotation.Cacheable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -65,7 +67,7 @@ public class SysMsgService {
orderClause = String.join(", ", orders); orderClause = String.join(", ", orders);
} }
if (CollectionUtils.isNotEmpty(typeIds)){ if (CollectionUtils.isNotEmpty(typeIds)) {
criteria.andTypeIdIn(typeIds); criteria.andTypeIdIn(typeIds);
} }
@ -120,7 +122,7 @@ public class SysMsgService {
return sysMsgTypeMapper.selectByExample(example); return sysMsgTypeMapper.selectByExample(example);
} }
private List<SettingTreeNode> buildTree(List<SysMsgType> lists){ private List<SettingTreeNode> buildTree(List<SysMsgType> lists) {
List<SettingTreeNode> rootNodes = new ArrayList<>(); List<SettingTreeNode> rootNodes = new ArrayList<>();
lists.forEach(node -> { lists.forEach(node -> {
SettingTreeNode settingTreeNode = convert(node); SettingTreeNode settingTreeNode = convert(node);
@ -183,6 +185,7 @@ public class SysMsgService {
/** /**
* 修改了订阅信息 需要清除缓存 * 修改了订阅信息 需要清除缓存
*
* @param request * @param request
* @param userId * @param userId
*/ */
@ -241,22 +244,29 @@ public class SysMsgService {
List<SubscribeNode> subscribes = subscribes(userId); List<SubscribeNode> subscribes = subscribes(userId);
if (CollectionUtils.isNotEmpty(subscribes)) { if (CollectionUtils.isNotEmpty(subscribes)) {
subscribes.stream().filter(item -> item.getTypeId().equals(typeId)).forEach(sub -> { for (int i = 0; i < subscribes.size(); i++) {
SendService sendService = serviceByChannel(sub.getChannelId()); SubscribeNode item = subscribes.get(i);
sendService.sendMsg(userId, typeId, content, param); 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(); String beanName = sysMsgChannelMapper.selectByPrimaryKey(channelId).getServiceName();
return (SendService)CommonBeanFactory.getBean(beanName); return (SendService) CommonBeanFactory.getBean(beanName);
} }
/** /**
* 查询用户订阅的消息 并缓存 * 查询用户订阅的消息 并缓存
*
* @param userId * @param userId
* @return * @return
*/ */
@ -280,7 +290,7 @@ public class SysMsgService {
List<SysMsgSetting> defaultSettings = defaultSettings(); List<SysMsgSetting> defaultSettings = defaultSettings();
defaultSettings.forEach(setting -> { defaultSettings.forEach(setting -> {
if (!sourceLists.stream().anyMatch(item -> item.match(setting))){ if (!sourceLists.stream().anyMatch(item -> item.match(setting))) {
sourceLists.add(setting); sourceLists.add(setting);
} }
}); });
@ -297,7 +307,7 @@ public class SysMsgService {
public Long overTime() { public Long overTime() {
String msgTimeOut = systemParameterService.basicInfo().getMsgTimeOut(); String msgTimeOut = systemParameterService.basicInfo().getMsgTimeOut();
if(StringUtils.isNotBlank(msgTimeOut)) { if (StringUtils.isNotBlank(msgTimeOut)) {
overDays = Integer.parseInt(msgTimeOut); overDays = Integer.parseInt(msgTimeOut);
} }
Long currentTime = System.currentTimeMillis(); Long currentTime = System.currentTimeMillis();
@ -307,9 +317,8 @@ public class SysMsgService {
long temp = overDays * oneDayTime; long temp = overDays * oneDayTime;
return currentTime - (currentTime + 8 * 60 * 60 * 1000) % oneDayTime - temp; return currentTime - (currentTime + 8 * 60 * 60 * 1000) % oneDayTime - temp;
} }
} }

View File

@ -806,23 +806,23 @@ public class PanelGroupService {
//校验标准 1.存在视图且所有视图的数据来源必须是dataset 2.存在数据集且没有excel数据集 3.存在数据源且是单数据源 //校验标准 1.存在视图且所有视图的数据来源必须是dataset 2.存在数据集且没有excel数据集 3.存在数据源且是单数据源
//1.view check //1.view check
if (CollectionUtils.isEmpty(chartViewsInfo)) { 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) { } 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 // dataset check
if (CollectionUtils.isEmpty(datasetTablesInfo)) { 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) { } 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 //datasource check
if (CollectionUtils.isEmpty(datasourceDTOS)) { 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) { } 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); return new PanelExport2App(chartViewsInfo, chartViewFieldsInfo, datasetTablesInfo, datasetTableFieldsInfo, dataSetTasksInfo, datasourceDTOS,panelViews);
} }

View File

@ -31,6 +31,7 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -171,8 +172,6 @@ public class ShareService {
} }
// 以上是业务代码 // 以上是业务代码
// 下面是消息发送 // 下面是消息发送
Set<Long> addUserIdSet = AuthUtils.userIdsByURD(addAuthURD); Set<Long> addUserIdSet = AuthUtils.userIdsByURD(addAuthURD);
@ -212,7 +211,6 @@ public class ShareService {
} }
/** /**
*
* @param newTargets 新的分享目标 * @param newTargets 新的分享目标
* @param shareNodes 已景分享目标 * @param shareNodes 已景分享目标
* @return * @return
@ -349,7 +347,7 @@ public class ShareService {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("userId", userId); param.put("userId", userId);
param.put("deptId", deptId); param.put("deptId", deptId);
param.put("roleIds", CollectionUtils.isNotEmpty(roleIds)? roleIds: null); param.put("roleIds", CollectionUtils.isNotEmpty(roleIds) ? roleIds : null);
List<PanelSharePo> data = extPanelShareMapper.query(param); List<PanelSharePo> data = extPanelShareMapper.query(param);
List<PanelShareDto> dtoLists = data.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po)) List<PanelShareDto> dtoLists = data.stream().map(po -> BeanUtils.copyBean(new PanelShareDto(), po))
@ -384,7 +382,7 @@ public class ShareService {
if (CollectionUtils.isEmpty(targets)) if (CollectionUtils.isEmpty(targets))
return new ArrayList<>(); return new ArrayList<>();
return targets.stream().filter(item -> StringUtils.isNotEmpty(item.getTargetName())) 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) { public void removeSharesyPanel(String panelId) {
@ -405,7 +403,7 @@ public class ShareService {
AuthURD urd = new AuthURD(); AuthURD urd = new AuthURD();
for (Map.Entry<Integer, List<PanelShareOutDTO>> entry : listMap.entrySet()) { for (Map.Entry<Integer, List<PanelShareOutDTO>> entry : listMap.entrySet()) {
List<PanelShareOutDTO> dtoList = entry.getValue(); List<PanelShareOutDTO> dtoList = entry.getValue();
if(CollectionUtils.isNotEmpty(dtoList)) { if (CollectionUtils.isNotEmpty(dtoList)) {
List<Long> curTargetIds = dtoList.stream().map(dto -> Long.parseLong(dto.getTargetId())).collect(Collectors.toList()); List<Long> curTargetIds = dtoList.stream().map(dto -> Long.parseLong(dto.getTargetId())).collect(Collectors.toList());
buildRedAuthURD(entry.getKey(), curTargetIds, urd); buildRedAuthURD(entry.getKey(), curTargetIds, urd);
} }
@ -429,7 +427,7 @@ public class ShareService {
SysLogConstants.SOURCE_TYPE targetType = SysLogConstants.SOURCE_TYPE.USER; SysLogConstants.SOURCE_TYPE targetType = SysLogConstants.SOURCE_TYPE.USER;
if (type == 1) { if (type == 1) {
targetType = SysLogConstants.SOURCE_TYPE.ROLE; targetType = SysLogConstants.SOURCE_TYPE.ROLE;
}else if (type == 2) { } else if (type == 2) {
targetType = SysLogConstants.SOURCE_TYPE.DEPT; targetType = SysLogConstants.SOURCE_TYPE.DEPT;
} }
return targetType; 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); DeLogUtils.save(SysLogConstants.OPERATE_TYPE.UNSHARE, SysLogConstants.SOURCE_TYPE.PANEL, panelId, panelGroup.getPid(), removeRequest.getTargetId(), targetType);
AuthURD sharedAuthURD = new AuthURD(); AuthURD sharedAuthURD = new AuthURD();
List<Long> removeIds = new ArrayList<Long>(){{add(removeRequest.getTargetId());}}; List<Long> removeIds = new ArrayList<Long>() {{
add(removeRequest.getTargetId());
}};
buildRedAuthURD(removeRequest.getType(), removeIds, sharedAuthURD); buildRedAuthURD(removeRequest.getType(), removeIds, sharedAuthURD);
CurrentUserDto user = AuthUtils.getUser(); CurrentUserDto user = AuthUtils.getUser();
Gson gson = new Gson(); Gson gson = new Gson();

View File

@ -285,3 +285,6 @@ delimiter ;
UPDATE `panel_subject` 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\"}}}' 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'; 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;

View File

@ -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_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory
I18N_NOT_JAR=File is not jar! 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

View File

@ -194,7 +194,7 @@ I18N_DATASOURCE_LEVEL_GRANT=\u6388\u6743
I18N_NO_PERMISSION=\u5F53\u524D\u7528\u6237\u6CA1\u6709\u6743\u9650 I18N_NO_PERMISSION=\u5F53\u524D\u7528\u6237\u6CA1\u6709\u6743\u9650
I18N_PLEASE_CONCAT_ADMIN=\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u5F00\u901A 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_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_CONFIG_ERROR=\u90AE\u4EF6\u914D\u7F6E\u9519\u8BEF
I18N_EMAIL_HOST_ERROR=\u90AE\u4EF6\u4E3B\u673A\u4E0D\u80FD\u4E3A\u7A7A I18N_EMAIL_HOST_ERROR=\u90AE\u4EF6\u4E3B\u673A\u4E0D\u80FD\u4E3A\u7A7A
I18N_EMAIL_PORT_ERROR=\u90AE\u4EF6\u7AEF\u53E3\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_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_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

View File

@ -190,7 +190,7 @@ I18N_DATASOURCE_LEVEL_GRANT=\u6388\u6B0A
I18N_NO_PERMISSION=\u7576\u524D\u7528\u6236\u6C92\u6709\u6B0A\u9650 I18N_NO_PERMISSION=\u7576\u524D\u7528\u6236\u6C92\u6709\u6B0A\u9650
I18N_PLEASE_CONCAT_ADMIN=\u8ACB\u806F\u7CFB\u7BA1\u7406\u54E1\u958B\u901A 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_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_CONFIG_ERROR=\u90F5\u4EF6\u914D\u7F6E\u932F\u8AA4
I18N_EMAIL_HOST_ERROR=\u90F5\u4EF6\u4E3B\u6A5F\u4E0D\u80FD\u70BA\u7A7A I18N_EMAIL_HOST_ERROR=\u90F5\u4EF6\u4E3B\u6A5F\u4E0D\u80FD\u70BA\u7A7A
I18N_EMAIL_PORT_ERROR=\u90F5\u4EF6\u7AEF\u53E3\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_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_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

View File

@ -518,6 +518,7 @@ export default {
], ],
// tab // tab
'de-tabs': [ 'de-tabs': [
'fontSize',
'borderStyle', 'borderStyle',
'borderWidth', 'borderWidth',
'borderColor', 'borderColor',
@ -718,39 +719,42 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.attr-list { .attr-list {
overflow: auto; overflow: auto;
padding: 20px; padding: 20px;
padding-top: 0; padding-top: 0;
height: 100%; height: 100%;
} }
.el-card-main {
height: 34px;
z-index: 10;
padding-right: 2px;
position: absolute;
} .el-card-main {
.el-card-main ::v-deep .el-card__body { height: 34px;
padding: 0px!important; z-index: 10;
padding-right: 2px;
position: absolute;
} }
::v-deep .el-radio-button__inner{ .el-card-main ::v-deep .el-card__body {
padding: 5px!important; padding: 0px !important;
width: 30px!important;
}
::v-deep .el-color-dropdown__link-btn { }
display: inline!important;
}
::v-deep input::-webkit-outer-spin-button, ::v-deep .el-radio-button__inner {
::v-deep input::-webkit-inner-spin-button { padding: 5px !important;
-webkit-appearance: none !important; width: 30px !important;
} }
::v-deep input[type='number'] {
-moz-appearance: textfield !important; ::v-deep .el-color-dropdown__link-btn {
} display: inline !important;
}
::v-deep input::-webkit-outer-spin-button,
::v-deep input::-webkit-inner-spin-button {
-webkit-appearance: none !important;
}
::v-deep input[type='number'] {
-moz-appearance: textfield !important;
}
</style> </style>

View File

@ -388,7 +388,8 @@ const list = [
height: 200, height: 200,
borderStyle: 'solid', borderStyle: 'solid',
borderWidth: 0, borderWidth: 0,
borderColor: '#000000' borderColor: '#000000',
fontSize: 16
}, },
options: { options: {
tabList: [{ tabList: [{

View File

@ -99,6 +99,9 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
item.options.attrs.accuracy = 'HH:mm' item.options.attrs.accuracy = 'HH:mm'
} }
} }
if (item.type === 'de-tabs') {
item.style.fontSize = item.style.fontSize || 16
}
if (item.type === 'custom') { if (item.type === 'custom') {
item.options.manualModify = false item.options.manualModify = false
} }

View File

@ -25,8 +25,7 @@
:name="item.name" :name="item.name"
> >
<span slot="label"> <span slot="label">
<span>{{ item.title }}</span> <span :style="titleStyle">{{ item.title }}</span>
<el-dropdown <el-dropdown
v-if="dropdownShow" v-if="dropdownShow"
slot="label" slot="label"
@ -35,7 +34,6 @@
@command="handleCommand" @command="handleCommand"
> >
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<i <i
v-if="isEdit" v-if="isEdit"
class="de-tab-i el-icon-arrow-down el-icon--right" class="de-tab-i el-icon-arrow-down el-icon--right"
@ -295,6 +293,11 @@ export default {
} }
}, },
computed: { computed: {
titleStyle() {
return {
fontSize: (this.element.style.fontSize || 16) + 'px'
}
},
headClass() { headClass() {
return 'tab-head-' + this.element.style.headPosition return 'tab-head-' + this.element.style.headPosition
}, },

View File

@ -530,6 +530,7 @@ export default {
the_running_results: 'You can view the running results' the_running_results: 'You can view the running results'
}, },
detabs: { detabs: {
custom_sort: 'Custom Sort',
eidttitle: 'Edit Title', eidttitle: 'Edit Title',
selectview: 'Select View', selectview: 'Select View',
selectOthers: 'Select Others', selectOthers: 'Select Others',
@ -799,7 +800,7 @@ export default {
relate_top_organization: 'Associated parent organization', relate_top_organization: 'Associated parent organization',
organization_name_exist: 'Organization name already exists', organization_name_exist: 'Organization name already exists',
cannot_delete: 'Cannot delete', cannot_delete: 'Cannot delete',
remove_user_first: 'Please remove all users in the organization before deleting the organization', remove_user_first: 'Please remove all users and child nodes in the organization before deleting the organization',
sure_delete_organization: 'Are you sure to delete this organization?', sure_delete_organization: 'Are you sure to delete this organization?',
add_child_org: 'Add sub organization', add_child_org: 'Add sub organization',
edite_organization: 'Edit organization' edite_organization: 'Edit organization'
@ -1436,7 +1437,8 @@ export default {
reserve_two: '2', reserve_two: '2',
proportion: 'Proportion', proportion: 'Proportion',
label_content: 'Label Content', label_content: 'Label Content',
percent: 'Percent' percent: 'Percent',
table_index_desc: 'Index Header Name'
}, },
dataset: { dataset: {
spend_time: 'Spend', spend_time: 'Spend',
@ -2372,7 +2374,7 @@ export default {
channel_wecom_msg: 'Wecom', channel_wecom_msg: 'Wecom',
channel_dingtalk_msg: 'Dingtalk', channel_dingtalk_msg: 'Dingtalk',
channel_lark_msg: 'Lark', channel_lark_msg: 'Lark',
channel_larksuite_msg: 'Larksuite' channel_larksuite_msg: 'INT Lark'
}, },
denumberrange: { denumberrange: {
label: 'Number range', label: 'Number range',
@ -2488,7 +2490,7 @@ export default {
wecom: 'Wecom', wecom: 'Wecom',
dingtalk: 'Dingtalk', dingtalk: 'Dingtalk',
lark: 'Lark', lark: 'Lark',
larksuite: 'Larksuite', larksuite: 'INT Lark',
pixel: 'Pixel', pixel: 'Pixel',
default: 'Default', default: 'Default',
custom: 'Custom', custom: 'Custom',

View File

@ -530,6 +530,7 @@ export default {
the_running_results: '即可查看運行結果' the_running_results: '即可查看運行結果'
}, },
detabs: { detabs: {
custom_sort: '自定義排序',
eidttitle: '編輯標題', eidttitle: '編輯標題',
selectview: '選擇視圖', selectview: '選擇視圖',
selectOthers: '選擇組件', selectOthers: '選擇組件',
@ -798,7 +799,7 @@ export default {
relate_top_organization: '關聯上級組織', relate_top_organization: '關聯上級組織',
organization_name_exist: '組織名稱已存在', organization_name_exist: '組織名稱已存在',
cannot_delete: '無法刪除', cannot_delete: '無法刪除',
remove_user_first: '請先移除組織中所有用戶,再進行刪除組織操作。', remove_user_first: '請先移除組織中所有用戶以及子組織,再進行刪除組織操作。',
sure_delete_organization: '確定刪除該組織嗎?', sure_delete_organization: '確定刪除該組織嗎?',
delete: '刪除', delete: '刪除',
add_child_org: '添加子組織', add_child_org: '添加子組織',
@ -1436,7 +1437,8 @@ export default {
reserve_two: '两位', reserve_two: '两位',
proportion: '佔比', proportion: '佔比',
label_content: '標籤展示', label_content: '標籤展示',
percent: '占比' percent: '占比',
table_index_desc: '表頭名稱'
}, },
dataset: { dataset: {
spend_time: '耗時', spend_time: '耗時',

View File

@ -529,6 +529,7 @@ export default {
the_running_results: '即可查看运行结果' the_running_results: '即可查看运行结果'
}, },
detabs: { detabs: {
custom_sort: '自定义排序',
eidttitle: '编辑标题', eidttitle: '编辑标题',
selectview: '选择视图', selectview: '选择视图',
selectOthers: '选择组件', selectOthers: '选择组件',
@ -797,7 +798,7 @@ export default {
relate_top_organization: '关联上级组织', relate_top_organization: '关联上级组织',
organization_name_exist: '组织名称已存在', organization_name_exist: '组织名称已存在',
cannot_delete: '无法删除', cannot_delete: '无法删除',
remove_user_first: '请先移除组织中所有用户,再进行删除组织操作。', remove_user_first: '请先移除组织中所有用户以及子组织,再进行删除组织操作。',
sure_delete_organization: '确定删除该组织吗?', sure_delete_organization: '确定删除该组织吗?',
delete: '删除', delete: '删除',
add_child_org: '添加子组织', add_child_org: '添加子组织',
@ -1435,7 +1436,8 @@ export default {
reserve_two: '两位', reserve_two: '两位',
proportion: '占比', proportion: '占比',
label_content: '标签展示', label_content: '标签展示',
percent: '占比' percent: '占比',
table_index_desc: '表头名称'
}, },
dataset: { dataset: {
spend_time: '耗时', spend_time: '耗时',

View File

@ -27,7 +27,8 @@ export const DEFAULT_COLOR_CASE = {
quotaColor: '#5470c6', quotaColor: '#5470c6',
tableBorderColor: '#E6E7E4', tableBorderColor: '#E6E7E4',
seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false}
areaBorderColor: '#303133' areaBorderColor: '#303133',
areaBaseColor: '#FFFFFF'
} }
export const DEFAULT_COLOR_CASE_DARK = { export const DEFAULT_COLOR_CASE_DARK = {
@ -42,7 +43,8 @@ export const DEFAULT_COLOR_CASE_DARK = {
quotaColor: '#5470c6', quotaColor: '#5470c6',
tableBorderColor: '#CCCCCC', tableBorderColor: '#CCCCCC',
seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false} seriesColors: [], // 格式:{"name":"s1","color":"","isCustom":false}
areaBorderColor: '#EBEEF5' areaBorderColor: '#EBEEF5',
areaBaseColor: '5470C6'
} }
export const DEFAULT_SIZE = { export const DEFAULT_SIZE = {
barDefault: true, barDefault: true,

View File

@ -230,6 +230,9 @@ export function getLabel(chart) {
} }
} }
res = contentItems.join(' ') res = contentItems.join(' ')
} else if (equalsAny(chart.type, 'pie-rose', 'pie-donut-rose')) {
const quotaValue = valueFormatter(param.value, formatterCfg)
res = [param.field, quotaValue].join(' ')
} else { } else {
res = valueFormatter(param.value, formatterCfg) res = valueFormatter(param.value, formatterCfg)
} }

View File

@ -49,7 +49,7 @@ export function getCustomTheme(chart) {
fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fill: DEFAULT_COLOR_CASE.tableHeaderFontColor,
fontSize: DEFAULT_SIZE.tableTitleFontSize, fontSize: DEFAULT_SIZE.tableTitleFontSize,
textAlign: headerAlign, textAlign: headerAlign,
textBaseline: chart.type === 'table-pivot' ? 'top' : 'middle' // 行头字体绘制基线设置为中心,不然序号列的内容会靠上 textBaseline: chart.type === 'table-pivot' ? 'top' : 'middle'
}, },
bolderText: { bolderText: {
fill: DEFAULT_COLOR_CASE.tableHeaderFontColor, fill: DEFAULT_COLOR_CASE.tableHeaderFontColor,
@ -186,6 +186,7 @@ export function getCustomTheme(chart) {
theme.rowCell.measureText.fontSize = parseInt(s.tableItemFontSize) theme.rowCell.measureText.fontSize = parseInt(s.tableItemFontSize)
theme.rowCell.measureText.textAlign = i_a theme.rowCell.measureText.textAlign = i_a
} }
theme.rowCell.seriesNumberWidth = parseInt(s.tableColumnWidth)
theme.colCell.bolderText.fontSize = parseInt(s.tableTitleFontSize) theme.colCell.bolderText.fontSize = parseInt(s.tableTitleFontSize)
theme.colCell.bolderText.textAlign = h_a theme.colCell.bolderText.textAlign = h_a

View File

@ -1,9 +1,9 @@
import { TableSheet, S2Event, PivotSheet } from '@antv/s2' import { TableSheet, S2Event, PivotSheet, DataCell } from '@antv/s2'
import { getCustomTheme, getSize } from '@/views/chart/chart/common/common_table' import { getCustomTheme, getSize } from '@/views/chart/chart/common/common_table'
import { DEFAULT_COLOR_CASE, DEFAULT_TOTAL } from '@/views/chart/chart/chart' import { DEFAULT_COLOR_CASE, DEFAULT_TOTAL } from '@/views/chart/chart/chart'
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter' import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
import { hexColorToRGBA } from '@/views/chart/chart/util' import { hexColorToRGBA } from '@/views/chart/chart/util'
export function baseTableInfo(s2, container, chart, action, tableData) { export function baseTableInfo(s2, container, chart, action, tableData, pageInfo) {
const containerDom = document.getElementById(container) const containerDom = document.getElementById(container)
// fields // fields
@ -130,9 +130,19 @@ export function baseTableInfo(s2, container, chart, action, tableData) {
if (s2Options.showSeriesNumber) { if (s2Options.showSeriesNumber) {
s2Options.colCell = (node) => { s2Options.colCell = (node) => {
if (node.colIndex === 0) { 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) { if (s2Options.showSeriesNumber) {
s2Options.colCell = (node) => { s2Options.colCell = (node) => {
if (node.colIndex === 0) { if (node.colIndex === 0) {
node.label = customAttr.size.indexLabel if (!customAttr.size.indexLabel) {
node.label = ' '
} else {
node.label = customAttr.size.indexLabel
}
} }
} }
} }

View File

@ -18,11 +18,11 @@
:style="title_class" :style="title_class"
style="cursor: default;display: block;" style="cursor: default;display: block;"
> >
<div style="padding:6px 4px 0;margin: 0;display: flex;"> <div style="padding:6px 4px 0;margin: 0;">
<chart-title-update :chart-info="chartInfo" /> <chart-title-update :chart-info="chartInfo" />
<title-remark <title-remark
v-if="remarkCfg.show" v-if="remarkCfg.show"
style="text-shadow: none!important;" style="text-shadow: none!important;margin-left: 4px;"
:remark-cfg="remarkCfg" :remark-cfg="remarkCfg"
/> />
</div> </div>

View File

@ -18,11 +18,11 @@
:style="title_class" :style="title_class"
style="cursor: default;display: block;" style="cursor: default;display: block;"
> >
<div style="padding:6px 4px 0;margin: 0;display: flex;"> <div style="padding:6px 4px 0;margin: 0;">
<chart-title-update :chart-info="chartInfo" /> <chart-title-update :chart-info="chartInfo" />
<title-remark <title-remark
v-if="remarkCfg.show" v-if="remarkCfg.show"
style="text-shadow: none!important;" style="text-shadow: none!important;margin-left: 4px;"
:remark-cfg="remarkCfg" :remark-cfg="remarkCfg"
/> />
</div> </div>
@ -250,7 +250,7 @@ export default {
} }
} }
if (chart.type === 'table-info') { 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') { } else if (chart.type === 'table-normal') {
this.myChart = baseTableNormal(this.myChart, this.chartId, chart, this.antVAction, this.tableData) this.myChart = baseTableNormal(this.myChart, this.chartId, chart, this.antVAction, this.tableData)
} else if (chart.type === 'table-pivot') { } else if (chart.type === 'table-pivot') {

View File

@ -11,7 +11,7 @@
/> />
<p <p
v-else v-else
style="overflow: hidden;white-space: pre;text-overflow: ellipsis;display: inline-block;min-width: 30px" style="overflow: hidden;white-space: pre;text-overflow: ellipsis;display: inline;min-width: 30px"
@click.stop="handleTitleEditer" @click.stop="handleTitleEditer"
>{{ chart.title }}</p> >{{ chart.title }}</p>
</template> </template>

View File

@ -12,10 +12,10 @@
:label="$t('chart.show')" :label="$t('chart.show')"
class="form-item" class="form-item"
> >
<el-switch <el-checkbox
v-model="titleForm.show" v-model="titleForm.show"
@change="changeTitleStyle('show')" @change="changeTitleStyle('show')"
/> >{{ $t('chart.show') }}</el-checkbox>
</el-form-item> </el-form-item>
<div v-show="showProperty('show') && titleForm.show"> <div v-show="showProperty('show') && titleForm.show">
<el-form-item <el-form-item

View File

@ -12,10 +12,10 @@
:label="$t('chart.show')" :label="$t('chart.show')"
class="form-item" class="form-item"
> >
<el-switch <el-checkbox
v-model="titleForm.show" v-model="titleForm.show"
@change="changeTitleStyle('show')" @change="changeTitleStyle('show')"
/> >{{ $t('chart.show') }}</el-checkbox>
</el-form-item> </el-form-item>
<div v-show="showProperty('show') && titleForm.show"> <div v-show="showProperty('show') && titleForm.show">
<el-form-item <el-form-item

View File

@ -10,11 +10,11 @@
:style="title_class" :style="title_class"
style="cursor: default;display: block;" style="cursor: default;display: block;"
> >
<div style="display: flex;"> <div>
<chart-title-update :chart-info="chartInfo" /> <chart-title-update :chart-info="chartInfo" />
<title-remark <title-remark
v-if="chart.render && chart.render === 'antv' && remarkCfg.show" v-if="chart.render && chart.render === 'antv' && remarkCfg.show"
style="text-shadow: none!important;" style="text-shadow: none!important;margin-left: 4px;"
:remark-cfg="remarkCfg" :remark-cfg="remarkCfg"
/> />
</div> </div>

View File

@ -17,11 +17,11 @@
:style="title_class" :style="title_class"
style="cursor: default;display: block;" style="cursor: default;display: block;"
> >
<div style="display: flex;"> <div>
<chart-title-update :chart-info="chartInfo" /> <chart-title-update :chart-info="chartInfo" />
<title-remark <title-remark
v-if="chart.render && chart.render === 'antv' && remarkCfg.show" v-if="chart.render && chart.render === 'antv' && remarkCfg.show"
style="text-shadow: none!important;" style="text-shadow: none!important;margin-left: 4px;"
:remark-cfg="remarkCfg" :remark-cfg="remarkCfg"
/> />
</div> </div>

View File

@ -387,6 +387,7 @@
<el-form-item <el-form-item
v-show="showProperty('tableIndexLabel') && sizeForm.showIndex" v-show="showProperty('tableIndexLabel') && sizeForm.showIndex"
label-width="100px" label-width="100px"
:label="$t('chart.table_index_desc')"
class="form-item" class="form-item"
> >
<el-input <el-input
@ -1061,7 +1062,9 @@ export default {
this.sizeForm.tablePageSize = this.sizeForm.tablePageSize ? this.sizeForm.tablePageSize : DEFAULT_SIZE.tablePageSize this.sizeForm.tablePageSize = this.sizeForm.tablePageSize ? this.sizeForm.tablePageSize : DEFAULT_SIZE.tablePageSize
this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex
this.sizeForm.indexLabel = this.sizeForm.indexLabel ? this.sizeForm.indexLabel : DEFAULT_SIZE.indexLabel if (this.sizeForm.indexLabel === null || this.sizeForm.indexLabel === undefined) {
this.sizeForm.indexLabel = DEFAULT_SIZE.indexLabel
}
this.sizeForm.quotaFontFamily = this.sizeForm.quotaFontFamily ? this.sizeForm.quotaFontFamily : DEFAULT_SIZE.quotaFontFamily this.sizeForm.quotaFontFamily = this.sizeForm.quotaFontFamily ? this.sizeForm.quotaFontFamily : DEFAULT_SIZE.quotaFontFamily
this.sizeForm.quotaFontIsBolder = this.sizeForm.quotaFontIsBolder ? this.sizeForm.quotaFontIsBolder : DEFAULT_SIZE.quotaFontIsBolder this.sizeForm.quotaFontIsBolder = this.sizeForm.quotaFontIsBolder ? this.sizeForm.quotaFontIsBolder : DEFAULT_SIZE.quotaFontIsBolder

View File

@ -376,6 +376,7 @@
<el-form-item <el-form-item
v-show="showProperty('tableIndexLabel') && sizeForm.showIndex" v-show="showProperty('tableIndexLabel') && sizeForm.showIndex"
label-width="100px" label-width="100px"
:label="$t('chart.table_index_desc')"
class="form-item" class="form-item"
> >
<el-input <el-input
@ -1355,7 +1356,9 @@ export default {
this.sizeForm.tableItemAlign = this.sizeForm.tableItemAlign ? this.sizeForm.tableItemAlign : DEFAULT_SIZE.tableItemAlign this.sizeForm.tableItemAlign = this.sizeForm.tableItemAlign ? this.sizeForm.tableItemAlign : DEFAULT_SIZE.tableItemAlign
this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex
this.sizeForm.indexLabel = this.sizeForm.indexLabel ? this.sizeForm.indexLabel : DEFAULT_SIZE.indexLabel if (this.sizeForm.indexLabel === null || this.sizeForm.indexLabel === undefined) {
this.sizeForm.indexLabel = DEFAULT_SIZE.indexLabel
}
this.sizeForm.gaugeTickCount = this.sizeForm.gaugeTickCount ? this.sizeForm.gaugeTickCount : DEFAULT_SIZE.gaugeTickCount this.sizeForm.gaugeTickCount = this.sizeForm.gaugeTickCount ? this.sizeForm.gaugeTickCount : DEFAULT_SIZE.gaugeTickCount

View File

@ -23,6 +23,7 @@
:class="chart.id" :class="chart.id"
:show-summary="showSummary" :show-summary="showSummary"
:summary-method="summaryMethod" :summary-method="summaryMethod"
:index-config="{seqMethod}"
> >
<ux-table-column <ux-table-column
type="index" type="index"
@ -294,7 +295,11 @@ export default {
break break
} }
} }
this.indexLabel = customAttr.size.indexLabel if (!customAttr.size.indexLabel) {
this.indexLabel = ' '
} else {
this.indexLabel = customAttr.size.indexLabel
}
} }
this.table_item_class_stripe = JSON.parse(JSON.stringify(this.table_item_class)) this.table_item_class_stripe = JSON.parse(JSON.stringify(this.table_item_class))
// //
@ -380,7 +385,11 @@ export default {
// () // ()
return [means] return [means]
}, },
seqMethod({ rowIndex, column }) {
if (column?.type === 'index') {
return (this.currentPage.pageSize * (this.currentPage.page - 1)) + rowIndex + 1
}
},
chartResize() { chartResize() {
// //
this.calcHeightDelay() this.calcHeightDelay()

View File

@ -1043,7 +1043,7 @@ export default {
attr.label.position = 'outer' attr.label.position = 'outer'
} }
if (type === 'pie-donut') { if (type === 'pie-donut') {
attr.size.pieInnerRadius = Math.round(attr.size.pieOuterRadius * 0.7) attr.size.pieInnerRadius = Math.round(attr.size.pieOuterRadius * 0.75)
} }
if (type === 'pie-donut-rose') { if (type === 'pie-donut-rose') {
attr.size.pieInnerRadius = Math.round(attr.size.pieOuterRadius * 0.5) attr.size.pieInnerRadius = Math.round(attr.size.pieOuterRadius * 0.5)

View File

@ -3092,7 +3092,7 @@ export default {
customAttr.label.position = 'outer' customAttr.label.position = 'outer'
} }
if (type === 'pie-donut') { if (type === 'pie-donut') {
customAttr.size.pieInnerRadius = Math.round(customAttr.size.pieOuterRadius * 0.7) customAttr.size.pieInnerRadius = Math.round(customAttr.size.pieOuterRadius * 0.75)
} }
if (type === 'pie-donut-rose') { if (type === 'pie-donut-rose') {
customAttr.size.pieInnerRadius = Math.round(customAttr.size.pieOuterRadius * 0.5) customAttr.size.pieInnerRadius = Math.round(customAttr.size.pieOuterRadius * 0.5)

View File

@ -11,10 +11,10 @@
:label="$t('chart.show')" :label="$t('chart.show')"
class="form-item" class="form-item"
> >
<el-switch <el-checkbox
v-model="titleForm.show" v-model="titleForm.show"
@change="changeTitleStyle('show')" @change="changeTitleStyle('show')"
/> >{{ $t('chart.show') }}</el-checkbox>
</el-form-item> </el-form-item>
<div v-show="titleForm.show"> <div v-show="titleForm.show">
<el-form-item <el-form-item

View File

@ -158,8 +158,8 @@ export default {
}, },
templateDelete(template) { templateDelete(template) {
const options = { const options = {
title: this.$('app_template.app_group_delete_tips'), title: this.$t('app_template.app_group_delete_tips'),
content: this.$('app_template.app_group_delete_content'), content: this.$t('app_template.app_group_delete_content'),
type: 'primary', type: 'primary',
cb: () => this.$emit('templateDelete', template.id) cb: () => this.$emit('templateDelete', template.id)
} }

View File

@ -104,7 +104,7 @@
</span> </span>
</el-tree> </el-tree>
<p <p
v-if="defaultData.length > 3" v-if="defaultData && defaultData.length > 3"
class="default-expansion" class="default-expansion"
@click="defaultExpansion = !defaultExpansion" @click="defaultExpansion = !defaultExpansion"
> >
@ -333,7 +333,8 @@
@click="close()" @click="close()"
>{{ >{{
$t('panel.cancel') $t('panel.cancel')
}}</el-button> }}
</el-button>
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
@ -409,7 +410,8 @@
@click="closeMoveGroup()" @click="closeMoveGroup()"
>{{ >{{
$t('dataset.cancel') $t('dataset.cancel')
}}</el-button> }}
</el-button>
<el-button <el-button
:disabled="groupMoveConfirmDisabled" :disabled="groupMoveConfirmDisabled"
type="primary" type="primary"
@ -568,9 +570,9 @@ export default {
return this.editPanel.titlePre + this.editPanel.titleSuf return this.editPanel.titlePre + this.editPanel.titleSuf
}, },
expandedData() { expandedData() {
return this.defaultExpansion return (!this.defaultExpansion && this.defaultData && this.defaultData.length > 3)
? this.defaultData ? this.defaultData.slice(0, 3)
: this.defaultData.slice(0, 3) : this.defaultData
}, },
...mapState(['nowPanelTrackInfo']) ...mapState(['nowPanelTrackInfo'])
}, },
@ -846,7 +848,8 @@ export default {
this.defaultTree() this.defaultTree()
}) })
}) })
.catch(() => {}) .catch(() => {
})
}, },
clearCanvas() { clearCanvas() {
@ -994,7 +997,8 @@ export default {
} }
return data return data
}, },
newPanelSave(id) {}, newPanelSave(id) {
},
// //
activeNodeAndClick(panelInfo) { activeNodeAndClick(panelInfo) {
if (panelInfo) { if (panelInfo) {
@ -1108,7 +1112,7 @@ export default {
} }
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.default-expansion { .default-expansion {
height: 40px; height: 40px;
width: 232px; width: 232px;
@ -1121,19 +1125,23 @@ export default {
padding-left: 22px; padding-left: 22px;
display: flex; display: flex;
align-items: center; align-items: center;
i { i {
margin-left: 5px; margin-left: 5px;
} }
} }
.main-area-input { .main-area-input {
::v-deep.el-input-group__append { ::v-deep.el-input-group__append {
width: 70px; width: 70px;
background: transparent; background: transparent;
.el-input__inner { .el-input__inner {
padding-left: 12px; padding-left: 12px;
} }
} }
} }
.header-title { .header-title {
font-size: 14px; font-size: 14px;
flex: 1; flex: 1;
@ -1165,6 +1173,7 @@ export default {
.dialog-css ::v-deep .el-dialog__body { .dialog-css ::v-deep .el-dialog__body {
padding: 15px 20px; padding: 15px 20px;
} }
.dialog-css ::v-deep .el-dialog__body { .dialog-css ::v-deep .el-dialog__body {
padding: 10px 20px 20px; padding: 10px 20px 20px;
} }
@ -1173,6 +1182,7 @@ export default {
/*display: none;*/ /*display: none;*/
visibility: hidden; visibility: hidden;
} }
.father:hover .child { .father:hover .child {
/*display: inline;*/ /*display: inline;*/
visibility: visible; visibility: visible;

View File

@ -156,7 +156,9 @@
: scope.row.from === 5 : scope.row.from === 5
? "Dingtalk" ? "Dingtalk"
: scope.row.from === 6 : scope.row.from === 6
? "Lark" : '-' ? "Lark"
: scope.row.from === 7
? "INT Lark" : '-'
}} }}
</div> </div>
</template> </template>