Skip to content

Commit 2826dbb

Browse files
committed
feat:【工作流】添加vue2版本的退回和委派前端代码
1 parent fcb39a6 commit 2826dbb

File tree

3 files changed

+230
-42
lines changed

3 files changed

+230
-42
lines changed

src/api/bpm/task.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,25 @@ export function getTaskListByProcessInstanceId(processInstanceId) {
6161
method: 'get',
6262
})
6363
}
64+
export function getReturnList(taskId) {
65+
return request({
66+
url: '/bpm/task/get-return-list?taskId='+ taskId,
67+
method: 'get',
68+
})
69+
}
70+
71+
72+
export function returnTask(data) {
73+
return request({
74+
url: '/bpm/task/return',
75+
method: 'PUT',
76+
data: data
77+
})
78+
}
79+
export function delegateTask(data) {
80+
return request({
81+
url: '/bpm/task/delegate',
82+
method: 'PUT',
83+
data: data
84+
})
85+
}

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ export default {
233233
return 'highlight-reject';
234234
} else if (result === 4) { // 已取消
235235
return 'highlight-cancel';
236+
} else if (result === 5) { // 已退回
237+
return 'highlight-back';
238+
} else if (result === 6) { // 已委派
239+
return 'highlight-todo';
236240
}
237241
return '';
238242
},
@@ -475,7 +479,33 @@ export default {
475479
:deep(.highlight-cancel.djs-connection > .djs-visual > path) {
476480
stroke: grey !important;
477481
}
482+
/**驳回 */
483+
.highlight-back.djs-connection > .djs-visual > path {
484+
stroke: #FFBA00 !important;
485+
stroke-dasharray: 4px !important;
486+
fill-opacity: 0.2 !important;
487+
}
488+
489+
.highlight-back.djs-shape .djs-visual > :nth-child(1) {
490+
fill: #FFBA00 !important;
491+
stroke: #FFBA00 !important;
492+
stroke-dasharray: 4px !important;
493+
fill-opacity: 0.2 !important;
494+
}
478495
496+
:deep(.highlight-back.djs-connection > .djs-visual > path) {
497+
stroke: #FFBA00 !important;
498+
stroke-dasharray: 4px !important;
499+
fill-opacity: 0.2 !important;
500+
marker-end: url(#sequenceflow-end-_E7DFDF-_E7DFDF-803g1kf6zwzmcig1y2ulm5egr);
501+
}
502+
503+
:deep(.highlight-back.djs-shape .djs-visual > :nth-child(1)) {
504+
fill: #FFBA00 !important;
505+
stroke: #FFBA00 !important;
506+
stroke-dasharray: 4px !important;
507+
fill-opacity: 0.2 !important;
508+
}
479509
.element-overlays {
480510
box-sizing: border-box;
481511
padding: 8px;

0 commit comments

Comments
 (0)