|
@@ -33,6 +33,10 @@ export default {
|
|
|
type: Object,
|
|
|
default: () => {},
|
|
|
},
|
|
|
+ nodeLogList: {
|
|
|
+ type: Array,
|
|
|
+ default: () => [],
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -114,19 +118,29 @@ export default {
|
|
|
|
|
|
// 设置高亮颜色的
|
|
|
fillColor(nodeData) {
|
|
|
+ console.log("nodeData", nodeData);
|
|
|
const canvas = this.bpmnViewer.get("canvas");
|
|
|
+ let isReject = false;
|
|
|
this.bpmnViewer
|
|
|
.getDefinitions()
|
|
|
.rootElements[0].flowElements.forEach((n) => {
|
|
|
const completeTask = nodeData.find((m) => m.key === n.id);
|
|
|
+ console.log(completeTask);
|
|
|
+
|
|
|
const todoTask = nodeData.find((m) => !m.completed);
|
|
|
const endTask = nodeData[nodeData.length - 1];
|
|
|
if (n.$type === "bpmn:UserTask") {
|
|
|
if (completeTask) {
|
|
|
- canvas.addMarker(
|
|
|
- n.id,
|
|
|
- completeTask.completed ? "highlight" : "highlight-todo"
|
|
|
+ const completeTaskData = this.nodeLogList.find(
|
|
|
+ (m) => m.taskNodeKey === completeTask.key
|
|
|
);
|
|
|
+ let className = !completeTask.completed
|
|
|
+ ? "highlight-todo"
|
|
|
+ : completeTaskData.taskNodeOtherState == "pass"
|
|
|
+ ? "highlight"
|
|
|
+ : "highlight-reject";
|
|
|
+ console.log(className);
|
|
|
+ canvas.addMarker(n.id, className);
|
|
|
n.outgoing?.forEach((nn) => {
|
|
|
const targetTask = nodeData.find(
|
|
|
(m) => m.key === nn.targetRef.id
|
|
@@ -294,6 +308,22 @@ export default {
|
|
|
.highlight.djs-connection > .djs-visual > path {
|
|
|
stroke: green !important;
|
|
|
}
|
|
|
+ .highlight-reject.djs-shape .djs-visual > :nth-child(1) {
|
|
|
+ fill: rgb(238, 105, 52) !important;
|
|
|
+ stroke: rgb(238, 105, 52) !important;
|
|
|
+ fill-opacity: 0.2 !important;
|
|
|
+ }
|
|
|
+ .highlight-reject.djs-shape .djs-visual > :nth-child(2) {
|
|
|
+ fill: rgb(238, 105, 52) !important;
|
|
|
+ }
|
|
|
+ .highlight-reject.djs-shape .djs-visual > path {
|
|
|
+ fill: rgb(238, 105, 52) !important;
|
|
|
+ fill-opacity: 0.2 !important;
|
|
|
+ stroke: rgb(238, 105, 52) !important;
|
|
|
+ }
|
|
|
+ .highlight-reject.djs-connection > .djs-visual > path {
|
|
|
+ stroke: rgb(238, 105, 52) !important;
|
|
|
+ }
|
|
|
.highlight-todo.djs-connection > .djs-visual > path {
|
|
|
stroke: orange !important;
|
|
|
stroke-dasharray: 4px !important;
|