From b006c3239a562427dc68ad42055cbceede5dc027 Mon Sep 17 00:00:00 2001 From: zhal <15900249928@163.com> Date: Wed, 20 Jul 2022 19:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=9B=BE=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/designer.extend.link.view.portal.js | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 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 acaa6ddb..595d9a4d 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 @@ -1712,6 +1712,7 @@ function sortModelByNumber() { //根据活动序号排序 if (attr != null && attr.id) { + if(attr.id=="activity_number"){ var number = attr.value; var subNumer=number< 10 ? number.substr(1,1) : number; @@ -1738,20 +1739,25 @@ function sortModelByNumber() { } // 有序号的元素升序排序 - var compare = function (obj1, obj2) { - var val1 = obj1.orderIndex; - var val2 = obj2.orderIndex; - if (val1 < val2) { - return -1; - } else if (val1 > val2) { - return 1; - } else { - return 0; + var compare = function (prop) { + return function (obj1, obj2) { + var val1 = obj1[prop]; + var val2 = obj2[prop]; + if (!isNaN(Number(val1)) && !isNaN(Number(val2))) { + val1 = Number(val1); + val2 = Number(val2); + } + if (val1 < val2) { + return -1; + } else if (val1 > val2) { + return 1; + } else { + return 0; + } } } - - hasNumArr.sort(compare); + hasNumArr.sort(compare("orderIndex")); /*for (var shapeId in Model.define.elements) { if($.inArray(shapeId, recordId) == -1) { var obj = {}; @@ -1829,7 +1835,7 @@ function initShapeAttribute(obj) { } var novalue=no+"."+shape.text; var t = ''; - t += '
'; + t += '
'; t += ''; t += ''; t += ''; @@ -1874,7 +1880,7 @@ function initShapeAttribute(obj) { if(obj==shape.id){ continue; } - var no = ""; + /*var no = ""; var array=shape.attributesJsonArray; for (var i = 0; i < array.length; i++) { var id = array[i].id; @@ -1884,9 +1890,9 @@ function initShapeAttribute(obj) { no = numberValue; } } - } - - document.getElementById("span"+shape.id).innerHTML=no+"."+shape.text; + }*/ + document.getElementById("box"+shape.id).style.display="none"; + //document.getElementById("span"+shape.id).innerHTML=no+"."+shape.text; } } }