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 be10c482..a3bc01ae 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
@@ -293,113 +293,118 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
for (var index = 0; index < attributesJsonArray.length; index++) {
var obj = attributesJsonArray[index];
if (obj != null && obj != undefined && obj.value != undefined) {
- var constr = '
';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ obj.value + ' | ';
- constr += '
';
- if ((!obj.readonly && obj.type == "string")
- || (!obj.readonly && obj.type == "list")) {
- // 目前支持到文本的输入 ,需求定下了再改
- constr = '';
+ if(obj.name=="活动序号"){
+ break;
+ }
+ var constr = '
';
/*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ obj.value + ' | ';
- constr += '
';
- } else if(!obj.readonly && obj.type == "link") {
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- // constr += '' + obj.value + ' | ';
- constr += '' + obj.name +':'+ '' + obj.value + '' + ' | ';
- constr += '
';
- } else if (!obj.readonly && obj.type == "number") {
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ obj.value + ' | ';
- constr += '
';
- } else if (!obj.readonly && obj.type == "boolean") {
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += ''+ obj.name +':'+' | ';
- constr += '
';
- } else if (!obj.readonly && obj.type == "textarea") {
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- if (obj.value == undefined) {
- obj.value = '';
- }
- constr += '' + obj.name +':'+ obj.value.replace(/\n/g,' ') + ' | ';
- constr += '
';
- } else if (obj.readonly && obj.type == "relation") {
- var relationValue = "";
- if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) {
- relationValue = relationShapesData[shape.id][obj.id];
- }
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ relationValue + ' | ';
- constr += '
';
- } else if (obj.type == "select" || obj.type == "select_m") {
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ obj.value + ' | ';
+ constr += '' + obj.name + ':' + obj.value + ' | ';
constr += '
';
+ if ((!obj.readonly && obj.type == "string")
+ || (!obj.readonly && obj.type == "list")) {
+ // 目前支持到文本的输入 ,需求定下了再改
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + obj.value + ' | ';
+ constr += '
';
+ } else if (!obj.readonly && obj.type == "link") {
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ // constr += '' + obj.value + ' | ';
+ constr += '' + '【活动描述】' + obj.name + ':' + '' + obj.value + '' + ' | ';
+ constr += '
';
+ } else if (!obj.readonly && obj.type == "number") {
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + obj.value + ' | ';
+ constr += '
';
+ } else if (!obj.readonly && obj.type == "boolean") {
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + ' | ';
+ constr += '
';
+ } else if (!obj.readonly && obj.type == "textarea") {
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ if (obj.value == undefined) {
+ obj.value = '';
+ }
+ constr += '' + '【活动描述】' + obj.name + ':' + obj.value.replace(/\n/g, ' ') + ' | ';
+ constr += '
';
+ } else if (obj.readonly && obj.type == "relation") {
+ var relationValue = "";
+ if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) {
+ relationValue = relationShapesData[shape.id][obj.id];
+ }
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ' | ';
+ constr += '
';
+ } else if (obj.type == "select" || obj.type == "select_m") {
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + obj.value + ' | ';
+ constr += '
';
- selectFlag = true;
- var selectValue = { "objId" : obj.id,
- "objValue" : obj.value,
- "objType": obj.type};
- selectValues.push(selectValue);
- }else if (obj.readonly && obj.type == "userAddress") {
- userAddress = true;
- userObjIds.push(obj.id);
- var relationValue = "";
- if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) {
- relationValue = relationShapesData[shape.id][obj.id];
+ selectFlag = true;
+ var selectValue = {
+ "objId": obj.id,
+ "objValue": obj.value,
+ "objType": obj.type
+ };
+ selectValues.push(selectValue);
+ } else if (obj.readonly && obj.type == "userAddress") {
+ userAddress = true;
+ userObjIds.push(obj.id);
+ var relationValue = "";
+ if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) {
+ relationValue = relationShapesData[shape.id][obj.id];
+ }
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ' | ';
+ constr += '
';
+ } else if (obj.readonly && obj.type == "deptAddress") {
+ deptAddress = true;
+ deptObjIds.push(obj.id);
+ deptIds += "," + obj.value;
+ var relationValue = "";
+ if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) {
+ relationValue = relationShapesData[shape.id][obj.id];
+ }
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ' | ';
+ constr += '
';
+ } else if (obj.readonly && obj.type == "awsorg") {
+ var relationValue = "";
+ if (relationShapesData[shape.id] !== null && relationShapesData[shape.id][obj.id] != null) {
+ relationValue = relationShapesData[shape.id][obj.id];
+ }
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + relationValue + ' | ';
+ constr += '
';
+ } else if (obj.readonly && obj.type == "hidden") {
+ constr = ''
+ + ' | ' + obj.name + ' | '
+ + ' '
+ + ' '
+ //+ ''
+ + ' |
';
+ } else if (obj.type == "table") {
+ let tableInput = '请输入'
+ if (obj.value.table.length > 1) {
+ tableInput = '请查看'
+ }
+ constr = '';
+ /*constr += '| ' + obj.name + ' | ';*/
+ constr += '' + '【活动描述】' + obj.name + ':' + ' ' + tableInput + '' + ' | ';
+ constr += '
';
}
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ relationValue + ' | ';
- constr += '
';
- } else if (obj.readonly && obj.type == "deptAddress") {
- deptAddress = true;
- deptObjIds.push(obj.id);
- deptIds += "," + obj.value;
- var relationValue = "";
- if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) {
- relationValue = relationShapesData[shape.id][obj.id];
- }
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ relationValue + ' | ';
- constr += '
';
- } else if (obj.readonly && obj.type == "awsorg") {
- var relationValue = "";
- if(relationShapesData[shape.id] !==null && relationShapesData[shape.id][obj.id] != null) {
- relationValue = relationShapesData[shape.id][obj.id];
- }
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ relationValue + ' | ';
- constr += '
';
- } else if (obj.readonly && obj.type == "hidden") {
- constr = ''
- + ' | ' + obj.name + ' | '
- + ' '
- + ' '
- //+ ''
- + ' |
';
- } else if (obj.type == "table") {
- let tableInput = '请输入'
- if(obj.value.table.length > 1) {
- tableInput = '请查看'
- }
- constr = '';
- /*constr += '| ' + obj.name + ' | ';*/
- constr += '' + obj.name +':'+ ' ' + tableInput + '' + ' | ';
- constr += '
';
}
$('#' + tbodyId + ' table[name=' + shape.id + ']').append(constr);
}
- }
if (selectFlag) {
getSelectOptions(shape.category, selectValues); //处理select类型
}
@@ -1657,14 +1662,14 @@ function sortModelByNumber() {
// 序号升序,无序号在后面
var recordId = [];
var hasNumArr = [];
- for (var shapeId in Model.define.elements) {
+ /*for (var shapeId in Model.define.elements) {
var shape = Model.define.elements[shapeId];
for (var i = 0; i < shape.dataAttributes.length; i++) {
var attrArr = shape.dataAttributes[i];
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,"")
@@ -1678,33 +1683,52 @@ 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;
}
}
+ }*/
+
+ /*******************************排序方法重构***by zhaolei**********************************************/
+ for (var shapeId in Model.define.elements) {
+ var shape = Model.define.elements[shapeId];
+ for (var i = 0; i < shape.dataAttributes.length; i++) {
+ var attrArr = shape.dataAttributes[i];
+ 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) {
+ if(attr.id=="activity_number"){
+ var number = attr.value;
+ var subNumer=number< 10 ? number.substr(1,1) : number;
+
+ if(typeof subNumer == 'string') {
+ subNumer = subNumer.replace(/^\s+|\s+$/g,"")
+ };
+ if(subNumer != undefined && subNumer != null && subNumer != "") {
+ var obj = {};
+ obj.text = shape.text;
+ obj.id = shapeId;
+ obj.orderIndex = subNumer;
+ hasNumArr.push(obj);
+ recordId.push(shapeId);
+ }
+ }
+ }
+
+
+
+ }
+ }
+ }
}
+
// 有序号的元素升序排序
var compare = function (obj1, obj2) {
var val1 = obj1.orderIndex;
@@ -1717,14 +1741,17 @@ function sortModelByNumber() {
return 0;
}
}
+
+
hasNumArr.sort(compare);
- for (var shapeId in Model.define.elements) {
+ /*for (var shapeId in Model.define.elements) {
if($.inArray(shapeId, recordId) == -1) {
var obj = {};
obj.id = shapeId;
hasNumArr.push(obj);
}
- }
+ }*/
+
return hasNumArr;
}
@@ -1780,7 +1807,7 @@ function initShapeAttribute(obj) {
}
//流程阅览只显示线上审批、线下审批、系统任务、人工审批
- if(shape.title=="线上审批" || shape.title=="线下审批" || shape.title=="系统任务" ||shape.title=="人工审批") {
+ if(shape.title=="线上审批" || shape.title=="线下审批" || shape.title=="系统任务" ||shape.title=="人工任务") {
var no = "";
for (var i = 0; i < attributesJsonArrayT.length; i++) {
@@ -1791,16 +1818,14 @@ function initShapeAttribute(obj) {
no = numberValue;
}
}
-
-
}
+ var novalue=no+"."+shape.text;
var t = '';
- t += ''
- /*t += '
';*/
- t += '
';
+ t += '
';
+ t += '
';
+ t += '';
+ t += '
';
t += '
';
t += '
';
t += '';
@@ -1837,16 +1862,19 @@ function initShapeAttribute(obj) {
}
}
-function searchChange(id) {
-
+function searchChange(id,text) {
+ debugger;
if (document.getElementById("searchChangeFlg"+id).value == "1") {
document.getElementById(id+"change").style.display="";
document.getElementById("searchChange"+id).innerHTML = "";
document.getElementById("searchChangeFlg"+id).value = "0";
+ document.getElementById("span"+id).innerHTML="";
+
} else {
document.getElementById(id+"change").style.display="none";
document.getElementById("searchChange"+id).innerHTML = "";
document.getElementById("searchChangeFlg"+id).value = "1";
+ document.getElementById("span"+id).innerHTML=text;
}
}