From cc3f35a635973d399bb2e310507cf4eb4508da5f Mon Sep 17 00:00:00 2001 From: qinoy Date: Thu, 1 Jun 2023 12:19:43 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=AF=E5=88=B0=E7=AB=AF=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20=E8=8A=82=E7=82=B9=E5=B1=95=E5=BC=80=E5=90=8E=20=E5=B1=95?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E9=97=AD=E7=9A=84=E5=9B=BE=E6=A0=87=E6=B8=B2?= =?UTF-8?q?=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../diagraming/designer.method.subprocess.js | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js index c8878d59..e560570a 100644 --- a/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js +++ b/com.actionsoft.apps.coe.pal/web/com.actionsoft.apps.coe.pal/lib/designer/scripts/diagraming/designer.method.subprocess.js @@ -6,6 +6,7 @@ $(function(){ (function (Model, ruuid, sid) { const subProcess = new SubProcess(Model, ruuid, sid); subProcess.shapeIconRender(); + window.subProcess = subProcess; // 连线框 鼠标指针样式设置 防止因为连线z-index层级较高 会导致节点展开图标点击不到 $('.shape_box.linker_box').css({ @@ -29,14 +30,16 @@ class SubProcess { for (let shapeId in elements) { let shape = elements[shapeId]; if (shape.name == 'linker') continue; // 当前元素为连线的话 直接略过 - if (shape.name == 'subProcess') { // 当前元素为子流程节点 渲染展开图标 并绑定展开事件 - let expandIcon = ""; - $('#'+shapeId).append(expandIcon); - $('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeExpand); - }else { // 当前元素为虚线范围限制框的话 渲染关闭图标 并绑定关闭事件 - let closeIcon = ""; - $('#'+shapeId).append(closeIcon); - $('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeClose); + if (shape.name == 'scopeLimitation' || shape.name == 'subProcess'){ // 只有子流程或者范围选择框才有对应的图标渲染 + if (shape.name == 'subProcess') { // 当前元素为子流程节点 渲染展开图标 并绑定展开事件 + let expandIcon = ""; + $('#'+shapeId).append(expandIcon); + $('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeExpand); + }else { // 当前元素为虚线范围限制框的话 渲染关闭图标 并绑定关闭事件 + let closeIcon = ""; + $('#'+shapeId).append(closeIcon); + $('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeClose); + } } } } @@ -66,9 +69,11 @@ class SubProcess { shapeId: param.shapeId }, ok: function(r){ - console.log(JSON.stringify(r.data)); + // console.log(JSON.stringify(r.data)); definition = JSON.stringify(r.data); - Designer.open(definition); + Designer.open(definition); // 节点重新渲染 + // 针对范围标识框渲染 节点关闭按钮 + window.subProcess.shapeIconRender(); }, err: function(r){ $.simpleAlert(r.msg);