From 4aa42f5c20d56661a3d7dbaad8a9d0a21bbb5f73 Mon Sep 17 00:00:00 2001
From: bleachtred <bleachtred@163.com>
Date: 星期四, 18 四月 2024 11:29:57 +0800
Subject: [PATCH] fix  角色必填*号

---
 src/components/BpmnView/index.vue |   41 ++++++++++++++++++++++++++++-------------
 1 files changed, 28 insertions(+), 13 deletions(-)

diff --git a/src/components/BpmnView/index.vue b/src/components/BpmnView/index.vue
index 75a89cd..fa625bf 100644
--- a/src/components/BpmnView/index.vue
+++ b/src/components/BpmnView/index.vue
@@ -38,7 +38,6 @@
 import ZoomScrollModule from 'diagram-js/lib/navigation/zoomscroll';
 import { ModuleDeclaration } from 'didi';
 import { Canvas, ModdleElement } from 'bpmn';
-import defaultXML from '@/components/BpmnDesign/assets/defaultXML';
 import EventBus from 'diagram-js/lib/core/EventBus';
 import Overlays from 'diagram-js/lib/features/overlays/Overlays';
 import processApi from '@/api/workflow/processInstance/index';
@@ -146,10 +145,8 @@
 //閫掑綊涓婅壊
 const bpmnNodeList = (flowElements, canvas) => {
   flowElements.forEach((n) => {
-    console.log(n);
     if (n.$type === 'bpmn:UserTask') {
       const completeTask = taskList.value.find((m) => m.key === n.id);
-      console.log(completeTask);
       if (completeTask) {
         canvas.addMarker(n.id, completeTask.completed ? 'highlight' : 'highlight-todo');
         n.outgoing?.forEach((nn) => {
@@ -212,7 +209,6 @@
           if (completeTask) {
             canvas.addMarker(nn.id, 'highlight');
             canvas.addMarker(n.id, 'highlight');
-            // return;
           }
         });
       }
@@ -293,7 +289,7 @@
   }
 }
 .bpmn-el-container {
-  height: 500px;
+  height: calc(100vh - 350px);
 }
 .flow-containers {
   width: 100%;
@@ -342,16 +338,35 @@
   :deep(.highlight.djs-connection > .djs-visual > path) {
     stroke: green !important;
   }
-  :deep(.highlight-todo.djs-connection > .djs-visual > path) {
-    stroke: orange !important;
-    stroke-dasharray: 4px !important;
-    fill-opacity: 0.2 !important;
-    marker-end: url(#sequenceflow-end-_E7DFDF-_E7DFDF-803g1kf6zwzmcig1y2ulm5egr);
+
+  // 杈规婊氬姩鍔ㄧ敾
+  @keyframes path-animation {
+    from {
+      stroke-dashoffset: 100%;
+    }
+
+    to {
+      stroke-dashoffset: 0%;
+    }
   }
-  :deep(.highlight-todo.djs-shape .djs-visual > :nth-child(1)) {
-    fill: orange !important;
-    stroke: orange !important;
+
+  :deep(.highlight-todo.djs-connection > .djs-visual > path) {
+    animation: path-animation 60s;
+    animation-timing-function: linear;
+    animation-iteration-count: infinite;
     stroke-dasharray: 4px !important;
+    stroke: orange !important;
+    fill-opacity: 0.2 !important;
+    marker-end: url('#sequenceflow-end-_E7DFDF-_E7DFDF-803g1kf6zwzmcig1y2ulm5egr');
+  }
+
+  :deep(.highlight-todo.djs-shape .djs-visual > :nth-child(1)) {
+    animation: path-animation 60s;
+    animation-timing-function: linear;
+    animation-iteration-count: infinite;
+    stroke-dasharray: 4px !important;
+    stroke: orange !important;
+    fill: orange !important;
     fill-opacity: 0.2 !important;
   }
 }

--
Gitblit v1.9.3