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 40d18abf..c9bad3a2 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 @@ -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 = '' + ' ' + objName + requiredSpan + '' + ' ' @@ -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) { + '' + '删除' + '' - 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() }