From 3dd016a0b04b1c24216e24c34bde9d5f14d63657 Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Tue, 19 Jul 2022 21:25:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=96=87=E4=BB=B6=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E4=BB=B6=E5=85=B3=E8=81=94=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/DesignerRelationShapeWeb.java | 41 ++++++++++++++++--- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java index 6ff9bd54..98936f61 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/designer/relation/web/DesignerRelationShapeWeb.java @@ -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