端到端功能 节点展开后 展开关闭的图标渲染
This commit is contained in:
parent
89e1b82652
commit
cc3f35a635
@ -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 = "<span id='icon_"+shapeId+"' class='iconfont icon-zhankaishousuo' style='position: absolute;cursor: pointer;'></span>";
|
||||
$('#'+shapeId).append(expandIcon);
|
||||
$('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeExpand);
|
||||
}else { // 当前元素为虚线范围限制框的话 渲染关闭图标 并绑定关闭事件
|
||||
let closeIcon = "<span id='icon_"+shapeId+"' class='iconfont icon-quanpingshouqi' style='position: absolute;cursor: pointer;'></span>";
|
||||
$('#'+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 = "<span id='icon_"+shapeId+"' class='iconfont icon-zhankaishousuo' style='position: absolute;cursor: pointer;'></span>";
|
||||
$('#'+shapeId).append(expandIcon);
|
||||
$('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeExpand);
|
||||
}else { // 当前元素为虚线范围限制框的话 渲染关闭图标 并绑定关闭事件
|
||||
let closeIcon = "<span id='icon_"+shapeId+"' class='iconfont icon-quanpingshouqi' style='position: absolute;cursor: pointer;'></span>";
|
||||
$('#'+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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user