流程阅览相关支持文件显示问题

This commit is contained in:
zhal 2022-08-30 15:25:49 +08:00
parent 80ae983790
commit 0234f05964
3 changed files with 35 additions and 19 deletions

View File

@ -2270,6 +2270,8 @@ public class CoeProcessLevelUtil {
//如果是关联属性增加链接功能
if(attributeModel.getType().equals("relation")){
String appUrl;
StringBuffer sb=new StringBuffer();
//判断数据库用户是否注销状态
UserModel userModel=SDK.getORGAPI().getUser(plModel.getCreateUser());
boolean isclosed=userModel.isClosed();
@ -2285,28 +2287,35 @@ public class CoeProcessLevelUtil {
String sessionId = new SSOUtil().registerClientSessionNoPassword(plModel.getCreateUser(), LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC);
relationFileId = jsonValue.getJSONObject(0).get("fileId").toString();
for(int i=0;i<jsonValue.size();i++){
relationFileId = jsonValue.getJSONObject(i).get("fileId").toString();
PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid);
String taskId="";
if (model != null) {
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
taskId=getLastPublishTaskIdByModelId(model.getId());
PALRepositoryModel model = PALRepositoryCache.getCache().get(uuid);
String taskId="";
if (model != null) {
if (model.isPublish() || model.isStop()) {// 停用或已发布状态查询最新流程手册
taskId=getLastPublishTaskIdByModelId(model.getId());
}
}
}
String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid="+relationFileId+""+"&sid="+sessionId+"&taskId="+taskId;
String url=SDK.getPortalAPI().getPortalUrl()+"/r/w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid="+relationFileId+""+"&sid="+sessionId+"&taskId="+taskId;
//判断如果关联属性是岗位多个岗位显示为...
if(attributeModel.getKey().equals("post")){
int lenth=inputValue.split(",").length-1;
if(lenth>=2){
int index1=inputValue.indexOf(",");
int index2=inputValue.indexOf(",",index1+1);
inputValue=inputValue.substring(0,index2)+"...";
//判断如果关联属性是岗位多个岗位显示为...
if(attributeModel.getKey().equals("post")){
int lenth=inputValue.split(",").length-1;
if(lenth>=2){
int index1=inputValue.indexOf(",");
int index2=inputValue.indexOf(",",index1+1);
inputValue=inputValue.substring(0,index2)+"...";
}
}else{
inputValue=jsonValue.getJSONObject(i).get("name").toString();
}
appUrl="<a href='"+url+"' style='color:blue' target='_blank'>"+inputValue+"</a>";
sb.append(appUrl).append(",");
}
appUrl="<a href='"+url+"' style='color:blue' target='_blank'>"+inputValue+"</a>";
attribute.put("value", appUrl);
attribute.put("value", sb.substring(0, sb.length()-1));
}else{
appUrl="<a href='"+'#'+"' style='color:blue' target='_blank'>"+inputValue+"</a>";

View File

@ -1462,9 +1462,17 @@ function initProcessDesc() {
b += '<table class="awsui-table">';
b += '<tr class="borderbottom">';
b += '<td class="tableContent">' + "【"+obj.name +"】"+ '</td>';
b += '<td>' + obj.value + '</td>';
b += '</tr>';
b += '</table>';
var fileArry=obj.value.split(",");
for(var k=0;k<fileArry.length;k++){
b += '<table class="awsui-table">';
b += '<tr class="borderbottom">';
b += '<td>' + fileArry[k] + '</td>';
b += '</tr>';
b += '</table>';
}
}else{
t += '<tr class="borderbottom">';
t += '<td class="tableContent tableleft">' + "【"+obj.name +"】"+ '</td>';
@ -1701,7 +1709,6 @@ function initUpfileData(obj) {
var t = '';
var splitId='';
var processFile = upfileData['file'];
debugger;
if(processFile.length > 0) {
t += '<table name="file" class="awsui-table">';
t += '<tr><td>';