小组权限优化&端到端功能 节点展开部分代码提交

This commit is contained in:
qinoy 2023-06-08 17:57:45 +08:00
parent 69247ee624
commit bb07770c4e
7 changed files with 32 additions and 2 deletions

View File

@ -188,6 +188,8 @@ public class GraphNodeCloseHandle {
subProcessNodeProps.put("y", scopeLimitationShape.getJSONObject("props").getDoubleValue("y"));
subProcessNodeProps.put("zindex", scopeLimitationShape.getJSONObject("props").getIntValue("zindex"));
subProcessNode.put("text", PALRepositoryCache.getCache().get(relationFileId).getName());
subProcessNode.put("dataAttributes", scopeLimitationShape.getJSONArray("dataAttributes"));
return subProcessNode;
}

View File

@ -137,6 +137,9 @@ public class GraphNodeExpandHandle {
scopeShapeProps.put("w", scopeShapeW);
scopeShapeProps.put("h", scopeShapeH);
scopeShapeProps.put("zindex", 1);
scopeLimitationShape.put("dataAttributes", currentExpandShape.getJSONArray("dataAttributes"));
this.scopeLimitationShape = scopeLimitationShape;
}

View File

@ -616,6 +616,9 @@ public class CoeCooperationAPIManager {
}
}
}
//更新用户权限缓存
CooperationCache.updateTeamInfo(teamId);
}
/**

View File

@ -8175,7 +8175,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
for (TeamInfo teamInfo : allTeamInfo) {
Set<String> teamPermVersionIds = teamInfo.getVersionIds();
if (teamPermVersionIds.contains(parentId)){ // 当前新增的架构/文件夹的父级在小组权限中
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(teamId, model.getVersionId());
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(teamInfo.getTeamId(), model.getVersionId());
}
}
}
@ -8283,7 +8283,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
for (TeamInfo teamInfo : allTeamInfo) {
Set<String> teamPermVersionIds = teamInfo.getVersionIds();
if (teamPermVersionIds.contains(parentId)){ // 当前新增的架构/文件夹的父级在小组权限中
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(teamId, model.getVersionId());
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(teamInfo.getTeamId(), model.getVersionId());
}
}
}
@ -8433,6 +8433,18 @@ public class CoeProcessLevelWeb extends ActionWeb {
if (!UtilString.isEmpty(teamId)) {
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(_uc, teamId, model.getVersionId(), true, true);
}
// 新增的架构或者文件夹 自动加权 遍历所有小组 判断父级文件夹/架构是否在该小组下是否有权限
if (UtilString.isNotEmpty(parentId) && parentId.length() == 36){
List<TeamInfo> allTeamInfo = CoeCooperationAPIManager.getInstance().getAllTeamInfo();
for (TeamInfo teamInfo : allTeamInfo) {
Set<String> teamPermVersionIds = teamInfo.getVersionIds();
if (teamPermVersionIds.contains(parentId)){ // 当前新增的架构/文件夹的父级在小组权限中
CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(teamInfo.getTeamId(), model.getVersionId());
}
}
}
ro.put("id", id);
// 操作行为日志记录
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {

View File

@ -127,6 +127,7 @@ class SubProcess {
// alert('节点展开事件 ' + param.Model.define.elements[event.data.shapeId].text);
// 1、同时只能支持一个子流程节点展开
let elements = param.Model.define.elements;
let shapeText = ''; // 当前要展开的节点文本
for (let key in elements) {
let shape = elements[key];
if (shape.name == 'linker') continue;
@ -134,6 +135,9 @@ class SubProcess {
$.simpleAlert("同一时间仅支持一个子流程节点展开", "warning");
return;
}
if (key == param.shapeId){
shapeText = shape.text;
}
}
// 2、传递当前模型文件ID、子流程节点ID
awsui.ajax.request({
@ -151,6 +155,7 @@ class SubProcess {
Designer.open(definition); // 节点重新渲染
// 针对范围标识框渲染 节点关闭按钮
window.subProcess.shapeIconRender();
window.subProcess.scopeShapeRenderTitle(param.shapeId, shapeText);
// 提示用户文件已修改
window.subProcess.fileModifiedTip();
},
@ -161,6 +166,11 @@ class SubProcess {
// 3、刷新当前画布
}
scopeShapeRenderTitle(shapeId, title){
let titleHtml = "<span style='position: absolute; left: 35px; top: 25px;'>"+title+"</span>";
$('#'+shapeId).prepend(titleHtml);
}
// 节点关闭事件
shapeClose(event){
console.log('sss');