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);