From 7b243b5c81a1726959ab3513d1f21397cf620879 Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Tue, 26 Jul 2022 15:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E8=A7=92=E8=89=B2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=B0=8F=E7=BB=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/coe/pal/CoEPALController.java | 29 ++++++++++++------- .../pal/repository/upfile/web/UpfileWeb.java | 24 +++++++++++++++ .../repository/web/CoeProcessLevelWeb.java | 7 ++++- ...al.pl.repository.designer.view.portal.html | 10 ++++++- .../js/coe.pal.processlevel.create.js | 3 +- .../extend/js/designer.extend.link.js | 3 +- .../js/designer.extend.link.view.portal.js | 11 +++++-- 7 files changed, 70 insertions(+), 17 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index 5c9375f7..7a4f6203 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -1161,6 +1161,23 @@ public class CoEPALController { return web.readFile(uuid); } + + /** + * 相关文件/支持文件附件下载 + * @param me + * @param params + * @return + */ + @Mapping("com.actionsoft.apps.coe.pal_outputreport_output_downloadfile") + public String COEPALOUTPUTREPORTOutputProcessDownloadFILE(UserContext me, RequestParams params) { + UpfileWeb web = new UpfileWeb(me); + String uuid = params.get("uuid"); + return web.readFileDownLoad(uuid); + } + + + + // 文件属性的单个 值 修改 // @Mapping("COE_PAL_PROCESSLEVEL_MORE_ATTR_CONTENT_SAVE") @Mapping("com.actionsoft.apps.coe.pal_processlevel_more_attr_content_save") @@ -2501,14 +2518,6 @@ public class CoEPALController { } - @Mapping("com.actionsoft.apps.coe.pal_outputreport_output_downloadfile") - public String COEPALOUTPUTREPORTOutputProcessDownloadFILE(UserContext me, String taskId) { - return PALRepositoryQueryAPIManager.getInstance().outputReportDownload(me, taskId); - } - - - - /** * 查询导出组织模型等结构 @@ -2989,9 +2998,9 @@ public class CoEPALController { * @return */ @Mapping("com.actionsoft.apps.coe.pal_pl_repository_designer_relation_shape_createDialogModel") - public String createDialogModel(UserContext me,String uuid,String methodId,String wsId) { + public String createDialogModel(UserContext me,String uuid,String methodId,String wsId,String teamId) { CoeProcessLevelWeb web = new CoeProcessLevelWeb(me); - return web.createDialogModel(uuid,methodId,wsId); + return web.createDialogModel(uuid,methodId,wsId,teamId); } diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java index abb47557..a38d93fb 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/upfile/web/UpfileWeb.java @@ -400,6 +400,30 @@ public class UpfileWeb extends ActionWeb { return ro.toString(); } + + + + /** + * 附件下载功能 + * + * @param uuid + * @return + * @author zhaolei + */ + public String readFileDownLoad(String uuid) { + UserContext me = super.getContext(); + ResponseObject ro = ResponseObject.newOkResponse(); + UpFileDao upfileDao = new UpFileDao(); + UpfileModel upfileModel = upfileDao.get(uuid); + DCContext dcContext = getDCContext(upfileModel); + + String downUrl=SDK.getConfAPI().getPortalUrl() + "/r/" + dcContext.getDownloadURL().replace("./", ""); + ro.put("url",downUrl); + return ro.toString(); + } + + + /** * 加载附件 * diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index c3952b5b..e311b50e 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -8358,7 +8358,7 @@ public class CoeProcessLevelWeb extends ActionWeb { * @return * by zhaolei */ - public String createDialogModel(String uuid,String methodId,String wsId){ + public String createDialogModel(String uuid,String methodId,String wsId,String teamId){ ResponseObject ro = ResponseObject.newOkResponse(); try { @@ -8491,6 +8491,11 @@ public class CoeProcessLevelWeb extends ActionWeb { // 保存文件 CoeDesignerAPIManager.getInstance().storeDefinition(defineModel);// dao操作 + // 小组权限设置 + if (!UtilString.isEmpty(teamId)) { + CoeCooperationAPIManager.getInstance().addRepositoryToTeamAndRolePerm(_uc, teamId, model.getVersionId(), true, true); + } + ro.put("uuid", id); ro.put("result", "ok"); } diff --git a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.portal.html b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.portal.html index b51a32c6..56693a47 100755 --- a/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.portal.html +++ b/com.actionsoft.apps.coe.pal/template/page/pal.pl.repository.designer.view.portal.html @@ -756,6 +756,14 @@ border-radius: 4px; box-shadow: 0 2px 4px rgb(0, 0, 0, 0.2); } + + .tableContent{ + white-space:nowrap; + overflow:hidden; + text-overflow:ellipsis; + width:200px; + } + .toolbar_info2{margin-bottom:10px;} #tools{position: relative; padding:20px;} #tab{ clear: both;overflow: hidden; border-bottom:1px solid #dbdbdb;width:100%;} @@ -774,7 +782,7 @@ } #designer_layout{background: none!important;margin:10px!important;} .awsui-table-bordered td{border:0!important; padding: 5px 0!important;} - .awsui-table-bordered,.tableContent{border:0!important;line-height: 20px; float:left} + .awsui-table-bordered,.tableContent{border:0!important;line-height: 20px; float:left;} #designer_canvas{background: none!important;} .task-box { border: 1px solid #f1f5f7;border-top:2px solid #f1f5f7; padding: 10px; diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js index 9b4c6dd0..3770d939 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/js/coe.pal.processlevel.create.js @@ -1118,7 +1118,8 @@ function openRelationDialog(obj, callback) { data : { uuid:uuid, methodId:method, - wsId:$("#wsid").val() + wsId:$("#wsid").val(), + teamId : $('#teamId').val() }, success : function(msg) { if (msg.result == "ok") { diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js index 6969d304..589a49cf 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js @@ -3553,7 +3553,8 @@ function openRelationDig(obj,value) { data : { uuid:ruuid, methodId:methodId, - wsId:wsId + wsId:wsId, + teamId : $('#teamId').val() }, success : function(msg) { if (msg.result == "ok") { diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js index fd65ed09..8ac3cbc3 100755 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.view.portal.js @@ -1634,15 +1634,20 @@ function downloadProcessFile(taskId) { } +/** + * 相关文件/制度文件下载 + * @param uuid + */ function downloadFile(uuid) { $.ajax({ type : "POST", url : "./jd?sid=" + sid + "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_downloadfile", data : { - taskId : taskId + uuid : uuid }, success : function(msg) { + debugger; if (msg.result == "ok") { window.location.href = msg.data.url; } @@ -1662,7 +1667,7 @@ function initUpfileData(obj) { if(processFile.length > 0) { t += ''; t += '
'; - t += '
相关文件:
'; + t += '
文件附件:
'; for(var i = 0; i < processFile.length; i++) { var obj = processFile[i]; t += ''; @@ -1684,7 +1689,7 @@ function initUpfileData(obj) { if(processShape != null && processShape.length > 0) { t += ''; t += '
'; - t += '
' + ele.text + ':
'; + t += '
' +"节点附件"+"("+ele.text +")"+ ':
'; for(var i = 0; i < processShape.length; i++) { var obj = processShape[i]; t += '';