处理风控信息显示问题,是否关键控制点实际值显示问题
This commit is contained in:
parent
301a4d84d0
commit
a7ff9a43ba
@ -2321,7 +2321,7 @@ function updateAttributeById(objId, va, shapeId) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}else if(isCriticalControlPoint === "否"){
|
}else if(isCriticalControlPoint === "否" || isCriticalControlPoint === "请选择"){
|
||||||
shape.dataAttributes.forEach(function(attribute) {
|
shape.dataAttributes.forEach(function(attribute) {
|
||||||
if(attribute.attributesJsonArray){
|
if(attribute.attributesJsonArray){
|
||||||
//在遍历角标,锁定到右下角的角标
|
//在遍历角标,锁定到右下角的角标
|
||||||
|
|||||||
@ -343,7 +343,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
|||||||
} else if (!obj.readonly && obj.type == "boolean") {
|
} else if (!obj.readonly && obj.type == "boolean") {
|
||||||
constr = '<tr>';
|
constr = '<tr>';
|
||||||
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
|
||||||
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【' + obj.name + '】'+' '+'</td>';
|
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【' + obj.name + '】'+' '+ obj.value + '</td>';
|
||||||
constr += '</tr>';
|
constr += '</tr>';
|
||||||
} else if (!obj.readonly && obj.type == "textarea") {
|
} else if (!obj.readonly && obj.type == "textarea") {
|
||||||
constr = '<tr>';
|
constr = '<tr>';
|
||||||
@ -433,44 +433,67 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// table表格
|
|
||||||
function openDialog(obj) {
|
function openDialog(obj) {
|
||||||
let tableName = obj.name
|
const { name: tableName, table: dialogTable } = obj;
|
||||||
let dialogTable = obj.table
|
const columns = dialogTable[0];
|
||||||
$("#attribute-table-content2").empty()
|
//先判断是4列还是2列的,根据columns.threeColumn是否为空
|
||||||
let thead =
|
const columnCount = columns.threeColumn ? 4 : 2;
|
||||||
'<tr id="' + dialogTable[0].id + '" >'
|
const columnNames = columnCount === 4
|
||||||
+ '<td style="width: 30%;" class="dialogTableHead">' + dialogTable[0].name + '</td>'
|
? ['firstColumn', 'secondColumn', 'threeColumn', 'fourColumn']
|
||||||
+ '<td style="width: 70%;" class="dialogTableHead">' + dialogTable[0].desc + '</td>'
|
: ['name', 'desc'];
|
||||||
+'</tr>'
|
const columnWidths = columnCount === 4
|
||||||
$('#attribute-table-content2').append(thead)
|
? ['18%', '33%', '33%', '16%']
|
||||||
for ( let i = 1; i < dialogTable.length; i++) {
|
: ['30%', '70%'];
|
||||||
let str =
|
|
||||||
'<tr id="' + dialogTable[i].id + '">'
|
|
||||||
+ '<td style="width: 30%;">' + dialogTable[i].name + '</td>'
|
|
||||||
+ '<td style="width: 70%;">' + dialogTable[i].desc + '</td>'
|
|
||||||
+'</tr>'
|
|
||||||
$('#attribute-table-content2').append(str)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// 清空现有内容
|
||||||
|
$("#attribute-table-content2").empty();
|
||||||
|
|
||||||
|
// 构建表头
|
||||||
|
const thead = $('<tr>').attr('id', columns.id);
|
||||||
|
columnNames.forEach((name, index) => {
|
||||||
|
$('<td>')
|
||||||
|
.addClass('dialogTableHead')
|
||||||
|
.css('width', columnWidths[index])
|
||||||
|
.text(columns[name])
|
||||||
|
.appendTo(thead);
|
||||||
|
});
|
||||||
|
$('#attribute-table-content2').append(thead);
|
||||||
|
|
||||||
|
// 构建表格内容
|
||||||
|
dialogTable.slice(1).forEach(row => {
|
||||||
|
const tr = $('<tr>').attr('id', row.id);
|
||||||
|
columnNames.forEach((_, index) => {
|
||||||
|
$('<td>')
|
||||||
|
.css('width', columnWidths[index])
|
||||||
|
.text(row[columnNames[index]])
|
||||||
|
.appendTo(tr);
|
||||||
|
});
|
||||||
|
$('#attribute-table-content2').append(tr);
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化对话框
|
||||||
$("#attribute-table-window2").dialog({
|
$("#attribute-table-window2").dialog({
|
||||||
title: tableName,
|
title: tableName,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
buttons : [{
|
buttons: [
|
||||||
text : '确定',
|
{
|
||||||
cls : "blue",
|
text: '确定',
|
||||||
handler : function() {
|
cls: "blue",
|
||||||
$("#attribute-table-window2").dialog('close');
|
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(){
|
Array.prototype.unique = function(){
|
||||||
var res = [];
|
var res = [];
|
||||||
var json = {};
|
var json = {};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user