处理风控信息显示问题,是否关键控制点实际值显示问题

This commit is contained in:
yujh 2025-02-08 17:44:32 +08:00
parent 301a4d84d0
commit a7ff9a43ba
2 changed files with 55 additions and 32 deletions

View File

@ -2321,7 +2321,7 @@ function updateAttributeById(objId, va, shapeId) {
}
});
}else if(isCriticalControlPoint === "否"){
}else if(isCriticalControlPoint === "否" || isCriticalControlPoint === "请选择"){
shape.dataAttributes.forEach(function(attribute) {
if(attribute.attributesJsonArray){
//在遍历角标,锁定到右下角的角标

View File

@ -343,7 +343,7 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
} else if (!obj.readonly && obj.type == "boolean") {
constr = '<tr>';
/*constr += '<td style="padding-left:20px;" class="tableContent">' + obj.name + '</td>';*/
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【' + obj.name + '】'+'&nbsp;'+'</td>';
constr += '<td id="' + shape.id + obj.id + '" class="tableContent">' + '【' + obj.name + '】'+'&nbsp;'+ obj.value + '</td>';
constr += '</tr>';
} else if (!obj.readonly && obj.type == "textarea") {
constr = '<tr>';
@ -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 =
'<tr id="' + dialogTable[0].id + '" >'
+ '<td style="width: 30%;" class="dialogTableHead">' + dialogTable[0].name + '</td>'
+ '<td style="width: 70%;" class="dialogTableHead">' + dialogTable[0].desc + '</td>'
+'</tr>'
$('#attribute-table-content2').append(thead)
for ( let i = 1; i < dialogTable.length; i++) {
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)
}
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 = $('<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({
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 = {};