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 cc8534b5..be10c482 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 @@ -1533,7 +1533,7 @@ function changeArributeByShape() { if (Utils.getSelected()[0] == null) { initShapeAttribute('0'); initUpfileData('0'); - + cc(); $('table[name=lastTable]').remove(); if($('#portalAttrDock').children('table').length > 0) { // $('#portalAttrDock').append(lastTable); @@ -1556,6 +1556,19 @@ function changeArributeByShape() { } } +function cc() { + $('#processFileDock').empty(); + var t = ''; + t += ''; + t += ''; + t += '
'; + t += '
流程手册:
'; + t += ''; + t += '
'; + $('#processFileDock').append(t); + +} + // 初始化上传附件 function initUpfileData(obj) { $('#alertMessage').remove(); @@ -1566,20 +1579,20 @@ function initUpfileData(obj) { if(processFile.length > 0) { t += ''; t += '
'; - t += '
相关文件:
'; + t += '
相关文件:
'; for(var i = 0; i < processFile.length; i++) { var obj = processFile[i]; t += ''; } t += '
'; } - //流程手册附件展示 + /*//流程手册附件展示 t += ''; t += ''; - t += '
'; - t += '
流程手册:
'; + t += '
流程手册:
'; t += ''; t += '
'; + t += ''*/; var elements = Model.define.elements; for(var e in elements) { @@ -1591,7 +1604,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 += ''; @@ -1602,12 +1615,11 @@ function initUpfileData(obj) { } $('#portalFileDock').append(t); } else { - $('#portalFileDock table').hide(); + $('#portalFileDock table').show(); $('#portalFileDock table[name=' + obj + ']').show(); } var isHidden = true; $('#portalFileDock table').each(function(){ - console.log($(this).css('display')); if ($(this).css('display') != 'none') { isHidden = false; } @@ -1652,7 +1664,7 @@ function sortModelByNumber() { if (attrArr.attributesJsonArray && attrArr.attributesJsonArray.length > 0) { for (var j = 0; j < attrArr.attributesJsonArray.length; j++) { var attr = attrArr.attributesJsonArray[j]; - if (attr != null && attr.id && attr.id == 'number') { + /*if (attr != null && attr.id && attr.id == 'number') { var number = attr.value; if(typeof number == 'string') { number = number.replace(/^\s+|\s+$/g,"") @@ -1666,7 +1678,28 @@ function sortModelByNumber() { recordId.push(shapeId); } break; + }*/ + + + //根据活动序号排序 + if (attr != null && attr.id) { + var number = attr.value; + if(attr.id=="activity_number"){ + if(typeof number == 'string') { + number = number.replace(/^\s+|\s+$/g,"") + }; + if(number != undefined && number != null && number != "") { + var obj = {}; + obj.text = shape.text; + obj.id = shapeId; + obj.orderIndex = number; + hasNumArr.push(obj); + recordId.push(shapeId); + } + } + break; } + } break; } @@ -1745,38 +1778,56 @@ function initShapeAttribute(obj) { attributesJsonArrayT = tempAttrArray.concat(newAttrArray); } } - var t = ''; - t += '
' - /*t += '';*/ - t +=''; - t +=''; - t += ''; - t += ''; - t += ''; - t += ''; - t += ''; - /*t += '';*/ - t += ''; - t += ''; - t += '
' + shape.text + '
'; - $('#portalAttrDock').append(t); - if (shape && attributesJsonArrayT) { - // {}函数,改为图形创建时增加私有属性 - attributesJsonArray = attributesJsonArrayT; - var shapeTitle = shape.title == undefined ? "" : shape.title; - $("#" + shape.id + "type").text(shapeTitle); - for (var i = 0; i < shape.dataAttributes.length; i++) { - var attr = shape.dataAttributes[i]; - if (attr.shapeDesc) { - $("#" + shape.id + "desc").html(attr.shapeDesc == undefined ? "" : attr.shapeDesc.replace(/\n/g,'
')); - break; + + //流程阅览只显示线上审批、线下审批、系统任务、人工审批 + if(shape.title=="线上审批" || shape.title=="线下审批" || shape.title=="系统任务" ||shape.title=="人工审批") { + + var no = ""; + for (var i = 0; i < attributesJsonArrayT.length; i++) { + var id = attributesJsonArrayT[i].id; + if (id == "activity_number") { + var numberValue = attributesJsonArrayT[i].value; + if (numberValue != "") { + no = numberValue; + } } + + } - // 此处遍历attributesJsonArray输入 内容 - if (attributesJsonArray.length != 0) { - getPrivateAttributeHtml(attributesJsonArray, "portalAttrDock", shape); + + var t = ''; + t += '
' + /*t += '';*/ + t += ''; + t += ''; + t += ''; + t += ''; + t += ''; + t += ''; + t += ''; + /*t += '';*/ + t += ''; + t += ''; + t += '
' +no+"."+shape.text + '
'; + $('#portalAttrDock').append(t); + if (shape && attributesJsonArrayT) { + // {}函数,改为图形创建时增加私有属性 + attributesJsonArray = attributesJsonArrayT; + var shapeTitle = shape.title == undefined ? "" : shape.title; + $("#" + shape.id + "type").text(shapeTitle); + for (var i = 0; i < shape.dataAttributes.length; i++) { + var attr = shape.dataAttributes[i]; + if (attr.shapeDesc) { + $("#" + shape.id + "desc").html(attr.shapeDesc == undefined ? "" : attr.shapeDesc.replace(/\n/g, '
')); + break; + } + } + // 此处遍历attributesJsonArray输入 内容 + if (attributesJsonArray.length != 0) { + getPrivateAttributeHtml(attributesJsonArray, "portalAttrDock", shape); + } } } }