相关文件,支持文件关联其他属性

This commit is contained in:
zhal 2022-07-19 21:25:23 +08:00
parent 8d22e76a7e
commit 3dd016a0b0

View File

@ -754,7 +754,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
// macroLibraries.put("treeData", getTreeJson(wsId, "", category, type, method));
// by bzp
String treeJson=getTreeJson(wsId, "", category, type, method,ruuid);
String treeJson=getTreeJson(wsId, "", category, type, method,ruuid,attrId);
//JSONObject jsonObject = JSONObject.parseObject(json);
JSONArray jsonArr_new= new JSONArray();
@ -842,10 +843,10 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return HtmlPageTemplate.merge(CoEConstant.APP_ID, "pal.pl.repository.designer.shapes.htm", macroLibraries);
}
public String getTreeJson(String wsId, String pid, String category, String type, String method, String ruuid) {
public String getTreeJson(String wsId, String pid, String category, String type, String method, String ruuid,String attrId) {
StringBuffer treeJson = new StringBuffer();
if (pid.equals("")) {
return getRootJson(wsId, category, type, method,ruuid); // 加载根
return getRootJson(wsId, category, type, method,ruuid,attrId); // 加载根
}
// 加载二级
// treeJson.append(getTwoNodeJson(pid, wsId));
@ -855,6 +856,9 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return treeJson.toString();
}
/**
* 获取第二级及其以下目录
* by bzp 增加method方法 判断
@ -875,7 +879,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return jsonArray.toString();
}
protected String getRootJson(String wsuuid, String category, String type, String methodScope,String ruuid) {
protected String getRootJson(String wsuuid, String category, String type, String methodScope,String ruuid,String attrId) {
JSONArray jsonArray = new JSONArray();
if ("file".equals(type)) {// 关联的文件模型
PALMethodJsonModel processpmjm = new PALMethodJsonModel();
@ -912,7 +916,8 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
jsonArray.add(node);
}
} else {// 关联的形状节点
} else {
// 关联的形状节点
PALMethodJsonModel controlpmjm = new PALMethodJsonModel();
controlpmjm.setId(category);
controlpmjm.setName(I18nRes.findValue(CoEConstant.APP_ID, category));
@ -921,6 +926,29 @@ public class DesignerRelationShapeWeb extends ActionWeb {
controlpmjm.setMenu(false);
controlpmjm.setOpen(true);
jsonArray.add(controlpmjm);
if(attrId.equals("R_relevant_flies")||attrId.equals("support_files")){
PALMethodJsonModel controlpmjm1 = new PALMethodJsonModel();
controlpmjm1.setId("process");
controlpmjm1.setName(I18nRes.findValue(CoEConstant.APP_ID, "process"));
controlpmjm1.setUrl("");
controlpmjm1.setIcon("../apps/" + CoEConstant.APP_ID + "/img/method/" + "process" + ".png");
controlpmjm1.setMenu(false);
controlpmjm1.setOpen(true);
jsonArray.add(controlpmjm1);
PALMethodJsonModel controlpmjm2 = new PALMethodJsonModel();
controlpmjm2.setId("control");
controlpmjm2.setName(I18nRes.findValue(CoEConstant.APP_ID, "control"));
controlpmjm2.setUrl("");
controlpmjm2.setIcon("../apps/" + CoEConstant.APP_ID + "/img/method/" + "control" + ".png");
controlpmjm2.setMenu(false);
controlpmjm2.setOpen(true);
jsonArray.add(controlpmjm2);
}
JSONArray nodes = PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsuuid, controlpmjm.getId());
for (int i = 0; i < nodes.size(); i++) {
JSONObject node = nodes.getJSONObject(i);
@ -946,6 +974,9 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return jsonArray.toString();
}
/**
* 关联属性快速搜索
* @param wsId