Merge branch 'dev' into pr@dev@fixSql
This commit is contained in:
commit
2c0d5cd2ad
13
.github/workflows/auto-pr.yml
vendored
13
.github/workflows/auto-pr.yml
vendored
@ -1,13 +0,0 @@
|
||||
on: [push, pull_request, release]
|
||||
|
||||
name: DataEase pull request handler
|
||||
|
||||
jobs:
|
||||
generic_handler:
|
||||
name: Generic handler for DataEase Repos
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add labels
|
||||
uses: jumpserver/action-generic-handler@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
|
||||
@ -24,6 +24,7 @@ extend-exclude = [
|
||||
"core/frontend/src/views/chart/components/table/TableNormal.vue",
|
||||
"core/backend/src/main/java/io/dataease/ext/ExtSysUserMapper.xml",
|
||||
"core/backend/src/main/java/io/dataease/ext/AuthMapper.xml",
|
||||
"core/backend/src/main/java/io/dataease/ext/ExtAuthMapper.xml",
|
||||
"installer/dataease/templates/be.conf"
|
||||
]
|
||||
|
||||
|
||||
@ -84,11 +84,7 @@ curl -sSL https://dataease.oss-cn-hangzhou.aliyuncs.com/quick_start.sh | bash
|
||||
- [在线文档](https://dataease.io/docs/)
|
||||
- [社区论坛](https://bbs.fit2cloud.com/c/de/6)
|
||||
|
||||
**加入微信交流群**
|
||||
|
||||
<img src="https://dataease.oss-cn-hangzhou.aliyuncs.com/img/wechat-helper.png" width="156" height="156"/>
|
||||
|
||||
## DataEase 的技术栈
|
||||
## DataEase v1 的技术栈
|
||||
|
||||
- 前端:[Vue.js](https://vuejs.org/)、[Element](https://element.eleme.cn/)
|
||||
- 图库:[Apache ECharts](https://github.com/apache/echarts)、[AntV](https://antv.vision/zh)
|
||||
|
||||
@ -10,6 +10,8 @@ public interface ExtAuthService {
|
||||
|
||||
Set<Long> userIdsByRD(AuthURD request);
|
||||
|
||||
Set<String> userNamesByRD(AuthURD request);
|
||||
|
||||
AuthURD resourceTarget(String resourceId);
|
||||
|
||||
List<AuthItem> dataSourceIdByUser(Long userId);
|
||||
|
||||
@ -43,6 +43,21 @@ public class ExtAuthServiceImpl implements ExtAuthService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> userNamesByRD(AuthURD request) {
|
||||
Set<String> result = new HashSet<>();
|
||||
List<Long> roleIds = request.getRoleIds();
|
||||
List<Long> deptIds = request.getDeptIds();
|
||||
if (!CollectionUtils.isEmpty(roleIds)) {
|
||||
result.addAll(extAuthMapper.queryUserNameWithRoleIds(roleIds));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(deptIds)) {
|
||||
result.addAll(extAuthMapper.queryUserNameWithDeptIds(deptIds));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AuthURD resourceTarget(String resourceId) {
|
||||
AuthURD authURD = new AuthURD();
|
||||
|
||||
@ -71,6 +71,10 @@ public class AuthUtils {
|
||||
return userIds;
|
||||
}
|
||||
|
||||
public static Set<String> accountByURD(AuthURD request) {
|
||||
return extAuthService.userNamesByRD(request);
|
||||
}
|
||||
|
||||
public static List<String> parentResources(String resourceId, String type) {
|
||||
return extAuthService.parentResource(resourceId, type);
|
||||
}
|
||||
|
||||
@ -11,8 +11,10 @@ import java.util.List;
|
||||
public interface ExtAuthMapper {
|
||||
|
||||
List<Long> queryUserIdWithRoleIds(@Param("roleIds") List<Long> roleIds);
|
||||
List<String> queryUserNameWithRoleIds(@Param("roleIds") List<Long> roleIds);
|
||||
|
||||
List<Long> queryUserIdWithDeptIds(@Param("deptIds") List<Long> deptIds);
|
||||
List<String> queryUserNameWithDeptIds(@Param("deptIds") List<Long> deptIds);
|
||||
|
||||
List<SysAuth> queryByResource(@Param("resourceId") String resourceId);
|
||||
|
||||
|
||||
@ -16,6 +16,16 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryUserNameWithRoleIds" resultType="java.lang.String" >
|
||||
select su.username
|
||||
from sys_user su
|
||||
left join sys_users_roles sur on sur.user_id = su.user_id
|
||||
where sur.role_id in
|
||||
<foreach collection="roleIds" item="roleId" open='(' separator=',' close=')'>
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryUserIdWithDeptIds" resultType="java.lang.Long" >
|
||||
select user_id
|
||||
@ -26,6 +36,15 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryUserNameWithDeptIds" resultType="java.lang.String" >
|
||||
select username
|
||||
from sys_user
|
||||
where dept_id in
|
||||
<foreach collection="deptIds" item="deptId" open='(' separator=',' close=')'>
|
||||
#{deptId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByResource" resultMap="io.dataease.plugins.common.base.mapper.SysAuthMapper.BaseResultMap" >
|
||||
select a.*
|
||||
|
||||
@ -6,6 +6,7 @@ import io.dataease.auth.entity.TokenInfo;
|
||||
import io.dataease.auth.service.AuthUserService;
|
||||
import io.dataease.auth.service.impl.AuthUserServiceImpl;
|
||||
import io.dataease.auth.util.JWTUtils;
|
||||
import io.dataease.commons.model.AuthURD;
|
||||
import io.dataease.commons.utils.*;
|
||||
import io.dataease.dto.PermissionProxy;
|
||||
import io.dataease.dto.chart.ViewOption;
|
||||
@ -45,10 +46,7 @@ import org.springframework.web.util.HtmlUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service("emailTaskHandler")
|
||||
@ -157,6 +155,27 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
emailXpackService.saveInstance(taskInstance);
|
||||
}
|
||||
|
||||
private void formatReci(XpackEmailTemplateDTO emailTemplateDTO) {
|
||||
String reciUsers = emailTemplateDTO.getReciUsers();
|
||||
String roleList = emailTemplateDTO.getRoleList();
|
||||
String orgList = emailTemplateDTO.getOrgList();
|
||||
AuthURD authURD = new AuthURD();
|
||||
if (StringUtils.isNotBlank(roleList)) {
|
||||
authURD.setRoleIds(Arrays.stream(roleList.split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||
}
|
||||
if (StringUtils.isNotBlank(orgList)) {
|
||||
authURD.setDeptIds(Arrays.stream(orgList.split(",")).map(Long::parseLong).collect(Collectors.toList()));
|
||||
}
|
||||
Set<String> accountSet = AuthUtils.accountByURD(authURD);
|
||||
if (accountSet == null) accountSet = new HashSet<>();
|
||||
if (StringUtils.isNotBlank(reciUsers)) {
|
||||
accountSet.addAll(Arrays.stream(reciUsers.split(",")).collect(Collectors.toSet()));
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(accountSet)) {
|
||||
emailTemplateDTO.setReciUsers(String.join(",", accountSet));
|
||||
}
|
||||
}
|
||||
|
||||
@Async("priorityExecutor")
|
||||
public void sendReport(GlobalTaskInstance taskInstance, SysUserEntity user, Boolean isTempTask) {
|
||||
|
||||
@ -177,11 +196,15 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
token = tokenByUser(user);
|
||||
XpackPixelEntity xpackPixelEntity = buildPixel(emailTemplateDTO);
|
||||
// 下面继续执行发送邮件的
|
||||
if (StringUtils.isNotBlank(emailTemplateDTO.getRoleList()) || StringUtils.isNotBlank(emailTemplateDTO.getOrgList()))
|
||||
formatReci(emailTemplateDTO);
|
||||
LogUtil.info(String.format("recipients list is [%s]", emailTemplateDTO.getReciUsers()));
|
||||
String recipients = emailTemplateDTO.getRecipients();
|
||||
String reciUsers = emailTemplateDTO.getReciUsers();
|
||||
Integer extWaitTime = emailTemplateDTO.getExtWaitTime();
|
||||
List<String> reciLists = null;
|
||||
if (StringUtils.isNotBlank(reciUsers)) {
|
||||
String emailUsers = Arrays.stream(reciUsers.split(",")).map(userService::getUserByName).filter(tempUser -> StringUtils.isNotBlank(tempUser.getEmail())).map(SysUserEntity::getEmail).collect(Collectors.joining(","));
|
||||
String emailUsers = Arrays.stream(reciUsers.split(",")).map(userService::getUserByName).filter(tempUser -> StringUtils.isNotBlank(tempUser.getEmail()) && 1 == tempUser.getEnabled()).map(SysUserEntity::getEmail).collect(Collectors.joining(","));
|
||||
if (StringUtils.isNotBlank(emailUsers)) {
|
||||
if (StringUtils.isNotBlank(recipients)) {
|
||||
recipients += "," + emailUsers;
|
||||
@ -215,6 +238,13 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
files = viewExportExcel.export(panelId, viewIdList, proxy, justExportView, taskInstance.getTaskId().toString());
|
||||
}
|
||||
|
||||
List<String> groupList = null;
|
||||
if (StringUtils.isNotBlank(emailTemplateDTO.getGroups())) {
|
||||
String groups = emailTemplateDTO.getGroups();
|
||||
groupList = Arrays.stream(groups.split(",")).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
byte[] bytes = null;
|
||||
List<String> channels = null;
|
||||
String recisetting = emailTemplateDTO.getRecisetting();
|
||||
if (StringUtils.isBlank(recisetting)) {
|
||||
@ -225,18 +255,17 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
}
|
||||
|
||||
List<String> errorMsgs = new ArrayList<>();
|
||||
for (int i = 0; i < channels.size(); i++) {
|
||||
String channel = channels.get(i);
|
||||
for (String channel : channels) {
|
||||
switch (channel) {
|
||||
case "email":
|
||||
if (StringUtils.isNotBlank(recipients))
|
||||
try {
|
||||
Integer panelFormat = emailTemplateDTO.getPanelFormat();
|
||||
if (ObjectUtils.isEmpty(panelFormat) || panelFormat == 0) {
|
||||
byte[] bytes = emailXpackService.printData(url, token, xpackPixelEntity);
|
||||
bytes = emailXpackService.printData(url, token, xpackPixelEntity, extWaitTime);
|
||||
emailService.sendWithImageAndFiles(recipients, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
} else {
|
||||
byte[] bytes = emailXpackService.printPdf(url, token, xpackPixelEntity, false, true);
|
||||
bytes = emailXpackService.printPdf(url, token, xpackPixelEntity, false, true);
|
||||
emailService.sendPdfWithFiles(recipients, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
}
|
||||
|
||||
@ -245,12 +274,11 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
}
|
||||
break;
|
||||
case "wecom":
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportWecom()) {
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportWecom() && CollectionUtils.isNotEmpty(reciLists)) {
|
||||
List<String> wecomUsers = new ArrayList<>();
|
||||
for (int j = 0; j < reciLists.size(); j++) {
|
||||
String reci = reciLists.get(j);
|
||||
for (String reci : reciLists) {
|
||||
SysUserEntity userBySub = userService.getUserByName(reci);
|
||||
if (ObjectUtils.isEmpty(userBySub)) continue;
|
||||
if (ObjectUtils.isEmpty(userBySub) || 1 != userBySub.getEnabled()) continue;
|
||||
Long userId = userBySub.getUserId();
|
||||
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getWecomId()))
|
||||
@ -260,7 +288,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
|
||||
if (CollectionUtils.isNotEmpty(wecomUsers)) {
|
||||
WecomXpackService wecomXpackService = SpringContextUtil.getBean(WecomXpackService.class);
|
||||
byte[] bytes = emailXpackService.printData(url, token, xpackPixelEntity);
|
||||
bytes = emailXpackService.printData(url, token, xpackPixelEntity, extWaitTime);
|
||||
WecomMsgResult wecomMsgResult = wecomXpackService.pushOaMsg(wecomUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (wecomMsgResult.getErrcode() != 0) {
|
||||
errorMsgs.add("wecom: " + wecomMsgResult.getErrmsg());
|
||||
@ -270,12 +298,11 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
}
|
||||
break;
|
||||
case "dingtalk":
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportDingtalk()) {
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportDingtalk() && CollectionUtils.isNotEmpty(reciLists)) {
|
||||
List<String> dingTalkUsers = new ArrayList<>();
|
||||
for (int j = 0; j < reciLists.size(); j++) {
|
||||
String reci = reciLists.get(j);
|
||||
for (String reci : reciLists) {
|
||||
SysUserEntity userBySub = userService.getUserByName(reci);
|
||||
if (ObjectUtils.isEmpty(userBySub)) continue;
|
||||
if (ObjectUtils.isEmpty(userBySub) || 1 != userBySub.getEnabled()) continue;
|
||||
Long userId = userBySub.getUserId();
|
||||
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getDingtalkId()))
|
||||
@ -285,7 +312,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
|
||||
if (CollectionUtils.isNotEmpty(dingTalkUsers)) {
|
||||
DingtalkXpackService dingtalkXpackService = SpringContextUtil.getBean(DingtalkXpackService.class);
|
||||
byte[] bytes = emailXpackService.printData(url, token, xpackPixelEntity);
|
||||
bytes = emailXpackService.printData(url, token, xpackPixelEntity, extWaitTime);
|
||||
DingtalkMsgResult dingtalkMsgResult = dingtalkXpackService.pushOaMsg(dingTalkUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (dingtalkMsgResult.getErrcode() != 0) {
|
||||
errorMsgs.add("dingtalk: " + dingtalkMsgResult.getErrmsg());
|
||||
@ -295,12 +322,11 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
}
|
||||
break;
|
||||
case "lark":
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportLark()) {
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportLark() && CollectionUtils.isNotEmpty(reciLists)) {
|
||||
List<String> larkUsers = new ArrayList<>();
|
||||
for (int j = 0; j < reciLists.size(); j++) {
|
||||
String reci = reciLists.get(j);
|
||||
for (String reci : reciLists) {
|
||||
SysUserEntity userBySub = userService.getUserByName(reci);
|
||||
if (ObjectUtils.isEmpty(userBySub)) continue;
|
||||
if (ObjectUtils.isEmpty(userBySub) || 1 != userBySub.getEnabled()) continue;
|
||||
Long userId = userBySub.getUserId();
|
||||
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getLarkId()))
|
||||
@ -310,7 +336,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
|
||||
if (CollectionUtils.isNotEmpty(larkUsers)) {
|
||||
LarkXpackService larkXpackService = SpringContextUtil.getBean(LarkXpackService.class);
|
||||
byte[] bytes = emailXpackService.printData(url, token, xpackPixelEntity);
|
||||
bytes = emailXpackService.printData(url, token, xpackPixelEntity, extWaitTime);
|
||||
LarkMsgResult larkMsgResult = larkXpackService.pushOaMsg(larkUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (larkMsgResult.getCode() != 0) {
|
||||
errorMsgs.add("lark: " + larkMsgResult.getMsg());
|
||||
@ -320,12 +346,11 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
}
|
||||
break;
|
||||
case "larksuite":
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportLarksuite()) {
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportLarksuite() && CollectionUtils.isNotEmpty(reciLists)) {
|
||||
List<String> larksuiteUsers = new ArrayList<>();
|
||||
for (int j = 0; j < reciLists.size(); j++) {
|
||||
String reci = reciLists.get(j);
|
||||
for (String reci : reciLists) {
|
||||
SysUserEntity userBySub = userService.getUserByName(reci);
|
||||
if (ObjectUtils.isEmpty(userBySub)) continue;
|
||||
if (ObjectUtils.isEmpty(userBySub) || 1 != userBySub.getEnabled()) continue;
|
||||
Long userId = userBySub.getUserId();
|
||||
SysUserAssist sysUserAssist = sysUserService.assistInfo(userId);
|
||||
if (ObjectUtils.isEmpty(sysUserAssist) || StringUtils.isBlank(sysUserAssist.getLarksuiteId()))
|
||||
@ -335,7 +360,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
|
||||
if (CollectionUtils.isNotEmpty(larksuiteUsers)) {
|
||||
LarksuiteXpackService larksuiteXpackService = SpringContextUtil.getBean(LarksuiteXpackService.class);
|
||||
byte[] bytes = emailXpackService.printData(url, token, xpackPixelEntity);
|
||||
bytes = emailXpackService.printData(url, token, xpackPixelEntity, extWaitTime);
|
||||
LarksuiteMsgResult larksuiteMsgResult = larksuiteXpackService.pushOaMsg(larksuiteUsers, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
if (larksuiteMsgResult.getCode() != 0) {
|
||||
errorMsgs.add("larksuite: " + larksuiteMsgResult.getMsg());
|
||||
@ -348,6 +373,20 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (SpringContextUtil.getBean(AuthUserService.class).supportLark() && CollectionUtils.isNotEmpty(groupList)) {
|
||||
LarkXpackService larkXpackService = SpringContextUtil.getBean(LarkXpackService.class);
|
||||
if (ObjectUtils.isEmpty(bytes)) {
|
||||
bytes = emailXpackService.printData(url, token, xpackPixelEntity, extWaitTime);
|
||||
}
|
||||
List<LarkMsgResult> larkMsgResultList = larkXpackService.pushChatOaMsg(groupList, emailTemplateDTO.getTitle(), contentStr, bytes, files);
|
||||
larkMsgResultList.forEach(larkMsgResult -> {
|
||||
if (larkMsgResult.getCode() != 0) {
|
||||
LogUtil.error(larkMsgResult.getMsg());
|
||||
errorMsgs.add("lark: " + larkMsgResult.getMsg());
|
||||
}
|
||||
});
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(errorMsgs)) {
|
||||
String msg = errorMsgs.stream().collect(Collectors.joining(" \n "));
|
||||
Exception exception = new RuntimeException(msg);
|
||||
|
||||
@ -207,7 +207,7 @@ public class XEmailTaskServer {
|
||||
String currentToken = ServletUtils.getToken();
|
||||
Future<?> future = priorityExecutor.submit(() -> {
|
||||
try {
|
||||
return emailXpackService.print(url, currentToken, buildPixel(request.getPixel()));
|
||||
return emailXpackService.print(url, currentToken, buildPixel(request.getPixel()), request.getExtWaitTime());
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
DataEaseException.throwException("预览失败,请联系管理员");
|
||||
@ -247,7 +247,7 @@ public class XEmailTaskServer {
|
||||
try {
|
||||
Future<?> future = priorityExecutor.submit(() -> {
|
||||
try {
|
||||
return emailXpackService.print(url, token, buildPixel(request.getPixel()));
|
||||
return emailXpackService.print(url, token, buildPixel(request.getPixel()), request.getExtWaitTime());
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
DataEaseException.throwException("预览失败,请联系管理员");
|
||||
|
||||
@ -13,9 +13,9 @@ import io.dataease.i18n.Translator;
|
||||
import io.dataease.plugins.common.base.domain.SysUserAssist;
|
||||
import io.dataease.plugins.common.exception.DataEaseException;
|
||||
import io.dataease.plugins.common.util.SpringContextUtil;
|
||||
|
||||
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkAppUserEntity;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkGroupResult;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkQrResult;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkUserInfo;
|
||||
import io.dataease.plugins.xpack.lark.dto.response.LarkAppUserResult;
|
||||
@ -239,4 +239,12 @@ public class XLarkServer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@GetMapping("/group")
|
||||
public LarkGroupResult group() {
|
||||
LarkXpackService larkXpackService = SpringContextUtil.getBean(LarkXpackService.class);
|
||||
return larkXpackService.getGroup();
|
||||
}
|
||||
}
|
||||
|
||||
@ -635,7 +635,9 @@ public class ChartViewService {
|
||||
if (StringUtils.equalsIgnoreCase(view.getType(), "table-pivot")
|
||||
|| StringUtils.containsIgnoreCase(view.getType(), "group")
|
||||
|| ("antv".equalsIgnoreCase(view.getRender()) && "line".equalsIgnoreCase(view.getType()))
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "flow-map")) {
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "flow-map")
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "bar-time-range")
|
||||
) {
|
||||
xAxis.addAll(xAxisExt);
|
||||
}
|
||||
List<ChartViewFieldDTO> yAxis = gson.fromJson(view.getYAxis(), tokenType);
|
||||
@ -1420,6 +1422,8 @@ public class ChartViewService {
|
||||
mapChart = ChartDataBuild.transBaseGroupDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, view, data, isDrill);
|
||||
} else if (StringUtils.equalsIgnoreCase(view.getType(), "bar-group-stack")) {
|
||||
mapChart = ChartDataBuild.transGroupStackDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, extStack, data, view, isDrill);
|
||||
} else if (StringUtils.equalsIgnoreCase(view.getType(), "bar-time-range")) {
|
||||
mapChart = ChartDataBuild.transTimeBarDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, extStack, data, view, isDrill);
|
||||
} else if (StringUtils.containsIgnoreCase(view.getType(), "bar-stack")) {
|
||||
mapChart = ChartDataBuild.transStackChartDataAntV(xAxis, yAxis, view, data, extStack, isDrill);
|
||||
} else if (StringUtils.containsIgnoreCase(view.getType(), "line-stack")) {
|
||||
|
||||
@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -1282,6 +1283,120 @@ public class ChartDataBuild {
|
||||
}
|
||||
}
|
||||
|
||||
private static String getDateFormat(String dateStyle, String datePattern) {
|
||||
String split;
|
||||
if (StringUtils.equalsIgnoreCase(datePattern, "date_split")) {
|
||||
split = "/";
|
||||
} else {
|
||||
split = "-";
|
||||
}
|
||||
switch (dateStyle) {
|
||||
case "y":
|
||||
return "yyyy";
|
||||
case "y_M":
|
||||
return "yyyy" + split + "MM";
|
||||
case "y_M_d":
|
||||
return "yyyy" + split + "MM" + split + "dd";
|
||||
case "H_m_s":
|
||||
return "HH:mm:ss";
|
||||
case "y_M_d_H":
|
||||
return "yyyy" + split + "MM" + split + "dd" + " HH";
|
||||
case "y_M_d_H_m":
|
||||
return "yyyy" + split + "MM" + split + "dd" + " HH:mm";
|
||||
case "y_M_d_H_m_s":
|
||||
return "yyyy" + split + "MM" + split + "dd" + " HH:mm:ss";
|
||||
default:
|
||||
return "yyyy-MM-dd HH:mm:ss";
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, Object> transTimeBarDataAntV(List<ChartViewFieldDTO> xAxisBase, List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> xAxisExt, List<ChartViewFieldDTO> yAxis, List<ChartViewFieldDTO> extStack, List<String[]> data, ChartViewWithBLOBs view, boolean isDrill) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (CollectionUtils.isEmpty(xAxisBase) || CollectionUtils.isEmpty(xAxisExt) || xAxisExt.size() < 2) {
|
||||
map.put("data", new ArrayList<>());
|
||||
return map;
|
||||
}
|
||||
if (xAxisExt.stream().filter(ext -> !ext.isDrill()).count() != 2) {
|
||||
map.put("data", new ArrayList<>());
|
||||
return map;
|
||||
}
|
||||
|
||||
List<Date> dates = new ArrayList<>();
|
||||
|
||||
ChartViewFieldDTO xAxis1 = xAxis.get(xAxisBase.size());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(getDateFormat(xAxis1.getDateStyle(), xAxis1.getDatePattern()));
|
||||
|
||||
List<Object> dataList = new ArrayList<>();
|
||||
for (int i1 = 0; i1 < data.size(); i1++) {
|
||||
String[] row = data.get(i1);
|
||||
|
||||
StringBuilder xField = new StringBuilder();
|
||||
if (isDrill) {
|
||||
xField.append(row[xAxis.size() - 1]);
|
||||
} else {
|
||||
for (int i = 0; i < xAxisBase.size(); i++) {
|
||||
if (i == xAxisBase.size() - 1) {
|
||||
xField.append(row[i]);
|
||||
} else {
|
||||
xField.append(row[i]).append("\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> obj = new HashMap<>();
|
||||
obj.put("field", xField.toString());
|
||||
obj.put("category", xField.toString());
|
||||
|
||||
List<ChartDimensionDTO> dimensionList = new ArrayList<>();
|
||||
|
||||
for (int j = 0; j < xAxis.size(); j++) {
|
||||
ChartDimensionDTO chartDimensionDTO = new ChartDimensionDTO();
|
||||
chartDimensionDTO.setId(xAxis.get(j).getId());
|
||||
chartDimensionDTO.setValue(row[j]);
|
||||
dimensionList.add(chartDimensionDTO);
|
||||
}
|
||||
|
||||
obj.put("dimensionList", dimensionList);
|
||||
|
||||
List<String> values = new ArrayList<>();
|
||||
|
||||
if (row[xAxisBase.size()] == null || row[xAxisBase.size() + 1] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
values.add(row[xAxisBase.size()]);
|
||||
values.add(row[xAxisBase.size() + 1]);
|
||||
obj.put("values", values);
|
||||
|
||||
|
||||
try {
|
||||
Date date = sdf.parse(row[xAxisBase.size()]);
|
||||
if (date != null) {
|
||||
dates.add(date);
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
try {
|
||||
Date date = sdf.parse(row[xAxisBase.size() + 1]);
|
||||
if (date != null) {
|
||||
dates.add(date);
|
||||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
|
||||
dataList.add(obj);
|
||||
}
|
||||
|
||||
map.put("minTime", sdf.format(dates.stream().min(Date::compareTo).orElse(null)));
|
||||
|
||||
|
||||
map.put("maxTime", sdf.format(dates.stream().max(Date::compareTo).orElse(null)));
|
||||
|
||||
map.put("data", dataList);
|
||||
return map;
|
||||
|
||||
}
|
||||
|
||||
public static Map<String, Object> transBidirectionalBarData(List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> yAxis, ChartViewDTO view, List<String[]> data, boolean isDrill) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
|
||||
@ -1,2 +1,18 @@
|
||||
UPDATE `sys_user` set `enabled` = 0 where `user_id` = 2;
|
||||
ALTER TABLE de_driver` ADD COLUMN `surpport_versions` LONGTEXT NULL AFTER `desc`;
|
||||
UPDATE `sys_user`
|
||||
set `enabled` = 0
|
||||
where `user_id` = 2;
|
||||
|
||||
ALTER TABLE `sys_task_email`
|
||||
ADD COLUMN `groups` varchar(255) NULL COMMENT '群聊' AFTER `view_data_range`;
|
||||
|
||||
ALTER TABLE `sys_task_email`
|
||||
ADD COLUMN `ext_wait_time` int(0) NOT NULL DEFAULT 0 COMMENT '加载仪表板额外等待时间(s)' AFTER `groups`;
|
||||
|
||||
ALTER TABLE `sys_task_email`
|
||||
ADD COLUMN `role_list` longtext NULL COMMENT '收件角色' AFTER `ext_wait_time`,
|
||||
ADD COLUMN `org_list` longtext NULL COMMENT '收件组织' AFTER `role_list`;
|
||||
|
||||
ALTER TABLE `sys_task_email`
|
||||
MODIFY COLUMN `reci_users` longtext NULL COMMENT '接收人账号' AFTER `conditions`;
|
||||
|
||||
ALTER TABLE de_driver` ADD COLUMN `surpport_versions` LONGTEXT NULL AFTER `desc`;
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dataease",
|
||||
"version": "1.18.13",
|
||||
"version": "1.18.14",
|
||||
"description": "dataease front",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@ -830,7 +830,6 @@ export default {
|
||||
const filters = this.filter.filter
|
||||
const group = this.groupRequiredInvalid(filters)
|
||||
if (group.unReady?.length) {
|
||||
this.view && (this.view.unReadyMsg = '请先完成必填项过滤器!')
|
||||
this.getDataLoading = false
|
||||
return
|
||||
} else {
|
||||
|
||||
@ -28,10 +28,21 @@
|
||||
class="condition-content"
|
||||
:class="{'condition-content-default' : !(element.options.attrs.showTitle && element.options.attrs.title)}"
|
||||
>
|
||||
|
||||
<div
|
||||
v-if="element.options.attrs.required"
|
||||
class="widget-required-symbol"
|
||||
>
|
||||
<span>*</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="condition-content-container"
|
||||
:class="{'widget-required' : element.options.attrs.required}"
|
||||
>
|
||||
<!-- <div class="required-msg-container">
|
||||
<span>必填项不能为空</span>
|
||||
</div> -->
|
||||
<div class="first-element">
|
||||
<div
|
||||
:class="element.component === 'de-select-grid' ? 'first-element-grid-container': ''"
|
||||
@ -58,12 +69,7 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div
|
||||
v-if="element.options.attrs.required"
|
||||
class="widget-required-symbol"
|
||||
>
|
||||
<span>*</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -281,13 +287,13 @@ export default {
|
||||
width: 100%;
|
||||
.widget-required {
|
||||
width: calc(100% - 12px) !important;
|
||||
float: left !important;
|
||||
float: right !important;
|
||||
}
|
||||
.widget-required-symbol {
|
||||
color: #f54a45;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
float: right;
|
||||
float: left;
|
||||
width: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,11 +5,12 @@
|
||||
ref="dateRef"
|
||||
v-model="values"
|
||||
:popper-class="'coustom-date-picker' + ' ' + extPoperClass"
|
||||
:class="{'show-required-tips': showRequiredTips}"
|
||||
:type="componentType"
|
||||
:range-separator="$t(element.options.attrs.rangeSeparator)"
|
||||
:start-placeholder="$t(element.options.attrs.startPlaceholder)"
|
||||
:end-placeholder="$t(element.options.attrs.endPlaceholder)"
|
||||
:placeholder="$t(element.options.attrs.placeholder)"
|
||||
:start-placeholder="showRequiredTips ? $t('panel.required_tips') : $t(element.options.attrs.startPlaceholder)"
|
||||
:end-placeholder="showRequiredTips ? $t('panel.required_tips') : $t(element.options.attrs.endPlaceholder)"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : $t(element.options.attrs.placeholder)"
|
||||
:append-to-body="inScreen"
|
||||
value-format="timestamp"
|
||||
:format="labelFormat"
|
||||
@ -219,6 +220,9 @@ export default {
|
||||
}
|
||||
return null
|
||||
},
|
||||
showRequiredTips() {
|
||||
return this.inDraw && this.element.options.attrs.required && (!this.values || this.values.length === 0)
|
||||
},
|
||||
...mapState([
|
||||
'canvasStyleData',
|
||||
'mobileStatus'
|
||||
@ -516,7 +520,31 @@ export default {
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.show-required-tips {
|
||||
border-color: #ff0000 !important;
|
||||
::v-deep .el-input__inner {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
::v-deep input::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner, input {
|
||||
border-color: #ff0000 !important;
|
||||
}
|
||||
|
||||
.show-required-tips ::v-deep .el-input__inner, input::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.date-picker-vant {
|
||||
position: relative;
|
||||
|
||||
@ -5,9 +5,10 @@
|
||||
ref="de-input-search"
|
||||
v-model="value"
|
||||
resize="vertical"
|
||||
:placeholder="$t(element.options.attrs.placeholder)"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : $t(element.options.attrs.placeholder)"
|
||||
:size="size"
|
||||
class="de-range-tag"
|
||||
:class="{'show-required-tips': showRequiredTips}"
|
||||
@input="valueChange"
|
||||
@keypress.enter.native="search"
|
||||
@dblclick="setEdit"
|
||||
@ -63,6 +64,9 @@ export default {
|
||||
},
|
||||
manualModify() {
|
||||
return !!this.element.options.manualModify
|
||||
},
|
||||
showRequiredTips() {
|
||||
return this.inDraw && this.element.options.attrs.required && !this.value
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -146,10 +150,14 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
// .de-range-tag {
|
||||
// input::placeholder {
|
||||
// color: var(--CustomColor, #909399) !important;
|
||||
// }
|
||||
// }
|
||||
<style lang="scss" scoped>
|
||||
.show-required-tips ::v-deep .el-input__inner {
|
||||
border-color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
style="width: 100%;"
|
||||
:rules="rules"
|
||||
>
|
||||
<div class="de-number-range-container">
|
||||
<div
|
||||
class="de-number-range-container"
|
||||
:class="{'show-required-tips': showRequiredTips}"
|
||||
>
|
||||
<el-form-item
|
||||
prop="min"
|
||||
style="padding-left: 0px;"
|
||||
@ -15,7 +18,7 @@
|
||||
<el-input
|
||||
ref="de-number-range-min"
|
||||
v-model="form.min"
|
||||
:placeholder="$t(element.options.attrs.placeholder_min)"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : $t(element.options.attrs.placeholder_min)"
|
||||
:size="size"
|
||||
@input="inputChange"
|
||||
@change="handleMinChange"
|
||||
@ -29,7 +32,7 @@
|
||||
<el-input
|
||||
ref="de-number-range-max"
|
||||
v-model="form.max"
|
||||
:placeholder="$t(element.options.attrs.placeholder_max)"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : $t(element.options.attrs.placeholder_max)"
|
||||
:size="size"
|
||||
@input="inputChange"
|
||||
@change="handleMaxChange"
|
||||
@ -102,6 +105,9 @@ export default {
|
||||
},
|
||||
manualModify() {
|
||||
return !!this.element.options.manualModify
|
||||
},
|
||||
showRequiredTips() {
|
||||
return this.inDraw && this.element.options.attrs.required && !this.form.min && !this.form.max
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -316,6 +322,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.show-required-tips ::v-deep .el-input__inner {
|
||||
border-color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.de-number-range-container {
|
||||
display: inline;
|
||||
max-height: 40px;
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
:collapse-tags="showNumber"
|
||||
:clearable="!element.options.attrs.multiple && (inDraw || !selectFirst)"
|
||||
:multiple="element.options.attrs.multiple"
|
||||
:placeholder="$t(element.options.attrs.placeholder) + placeholderSuffix"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : ($t(element.options.attrs.placeholder) + placeholderSuffix)"
|
||||
:popper-append-to-body="inScreen"
|
||||
:size="size"
|
||||
:filterable="inDraw || !selectFirst"
|
||||
@ -16,7 +16,7 @@
|
||||
:item-disabled="!inDraw && selectFirst"
|
||||
:key-word="keyWord"
|
||||
popper-class="coustom-de-select"
|
||||
:class="{'disabled-close': !inDraw && selectFirst && element.options.attrs.multiple}"
|
||||
:class="{'disabled-close': !inDraw && selectFirst && element.options.attrs.multiple, 'show-required-tips': showRequiredTips}"
|
||||
:list="data"
|
||||
:flag="flag"
|
||||
:is-config="isConfig"
|
||||
@ -143,6 +143,9 @@ export default {
|
||||
},
|
||||
selectFirst() {
|
||||
return this.element.serviceName === 'textSelectWidget' && this.element.options.attrs.selectFirst
|
||||
},
|
||||
showRequiredTips() {
|
||||
return this.inDraw && this.element.options.attrs.required && !this.value
|
||||
}
|
||||
},
|
||||
|
||||
@ -159,8 +162,10 @@ export default {
|
||||
},
|
||||
'defaultValueStr': function(value, old) {
|
||||
if (value === old) return
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(value)
|
||||
this.$nextTick(() => {
|
||||
this.value = this.fillValueDerfault()
|
||||
this.changeValue(value)
|
||||
})
|
||||
},
|
||||
'element.options.attrs.fieldId': function(value, old) {
|
||||
if (value === null || typeof value === 'undefined' || value === old) return
|
||||
@ -532,6 +537,15 @@ export default {
|
||||
.disabled-close ::v-deep .el-icon-close {
|
||||
display: none !important;
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner {
|
||||
border-color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.coustom-de-select {
|
||||
|
||||
@ -4,11 +4,14 @@
|
||||
v-if="element.options!== null && element.options.attrs!==null && show"
|
||||
class="de-select-grid-class"
|
||||
>
|
||||
<div class="de-select-grid-search">
|
||||
<div
|
||||
class="de-select-grid-search"
|
||||
:class="{'show-required-tips': showRequiredTips}"
|
||||
>
|
||||
<el-input
|
||||
ref="de-select-grid"
|
||||
v-model="keyWord"
|
||||
:placeholder="$t('deinputsearch.placeholder')"
|
||||
:placeholder="showRequiredTips ? $t('panel.required_tips') : $t('deinputsearch.placeholder')"
|
||||
:size="size"
|
||||
prefix-icon="el-icon-search"
|
||||
clearable
|
||||
@ -149,6 +152,9 @@ export default {
|
||||
},
|
||||
isCustomSortWidget() {
|
||||
return this.element.serviceName === 'textSelectGridWidget'
|
||||
},
|
||||
showRequiredTips() {
|
||||
return this.inDraw && this.element.options.attrs.required && (!this.value || !this.value.length)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -448,6 +454,16 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.show-required-tips ::v-deep .el-input__inner {
|
||||
border-color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.de-select-grid-search {
|
||||
::v-deep input {
|
||||
border-radius: 0px;
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
v-if="element.options!== null && element.options.attrs!==null && show"
|
||||
ref="deSelectTree"
|
||||
v-model="value"
|
||||
:class="{'show-required-tips': showRequiredTips}"
|
||||
popover-class="test-class-wrap"
|
||||
:data="data"
|
||||
:select-params="selectParams"
|
||||
@ -69,7 +70,7 @@ export default {
|
||||
value: this.isSingle ? '' : [],
|
||||
selectParams: {
|
||||
clearable: true,
|
||||
placeholder: this.$t(this.element.options.attrs.placeholder)
|
||||
placeholder: this.showRequiredTips ? this.$t('panel.required_tips') : this.$t(this.element.options.attrs.placeholder)
|
||||
},
|
||||
treeParams: {
|
||||
showParent: true,
|
||||
@ -118,6 +119,9 @@ export default {
|
||||
customStyle() {
|
||||
const { brColor, wordColor, innerBgColor } = this.element.style
|
||||
return { brColor, wordColor, innerBgColor }
|
||||
},
|
||||
showRequiredTips() {
|
||||
return this.inDraw && this.element.options.attrs.required && (!this.value || !this.value.length)
|
||||
}
|
||||
},
|
||||
|
||||
@ -414,6 +418,17 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.show-required-tips ::v-deep .el-input__inner {
|
||||
border-color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep .el-input__inner::placeholder {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
.show-required-tips ::v-deep i {
|
||||
color: #ff0000 !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.test-class-wrap {
|
||||
background: var(--BgSelectTreeColor, #FFFFFF) !important;
|
||||
|
||||
8
core/frontend/src/icons/svg/bar-time-range.svg
Normal file
8
core/frontend/src/icons/svg/bar-time-range.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<svg width="1072" height="1024" xmlns="http://www.w3.org/2000/svg" p-id="1374" version="1.1" class="icon" t="1616054957891">
|
||||
|
||||
<g>
|
||||
<title>Layer 1</title>
|
||||
<path id="svg_1" p-id="1375" d="m150.528,77.48267l0,207.28685l472.64914,0l2.99886,-207.28685l-475.648,0zm873.32571,303.34781l-469.32565,0l0,204.62018l469.12451,0l0.20114,-204.62018zm-203.14209,303.34781l-483.51692,0l0,207.28685l479.25025,0l4.26667,-207.28685z"/>
|
||||
<path id="svg_2" p-id="1376" d="m115.15124,943.07962l0,-942.93333l-41.20381,0l0,994.37714l996.10819,0l0,-51.44381l-954.90438,0z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 566 B |
@ -1184,6 +1184,7 @@ export default {
|
||||
chart_bar_stack: 'Stack Bar',
|
||||
chart_percentage_bar_stack: 'Percentage Stack Bar',
|
||||
chart_bar_horizontal: 'Horizontal Bar',
|
||||
chart_bar_time_range: 'Time Bar',
|
||||
chart_bar_stack_horizontal: 'Stack Horizontal Bar',
|
||||
chart_percentage_bar_stack_horizontal: 'Horizontal Percentage Stack Bar',
|
||||
chart_bidirectional_bar: 'Bidirectional Bar',
|
||||
@ -1384,8 +1385,10 @@ export default {
|
||||
filter_type: 'Filter Type',
|
||||
filter_value_can_not_str: 'Value type can not input string',
|
||||
enum_value_can_not_null: 'Enum Value can not empty.',
|
||||
column: 'Column',
|
||||
table_config: 'Table Config',
|
||||
table_column_width_config: 'Column Width',
|
||||
table_column_freeze: 'Column Freeze',
|
||||
table_column_adapt: 'Adapt',
|
||||
table_column_custom: 'Custom',
|
||||
chart_table_pivot: 'Pivot Table',
|
||||
@ -1494,6 +1497,7 @@ export default {
|
||||
dynamic: 'Dynamic',
|
||||
gauge_size_field_delete: 'Dynamic field changed,please edit again',
|
||||
chart_group: 'Sub Type',
|
||||
chart_bar_time: 'Times',
|
||||
chart_bar_group: 'Bar Group',
|
||||
chart_bar_group_stack: 'Group Stack Bar',
|
||||
field_dynamic: 'Dynamic',
|
||||
@ -1521,6 +1525,7 @@ export default {
|
||||
set_zero: 'Set Zero',
|
||||
ignore_data: 'Hide Data',
|
||||
sub_dimension_tip: 'This field is required, and cannot be included in the type axis, you should choose non-group chart if you don\'t need it, or you will get unexpected chart.',
|
||||
time_bar_tip: 'This field is required, and axis type must be time',
|
||||
drill_dimension_tip: 'Only fields in the dataset can be drilled',
|
||||
table_scroll_tip: 'The detail table is only effective when the pagination mode is "Drop-down".',
|
||||
table_threshold_tip: 'Tip: Do not select fields repeatedly. If the same field is configured repeatedly, only the last field will take effect.',
|
||||
@ -2043,6 +2048,7 @@ export default {
|
||||
back_parent: 'Back to previous'
|
||||
},
|
||||
panel: {
|
||||
required_tips: 'Cannot be empty!',
|
||||
filter_no_select: 'Filter components do not need to be selected',
|
||||
first_item: 'First item',
|
||||
forbidden_copy: 'Forbidden copy',
|
||||
@ -2775,7 +2781,10 @@ export default {
|
||||
range_view: 'Displayed data',
|
||||
range_all: 'All data',
|
||||
execute_now: 'Execute now',
|
||||
fire_now_success: 'Task executing'
|
||||
fire_now_success: 'Task executing',
|
||||
larkgroups: 'Lark group',
|
||||
ext_wait_time: 'Additional waiting time for dashboard loading (unit: seconds)',
|
||||
wat_time_limit: 'The additional waiting time must be between [0 - 30]'
|
||||
},
|
||||
dynamic_time: {
|
||||
set_default: 'Set Default',
|
||||
|
||||
@ -1182,6 +1182,7 @@ export default {
|
||||
chart_bar_stack: '堆疊柱狀圖',
|
||||
chart_percentage_bar_stack: '百分比柱狀圖',
|
||||
chart_bar_horizontal: '橫嚮柱狀圖',
|
||||
chart_bar_time_range: '時間條形圖',
|
||||
chart_bar_stack_horizontal: '橫嚮堆疊柱狀圖',
|
||||
chart_percentage_bar_stack_horizontal: '橫嚮百分比柱狀圖',
|
||||
chart_bidirectional_bar: '對稱柱狀圖',
|
||||
@ -1382,8 +1383,10 @@ export default {
|
||||
filter_type: '過濾方式',
|
||||
filter_value_can_not_str: '數值類型字段過濾值不能包含文本',
|
||||
enum_value_can_not_null: '字段枚舉值不能為空',
|
||||
column: '列',
|
||||
table_config: '表格配置',
|
||||
table_column_width_config: '列寬調整',
|
||||
table_column_freeze: '列凍結',
|
||||
table_column_adapt: '自適應',
|
||||
table_column_custom: '自定義',
|
||||
chart_table_pivot: '透視表',
|
||||
@ -1491,6 +1494,7 @@ export default {
|
||||
dynamic: '動態值',
|
||||
gauge_size_field_delete: '動態值中字段發生變更,請重新編輯',
|
||||
chart_group: '子類別',
|
||||
chart_bar_time: '起止時間',
|
||||
chart_bar_group: '分組柱狀圖',
|
||||
chart_bar_group_stack: '分組堆疊柱狀圖',
|
||||
field_dynamic: '動態值',
|
||||
@ -1518,6 +1522,7 @@ export default {
|
||||
ignore_data: '隱藏空值',
|
||||
empty_data_field_ctrl: '字段設置',
|
||||
sub_dimension_tip: '該字段為必填項,且不應使用類別軸中的字段,若無需該字段,請選擇基礎圖表進行展示,否則展示效果不理想',
|
||||
time_bar_tip: '該字段為必填項,且需要兩個時間類型字段',
|
||||
drill_dimension_tip: '鑽取字段僅支持數據集中的字段',
|
||||
table_scroll_tip: '明細表僅在分頁模式為"下拉"時生效。',
|
||||
table_threshold_tip: '提示:請勿重複選擇字段,若同一字段重複配置,則只有最後的字段配置生效。',
|
||||
@ -2035,6 +2040,7 @@ export default {
|
||||
back_parent: '返回上一級'
|
||||
},
|
||||
panel: {
|
||||
required_tips: '必填項不能爲空!',
|
||||
filter_no_select: '過濾組件無需選擇',
|
||||
first_item: '首項',
|
||||
forbidden_copy: '當前組件不允許復製',
|
||||
@ -2767,7 +2773,10 @@ export default {
|
||||
range_view: '展示數據',
|
||||
range_all: '全部數據',
|
||||
execute_now: '立即執行',
|
||||
fire_now_success: '任務發起成功'
|
||||
fire_now_success: '任務發起成功',
|
||||
larkgroups: '飛書群',
|
||||
ext_wait_time: '加載儀表板額外等待時間(單位:秒)',
|
||||
wat_time_limit: '額外等待時間必須在[0 - 30]'
|
||||
},
|
||||
dynamic_time: {
|
||||
set_default: '設置默認值',
|
||||
|
||||
@ -1182,6 +1182,7 @@ export default {
|
||||
chart_bar_stack: '堆叠柱状图',
|
||||
chart_percentage_bar_stack: '百分比柱状图',
|
||||
chart_bar_horizontal: '横向柱状图',
|
||||
chart_bar_time_range: '时间条形图',
|
||||
chart_bar_stack_horizontal: '横向堆叠柱状图',
|
||||
chart_percentage_bar_stack_horizontal: '横向百分比柱状图',
|
||||
chart_bidirectional_bar: '对称柱状图',
|
||||
@ -1382,8 +1383,10 @@ export default {
|
||||
filter_type: '过滤方式',
|
||||
filter_value_can_not_str: '数值类型字段过滤值不能包含文本',
|
||||
enum_value_can_not_null: '字段枚举值不能为空',
|
||||
column: '列',
|
||||
table_config: '表格配置',
|
||||
table_column_width_config: '列宽调整',
|
||||
table_column_freeze: '列冻结',
|
||||
table_column_adapt: '自适应',
|
||||
table_column_custom: '自定义',
|
||||
chart_table_pivot: '透视表',
|
||||
@ -1491,6 +1494,7 @@ export default {
|
||||
dynamic: '动态值',
|
||||
gauge_size_field_delete: '动态值中字段发生变更,请重新编辑',
|
||||
chart_group: '子类别',
|
||||
chart_bar_time: '起止时间',
|
||||
chart_bar_group: '分组柱状图',
|
||||
chart_bar_group_stack: '分组堆叠柱状图',
|
||||
field_dynamic: '动态值',
|
||||
@ -1518,6 +1522,7 @@ export default {
|
||||
set_zero: '置为0',
|
||||
ignore_data: '隐藏空值',
|
||||
sub_dimension_tip: '该字段为必填项,且不应使用类别轴中的字段,若无需该字段,请选择基础图表进行展示,否则展示效果不理想。',
|
||||
time_bar_tip: '该字段为必填项,且需要两个时间类型字段',
|
||||
drill_dimension_tip: '钻取字段仅支持数据集中的字段',
|
||||
table_scroll_tip: '明细表仅在分页模式为"下拉"时生效。',
|
||||
table_threshold_tip: '提示:请勿重复选择字段,若同一字段重复配置,则只有最后的字段配置生效',
|
||||
@ -2038,6 +2043,7 @@ export default {
|
||||
back_parent: '返回上一级'
|
||||
},
|
||||
panel: {
|
||||
required_tips: '必填项不能为空!',
|
||||
filter_no_select: '过滤组件无需选择',
|
||||
first_item: '首项',
|
||||
forbidden_copy: '当前组件不允许复制',
|
||||
@ -2770,7 +2776,10 @@ export default {
|
||||
range_view: '展示数据',
|
||||
range_all: '全部数据',
|
||||
execute_now: '立即执行',
|
||||
fire_now_success: '任务发起成功'
|
||||
fire_now_success: '任务发起成功',
|
||||
larkgroups: '飞书群',
|
||||
ext_wait_time: '加载仪表板额外等待时间(单位:秒)',
|
||||
wat_time_limit: '额外等待时间必须在[0 - 30]'
|
||||
},
|
||||
dynamic_time: {
|
||||
set_default: '设置默认值',
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
>
|
||||
<licbar />
|
||||
<topbar
|
||||
v-if="!fullHeightFlag && finishLoad"
|
||||
v-if="!fullHeightFlag"
|
||||
:show-tips="showTips"
|
||||
/>
|
||||
|
||||
@ -83,7 +83,6 @@ export default {
|
||||
return {
|
||||
componentName: 'PanelMain',
|
||||
showTips: false,
|
||||
finishLoad: false,
|
||||
buttonDisable: false,
|
||||
sideWidth: ''
|
||||
}
|
||||
@ -125,12 +124,7 @@ export default {
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
needModifyPwd().then(res => {
|
||||
this.showTips = res.success && res.data
|
||||
this.finishLoad = true
|
||||
}).catch(e => {
|
||||
this.finishLoad = true
|
||||
})
|
||||
this.showTips = false
|
||||
},
|
||||
mounted() {
|
||||
document.addEventListener('click', this.bodyClick)
|
||||
|
||||
@ -262,6 +262,130 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
|
||||
return plot
|
||||
}
|
||||
|
||||
export function timeRangeBarOptionAntV(plot, container, chart, action) {
|
||||
// theme
|
||||
const theme = getTheme(chart)
|
||||
// attr
|
||||
const label = getLabel(chart)
|
||||
const tooltip = getTooltip(chart)
|
||||
// style
|
||||
const legend = getLegend(chart)
|
||||
const yAxis = getXAxis(chart)
|
||||
const xAxis = getYAxis(chart)
|
||||
// data
|
||||
const data = _.cloneDeep(chart.data.data)
|
||||
|
||||
const minTime = chart.data.minTime
|
||||
const maxTime = chart.data.maxTime
|
||||
|
||||
// config
|
||||
const slider = getSlider(chart)
|
||||
const analyse = getAnalyse(chart)
|
||||
// options
|
||||
const options = {
|
||||
theme: theme,
|
||||
data: data,
|
||||
xField: 'values',
|
||||
yField: 'field',
|
||||
seriesField: 'category',
|
||||
appendPadding: getPadding(chart),
|
||||
label: label,
|
||||
tooltip: tooltip,
|
||||
legend: legend,
|
||||
xAxis: xAxis,
|
||||
yAxis: yAxis,
|
||||
slider: slider,
|
||||
annotations: analyse,
|
||||
isRange: true,
|
||||
meta: {
|
||||
values: {
|
||||
type: 'time',
|
||||
min: minTime,
|
||||
max: maxTime
|
||||
}
|
||||
},
|
||||
brush: {
|
||||
enabled: true,
|
||||
isStartEnable: (context) => {
|
||||
// 按住 shift 键,才能开启交互
|
||||
if (context.event.gEvent.originalEvent?.shiftKey) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
},
|
||||
interactions: [
|
||||
{
|
||||
type: 'legend-active', cfg: {
|
||||
start: [{ trigger: 'legend-item:mouseenter', action: ['element-active:reset'] }],
|
||||
end: [{ trigger: 'legend-item:mouseleave', action: ['element-active:reset'] }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'legend-filter', cfg: {
|
||||
start: [{ trigger: 'legend-item:click', action: ['list-unchecked:toggle', 'data-filter:filter', 'element-active:reset', 'element-highlight:reset'] }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'tooltip', cfg: {
|
||||
start: [{ trigger: 'interval:mousemove', action: 'tooltip:show' }],
|
||||
end: [{ trigger: 'interval:mouseleave', action: 'tooltip:hide' }]
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'active-region', cfg: {
|
||||
start: [{ trigger: 'interval:mousemove', action: 'active-region:show' }],
|
||||
end: [{ trigger: 'interval:mouseleave', action: 'active-region:hide' }]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
// size
|
||||
let customAttr = {}
|
||||
if (chart.customAttr) {
|
||||
customAttr = JSON.parse(chart.customAttr)
|
||||
if (customAttr.size) {
|
||||
const s = JSON.parse(JSON.stringify(customAttr.size))
|
||||
if (s.barDefault) {
|
||||
delete options.marginRatio
|
||||
} else {
|
||||
options.marginRatio = s.barGap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delete options.isGroup
|
||||
delete options.isStack
|
||||
|
||||
options.isPercent = chart.type.includes('percentage')
|
||||
// custom color
|
||||
options.color = antVCustomColor(chart)
|
||||
if (customAttr.color.gradient) {
|
||||
options.color = options.color.map((ele) => {
|
||||
return setGradientColor(ele, customAttr.color.gradient)
|
||||
})
|
||||
}
|
||||
// 处理空值
|
||||
if (chart.senior) {
|
||||
let emptyDataStrategy = JSON.parse(chart.senior)?.functionCfg?.emptyDataStrategy
|
||||
if (!emptyDataStrategy) {
|
||||
emptyDataStrategy = 'breakLine'
|
||||
}
|
||||
handleEmptyDataStrategy(emptyDataStrategy, chart, data, options)
|
||||
}
|
||||
|
||||
// 开始渲染
|
||||
if (plot) {
|
||||
plot.destroy()
|
||||
}
|
||||
plot = new Bar(container, options)
|
||||
|
||||
plot.off('interval:click')
|
||||
plot.on('interval:click', action)
|
||||
|
||||
return plot
|
||||
}
|
||||
|
||||
export function baseBidirectionalBarOptionAntV(plot, container, chart, action, isGroup, isStack) {
|
||||
// theme
|
||||
const theme = getTheme(chart)
|
||||
|
||||
@ -170,7 +170,9 @@ export const DEFAULT_SIZE = {
|
||||
quotaSuffixFontIsItalic: false,
|
||||
quotaSuffixFontIsBolder: false,
|
||||
quotaSuffixLetterSpace: '0',
|
||||
quotaSuffixFontShadow: false
|
||||
quotaSuffixFontShadow: false,
|
||||
tableColumnFreezeHead: 0,
|
||||
tableColumnFreezeTail: 0
|
||||
}
|
||||
export const DEFAULT_SUSPENSION = {
|
||||
show: true
|
||||
|
||||
@ -422,7 +422,7 @@ export function getTooltip(chart) {
|
||||
res = valueFormatter(param.value, formatterItem)
|
||||
}
|
||||
}
|
||||
} else if (includesAny(chart.type, 'bar', 'scatter', 'radar', 'area') && !chart.type.includes('group')) {
|
||||
} else if (includesAny(chart.type, 'bar', 'scatter', 'radar', 'area') && !chart.type.includes('group') && chart.type !== 'bar-time-range') {
|
||||
obj = { name: param.category, value: param.value }
|
||||
for (let i = 0; i < yAxis.length; i++) {
|
||||
const f = yAxis[i]
|
||||
@ -470,6 +470,9 @@ export function getTooltip(chart) {
|
||||
res = valueFormatter(param.value, formatterItem)
|
||||
}
|
||||
}
|
||||
} else if (chart.type === 'bar-time-range') {
|
||||
obj = { values: param.values, name: param.category }
|
||||
res = param.values[0] + ' - ' + param.values[1]
|
||||
} else {
|
||||
res = param.value
|
||||
}
|
||||
@ -724,7 +727,7 @@ export function getXAxis(chart) {
|
||||
delete axis.maxLimit
|
||||
delete axis.tickCount
|
||||
const axisValue = a.axisValue
|
||||
if (chart.type.includes('horizontal')) {
|
||||
if (chart.type.includes('horizontal') || chart.type === 'bar-time-range') {
|
||||
if (axisValue && !axisValue.auto) {
|
||||
const yAxisSeriesMaxList = []
|
||||
const maxList = []
|
||||
@ -814,7 +817,7 @@ export function getYAxis(chart) {
|
||||
if (chart.type === 'waterfall') {
|
||||
return value
|
||||
} else {
|
||||
if (!chart.type.includes('horizontal')) {
|
||||
if (!(chart.type.includes('horizontal') || chart.type === 'bar-time-range')) {
|
||||
if (!a.axisLabelFormatter) {
|
||||
return valueFormatter(value, formatterItem)
|
||||
} else {
|
||||
@ -841,7 +844,7 @@ export function getYAxis(chart) {
|
||||
delete axis.maxLimit
|
||||
delete axis.tickCount
|
||||
const axisValue = a.axisValue
|
||||
if (!chart.type.includes('horizontal')) {
|
||||
if (!chart.type.includes('horizontal') || chart.type === 'bar-time-range') {
|
||||
if (axisValue && !axisValue.auto) {
|
||||
const yAxisSeriesMaxList = []
|
||||
const maxList = []
|
||||
|
||||
@ -91,7 +91,8 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo)
|
||||
height: containerDom.offsetHeight,
|
||||
showSeriesNumber: customAttr.size.showIndex,
|
||||
style: getSize(chart),
|
||||
conditions: getConditions(chart)
|
||||
conditions: getConditions(chart),
|
||||
frozenColCount: customAttr.size.tableColumnFreezeHead ?? 0
|
||||
}
|
||||
// 开启序号之后,第一列就是序号列,修改 label 即可
|
||||
if (s2Options.showSeriesNumber) {
|
||||
@ -279,7 +280,8 @@ export function baseTableNormal(s2, container, chart, action, tableData) {
|
||||
height: containerDom.offsetHeight,
|
||||
showSeriesNumber: customAttr.size.showIndex,
|
||||
style: getSize(chart),
|
||||
conditions: getConditions(chart)
|
||||
conditions: getConditions(chart),
|
||||
frozenColCount: customAttr.size.tableColumnFreezeHead ?? 0
|
||||
}
|
||||
// 开启序号之后,第一列就是序号列,修改 label 即可
|
||||
if (s2Options.showSeriesNumber) {
|
||||
@ -291,7 +293,6 @@ export function baseTableNormal(s2, container, chart, action, tableData) {
|
||||
node.label = customAttr.size.indexLabel
|
||||
}
|
||||
}
|
||||
return node.belongsCell
|
||||
}
|
||||
s2Options.dataCell = (viewMeta) => {
|
||||
return new DataCell(viewMeta, viewMeta?.spreadsheet)
|
||||
|
||||
@ -63,6 +63,7 @@ export const TYPE_CONFIGS = [
|
||||
'tableTitleHeight',
|
||||
'tableItemHeight',
|
||||
'tableColumnMode',
|
||||
'tableColumnFreeze',
|
||||
'showIndex',
|
||||
'indexLabel',
|
||||
'tableColTooltip',
|
||||
@ -119,7 +120,8 @@ export const TYPE_CONFIGS = [
|
||||
'showIndex',
|
||||
'indexLabel',
|
||||
'tableColTooltip',
|
||||
'showTableHeader'
|
||||
'showTableHeader',
|
||||
'tableColumnFreeze'
|
||||
],
|
||||
'title-selector-ant-v': [
|
||||
'show',
|
||||
@ -1100,6 +1102,85 @@ export const TYPE_CONFIGS = [
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
render: 'antv',
|
||||
category: 'chart.chart_type_compare',
|
||||
value: 'bar-time-range',
|
||||
title: 'chart.chart_bar_time_range',
|
||||
icon: 'bar-time-range',
|
||||
properties: [
|
||||
'color-selector',
|
||||
|
||||
'label-selector-ant-v',
|
||||
'tooltip-selector-ant-v',
|
||||
'x-axis-selector-ant-v',
|
||||
'y-axis-selector-ant-v',
|
||||
'title-selector-ant-v',
|
||||
'legend-selector-ant-v'
|
||||
],
|
||||
propertyInner: {
|
||||
'color-selector': [
|
||||
'value',
|
||||
'colorPanel',
|
||||
'customColor',
|
||||
'gradient',
|
||||
'alpha'
|
||||
],
|
||||
'size-selector-ant-v': [
|
||||
'barDefault',
|
||||
'barGap'
|
||||
],
|
||||
'label-selector-ant-v': [
|
||||
'show',
|
||||
'fontSize',
|
||||
'color',
|
||||
'position-h'
|
||||
],
|
||||
'tooltip-selector-ant-v': [
|
||||
'show',
|
||||
'textStyle'
|
||||
],
|
||||
'x-axis-selector-ant-v': [
|
||||
'show',
|
||||
'position',
|
||||
'name',
|
||||
'nameTextStyle',
|
||||
'splitLine',
|
||||
'axisForm',
|
||||
'axisLabel'
|
||||
],
|
||||
'y-axis-selector-ant-v': [
|
||||
'show',
|
||||
'position',
|
||||
'name',
|
||||
'nameTextStyle',
|
||||
'splitLine',
|
||||
'axisForm',
|
||||
'axisLabel'
|
||||
],
|
||||
'title-selector-ant-v': [
|
||||
'show',
|
||||
'title',
|
||||
'fontSize',
|
||||
'color',
|
||||
'hPosition',
|
||||
'isItalic',
|
||||
'isBolder',
|
||||
'remarkShow',
|
||||
'fontFamily',
|
||||
'letterSpace',
|
||||
'fontShadow'
|
||||
],
|
||||
'legend-selector-ant-v': [
|
||||
'show',
|
||||
'icon',
|
||||
'orient',
|
||||
'textStyle',
|
||||
'hPosition',
|
||||
'vPosition'
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
render: 'antv',
|
||||
category: 'chart.chart_type_compare',
|
||||
@ -2002,6 +2083,7 @@ export const TYPE_CONFIGS = [
|
||||
'tableTitleHeight',
|
||||
'tableItemHeight',
|
||||
'tableColumnWidth',
|
||||
'tableColumnFreeze',
|
||||
'showIndex',
|
||||
'indexLabel',
|
||||
'tableAutoBreakLine',
|
||||
@ -2051,6 +2133,7 @@ export const TYPE_CONFIGS = [
|
||||
'tableColumnWidth',
|
||||
'showIndex',
|
||||
'indexLabel',
|
||||
'tableColumnFreeze',
|
||||
'tableAutoBreakLine',
|
||||
'showTableHeader'
|
||||
],
|
||||
@ -3517,7 +3600,7 @@ export function getColors(chart, colors, reset) {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ((includesAny(chart.type, 'bar', 'radar', 'area')) && !chart.type.includes('group')) {
|
||||
} else if ((includesAny(chart.type, 'bar', 'radar', 'area')) && !chart.type.includes('group') && chart.type !== 'bar-time-range') {
|
||||
if (Object.prototype.toString.call(chart.yaxis) === '[object Array]') {
|
||||
series = JSON.parse(JSON.stringify(chart.yaxis))
|
||||
} else {
|
||||
|
||||
@ -45,7 +45,7 @@ import { baseLiquid } from '@/views/chart/chart/liquid/liquid'
|
||||
import { uuid } from 'vue-uuid'
|
||||
import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
|
||||
import { getRemark, hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import { baseBarOptionAntV, hBaseBarOptionAntV, baseBidirectionalBarOptionAntV } from '@/views/chart/chart/bar/bar_antv'
|
||||
import { baseBarOptionAntV, hBaseBarOptionAntV, baseBidirectionalBarOptionAntV, timeRangeBarOptionAntV } from '@/views/chart/chart/bar/bar_antv'
|
||||
import { baseAreaOptionAntV, baseLineOptionAntV } from '@/views/chart/chart/line/line_antv'
|
||||
import { basePieOptionAntV, basePieRoseOptionAntV } from '@/views/chart/chart/pie/pie_antv'
|
||||
import { baseScatterOptionAntV } from '@/views/chart/chart/scatter/scatter_antv'
|
||||
@ -273,6 +273,8 @@ export default {
|
||||
this.myChart = hBaseBarOptionAntV(this.myChart, this.chartId, chart, this.antVAction, true, false)
|
||||
} else if (equalsAny(chart.type, 'bar-stack-horizontal', 'percentage-bar-stack-horizontal')) {
|
||||
this.myChart = hBaseBarOptionAntV(this.myChart, this.chartId, chart, this.antVAction, false, true)
|
||||
} else if (equalsAny(chart.type, 'bar-time-range')) {
|
||||
this.myChart = timeRangeBarOptionAntV(this.myChart, this.chartId, chart, this.antVAction)
|
||||
} else if (chart.type === 'line') {
|
||||
this.myChart = baseLineOptionAntV(this.myChart, this.chartId, chart, this.antVAction)
|
||||
} else if (chart.type === 'area') {
|
||||
@ -389,8 +391,12 @@ export default {
|
||||
}
|
||||
return
|
||||
}
|
||||
const quotaList = this.pointParam.data.quotaList
|
||||
quotaList[0]['value'] = this.pointParam.data.value
|
||||
let quotaList = this.pointParam.data.quotaList
|
||||
if (this.chart.type === 'bar-time-range') {
|
||||
quotaList = this.pointParam.data.dimensionList
|
||||
} else {
|
||||
quotaList[0]['value'] = this.pointParam.data.value
|
||||
}
|
||||
const linkageParam = {
|
||||
option: 'linkage',
|
||||
name: this.pointParam.data.name,
|
||||
|
||||
@ -28,14 +28,18 @@
|
||||
size="mini"
|
||||
@change="changeXAxisStyle('position')"
|
||||
>
|
||||
<div v-if="chart.type !== 'bidirectional-bar'">
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
<el-radio-button label="bottom">{{ $t('chart.text_pos_bottom') }}</el-radio-button>
|
||||
</div>
|
||||
<div v-else-if="chart.type === 'bidirectional-bar'">
|
||||
<div v-if="chart.type === 'bidirectional-bar'">
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
<el-radio-button label="bottom">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||
</div>
|
||||
<div v-else-if="chart.type === 'bar-time-range'">
|
||||
<el-radio-button label="bottom">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
<el-radio-button label="bottom">{{ $t('chart.text_pos_bottom') }}</el-radio-button>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -266,7 +270,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="chart.type && chart.type !== 'bidirectional-bar'"
|
||||
v-if="chart.type && chart.type !== 'bidirectional-bar' && chart.type !== 'bar-time-range'"
|
||||
:label="$t('chart.axis_label_rotate')"
|
||||
class="form-item form-item-slider"
|
||||
>
|
||||
|
||||
@ -28,14 +28,18 @@
|
||||
size="mini"
|
||||
@change="changeYAxisStyle('position')"
|
||||
>
|
||||
<div v-if="chart.type !== 'bidirectional-bar'">
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||
</div>
|
||||
<div v-else-if="chart.type === 'bidirectional-bar'">
|
||||
<div v-if="chart.type === 'bidirectional-bar' ">
|
||||
<el-radio-button label="right">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_bottom') }}</el-radio-button>
|
||||
</div>
|
||||
<div v-else-if="chart.type === 'bar-time-range'">
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
<el-radio-button label="right">{{ $t('chart.text_pos_bottom') }}</el-radio-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||
</div>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
@ -293,7 +297,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<span v-show="chart.type && !chart.type.includes('horizontal') && chart.type !== 'waterfall'">
|
||||
<span v-show="chart.type && !(chart.type.includes('horizontal') || chart.type === 'bar-time-range') && chart.type !== 'waterfall'">
|
||||
<el-form-item
|
||||
:label="$t('chart.value_formatter_type')"
|
||||
class="form-item"
|
||||
|
||||
@ -119,11 +119,18 @@
|
||||
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="!hideSpecial"
|
||||
:command="beforeDateStyle('H_m_s')"
|
||||
divided
|
||||
>{{ $t('chart.H_m_s') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H')">{{ $t('chart.y_M_d_H') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m')">{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="!hideSpecial"
|
||||
:command="beforeDateStyle('y_M_d_H')"
|
||||
>{{ $t('chart.y_M_d_H') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="beforeDateStyle('y_M_d_H_m')"
|
||||
:divided="hideSpecial"
|
||||
>{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m_s')">{{ $t('chart.y_M_d_H_m_s') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@ -210,6 +217,11 @@ export default {
|
||||
showDateExt: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
hideSpecial() {
|
||||
return this.chart.type === 'bar-time-range'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dimensionData: function() {
|
||||
this.getItemTagType()
|
||||
@ -299,10 +311,10 @@ export default {
|
||||
},
|
||||
getDateExtStatus() {
|
||||
if (this.chart) {
|
||||
this.showDateExt = this.chart.datasourceType === 'mysql' ||
|
||||
this.showDateExt = (this.chart.datasourceType === 'mysql' ||
|
||||
this.chart.datasourceType === 'ds_doris' ||
|
||||
this.chart.datasourceType === 'StarRocks' ||
|
||||
this.chart.datasetMode === 1
|
||||
this.chart.datasetMode === 1) && this.chart.type !== 'bar-time-range'
|
||||
} else {
|
||||
this.showDateExt = false
|
||||
}
|
||||
|
||||
@ -117,13 +117,16 @@
|
||||
v-show="!item.term.includes('null') && !item.term.includes('empty') && item.term !== 'between'"
|
||||
v-model="item.value"
|
||||
class="value-item"
|
||||
style="margin-left: 10px;"
|
||||
style="padding-left: 10px"
|
||||
:placeholder="$t('chart.drag_block_label_value')"
|
||||
size="mini"
|
||||
clearable
|
||||
@change="changeThreshold"
|
||||
/>
|
||||
<span v-if="item.term === 'between'">
|
||||
<span
|
||||
v-if="item.term === 'between'"
|
||||
class="flex-between"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.min"
|
||||
class="item-long-between"
|
||||
@ -147,7 +150,10 @@
|
||||
v-if="item.field === '1'"
|
||||
:span="12"
|
||||
>
|
||||
<span v-show="!item.term.includes('null') && !item.term.includes('empty') && item.term !== 'between'">
|
||||
<span
|
||||
v-show="!item.term.includes('null') && !item.term.includes('empty') && item.term !== 'between'"
|
||||
class="flex-between"
|
||||
>
|
||||
<el-select
|
||||
v-model="item.targetField.fieldId"
|
||||
size="mini"
|
||||
@ -205,7 +211,10 @@
|
||||
</el-select>
|
||||
</span>
|
||||
|
||||
<span v-if="item.term === 'between'">
|
||||
<span
|
||||
v-if="item.term === 'between'"
|
||||
class="flex-between"
|
||||
>
|
||||
<el-select
|
||||
v-model="item.minField.fieldId"
|
||||
size="mini"
|
||||
@ -787,4 +796,9 @@ span {
|
||||
color: #F56C6C;
|
||||
font-size: 12px;
|
||||
}
|
||||
.flex-between {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<el-form
|
||||
ref="sizeFormBar"
|
||||
:model="sizeForm"
|
||||
label-width="80px"
|
||||
label-width="84px"
|
||||
size="mini"
|
||||
>
|
||||
<!--bar-begin-->
|
||||
@ -329,6 +329,21 @@
|
||||
@change="changeBarSizeCase('tableColumnWidth')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showProperty('tableColumnFreeze')"
|
||||
:label="$t('chart.table_column_freeze')"
|
||||
class="form-item"
|
||||
>
|
||||
<span>{{ $t('dynamic_time.before') }} </span>
|
||||
<el-input-number
|
||||
v-model="sizeForm.tableColumnFreezeHead"
|
||||
:min="0"
|
||||
:max="100"
|
||||
:step-strictly="true"
|
||||
@change="changeBarSizeCase('tableColumnFreezeHead')"
|
||||
/>
|
||||
<span> {{ $t('chart.column') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showProperty('tableAutoBreakLine')"
|
||||
:label="$t('chart.table_auto_break_line')"
|
||||
@ -1236,6 +1251,8 @@ export default {
|
||||
this.sizeForm.liquidOutlineDistance = (this.sizeForm.liquidOutlineDistance || this.sizeForm.liquidOutlineDistance === 0) ? this.sizeForm.liquidOutlineDistance : DEFAULT_SIZE.liquidOutlineDistance
|
||||
this.sizeForm.liquidWaveLength = this.sizeForm.liquidWaveLength ? this.sizeForm.liquidWaveLength : DEFAULT_SIZE.liquidWaveLength
|
||||
this.sizeForm.liquidWaveCount = this.sizeForm.liquidWaveCount ? this.sizeForm.liquidWaveCount : DEFAULT_SIZE.liquidWaveCount
|
||||
this.sizeForm.tableColumnFreezeHead = this.sizeForm.tableColumnFreezeHead ?? DEFAULT_SIZE.tableColumnFreezeHead
|
||||
this.sizeForm.tableColumnFreezeTail = this.sizeForm.tableColumnFreezeTail ?? DEFAULT_SIZE.tableColumnFreezeTail
|
||||
|
||||
this.sizeForm.tablePageMode = this.sizeForm.tablePageMode ? this.sizeForm.tablePageMode : DEFAULT_SIZE.tablePageMode
|
||||
this.sizeForm.tablePageSize = this.sizeForm.tablePageSize ? this.sizeForm.tablePageSize : DEFAULT_SIZE.tablePageSize
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<el-form
|
||||
ref="sizeFormBar"
|
||||
:model="sizeForm"
|
||||
label-width="80px"
|
||||
label-width="84px"
|
||||
size="mini"
|
||||
>
|
||||
<!--bar-begin-->
|
||||
@ -295,6 +295,21 @@
|
||||
@change="changeBarSizeCase('tableColumnWidth')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showProperty('tableColumnFreeze')"
|
||||
:label="$t('chart.table_column_freeze')"
|
||||
class="form-item"
|
||||
>
|
||||
<span>{{ $t('dynamic_time.before') }} </span>
|
||||
<el-input-number
|
||||
v-model="sizeForm.tableColumnFreezeHead"
|
||||
:min="0"
|
||||
:max="100"
|
||||
:step-strictly="true"
|
||||
@change="changeBarSizeCase('tableColumnFreezeHead')"
|
||||
/>
|
||||
<span> {{ $t('chart.column') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="showProperty('showIndex')"
|
||||
:label="$t('chart.table_show_index')"
|
||||
@ -1680,6 +1695,8 @@ export default {
|
||||
this.sizeForm.tableItemAlign = this.sizeForm.tableItemAlign ? this.sizeForm.tableItemAlign : DEFAULT_SIZE.tableItemAlign
|
||||
this.sizeForm.tableRowTooltip = this.sizeForm.tableRowTooltip ?? DEFAULT_SIZE.tableRowTooltip
|
||||
this.sizeForm.tableColTooltip = this.sizeForm.tableColTooltip ?? DEFAULT_SIZE.tableColTooltip
|
||||
this.sizeForm.tableColumnFreezeHead = this.sizeForm.tableColumnFreezeHead ?? DEFAULT_SIZE.tableColumnFreezeHead
|
||||
this.sizeForm.tableColumnFreezeTail = this.sizeForm.tableColumnFreezeTail ?? DEFAULT_SIZE.tableColumnFreezeTail
|
||||
|
||||
this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex
|
||||
this.sizeForm.showTableHeader = this.sizeForm.showTableHeader !== false
|
||||
|
||||
@ -42,15 +42,18 @@
|
||||
type="index"
|
||||
:title="indexLabel"
|
||||
:width="columnWidth"
|
||||
:resizable="true"
|
||||
:fixed="getFixed(-1)"
|
||||
/>
|
||||
<ux-table-column
|
||||
v-for="field in fields"
|
||||
v-for="(field, index) in fields"
|
||||
:key="field.name"
|
||||
:field="field.child ? '' : field.dataeaseName"
|
||||
:resizable="true"
|
||||
:sortable="(!mergeCells || !mergeCells.length) && (!field.child || !field.child.length)"
|
||||
:title="field.name"
|
||||
:width="columnWidth"
|
||||
:fixed="getFixed(index)"
|
||||
>
|
||||
<ux-table-column
|
||||
v-for="item in field.child"
|
||||
@ -728,6 +731,14 @@ export default {
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
getFixed(index) {
|
||||
const size = JSON.parse(this.chart.customAttr).size
|
||||
const { showIndex, tableColumnFreezeHead } = size
|
||||
if (showIndex) {
|
||||
return index < tableColumnFreezeHead - 1 ? 'left' : ''
|
||||
}
|
||||
return index < tableColumnFreezeHead ? 'left' : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -687,12 +687,14 @@
|
||||
v-if="view.type === 'bar-group'
|
||||
|| view.type === 'bar-group-stack'
|
||||
|| (view.render === 'antv' && view.type === 'line')
|
||||
|| view.type === 'flow-map'"
|
||||
|| view.type === 'flow-map'
|
||||
|| view.type === 'bar-time-range'"
|
||||
class="padding-lr"
|
||||
>
|
||||
<span class="data-area-label">
|
||||
<span>
|
||||
<span v-if="view.type !=='flow-map'">{{ $t('chart.chart_group') }}</span>
|
||||
<span v-if="view.type === 'bar-time-range'">{{ $t('chart.chart_bar_time') }}</span>
|
||||
<span v-else-if="view.type !== 'flow-map'">{{ $t('chart.chart_group') }}</span>
|
||||
<span v-else-if="view.type === 'flow-map'">{{ $t('chart.end_point') }}</span>
|
||||
<span
|
||||
v-show="view.type !== 'line'"
|
||||
@ -708,7 +710,12 @@
|
||||
placement="bottom"
|
||||
>
|
||||
<div slot="content">
|
||||
{{ $t('chart.sub_dimension_tip') }}
|
||||
<template v-if="view.type === 'bar-time-range'">
|
||||
{{ $t('chart.time_bar_tip') }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ $t('chart.sub_dimension_tip') }}
|
||||
</template>
|
||||
</div>
|
||||
<i
|
||||
class="el-icon-info"
|
||||
@ -739,7 +746,7 @@
|
||||
:dimension-data="dimension"
|
||||
:quota-data="quota"
|
||||
:chart="chart"
|
||||
@onDimensionItemChange="dimensionItemChange"
|
||||
@onDimensionItemChange="dimensionExtItemChange"
|
||||
@onDimensionItemRemove="dimensionItemRemove"
|
||||
@editItemFilter="showDimensionEditFilter"
|
||||
@onNameEdit="showRename"
|
||||
@ -755,7 +762,7 @@
|
||||
</el-row>
|
||||
<!--yaxis-->
|
||||
<el-row
|
||||
v-if="!equalsAny(view.type , 'table-info', 'label', 'flow-map')"
|
||||
v-if="!equalsAny(view.type , 'table-info', 'label', 'flow-map', 'bar-time-range')"
|
||||
class="padding-lr"
|
||||
style="margin-top: 6px;"
|
||||
>
|
||||
@ -2122,7 +2129,7 @@ export default {
|
||||
return equalsAny(this.view.type, 'table-normal', 'table-info')
|
||||
},
|
||||
showAnalyseCfg() {
|
||||
if (this.view.type === 'bidirectional-bar') {
|
||||
if (this.view.type === 'bidirectional-bar' || this.view.type === 'bar-time-range') {
|
||||
return false
|
||||
}
|
||||
return includesAny(this.view.type, 'bar', 'line', 'area', 'gauge', 'liquid') ||
|
||||
@ -2502,7 +2509,7 @@ export default {
|
||||
}
|
||||
})
|
||||
if (equalsAny(view.type, 'table-pivot', 'bar-group', 'bar-group-stack', 'flow-map', 'race-bar') ||
|
||||
(view.render === 'antv' && (view.type === 'line' || view.type === 'scatter'))) {
|
||||
(view.render === 'antv' && (view.type === 'line' || view.type === 'scatter' || view.type === 'bar-time-range'))) {
|
||||
view.xaxisExt.forEach(function(ele) {
|
||||
if (!ele.dateStyle || ele.dateStyle === '') {
|
||||
ele.dateStyle = 'y_M_d'
|
||||
@ -2846,6 +2853,16 @@ export default {
|
||||
this.calcData(true)
|
||||
},
|
||||
|
||||
dimensionExtItemChange(item) {
|
||||
if (this.view.type === 'bar-time-range') {
|
||||
this.view.xaxisExt.forEach(ext => {
|
||||
ext.dateStyle = item.dateStyle
|
||||
ext.datePattern = item.datePattern
|
||||
})
|
||||
}
|
||||
this.calcData(true)
|
||||
},
|
||||
|
||||
dimensionItemRemove(item) {
|
||||
if (item.removeType === 'dimension') {
|
||||
this.view.xaxis.splice(item.index, 1)
|
||||
@ -3310,6 +3327,19 @@ export default {
|
||||
if (this.view.type !== 'table-info') {
|
||||
this.dragCheckType(this.view.xaxisExt, 'd')
|
||||
}
|
||||
if (this.view.type === 'bar-time-range') {
|
||||
// 针对时间条形图,需要限定类型为时间类型
|
||||
if (this.view.xaxisExt && this.view.xaxisExt.length > 0) {
|
||||
for (let i = this.view.xaxisExt.length - 1; i >= 0; i--) {
|
||||
if (this.view.xaxisExt[i].deType !== 1) {
|
||||
this.view.xaxisExt.splice(i, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.view.xaxisExt.length > 2) {
|
||||
this.view.xaxisExt = [this.view.xaxisExt[0], this.view.xaxisExt[1]]
|
||||
}
|
||||
}
|
||||
if ((this.view.type === 'map' || this.view.type === 'word-cloud' || this.view.type === 'scatter') && this.view.xaxisExt.length > 1) {
|
||||
this.view.xaxisExt = [this.view.xaxisExt[0]]
|
||||
}
|
||||
|
||||
@ -471,13 +471,13 @@ export default {
|
||||
return false
|
||||
},
|
||||
xAisTitle() {
|
||||
if (this.chart.type === 'bidirectional-bar') {
|
||||
if (this.chart.type === 'bidirectional-bar' || this.chart.type === 'bar-time-range') {
|
||||
return this.$t('chart.yAxis')
|
||||
}
|
||||
return this.$t('chart.xAxis')
|
||||
},
|
||||
yAxisTitle() {
|
||||
if (this.chart.type === 'bidirectional-bar') {
|
||||
if (this.chart.type === 'bidirectional-bar' || this.chart.type === 'bar-time-range') {
|
||||
return this.$t('chart.xAxis')
|
||||
}
|
||||
if (this.chart.type === 'chart-mix') {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dataease-mobile",
|
||||
"version": "1.18.13",
|
||||
"version": "1.18.14",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "npm run dev:h5",
|
||||
|
||||
@ -159,12 +159,17 @@
|
||||
const param = getUrlParams(url)
|
||||
if (param?.detoken) {
|
||||
if(param.detoken.endsWith('#/'))
|
||||
param.detoken = param.detoken.substr(0, param.detoken.length - 2)
|
||||
param.detoken = param.detoken.substr(0, param.detoken.length - 2)
|
||||
|
||||
const redirect = window.location.href.split('?')[0]
|
||||
setToken(param.detoken)
|
||||
getInfo().then(res => {
|
||||
setUserInfo(res.data)
|
||||
const redirect = window.location.href.split('?')[0]
|
||||
|
||||
window.location.href = redirect
|
||||
}).catch(() => {
|
||||
setToken(null)
|
||||
localStorage.removeItem('Authorization')
|
||||
window.cookieStore.delete('Authorization')
|
||||
window.location.href = redirect
|
||||
})
|
||||
return true
|
||||
|
||||
@ -56,8 +56,8 @@
|
||||
"vue-style-loader": "^4.1.2",
|
||||
"vue-template-compiler": "^2.5.2",
|
||||
"webpack": "^4.8.1",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-bundle-analyzer": "^3.3.2",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-dev-server": "^3.1.11",
|
||||
"webpack-merge": "^4.1.0"
|
||||
},
|
||||
|
||||
@ -122,6 +122,48 @@
|
||||
@change="changeXAxisStyle('splitLine')"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item
|
||||
:label="$t('chart.dash_show')"
|
||||
class="form-item"
|
||||
>
|
||||
<el-checkbox
|
||||
v-model="axisForm.splitLine.enableDash"
|
||||
@change="changeXAxisStyle('splitLine')"
|
||||
>{{ $t('chart.dash_show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<template v-if="axisForm.splitLine.enableDash">
|
||||
<el-form-item
|
||||
:label="$t('chart.dash_width')"
|
||||
class="form-item form-item-slider"
|
||||
>
|
||||
<el-slider
|
||||
v-model="axisForm.splitLine.dashStyle.width"
|
||||
:min="1"
|
||||
:max="10"
|
||||
show-input
|
||||
:show-input-controls="false"
|
||||
input-size="mini"
|
||||
@change="changeXAxisStyle('splitLine')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$t('chart.dash_offset')"
|
||||
class="form-item form-item-slider"
|
||||
>
|
||||
<el-slider
|
||||
v-model="axisForm.splitLine.dashStyle.offset"
|
||||
:min="1"
|
||||
:max="10"
|
||||
show-input
|
||||
:show-input-controls="false"
|
||||
input-size="mini"
|
||||
@change="changeXAxisStyle('splitLine')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
</span>
|
||||
<el-divider/>
|
||||
<el-form-item
|
||||
@ -325,6 +367,9 @@ export default {
|
||||
if (!this.axisForm.axisLine) {
|
||||
this.axisForm.axisLine = JSON.parse(JSON.stringify(DEFAULT_XAXIS_STYLE.axisLine))
|
||||
}
|
||||
if (!this.axisForm.splitLine.dashStyle) {
|
||||
this.axisForm.splitLine.dashStyle = JSON.parse(JSON.stringify(DEFAULT_XAXIS_STYLE.splitLine.dashStyle))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -549,6 +549,11 @@ export const DEFAULT_XAXIS_STYLE = {
|
||||
color: '#cccccc',
|
||||
width: 1,
|
||||
style: 'solid'
|
||||
},
|
||||
enableDash: false,
|
||||
dashStyle: {
|
||||
width: 4,
|
||||
offset: 5
|
||||
}
|
||||
},
|
||||
axisValue: {
|
||||
|
||||
@ -441,11 +441,16 @@ export default {
|
||||
},
|
||||
spacing: 8
|
||||
} : null
|
||||
const gridCfg = a.splitLine ? a.splitLine : DEFAULT_XAXIS_STYLE.splitLine
|
||||
if (!gridCfg.dashStyle) {
|
||||
gridCfg.dashStyle = DEFAULT_XAXIS_STYLE.splitLine.dashStyle
|
||||
}
|
||||
const grid = a.splitLine.show ? {
|
||||
line: {
|
||||
style: {
|
||||
stroke: a.splitLine.lineStyle.color,
|
||||
lineWidth: parseInt(a.splitLine.lineStyle.width)
|
||||
lineWidth: parseInt(a.splitLine.lineStyle.width),
|
||||
lineDash: gridCfg.enableDash ? [gridCfg.dashStyle.width, gridCfg.dashStyle.offset] : undefined
|
||||
}
|
||||
}
|
||||
} : null
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -9,7 +9,7 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<properties>
|
||||
<dataease.version>1.18.13</dataease.version>
|
||||
<dataease.version>1.18.14</dataease.version>
|
||||
</properties>
|
||||
|
||||
<name>dataease</name>
|
||||
|
||||
@ -32,4 +32,12 @@ public class XpackEmailTaskRequest extends XpackTaskCreateRequest {
|
||||
private String conditions;
|
||||
|
||||
private String viewDataRange = "view";
|
||||
|
||||
private String groups;
|
||||
|
||||
private Integer extWaitTime = 0;
|
||||
|
||||
private String roleList;
|
||||
|
||||
private String orgList;
|
||||
}
|
||||
|
||||
@ -12,5 +12,7 @@ public class XpackEmailViewRequest implements Serializable{
|
||||
private String content;
|
||||
|
||||
private String pixel;
|
||||
|
||||
private Integer extWaitTime = 0;
|
||||
|
||||
}
|
||||
|
||||
@ -35,4 +35,12 @@ public class XpackEmailTemplateDTO implements Serializable {
|
||||
|
||||
private Boolean status;
|
||||
|
||||
private String groups;
|
||||
|
||||
private Integer extWaitTime = 0;
|
||||
|
||||
private String roleList;
|
||||
|
||||
private String orgList;
|
||||
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ public abstract class EmailXpackService extends PluginMenuService {
|
||||
|
||||
public abstract GlobalTaskInstance instanceForm(Long instanceId);
|
||||
|
||||
public abstract byte[] print(String url, String token, XpackPixelEntity XpackPixelEntity) throws Exception;
|
||||
public abstract byte[] print(String url, String token, XpackPixelEntity XpackPixelEntity, Integer extWaitTime) throws Exception;
|
||||
|
||||
public abstract byte[] printPdf(String url, String token, XpackPixelEntity XpackPixelEntity, boolean showPageNo, boolean picture2pdf) throws Exception;
|
||||
|
||||
@ -48,7 +48,7 @@ public abstract class EmailXpackService extends PluginMenuService {
|
||||
|
||||
public abstract XpackEmailTemplateDTO emailTemplate(Long taskId);
|
||||
|
||||
public abstract byte[] printData(String url, String token, XpackPixelEntity XpackPixelEntity) throws Exception;
|
||||
public abstract byte[] printData(String url, String token, XpackPixelEntity XpackPixelEntity, Integer extWaitTime) throws Exception;
|
||||
|
||||
public abstract void batchDel(List<Long> taskIds);
|
||||
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
package io.dataease.plugins.xpack.lark.dto.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LarkGroupData implements Serializable {
|
||||
|
||||
private boolean has_more;
|
||||
|
||||
private String page_token;
|
||||
|
||||
private List<LarkGroupItem> items;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package io.dataease.plugins.xpack.lark.dto.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class LarkGroupHttpResult extends LarkBaseResult implements Serializable {
|
||||
|
||||
private LarkGroupData data;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package io.dataease.plugins.xpack.lark.dto.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class LarkGroupItem implements Serializable {
|
||||
|
||||
private String chat_id;
|
||||
|
||||
private String name;
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package io.dataease.plugins.xpack.lark.dto.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LarkGroupResult implements Serializable {
|
||||
|
||||
private boolean valid;
|
||||
|
||||
private List<LarkGroupItem> groupList;
|
||||
}
|
||||
@ -2,13 +2,13 @@ package io.dataease.plugins.xpack.lark.service;
|
||||
|
||||
import io.dataease.plugins.common.service.PluginComponentService;
|
||||
import io.dataease.plugins.xpack.display.dto.response.SysSettingDto;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkGroupResult;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkMsgResult;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkQrResult;
|
||||
import io.dataease.plugins.xpack.lark.dto.entity.LarkUserInfo;
|
||||
import io.dataease.plugins.xpack.lark.dto.response.LarkAppUserResult;
|
||||
import io.dataease.plugins.xpack.lark.dto.response.LarkInfo;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
@ -33,4 +33,8 @@ public abstract class LarkXpackService extends PluginComponentService {
|
||||
public abstract LarkMsgResult pushMsg(List<String> userIds, String message);
|
||||
|
||||
public abstract LarkMsgResult pushOaMsg(List<String> userIds, String title, String content, byte[] bytes, List<File> files);
|
||||
|
||||
public abstract List<LarkMsgResult> pushChatOaMsg(List<String> groupList, String title, String content, byte[] bytes, List<File> files);
|
||||
|
||||
public abstract LarkGroupResult getGroup();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user