mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 17:21:53 +08:00
基本算完成第一个版本的流程图高亮,基于前端实现
This commit is contained in:
parent
34a0f0ea9d
commit
d839adedff
@ -104,11 +104,6 @@ export default {
|
|||||||
/* 高亮流程图 */
|
/* 高亮流程图 */
|
||||||
// TODO 芋艿:如果多个 endActivity 的话,目前的逻辑可能有一定的问题。https://www.jdon.com/workflow/multi-events.html
|
// TODO 芋艿:如果多个 endActivity 的话,目前的逻辑可能有一定的问题。https://www.jdon.com/workflow/multi-events.html
|
||||||
async highlightDiagram() {
|
async highlightDiagram() {
|
||||||
// let activityList = this.activityList.filter(task => {
|
|
||||||
// if (task.type !== 'sequenceFlow') { // 去除连线元素
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
const activityList = this.activityList;
|
const activityList = this.activityList;
|
||||||
if (activityList.length === 0) {
|
if (activityList.length === 0) {
|
||||||
return;
|
return;
|
||||||
@ -141,15 +136,13 @@ export default {
|
|||||||
outgoing?.forEach(nn => {
|
outgoing?.forEach(nn => {
|
||||||
// debugger
|
// debugger
|
||||||
let targetActivity = activityList.find(m => m.key === nn.targetRef.id)
|
let targetActivity = activityList.find(m => m.key === nn.targetRef.id)
|
||||||
|
// 如果目标活动存在,则根据该活动是否结束,进行【bpmn:SequenceFlow】连线的高亮设置
|
||||||
if (targetActivity) {
|
if (targetActivity) {
|
||||||
// debugger
|
|
||||||
canvas.addMarker(nn.id, targetActivity.endTime ? 'highlight' : 'highlight-todo');
|
canvas.addMarker(nn.id, targetActivity.endTime ? 'highlight' : 'highlight-todo');
|
||||||
} else if (nn.targetRef.$type === 'bpmn:ExclusiveGateway') {
|
} else if (nn.targetRef.$type === 'bpmn:ExclusiveGateway') { // TODO 芋艿:这个流程,暂时没走到过
|
||||||
// debugger
|
|
||||||
canvas.addMarker(nn.id, activity.endTime ? 'highlight' : 'highlight-todo');
|
canvas.addMarker(nn.id, activity.endTime ? 'highlight' : 'highlight-todo');
|
||||||
canvas.addMarker(nn.targetRef.id, activity.endTime ? 'highlight' : 'highlight-todo');
|
canvas.addMarker(nn.targetRef.id, activity.endTime ? 'highlight' : 'highlight-todo');
|
||||||
} else if (nn.targetRef.$type === 'bpmn:EndEvent') {
|
} else if (nn.targetRef.$type === 'bpmn:EndEvent') { // TODO 芋艿:这个流程,暂时没走到过
|
||||||
// debugger
|
|
||||||
if (!todoActivity && endActivity.key === n.id) {
|
if (!todoActivity && endActivity.key === n.id) {
|
||||||
canvas.addMarker(nn.id, 'highlight');
|
canvas.addMarker(nn.id, 'highlight');
|
||||||
canvas.addMarker(nn.targetRef.id, 'highlight');
|
canvas.addMarker(nn.targetRef.id, 'highlight');
|
||||||
|
Loading…
Reference in New Issue
Block a user