相关文件选择已发布

This commit is contained in:
zhal 2022-07-29 22:11:10 +08:00
parent ef3e989b60
commit 6e717f7d67
2 changed files with 24 additions and 8 deletions

View File

@ -789,9 +789,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
String id = jsonObject.getString("id");
String isParent=jsonObject.getString("isParent");
if (isParent != null) {
if (isParent.equals("true")) {
List<PALRepositoryModel> coeProcessLevelModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByPid(id, wsId);
if (coeProcessLevelModels.size() > 0) {
for (int k = 0; k < coeProcessLevelModels.size(); k++) {
@ -856,8 +854,25 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
} else if(attrId.equals("R_relevant_flies")){
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
String isPublish=jsonObject.getString("isPublish");
if(isPublish!=null){
if(isPublish.equals("true")){
JSONObject node = objects.getJSONObject(i);
node.put("nocheck", "false");
jsonArr_new.add(node);
}
}else{
jsonArr_new.add(objects.getJSONObject(i));
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
} else{
macroLibraries.put("treeData", treeJson);
macroLibraries.put("treeData", jsonArr_new.toString());
}
@ -1189,7 +1204,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}else */
//如果为相关文件 未发布不可选中
if(attrId.equals("related_files")){
if(attrId.equals("R_relevant_flies")){
if(isPublish.equals("false") || isParent.equals("true")){
node.put("nocheck", true);
}
@ -1200,14 +1215,13 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
}
if(attrId.equals("related_files")){
if(attrId.equals("R_relevant_flies")){
if(isPublish.equals("true") && isStop.equals("false")){
result.add(node);
}
}else {
// 只查没有废止的文件
if(isStop.equals("false")){
//by bzp control.kpi
String methodId = node.getString("plMethodId");
if ("control.kpi".equals(methodId) && methodScope.equals(methodId)) {

View File

@ -1452,12 +1452,13 @@ function isObjectRelationshipModel(linker, isAlert) {
// 文件属性的处理
function initProcessDesc() {
debugger;
var length = Object.keys(processDesc).length;
var t = '';
var b='';
for(var i = 1; i <= length; i++) {
var obj = processDesc[i];
debugger;
//判断如果为相关文件/支持文件显示在右侧区域
if(obj.name=="相关文件" || obj.name=="支持文件"){
b += '<table class="awsui-table">';
@ -1585,10 +1586,11 @@ function ProcessManual(obj) {
t += '<table class="awsui-table">';
t += '<tr><td>';
t += '<div class="filetableHeader"><i class="awsui-iconfont" style="color: #999999;margin-top: 2px;">&#xe7cf;</i> 流程手册:</div>';
t += '<div class="tableContent"><a href="javascript:void(0);" onclick="openOutputFile(\''+ taskId +'\')">'+ fileName +'</a></div>';
t += '<div class="tableContents"><a href="javascript:void(0);" onclick="openOutputFile(\''+ taskId +'\')">'+ fileName +'</a>';
t +='<button id="ProcessManual" type="button" class="awsui-btn awsui-btn-blue awsui-btn-sm">';
t += '<i class="awsui-iconfont" onclick="downloadProcessFile(\''+taskId+'\')">&#xe653;</i>';
t +='</button>';
t +='</div>';
t += '</td></tr>';
t += '</table>';