Merge branch 'dev-zhaoDN/fixbug-setColor-tryCatch' into 'dev'
fixbug:【流程图】点开流程图查看报错 See merge request itc-framework/ma/2024/front!88
This commit is contained in:
@ -125,21 +125,28 @@ function setColors(finishedIds: Array<string>, currentIds: Array<string>) {
|
||||
const elementRegistry = data.bpmnViewer.get('elementRegistry');
|
||||
if (finishedIds.length > 0) {
|
||||
finishedIds.forEach((it) => {
|
||||
let Event = elementRegistry.get(it);
|
||||
|
||||
modeling.setColor(Event, {
|
||||
stroke: 'green',
|
||||
fill: 'white',
|
||||
});
|
||||
try {
|
||||
let Event = elementRegistry.get(it);
|
||||
modeling.setColor(Event, {
|
||||
stroke: 'green',
|
||||
fill: 'white',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(`Error setColor element with id ${it}:`, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (currentIds.length > 0) {
|
||||
currentIds.forEach((it) => {
|
||||
let Event = elementRegistry.get(it);
|
||||
modeling.setColor(Event, {
|
||||
stroke: '#409eff',
|
||||
fill: 'white',
|
||||
});
|
||||
try {
|
||||
let Event = elementRegistry.get(it);
|
||||
modeling.setColor(Event, {
|
||||
stroke: '#409eff',
|
||||
fill: 'white',
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(`Error setColor element with id ${it}:`, error);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user