From fa0d386fa542a2f0c09fc2fa0c6ba72edb52a0e4 Mon Sep 17 00:00:00 2001 From: "mrs_12345@163.com" Date: Fri, 8 Jul 2022 18:12:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E8=AE=A1=E5=99=A8=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E8=A1=A8=E6=A0=BC=E7=B1=BB=E5=9E=8B=E5=A4=9A?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=98=BE=E7=A4=BA=E4=B8=8E=E4=BF=9D=E5=AD=98?= =?UTF-8?q?bug=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/designer/extend/js/designer.extend.link.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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() }