设计器数据属性表格类型多表格显示与保存bug解决
This commit is contained in:
parent
237b52c8a0
commit
fa0d386fa5
@ -1376,7 +1376,9 @@ function attributeShowTabContent(currentShape) {
|
||||
$("#dock_view_header_title").html("数据属性");
|
||||
}
|
||||
|
||||
var dialogTableList = []
|
||||
// var dialogTableList = []
|
||||
var tableObj = {}
|
||||
var curTableId = ''
|
||||
function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
||||
// 属性排序
|
||||
var defaultMoreAttr = $('#defaultMoreAttrSort').val();
|
||||
@ -1536,7 +1538,8 @@ function getPrivateAttributeHtml(attributesJsonArray, tbodyId, shape) {
|
||||
} else if (!objReadonly && objType == "table") {
|
||||
let objRef = JSON.parse(obj.ref)
|
||||
let objTableInput = obj.value.table !== undefined && obj.value.table.length > 1 ? '请查看' : '请输入'
|
||||
dialogTableList = obj.value.table == undefined ? [ { id: Utils.newId() ,name: objRef.firstColumn, desc: objRef.secondColumn} ] : obj.value.table;
|
||||
tableObj[obj.id] = obj.value.table == undefined ? [ { id: Utils.newId() ,name: objRef.firstColumn, desc: objRef.secondColumn} ] : obj.value.table;
|
||||
// dialogTableList = obj.value.table == undefined ? [ { id: Utils.newId() ,name: objRef.firstColumn, desc: objRef.secondColumn} ] : obj.value.table;
|
||||
constr = '<tr ' + mouseout + mouseover + ' class="tagContentTableTr">'
|
||||
+ ' <td>' + objName + requiredSpan + '</td>'
|
||||
+ ' <td class="tagContentTableTrTd">'
|
||||
@ -2049,6 +2052,8 @@ function showAttributedEditWindow(obj) {
|
||||
function openTableDialog(obj,value) {
|
||||
let tableName = '提示'
|
||||
let objId = $(obj).attr("objid");
|
||||
curTableId = objId
|
||||
let dialogTableList = tableObj[objId]
|
||||
let shape = Utils.getSelected()[0];
|
||||
if (shape) {
|
||||
let attributesJsonArray = [];
|
||||
@ -2144,13 +2149,13 @@ function addTableTr(obj) {
|
||||
+ '<td style="width: 270px;"><textarea type="textarea" rows="5" class="dialog_table_input_css" value=""></textarea></td>'
|
||||
+ '<td style="width: 60px;text-align: center" class="dialogTableDelete" onclick="removeTableTr(this)">删除</td>'
|
||||
+ '</tr>'
|
||||
dialogTableList.push({ id: newTrId ,name: '',desc: ''})
|
||||
tableObj[curTableId].push({ id: newTrId ,name: '',desc: ''})
|
||||
$('#attribute-table-content').append(defaultStr)
|
||||
}
|
||||
|
||||
function removeTableTr(obj) {
|
||||
let removeId = obj.parentNode.getAttribute('id')
|
||||
dialogTableList.splice(dialogTableList.findIndex(item => item.id == removeId), 1)
|
||||
tableObj[curTableId].splice(tableObj[curTableId].findIndex(item => item.id == removeId), 1)
|
||||
let tr = obj.parentNode
|
||||
tr.remove()
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user