Skip to content

Commit b8b966f

Browse files
committed
add FlowData.isReject()
1 parent eb3fb9a commit b8b966f

File tree

1 file changed

+14
-0
lines changed
  • admin-ui/src/components/Flow/flow

1 file changed

+14
-0
lines changed

admin-ui/src/components/Flow/flow/data.ts

+14
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,20 @@ export class FlowData extends FlowWorkData {
268268
return false;
269269
}
270270

271+
// 是否是退回状态
272+
isReject(){
273+
const historyRecords = this.data.historyRecords || [];
274+
const currentRecord = this.data.flowRecord;
275+
if(currentRecord && historyRecords.length>0){
276+
const preId = currentRecord.preId;
277+
const preRecord = historyRecords.find((item:any)=>item.id===preId);
278+
if(preRecord){
279+
return preRecord.flowSourceDirection === 'REJECT';
280+
}
281+
}
282+
return false;
283+
}
284+
271285
// 是否是结束节点
272286
private isFinished() {
273287
if (this.data.flowRecord) {

0 commit comments

Comments
 (0)