forked from github/dataease
Merge branch 'dev' of github.com:dataease/dataease into dev
This commit is contained in:
commit
a9f5e1a6a5
@ -53,7 +53,7 @@ public class ShiroServiceImpl implements ShiroService {
|
||||
filterChainDefinitionMap.put("/linkJump/queryPanelJumpInfo/**", ANON);
|
||||
|
||||
//未读消息数量
|
||||
filterChainDefinitionMap.put("/api/sys_msg/unReadCount", ANON);
|
||||
// filterChainDefinitionMap.put("/api/sys_msg/unReadCount/**", ANON);
|
||||
|
||||
filterChainDefinitionMap.put("/**/*.json", ANON);
|
||||
filterChainDefinitionMap.put("/system/ui/**", ANON);
|
||||
|
@ -2,10 +2,12 @@ package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("消息渠道")
|
||||
public class SysMsgChannel implements Serializable {
|
||||
|
||||
@ApiModelProperty("消息渠道ID")
|
||||
|
@ -2,10 +2,12 @@ package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("订阅信息")
|
||||
public class SysMsgSetting implements Serializable {
|
||||
@ApiModelProperty(hidden = true)
|
||||
private Long msgSettingId;
|
||||
|
@ -2,10 +2,12 @@ package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@ApiModel("消息类型")
|
||||
public class SysMsgType implements Serializable {
|
||||
|
||||
@ApiModelProperty("消息类型ID")
|
||||
@ -17,10 +19,10 @@ public class SysMsgType implements Serializable {
|
||||
@ApiModelProperty("消息类型名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
@ApiModelProperty("回调路由")
|
||||
private String router;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
@ApiModelProperty("回调函数")
|
||||
private String callback;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -1,44 +1,64 @@
|
||||
package io.dataease.base.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SysUser implements Serializable {
|
||||
@ApiModelProperty("ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty("组织ID")
|
||||
private Long deptId;
|
||||
|
||||
@ApiModelProperty("账号")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String nickName;
|
||||
|
||||
@ApiModelProperty("性别")
|
||||
private String gender;
|
||||
|
||||
@ApiModelProperty("电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("是否管理员")
|
||||
private Boolean isAdmin;
|
||||
|
||||
@ApiModelProperty("状态")
|
||||
private Long enabled;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty("修改人")
|
||||
private String updateBy;
|
||||
|
||||
@ApiModelProperty("密码重置时间")
|
||||
private Long pwdResetTime;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@ApiModelProperty("修改时间")
|
||||
private Long updateTime;
|
||||
|
||||
@ApiModelProperty("语言")
|
||||
private String language;
|
||||
|
||||
@ApiModelProperty("用户来源")
|
||||
private Integer from;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
private String sub;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -94,6 +94,7 @@
|
||||
`custom_attr`,
|
||||
`custom_style`,
|
||||
`custom_filter`,
|
||||
`drill_fields`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
@ -117,6 +118,7 @@
|
||||
`custom_attr`,
|
||||
`custom_style`,
|
||||
`custom_filter`,
|
||||
`drill_fields`,
|
||||
`create_by`,
|
||||
`create_time`,
|
||||
`update_time`,
|
||||
|
@ -43,8 +43,8 @@ public class IndexController {
|
||||
return "doc.html";
|
||||
default:
|
||||
// DataEaseException.throwException("Invalid License.");
|
||||
return "nolic.html";
|
||||
// return "doc.html";
|
||||
/* return "nolic.html"; */
|
||||
return "doc.html";
|
||||
}
|
||||
// return "index.html";
|
||||
}
|
||||
|
@ -0,0 +1,15 @@
|
||||
package io.dataease.controller.response;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
|
||||
@ApiModel("已同步用户")
|
||||
public class ExistLdapUser {
|
||||
|
||||
@ApiModelProperty("账号")
|
||||
private String username;
|
||||
|
||||
}
|
@ -23,6 +23,8 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
|
||||
@Api(tags = "系统:消息管理")
|
||||
@ApiSupport(order = 230)
|
||||
@ -35,6 +37,11 @@ public class MsgController {
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@PostMapping("/list/{goPage}/{pageSize}")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(paramType="path", name = "goPage", value = "页码", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(paramType="path", name = "pageSize", value = "页容量", required = true, dataType = "Integer"),
|
||||
@ApiImplicitParam(name = "msgRequest", value = "查询条件", required = true)
|
||||
})
|
||||
public Pager<List<MsgGridDto>> messages(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody MsgRequest msgRequest) {
|
||||
Long userId = AuthUtils.getUser().getUserId();
|
||||
List<Long> typeIds = null;
|
||||
@ -50,16 +57,18 @@ public class MsgController {
|
||||
|
||||
@ApiOperation("查询未读数量")
|
||||
@PostMapping("/unReadCount")
|
||||
public Long unReadCount(@RequestBody Map<String, Long> request) {
|
||||
if(null == request || null == request.get("userId")) {
|
||||
public Long unReadCount() {;
|
||||
Long userId = null;
|
||||
if(null == AuthUtils.getUser() || (userId = AuthUtils.getUser().getUserId()) == null) {
|
||||
throw new RuntimeException("缺少用户ID");
|
||||
}
|
||||
Long userId = request.get("userId");
|
||||
// Long userId = request.get("userId");
|
||||
return sysMsgService.queryCount(userId);
|
||||
}
|
||||
|
||||
@ApiOperation("设置已读")
|
||||
@PostMapping("/setReaded/{msgId}")
|
||||
@ApiImplicitParam(paramType="path", name = "msgId", value = "消息ID", required = true, dataType = "Long")
|
||||
public void setReaded(@PathVariable Long msgId) {
|
||||
sysMsgService.setReaded(msgId);
|
||||
}
|
||||
@ -67,6 +76,7 @@ public class MsgController {
|
||||
|
||||
@ApiOperation("批量设置已读")
|
||||
@PostMapping("/batchRead")
|
||||
@ApiImplicitParam(name = "msgIds", value = "消息ID集合", required = true, dataType = "List")
|
||||
public void batchRead(@RequestBody List<Long> msgIds) {
|
||||
sysMsgService.setBatchReaded(msgIds);
|
||||
}
|
||||
@ -79,6 +89,7 @@ public class MsgController {
|
||||
|
||||
@ApiOperation("批量删除")
|
||||
@PostMapping("/batchDelete")
|
||||
@ApiImplicitParam(name = "msgIds", value = "消息ID集合", required = true, dataType = "List")
|
||||
public void batchDelete(@RequestBody List<Long> msgIds) {
|
||||
sysMsgService.batchDelete(msgIds);
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import io.dataease.base.domain.SysRole;
|
||||
import io.dataease.commons.utils.AuthUtils;
|
||||
import io.dataease.commons.utils.PageUtils;
|
||||
import io.dataease.commons.utils.Pager;
|
||||
import io.dataease.controller.response.ExistLdapUser;
|
||||
import io.dataease.controller.sys.base.BaseGridRequest;
|
||||
import io.dataease.controller.sys.request.SysUserCreateRequest;
|
||||
import io.dataease.controller.sys.request.SysUserPwdRequest;
|
||||
@ -18,13 +19,17 @@ import io.dataease.controller.sys.response.SysUserGridResponse;
|
||||
import io.dataease.service.sys.SysRoleService;
|
||||
import io.dataease.service.sys.SysUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "系统:用户管理")
|
||||
@ -40,6 +45,11 @@ public class SysUserController {
|
||||
|
||||
@ApiOperation("查询用户")
|
||||
@PostMapping("/userGrid/{goPage}/{pageSize}")
|
||||
@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>> userGrid(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody BaseGridRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
return PageUtils.setPageInfo(page, sysUserService.query(request));
|
||||
@ -63,6 +73,7 @@ public class SysUserController {
|
||||
|
||||
@ApiOperation("删除用户")
|
||||
@PostMapping("/delete/{userId}")
|
||||
@ApiImplicitParam(paramType = "path", value = "用户ID", name = "userId", required = true, dataType = "Integer")
|
||||
public void delete(@PathVariable("userId") Long userId){
|
||||
sysUserService.delete(userId);
|
||||
}
|
||||
@ -103,6 +114,7 @@ public class SysUserController {
|
||||
|
||||
@ApiOperation("设置语言")
|
||||
@PostMapping("/setLanguage/{language}")
|
||||
@ApiImplicitParam(paramType="path", name = "language", value = "语言(zh_CN, zh_TW, en_US)", required = true, dataType = "String")
|
||||
public void setLanguage(@PathVariable String language) {
|
||||
CurrentUserDto user = AuthUtils.getUser();
|
||||
Optional.ofNullable(language).ifPresent(currentLanguage -> {
|
||||
@ -122,6 +134,11 @@ public class SysUserController {
|
||||
|
||||
@ApiOperation("查询角色")
|
||||
@PostMapping("/roleGrid/{goPage}/{pageSize}")
|
||||
@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<SysRole>> roleGrid(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody BaseGridRequest request) {
|
||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||
Pager<List<SysRole>> listPager = PageUtils.setPageInfo(page, sysRoleService.query(request));
|
||||
@ -137,8 +154,13 @@ public class SysUserController {
|
||||
|
||||
@ApiOperation("已同步用户")
|
||||
@PostMapping("/existLdapUsers")
|
||||
public List<String> getExistLdapUsers() {
|
||||
return sysUserService.ldapUserNames();
|
||||
public List<ExistLdapUser> getExistLdapUsers() {
|
||||
List<String> userNames = sysUserService.ldapUserNames();
|
||||
return userNames.stream().map(name -> {
|
||||
ExistLdapUser ldapUser = new ExistLdapUser();
|
||||
ldapUser.setUsername(name);
|
||||
return ldapUser;
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.dataease.controller.sys.base;
|
||||
|
||||
import io.dataease.base.mapper.ext.query.GridExample;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
|
||||
@ -8,9 +9,11 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
@ApiModel("查询条件")
|
||||
public class BaseGridRequest implements Serializable {
|
||||
|
||||
@ApiModelProperty("查询条件")
|
||||
@ApiModelProperty("条件集合")
|
||||
private List<ConditionEntity> conditions;
|
||||
|
||||
public List<ConditionEntity> getConditions() {
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.dataease.controller.sys.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -7,6 +8,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("消息条件")
|
||||
public class MsgRequest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1920091635946508658L;
|
||||
|
@ -1,12 +1,14 @@
|
||||
package io.dataease.controller.sys.request;
|
||||
|
||||
import io.dataease.base.domain.SysUser;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("用户信息")
|
||||
public class SysUserCreateRequest extends SysUser {
|
||||
|
||||
@ApiModelProperty(value = "角色ID集合", required = true, position = 7)
|
||||
|
@ -1,12 +1,14 @@
|
||||
package io.dataease.controller.sys.request;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("更新密码参数")
|
||||
public class SysUserPwdRequest implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "用户ID", required = true)
|
||||
|
@ -1,16 +1,18 @@
|
||||
package io.dataease.controller.sys.request;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("更新状态参数")
|
||||
public class SysUserStateRequest implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "用户ID", required = true)
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "状态", required = true, allowableValues = "1,0")
|
||||
@ApiModelProperty(value = "状态{1:可用, 0:禁用}", required = true, allowableValues = "1,0")
|
||||
private Long enabled;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.dataease.controller.sys.response;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@ -8,6 +9,7 @@ import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@ApiModel("消息类型节点")
|
||||
public class SettingTreeNode implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -2416283978185545199L;
|
||||
|
@ -158,32 +158,6 @@ INSERT INTO `sys_theme_item` VALUES (2, 'customSiderTextColor', '#ACBAC3');
|
||||
INSERT INTO `sys_theme_item` VALUES (2, 'customTableBG', '#21333B');
|
||||
INSERT INTO `sys_theme_item` VALUES (2, 'customTableColor', '#ACBAC3');
|
||||
INSERT INTO `sys_theme_item` VALUES (2, 'customTableBorderColor', '#495865');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'primary', '#409EFF');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deSuccess', '#67C23A');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deWarning', '#E6A23C');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deDanger', '#F56C6C');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deInfo', '#909399');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deTextPrimary', '#303133');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deTextRegular', '#606266');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deTextSecondary', '#909399');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deTextPlaceholder', '#C0C4CC');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deBorderBase', '#DCDFE6');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deBorderLight', '#E4E7ED');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deBorderLighter', '#EBEEF5');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deBorderExtraLight', '#F2F6FC');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deWhite', '#FFFFFF');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deBlack', '#000000');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'deBackgroundBase', '#F5F7FA');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'shade-1', 'rgb(58, 142, 230)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-1', 'rgb(83, 168, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-2', 'rgb(102, 177, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-3', 'rgb(121, 187, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-4', 'rgb(140, 197, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-5', 'rgb(160, 207, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-6', 'rgb(179, 216, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-7', 'rgb(198, 226, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-8', 'rgb(217, 236, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (7, 'light-9', 'rgb(236, 245, 255)');
|
||||
INSERT INTO `sys_theme_item` VALUES (1, 'primary', '#409EFF');
|
||||
INSERT INTO `sys_theme_item` VALUES (1, 'deSuccess', '#67C23A');
|
||||
INSERT INTO `sys_theme_item` VALUES (1, 'deWarning', '#E6A23C');
|
||||
|
@ -9,12 +9,12 @@ export function query(pageIndex, pageSize, data) {
|
||||
})
|
||||
}
|
||||
|
||||
export function unReadCount(data) {
|
||||
export function unReadCount() {
|
||||
return request({
|
||||
url: '/api/sys_msg/unReadCount',
|
||||
method: 'post',
|
||||
loading: false,
|
||||
data
|
||||
loading: false
|
||||
// data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -187,10 +187,10 @@ export default {
|
||||
}.bind(this)
|
||||
})
|
||||
}
|
||||
const param = {
|
||||
/* const param = {
|
||||
userId: this.user.userId
|
||||
}
|
||||
unReadCount(param).then(res => {
|
||||
} */
|
||||
unReadCount().then(res => {
|
||||
this.count = res.data
|
||||
})
|
||||
},
|
||||
|
@ -114,7 +114,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState([
|
||||
'curComponent'
|
||||
'curComponent',
|
||||
'curCanvasScale'
|
||||
])
|
||||
},
|
||||
created() {
|
||||
@ -135,10 +136,13 @@ export default {
|
||||
modelChange(val) {
|
||||
if (val === '0') {
|
||||
this.curComponent.style.height = 100
|
||||
this.curComponent.sizey = Math.round(this.curComponent.style.height / this.curCanvasScale.matrixStyleOriginHeight)
|
||||
} else if (val === '1') {
|
||||
this.curComponent.style.height = 150
|
||||
this.curComponent.sizey = Math.round(this.curComponent.style.height / this.curCanvasScale.matrixStyleOriginHeight)
|
||||
} else {
|
||||
this.curComponent.style.height = 300
|
||||
this.curComponent.sizey = Math.round(this.curComponent.style.height / this.curCanvasScale.matrixStyleOriginHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -339,14 +339,20 @@ export default {
|
||||
},
|
||||
|
||||
jumpClick(param) {
|
||||
const dimension = param.dimensionList[0]
|
||||
|
||||
param.sourcePanelId = this.panelInfo.id
|
||||
param.sourceViewId = param.viewId
|
||||
param.sourceFieldId = dimension.id
|
||||
const sourceInfo = param.viewId + '#' + dimension.id
|
||||
const jumpInfo = this.nowPanelJumpInfo[sourceInfo]
|
||||
let dimension, jumpInfo, sourceInfo
|
||||
// 倒序取最后一个能匹配的
|
||||
for (let i = param.dimensionList.length - 1; i >= 0; i--) {
|
||||
dimension = param.dimensionList[i]
|
||||
sourceInfo = param.viewId + '#' + dimension.id
|
||||
jumpInfo = this.nowPanelJumpInfo[sourceInfo]
|
||||
if (jumpInfo) {
|
||||
break
|
||||
}
|
||||
}
|
||||
if (jumpInfo) {
|
||||
param.sourcePanelId = this.panelInfo.id
|
||||
param.sourceViewId = param.viewId
|
||||
param.sourceFieldId = dimension.id
|
||||
// 内部仪表板跳转
|
||||
if (jumpInfo.linkType === 'inner') {
|
||||
if (jumpInfo.targetPanelId) {
|
||||
|
@ -58,6 +58,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!style.background) {
|
||||
style.background = '#FFFFFF'
|
||||
}
|
||||
return style
|
||||
},
|
||||
...mapState([
|
||||
|
1
frontend/src/icons/svg/word-cloud.svg
Normal file
1
frontend/src/icons/svg/word-cloud.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg t="1635820237435" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="861" width="200" height="200"><path d="M881.371429 610.377143H785.066667v295.033905h101.814857c36.59581 2.779429 72.679619-10.410667 100.205714-36.571429 25.35619-30.841905 37.64419-71.68 33.913905-112.713143 2.82819-40.350476-11.142095-79.969524-38.107429-108.129524-26.965333-28.16-64.146286-41.935238-101.473524-37.619809z m-29.013334 66.072381h26.819048c48.201143 0 70.631619 26.575238 71.728762 80.847238 1.097143 54.296381-21.894095 84.382476-71.168 84.382476h-27.355429v-165.229714z m-437.930666-266.727619L191.073524 1019.928381h120.441905l54.735238-154.624h218.965333l54.759619 154.624h122.075429L533.211429 409.746286h-118.784z m59.123809 138.678857v11.215238s8.777143 23.015619 72.801524 201.825524h-147.260952c59.684571-167.594667 71.192381-198.875429 73.362285-203.580953l1.097143-9.459809zM199.826286 619.812571c-109.470476-6.485333-168.594286-74.361905-174.616381-201.825523 4.388571-133.948952 63.488-200.630857 174.08-208.286477 71.119238-2.608762 135.070476 46.470095 156.013714 119.783619l5.461333 17.115429-82.115047 23.015619-4.388572-15.36c-7.558095-37.64419-38.692571-64.316952-74.435047-63.707428-34.474667 0-83.21219 18.870857-88.673524 126.268952 3.82781 106.22781 54.735238 122.733714 89.234286 126.293333 43.008 0.975238 78.726095-35.669333 79.920762-82.041905l3.291428-17.700571 81.017905 25.356191-3.291429 14.774857c-11.337143 85.26019-83.090286 145.700571-162.596571 136.899047l1.097143-0.585143z m783.384381-240.152381c-2.876952-52.49219-34.54781-98.011429-80.457143-115.687619 37.571048-22.162286 60.269714-65.365333 58.563047-111.518476-4.388571-56.07619-36.132571-123.928381-164.230095-128.048762H597.820952v505.124572h214.064762c141.775238 0 171.324952-81.432381 171.324953-149.894095z m-103.472762-4.729904c0 31.865905-8.752762 69.022476-78.823619 69.022476h-106.203429v-128.633905h101.814857c71.728762 1.77981 82.115048 35.401143 83.772953 59.611429h-0.560762z m-91.428572-149.894096h-93.598476V112.90819h93.622857c65.145905 0 73.874286 30.110476 74.435048 51.931429 0.560762 21.845333-9.849905 60.196571-74.435048 60.196571z" p-id="862"></path></svg>
|
After Width: | Height: | Size: 2.2 KiB |
@ -423,7 +423,14 @@ export default {
|
||||
theme: {
|
||||
change: 'Change Theme',
|
||||
documentation: 'Theme documentation',
|
||||
tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.'
|
||||
tips: 'Tips: It is different from the theme-pick on the navbar is two different skinning methods, each with different application scenarios. Refer to the documentation for details.',
|
||||
base: 'Base color',
|
||||
font: 'Font color',
|
||||
border: 'Border color',
|
||||
background: 'Background color',
|
||||
custom: 'Custom color',
|
||||
otherSave: 'Theme Save as',
|
||||
info: 'Theme info'
|
||||
},
|
||||
tagsView: {
|
||||
refresh: 'Refresh',
|
||||
@ -946,7 +953,10 @@ export default {
|
||||
table_page_size: 'Page Size',
|
||||
table_page_size_unit: 'Item/Page',
|
||||
result_count: 'Result',
|
||||
result_mode_all: 'ALL'
|
||||
result_mode_all: 'ALL',
|
||||
chart_word_cloud: 'Word Cloud',
|
||||
drag_block_word_cloud_label: 'Word Label',
|
||||
drag_block_word_cloud_size: 'Word Size'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
|
||||
|
@ -423,7 +423,14 @@ export default {
|
||||
theme: {
|
||||
change: '換膚',
|
||||
documentation: '換膚文檔',
|
||||
tips: 'Tips: 它區別于 navbar 上的 theme-pick, 是兩種不同的換膚方法,各自有不同的應用場景,具體請參考文檔。'
|
||||
tips: 'Tips: 它區別于 navbar 上的 theme-pick, 是兩種不同的換膚方法,各自有不同的應用場景,具體請參考文檔。',
|
||||
base: '基礎配色',
|
||||
font: '字體顏色',
|
||||
border: '邊框顏色',
|
||||
background: '背景顏色',
|
||||
custom: '自定義顏色',
|
||||
otherSave: '主題另存為',
|
||||
info: '主題信息'
|
||||
},
|
||||
tagsView: {
|
||||
refresh: '刷新',
|
||||
@ -947,7 +954,10 @@ export default {
|
||||
table_page_size: '分頁',
|
||||
table_page_size_unit: '條/頁',
|
||||
result_count: '結果展示',
|
||||
result_mode_all: '全部'
|
||||
result_mode_all: '全部',
|
||||
chart_word_cloud: '詞雲',
|
||||
drag_block_word_cloud_label: '詞標簽',
|
||||
drag_block_word_cloud_size: '詞大小'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多個 Sheet 頁,默認抽取第一個',
|
||||
|
@ -425,7 +425,14 @@ export default {
|
||||
theme: {
|
||||
change: '换肤',
|
||||
documentation: '换肤文档',
|
||||
tips: 'Tips: 它区别于 navbar 上的 theme-pick, 是两种不同的换肤方法,各自有不同的应用场景,具体请参考文档。'
|
||||
tips: 'Tips: 它区别于 navbar 上的 theme-pick, 是两种不同的换肤方法,各自有不同的应用场景,具体请参考文档。',
|
||||
base: '基础配色',
|
||||
font: '字体颜色',
|
||||
border: '边框颜色',
|
||||
background: '背景颜色',
|
||||
custom: '自定义颜色',
|
||||
otherSave: '主题另存为',
|
||||
info: '主题信息'
|
||||
},
|
||||
tagsView: {
|
||||
refresh: '刷新',
|
||||
@ -950,7 +957,10 @@ export default {
|
||||
table_page_size: '分页',
|
||||
table_page_size_unit: '条/页',
|
||||
result_count: '结果展示',
|
||||
result_mode_all: '全部'
|
||||
result_mode_all: '全部',
|
||||
chart_word_cloud: '词云',
|
||||
drag_block_word_cloud_label: '词标签',
|
||||
drag_block_word_cloud_size: '词大小'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多个 Sheet 页,默认抽取第一个',
|
||||
|
@ -864,6 +864,6 @@ export const COLOR_PANEL = [
|
||||
'#1e90ff',
|
||||
'#c71585',
|
||||
'#999999',
|
||||
'#ffffff',
|
||||
'#00008b',
|
||||
'#000000'
|
||||
]
|
||||
|
@ -51,7 +51,7 @@ export function componentStyle(chart_option, chart) {
|
||||
chart_option.legend.orient = customStyle.legend.orient
|
||||
chart_option.legend.icon = customStyle.legend.icon
|
||||
chart_option.legend.textStyle = customStyle.legend.textStyle
|
||||
if (chart.type === 'treemap') {
|
||||
if (chart.type === 'treemap' || chart.type === 'gauge') {
|
||||
chart_option.legend.show = false
|
||||
}
|
||||
}
|
||||
|
@ -103,5 +103,8 @@ export function baseWaterfallOptionAntV(plot, container, chart, action) {
|
||||
}
|
||||
plot = new Waterfall(container, options)
|
||||
|
||||
plot.off('interval:click')
|
||||
plot.on('interval:click', action)
|
||||
|
||||
return plot
|
||||
}
|
||||
|
62
frontend/src/views/chart/chart/wordCloud/word_cloud.js
Normal file
62
frontend/src/views/chart/chart/wordCloud/word_cloud.js
Normal file
@ -0,0 +1,62 @@
|
||||
import {
|
||||
getPadding,
|
||||
getTheme,
|
||||
getTooltip
|
||||
} from '@/views/chart/chart/common/common_antv'
|
||||
import { WordCloud } from '@antv/g2plot'
|
||||
|
||||
export function baseWordCloudOptionAntV(plot, container, chart, action) {
|
||||
// theme
|
||||
const theme = getTheme(chart)
|
||||
// attr
|
||||
const tooltip = getTooltip(chart)
|
||||
// data
|
||||
const data = chart.data.datas
|
||||
// options
|
||||
const options = {
|
||||
theme: theme,
|
||||
data: data,
|
||||
wordField: 'field',
|
||||
weightField: 'value',
|
||||
colorField: 'field',
|
||||
wordStyle: {
|
||||
fontFamily: 'Verdana',
|
||||
fontSize: [8, 32],
|
||||
rotation: [0, 0],
|
||||
padding: 6
|
||||
},
|
||||
random: () => 0.5,
|
||||
appendPadding: getPadding(chart),
|
||||
tooltip: tooltip,
|
||||
legend: false,
|
||||
interactions: [
|
||||
{
|
||||
type: 'element-active', cfg: {
|
||||
start: [{ trigger: 'element:mouseenter', action: ['element-highlight:highlight', 'element-active:reset', 'cursor:pointer'] }],
|
||||
end: [{ trigger: 'element:mouseleave', action: ['element-highlight:reset', 'element-active:reset', 'cursor:default'] }]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
// 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
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// 开始渲染
|
||||
if (plot) {
|
||||
plot.destroy()
|
||||
}
|
||||
plot = new WordCloud(container, options)
|
||||
|
||||
return plot
|
||||
}
|
@ -23,6 +23,7 @@ import { baseFunnelOptionAntV } from '@/views/chart/chart/funnel/funnel_antv'
|
||||
import { baseTreemapOptionAntV } from '@/views/chart/chart/treemap/treemap_antv'
|
||||
import { baseRadarOptionAntV } from '@/views/chart/chart/radar/radar_antv'
|
||||
import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall'
|
||||
import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud'
|
||||
|
||||
export default {
|
||||
name: 'ChartComponentG2',
|
||||
@ -161,6 +162,8 @@ export default {
|
||||
this.myChart = baseLiquid(this.myChart, this.chartId, chart)
|
||||
} else if (chart.type === 'waterfall') {
|
||||
this.myChart = baseWaterfallOptionAntV(this.myChart, this.chartId, chart, this.antVAction)
|
||||
} else if (chart.type === 'word-cloud') {
|
||||
this.myChart = baseWordCloudOptionAntV(this.myChart, this.chartId, chart, this.antVAction)
|
||||
} else {
|
||||
if (this.myChart) {
|
||||
this.antVRenderStatus = false
|
||||
|
@ -176,6 +176,7 @@
|
||||
<span v-else-if="view.type && view.type.includes('radar')">{{ $t('chart.drag_block_radar_label') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'map'">{{ $t('chart.area') }}</span>
|
||||
<span v-else-if="view.type && view.type.includes('treemap')">{{ $t('chart.drag_block_treemap_label') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{ $t('chart.drag_block_word_cloud_label') }}</span>
|
||||
/
|
||||
<span v-if="view.type && view.type !== 'table-info'">{{ $t('chart.dimension') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'table-info'">{{ $t('chart.dimension_or_quota') }}</span>
|
||||
@ -211,6 +212,7 @@
|
||||
<span v-else-if="view.type && view.type.includes('tree')">{{ $t('chart.drag_block_treemap_size') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'chart-mix'">{{ $t('chart.drag_block_value_axis_main') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'liquid'">{{ $t('chart.drag_block_progress') }}</span>
|
||||
<span v-else-if="view.type && view.type === 'word-cloud'">{{ $t('chart.drag_block_word_cloud_size') }}</span>
|
||||
/
|
||||
<span>{{ $t('chart.quota') }}</span>
|
||||
</span>
|
||||
@ -334,7 +336,7 @@
|
||||
<span class="drag-placeholder-style-span">{{ $t('chart.placeholder_field') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row v-if="view.type && !view.type.includes('table') && !view.type.includes('text') && !view.type.includes('gauge') && view.type !== 'liquid' && view.type !== 'waterfall'" class="padding-lr" style="margin-top: 6px;">
|
||||
<el-row v-if="view.type && !view.type.includes('table') && !view.type.includes('text') && !view.type.includes('gauge') && view.type !== 'liquid' && view.type !== 'word-cloud'" class="padding-lr" style="margin-top: 6px;">
|
||||
<span style="width: 80px;text-align: right;">
|
||||
<span>{{ $t('chart.drill') }}</span>
|
||||
/
|
||||
@ -381,11 +383,11 @@
|
||||
<el-collapse-item name="color" :title="$t('chart.color')">
|
||||
<color-selector :param="param" class="attr-selector" :chart="chart" @onColorChange="onColorChange" />
|
||||
</el-collapse-item>
|
||||
<el-collapse-item v-show="chart.type !== 'map' && chart.type !== 'waterfall'" name="size" :title="$t('chart.size')">
|
||||
<el-collapse-item v-show="chart.type !== 'map' && chart.type !== 'waterfall' && chart.type !== 'word-cloud'" name="size" :title="$t('chart.size')">
|
||||
<size-selector v-if="view.render && view.render === 'echarts'" :param="param" class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
|
||||
<size-selector-ant-v v-else-if="view.render && view.render === 'antv'" :param="param" class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
|
||||
</el-collapse-item>
|
||||
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="label" :title="$t('chart.label')">
|
||||
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text') && view.type !== 'word-cloud'" name="label" :title="$t('chart.label')">
|
||||
<label-selector v-if="view.render && view.render === 'echarts'" :param="param" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
|
||||
<label-selector-ant-v v-else-if="view.render && view.render === 'antv'" :param="param" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
|
||||
</el-collapse-item>
|
||||
@ -418,7 +420,7 @@
|
||||
<title-selector v-if="view.render && view.render === 'echarts'" :param="param" class="attr-selector" :chart="chart" @onTextChange="onTextChange" />
|
||||
<title-selector-ant-v v-else-if="view.render && view.render === 'antv'" :param="param" class="attr-selector" :chart="chart" @onTextChange="onTextChange" />
|
||||
</el-collapse-item>
|
||||
<el-collapse-item v-show="view.type && view.type !== 'map' && !view.type.includes('table') && !view.type.includes('text') && (chart.type !== 'treemap' || chart.render === 'antv') && view.type !== 'liquid' && view.type !== 'waterfall'" name="legend" :title="$t('chart.legend')">
|
||||
<el-collapse-item v-show="view.type && view.type !== 'map' && !view.type.includes('table') && !view.type.includes('text') && (chart.type !== 'treemap' || chart.render === 'antv') && view.type !== 'liquid' && view.type !== 'waterfall' && chart.type !== 'gauge' && chart.type !== 'word-cloud'" name="legend" :title="$t('chart.legend')">
|
||||
<legend-selector v-if="view.render && view.render === 'echarts'" :param="param" class="attr-selector" :chart="chart" @onLegendChange="onLegendChange" />
|
||||
<legend-selector-ant-v v-else-if="view.render && view.render === 'antv'" :param="param" class="attr-selector" :chart="chart" @onLegendChange="onLegendChange" />
|
||||
</el-collapse-item>
|
||||
|
@ -103,13 +103,17 @@
|
||||
<svg-icon icon-class="treemap" class="chart-icon" />
|
||||
</span>
|
||||
</el-radio>
|
||||
<el-radio value="word-cloud" label="word-cloud">
|
||||
<span :title="$t('chart.chart_word_cloud')">
|
||||
<svg-icon icon-class="word-cloud" class="chart-icon" />
|
||||
</span>
|
||||
</el-radio>
|
||||
<el-radio value="liquid" label="liquid">
|
||||
<span :title="$t('chart.chart_liquid')">
|
||||
<svg-icon icon-class="liquid" class="chart-icon" />
|
||||
</span>
|
||||
</el-radio>
|
||||
<el-radio value="" label="" disabled class="disabled-none-cursor"><svg-icon icon-class="" class="chart-icon" /></el-radio>
|
||||
<el-radio value="" label="" disabled class="disabled-none-cursor"><svg-icon icon-class="" class="chart-icon" /></el-radio>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="chart.render && chart.render === 'echarts'">
|
||||
|
@ -120,6 +120,10 @@ export default {
|
||||
this.form.uri = uri ? (this.origin + uri) : uri
|
||||
// 返回的密码是共钥加密后的 所以展示需要私钥解密一波
|
||||
pwd && (this.form.pwd = pwd)
|
||||
|
||||
if (pwd && pwd.length > 0 && pwd.length > this.pwdNums) {
|
||||
this.resetPwd()
|
||||
}
|
||||
/* pwd && (this.form.pwd = decrypt(pwd)) */
|
||||
/* overTime && (this.form.overTime = overTime) */
|
||||
overTime && (this.$set(this.form, 'overTime', overTime))
|
||||
|
@ -238,7 +238,7 @@ export default {
|
||||
ldapUsers().then(res => {
|
||||
if (res && res.data) {
|
||||
this.users = res.data.map(item => {
|
||||
if (this.exitsUsers.some(existUser => existUser === item.userName)) {
|
||||
if (this.exitsUsers.some(existUser => existUser.username === item.userName)) {
|
||||
item.disabled = true
|
||||
}
|
||||
return item
|
||||
|
Loading…
Reference in New Issue
Block a user