端到端功能 节点展开后 展开关闭的图标渲染
This commit is contained in:
parent
89e1b82652
commit
cc3f35a635
@ -6,6 +6,7 @@ $(function(){
|
|||||||
(function (Model, ruuid, sid) {
|
(function (Model, ruuid, sid) {
|
||||||
const subProcess = new SubProcess(Model, ruuid, sid);
|
const subProcess = new SubProcess(Model, ruuid, sid);
|
||||||
subProcess.shapeIconRender();
|
subProcess.shapeIconRender();
|
||||||
|
window.subProcess = subProcess;
|
||||||
|
|
||||||
// 连线框 鼠标指针样式设置 防止因为连线z-index层级较高 会导致节点展开图标点击不到
|
// 连线框 鼠标指针样式设置 防止因为连线z-index层级较高 会导致节点展开图标点击不到
|
||||||
$('.shape_box.linker_box').css({
|
$('.shape_box.linker_box').css({
|
||||||
@ -29,14 +30,16 @@ class SubProcess {
|
|||||||
for (let shapeId in elements) {
|
for (let shapeId in elements) {
|
||||||
let shape = elements[shapeId];
|
let shape = elements[shapeId];
|
||||||
if (shape.name == 'linker') continue; // 当前元素为连线的话 直接略过
|
if (shape.name == 'linker') continue; // 当前元素为连线的话 直接略过
|
||||||
if (shape.name == 'subProcess') { // 当前元素为子流程节点 渲染展开图标 并绑定展开事件
|
if (shape.name == 'scopeLimitation' || shape.name == 'subProcess'){ // 只有子流程或者范围选择框才有对应的图标渲染
|
||||||
let expandIcon = "<span id='icon_"+shapeId+"' class='iconfont icon-zhankaishousuo' style='position: absolute;cursor: pointer;'></span>";
|
if (shape.name == 'subProcess') { // 当前元素为子流程节点 渲染展开图标 并绑定展开事件
|
||||||
$('#'+shapeId).append(expandIcon);
|
let expandIcon = "<span id='icon_"+shapeId+"' class='iconfont icon-zhankaishousuo' style='position: absolute;cursor: pointer;'></span>";
|
||||||
$('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeExpand);
|
$('#'+shapeId).append(expandIcon);
|
||||||
}else { // 当前元素为虚线范围限制框的话 渲染关闭图标 并绑定关闭事件
|
$('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeExpand);
|
||||||
let closeIcon = "<span id='icon_"+shapeId+"' class='iconfont icon-quanpingshouqi' style='position: absolute;cursor: pointer;'></span>";
|
}else { // 当前元素为虚线范围限制框的话 渲染关闭图标 并绑定关闭事件
|
||||||
$('#'+shapeId).append(closeIcon);
|
let closeIcon = "<span id='icon_"+shapeId+"' class='iconfont icon-quanpingshouqi' style='position: absolute;cursor: pointer;'></span>";
|
||||||
$('#icon_'+shapeId).on('click', '', {shapeId: shapeId, Model: this.Model, repositoryId: this.repositoryId, sid: this.sid}, this.shapeClose);
|
$('#'+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
|
shapeId: param.shapeId
|
||||||
},
|
},
|
||||||
ok: function(r){
|
ok: function(r){
|
||||||
console.log(JSON.stringify(r.data));
|
// console.log(JSON.stringify(r.data));
|
||||||
definition = JSON.stringify(r.data);
|
definition = JSON.stringify(r.data);
|
||||||
Designer.open(definition);
|
Designer.open(definition); // 节点重新渲染
|
||||||
|
// 针对范围标识框渲染 节点关闭按钮
|
||||||
|
window.subProcess.shapeIconRender();
|
||||||
},
|
},
|
||||||
err: function(r){
|
err: function(r){
|
||||||
$.simpleAlert(r.msg);
|
$.simpleAlert(r.msg);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user