diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js
index 80fb71ae..cc78e20f 100755
--- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js
+++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/extend/js/designer.extend.link.js
@@ -2321,7 +2321,7 @@ function updateAttributeById(objId, va, shapeId) {
}
});
- }else if(isCriticalControlPoint === "否"){
+ }else if(isCriticalControlPoint === "否" || isCriticalControlPoint === "请选择"){
shape.dataAttributes.forEach(function(attribute) {
if(attribute.attributesJsonArray){
//在遍历角标,锁定到右下角的角标
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 a6c9d7f8..482b61cb 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
@@ -343,7 +343,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
} else if (!obj.readonly && obj.type == "boolean") {
constr = '
';
/*constr += '| ' + obj.name + ' | ';*/
- constr += '' + '【' + obj.name + '】'+' '+' | ';
+ constr += '' + '【' + obj.name + '】'+' '+ obj.value + ' | ';
constr += '
';
} else if (!obj.readonly && obj.type == "textarea") {
constr = '';
@@ -433,44 +433,67 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
}
}
-// table表格
function openDialog(obj) {
- let tableName = obj.name
- let dialogTable = obj.table
- $("#attribute-table-content2").empty()
- let thead =
- '
'
- + '| ' + dialogTable[0].name + ' | '
- + '' + dialogTable[0].desc + ' | '
- +'
'
- $('#attribute-table-content2').append(thead)
- for ( let i = 1; i < dialogTable.length; i++) {
- let str =
- ''
- + '| ' + dialogTable[i].name + ' | '
- + '' + dialogTable[i].desc + ' | '
- +'
'
- $('#attribute-table-content2').append(str)
- }
+ const { name: tableName, table: dialogTable } = obj;
+ const columns = dialogTable[0];
+ //先判断是4列还是2列的,根据columns.threeColumn是否为空
+ const columnCount = columns.threeColumn ? 4 : 2;
+ const columnNames = columnCount === 4
+ ? ['firstColumn', 'secondColumn', 'threeColumn', 'fourColumn']
+ : ['name', 'desc'];
+ const columnWidths = columnCount === 4
+ ? ['18%', '33%', '33%', '16%']
+ : ['30%', '70%'];
+ // 清空现有内容
+ $("#attribute-table-content2").empty();
+
+ // 构建表头
+ const thead = $('').attr('id', columns.id);
+ columnNames.forEach((name, index) => {
+ $('| ')
+ .addClass('dialogTableHead')
+ .css('width', columnWidths[index])
+ .text(columns[name])
+ .appendTo(thead);
+ });
+ $('#attribute-table-content2').append(thead);
+
+ // 构建表格内容
+ dialogTable.slice(1).forEach(row => {
+ const tr = $(' |
').attr('id', row.id);
+ columnNames.forEach((_, index) => {
+ $('| ')
+ .css('width', columnWidths[index])
+ .text(row[columnNames[index]])
+ .appendTo(tr);
+ });
+ $('#attribute-table-content2').append(tr);
+ });
+
+ // 初始化对话框
$("#attribute-table-window2").dialog({
title: tableName,
draggable: true,
- buttons : [{
- text : '确定',
- cls : "blue",
- handler : function() {
- $("#attribute-table-window2").dialog('close');
+ buttons: [
+ {
+ text: '确定',
+ cls: "blue",
+ handler: function() {
+ $("#attribute-table-window2").dialog('close');
+ }
+ },
+ {
+ text: '取消',
+ handler: function() {
+ $("#attribute-table-window2").dialog('close');
+ }
}
- }, {
- text : '取消',
- handler : function() {
- $("#attribute-table-window2").dialog('close');
- }
- }]
- })
+ ]
+ });
}
+
Array.prototype.unique = function(){
var res = [];
var json = {};
|