Skip to content

Commit e664ebd

Browse files
committed
更新 README 文档
1 parent fb8bbbf commit e664ebd

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,21 @@ export default {
120120
this.bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach(n => {
121121
let activity = activityList.find(m => m.key === n.id) // 找到对应的活动
122122
if (n.$type === 'bpmn:UserTask') { // 用户任务
123-
debugger
124123
if (!activity) {
125124
return;
126125
}
127126
// 处理用户任务的高亮
128127
const task = this.taskList.find(m => m.id === activity.taskId); // 找到活动对应的 taskId
129-
if (task) {
130-
canvas.addMarker(n.id, this.getResultCss(task.result));
131-
// 如果非通过,就不走后面的线条了
132-
if (task.result !== 2) {
133-
return;
134-
}
128+
if (!task) {
129+
return;
135130
}
131+
// 高亮任务
132+
canvas.addMarker(n.id, this.getResultCss(task.result));
136133
134+
// 如果非通过,就不走后面的线条了
135+
if (task.result !== 2) {
136+
return;
137+
}
137138
// 处理 outgoing 出线
138139
const outgoing = this.getActivityOutgoing(activity);
139140
outgoing?.forEach(nn => {
@@ -219,13 +220,13 @@ export default {
219220
return activity.endTime ? 'highlight' : 'highlight-todo';
220221
},
221222
getResultCss(result) {
222-
if (result === 1) {
223+
if (result === 1) { // 审批中
223224
return 'highlight-todo';
224-
} else if (result === 2) {
225+
} else if (result === 2) { // 已通过
225226
return 'highlight';
226-
} else if (result === 3) {
227+
} else if (result === 3) { // 不通过
227228
return 'highlight-reject';
228-
} else if (result === 4) {
229+
} else if (result === 4) { // 已取消
229230
return 'highlight-cancel';
230231
}
231232
return '';

0 commit comments

Comments
 (0)