From 2733e2ae0ecccb20ec839b4d44357b730f9652c0 Mon Sep 17 00:00:00 2001 From: yujh Date: Mon, 10 Feb 2025 15:20:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B9=E6=A1=88=E5=9B=BE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E9=97=AE=E9=A2=98=EF=BC=8Cjs=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/designer.extend.link.view.portal.js | 183 +++++++++--------- 1 file changed, 92 insertions(+), 91 deletions(-) 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 482b61cb..34dd5873 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 @@ -433,6 +433,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) { } } +// table表格 function openDialog(obj) { const { name: tableName, table: dialogTable } = obj; const columns = dialogTable[0]; @@ -1674,7 +1675,7 @@ function ProcessManual(obj) { }else if(methodId=="control.kpi"){ manualName="流程绩效文件 :"; }else if(methodId=="process.scheme"){ - manualName="流程绩效文件 :"; + manualName="方案文件 :"; }else if(methodId=="engineering.standard"){ manualName="工程技术标准文件 :"; } @@ -1817,7 +1818,7 @@ function initUpfileData(obj) { var t = ''; var splitId=''; var processFile = upfileData['file']; - + if(processFile.length > 0) { /*t += ''; t += '
'; @@ -1856,7 +1857,7 @@ function initUpfileData(obj) { splitId+=obj.id+','; var spiltName=obj.name; - + if(spiltName.substring(0,spiltName.lastIndexOf("."))==fileName && appendFlag==true){ appendFlag=false; var s=''; @@ -1879,16 +1880,16 @@ function initUpfileData(obj) { var countindex=0; var elements = Model.define.elements; - console.log('elements',elements) - if(methodId=="data.form"){ - var sortModelByName = sortModelByName1();; - for(var sortIndex = 0; sortIndex < sortModelByName.length; sortIndex++) { - var temp = sortModelByName[sortIndex]; - var shape = elements[temp.id]; - if(shape.name == 'linker') { - continue; - } - var processShape = upfileData[temp.id]; + console.log('elements',elements) + if(methodId=="data.form"){ + var sortModelByName = sortModelByName1();; + for(var sortIndex = 0; sortIndex < sortModelByName.length; sortIndex++) { + var temp = sortModelByName[sortIndex]; + var shape = elements[temp.id]; + if(shape.name == 'linker') { + continue; + } + var processShape = upfileData[temp.id]; if(processShape != null && processShape.length > 0) { var fileTile="表单/模板:"; t += '
'; @@ -1911,21 +1912,53 @@ function initUpfileData(obj) { } t += '
'; - } - - }else{ - for(var e in elements) { - var ele = elements[e]; - if(ele.name == 'linker') { - continue; } - var processShape = upfileData[ele.id]; - if(methodId=="control.policy"){ - //暂时去掉制度节点附件显示 20221208 lihongyu - if(false){ - //if(countindex!=0){ + }else{ + for(var e in elements) { + var ele = elements[e]; + if(ele.name == 'linker') { + continue; + } + + var processShape = upfileData[ele.id]; + if(methodId=="control.policy" || methodId=="engineering.standard" || methodId=="process.scheme"){ + //暂时去掉制度节点附件显示 20221208 lihongyu + if(false){ + //if(countindex!=0){ + if(processShape != null && processShape.length > 0) { + var fileTile=""; + if(ele.category=="data_form"){ + fileTile="表单/模板:"; + }else{ + fileTile="节点附件:"; + } + t += '
'; + t +=''+fileTile+''+ele.text; + for(var i = 0; i < processShape.length; i++) { + t += ''; + t +=''; + t += ''; + t += ''; + t += ''; + t +=''; + t += '
'; + var obj = processShape[i]; + t += '
'+ obj.name +''; + t +='
'; + t += '
'; + splitId+=obj.id+','; + + } + + } + t += '
'; + } + + countindex++; + }else{ if(processShape != null && processShape.length > 0) { + var fileTile=""; if(ele.category=="data_form"){ fileTile="表单/模板:"; @@ -1934,6 +1967,7 @@ function initUpfileData(obj) { } t += '
'; t +=''+fileTile+''+ele.text; + for(var i = 0; i < processShape.length; i++) { t += ''; t +=''; @@ -1954,48 +1988,15 @@ function initUpfileData(obj) { t += ''; } - countindex++; - }else{ - if(processShape != null && processShape.length > 0) { - var fileTile=""; - if(ele.category=="data_form"){ - fileTile="表单/模板:"; - }else{ - fileTile="节点附件:"; - } - t += '
'; - t +=''+fileTile+''+ele.text; - - for(var i = 0; i < processShape.length; i++) { - t += '
'; - t +=''; - t += ''; - t += ''; - t += ''; - t +=''; - t += '
'; - var obj = processShape[i]; - t += '
'+ obj.name +''; - t +='
'; - t += '
'; - splitId+=obj.id+','; - } - } - t += '
'; } - - } - - - } - - + + t += '
'; @@ -2035,42 +2036,42 @@ function initUpfileData(obj) { //根据节点名称排序 function sortModelByName1() { - var num = 0; + var num = 0; var recordId = []; var hasNumArr = []; /*******************************排序方法重构***by zhaolei**********************************************/ for (var shapeId in Model.define.elements) { var shape = Model.define.elements[shapeId]; - var attr = shape.text; - var category = shape.category; - console.log('节点名称',category); - //根据活动名称排序 - if (attr != null) { - if(category=="data_form"){ - - if(attr.substr(0,2)=='附件') { - var obj = {}; - obj.text = shape.text; - obj.id = shapeId; - obj.orderIndex = attr.substr(2, 1); - hasNumArr.push(obj); - recordId.push(shapeId); - - }else{ - var obj = {}; - obj.text = shape.text; - obj.id = shapeId; - obj.orderIndex = num; - hasNumArr.push(obj); - recordId.push(shapeId); - num++; - - } - } - } - - - + var attr = shape.text; + var category = shape.category; + console.log('节点名称',category); + //根据活动名称排序 + if (attr != null) { + if(category=="data_form"){ + + if(attr.substr(0,2)=='附件') { + var obj = {}; + obj.text = shape.text; + obj.id = shapeId; + obj.orderIndex = attr.substr(2, 1); + hasNumArr.push(obj); + recordId.push(shapeId); + + }else{ + var obj = {}; + obj.text = shape.text; + obj.id = shapeId; + obj.orderIndex = num; + hasNumArr.push(obj); + recordId.push(shapeId); + num++; + + } + } + } + + + } // 按名称升序排序