新建角色增加小组功能

This commit is contained in:
zhal 2022-07-26 15:33:52 +08:00
parent 8f216e4fd1
commit 7b243b5c81
7 changed files with 70 additions and 17 deletions

View File

@ -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);
}

View File

@ -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();
}
/**
* 加载附件
*

View File

@ -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");
}

View File

@ -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;

View File

@ -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") {

View File

@ -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") {

View File

@ -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 += '<table name="file" 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="filetableHeader"><i class="awsui-iconfont" style="color: #999999;margin-top: 2px;">&#xe7cf;</i> 件附件:</div>';
for(var i = 0; i < processFile.length; i++) {
var obj = processFile[i];
t += '<div class="tableContent"><a href="javascript:void(0);" onclick="readFile(\''+ obj.id +'\')">'+ obj.name +'</a></div>';
@ -1684,7 +1689,7 @@ function initUpfileData(obj) {
if(processShape != null && processShape.length > 0) {
t += '<table name="' + ele.id + '" class="awsui-table">';
t += '<tr><td>';
t += '<div class="filetableHeader"><i class="awsui-iconfont" style="color: #999999;margin-top: 2px;">&#xe7cf;</i>' + ele.text + '</div>';
t += '<div class="filetableHeader"><i class="awsui-iconfont" style="color: #999999;margin-top: 2px;">&#xe7cf;</i>' +"节点附件"+"("+ele.text +")"+ '</div>';
for(var i = 0; i < processShape.length; i++) {
var obj = processShape[i];
t += '<div class="tableContent"><a href="javascript:void(0);" onclick="readFile(\''+ obj.id +'\')">'+ obj.name +'</a></div>';