优化 bpm 高亮流程图的排它节点~~~

This commit is contained in:
YunaiV 2022-01-22 21:10:53 +08:00
parent e12c17360a
commit 991ce2105b

View File

@ -154,12 +154,32 @@ export default {
}
});
} else if (n.$type === 'bpmn:ExclusiveGateway') { //
if (!activity) {
return
}
// bpmn:ExclusiveGateway
canvas.addMarker(n.id, this.getActivityHighlightCss(activity));
// 线
let matchNN = undefined;
let matchActivity = undefined;
n.outgoing?.forEach(nn => {
let targetTask = activityList.find(m => m.key === nn.targetRef.id);
if (targetTask) {
canvas.addMarker(nn.id, targetTask.endTime ? 'highlight' : 'highlight-todo');
let targetActivity = activityList.find(m => m.key === nn.targetRef.id);
if (!targetActivity) {
return;
}
// endEvent ExclusiveGateway 2
// 1. UserTask => EndEvent
// 2. EndEvent
// 1 EndEvent 1 2
// matchActivity EndEvent ~~
if (!matchActivity || matchActivity.type === 'endEvent') {
matchNN = nn;
matchActivity = targetActivity;
}
})
if (matchNN && matchActivity) {
canvas.addMarker(matchNN.id, this.getActivityHighlightCss(matchActivity));
}
} else if (n.$type === 'bpmn:ParallelGateway') { //
if (!activity) {
return