流程图排序优化
This commit is contained in:
parent
43bca8cc7b
commit
b006c3239a
@ -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 += '<div class="task-box">';
|
||||
t += '<div class="task-box" id="box' + shape.id + '">';
|
||||
t += '<span id="span' + shape.id + '">';
|
||||
t += '</span>';
|
||||
t += '<i class="awsui-iconfont newadd_up" id="searchChange' + shape.id + '" onclick="searchChange(\'' + shape.id + '\',\''+novalue+'\')"></i>';
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user