基本算完成第一个版本的流程图高亮,基于前端实现

This commit is contained in:
YunaiV 2022-01-21 01:18:04 +08:00
parent 34a0f0ea9d
commit d839adedff

View File

@ -104,11 +104,6 @@ export default {
/* 高亮流程图 */
// TODO endActivity https://www.jdon.com/workflow/multi-events.html
async highlightDiagram() {
// let activityList = this.activityList.filter(task => {
// if (task.type !== 'sequenceFlow') { // 线
// return true;
// }
// });
const activityList = this.activityList;
if (activityList.length === 0) {
return;
@ -141,15 +136,13 @@ export default {
outgoing?.forEach(nn => {
// debugger
let targetActivity = activityList.find(m => m.key === nn.targetRef.id)
// bpmn:SequenceFlow线
if (targetActivity) {
// debugger
canvas.addMarker(nn.id, targetActivity.endTime ? 'highlight' : 'highlight-todo');
} else if (nn.targetRef.$type === 'bpmn:ExclusiveGateway') {
// debugger
} else if (nn.targetRef.$type === 'bpmn:ExclusiveGateway') { // TODO
canvas.addMarker(nn.id, activity.endTime ? 'highlight' : 'highlight-todo');
canvas.addMarker(nn.targetRef.id, activity.endTime ? 'highlight' : 'highlight-todo');
} else if (nn.targetRef.$type === 'bpmn:EndEvent') {
// debugger
} else if (nn.targetRef.$type === 'bpmn:EndEvent') { // TODO
if (!todoActivity && endActivity.key === n.id) {
canvas.addMarker(nn.id, 'highlight');
canvas.addMarker(nn.targetRef.id, 'highlight');