ProcessViewer.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. <template>
  2. <div class="my-process-designer">
  3. <div class="my-process-designer__container">
  4. <div class="my-process-designer__canvas" style="height: 760px" ref="bpmnCanvas"></div>
  5. </div>
  6. </div>
  7. </template>
  8. <script setup lang="ts" name="MyProcessViewer">
  9. import BpmnViewer from 'bpmn-js/lib/Viewer'
  10. import DefaultEmptyXML from './plugins/defaultEmpty'
  11. import { onMounted, onBeforeUnmount, provide, ref, watch, toRaw } from 'vue'
  12. import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
  13. const props = defineProps({
  14. value: {
  15. // BPMN XML 字符串
  16. type: String
  17. },
  18. prefix: {
  19. // 使用哪个引擎
  20. type: String,
  21. default: 'camunda'
  22. },
  23. activityData: {
  24. // 活动的数据。传递时,可高亮流程
  25. type: Array,
  26. default: () => []
  27. },
  28. processInstanceData: {
  29. // 流程实例的数据。传递时,可展示流程发起人等信息
  30. type: Object
  31. },
  32. taskData: {
  33. // 任务实例的数据。传递时,可展示 UserTask 审核相关的信息
  34. type: Array,
  35. default: () => []
  36. }
  37. })
  38. provide('configGlobal', props)
  39. const emit = defineEmits(['destroy'])
  40. let bpmnModeler
  41. const xml = ref('')
  42. const activityLists = ref([])
  43. const processInstance = ref(undefined)
  44. const taskList = ref([])
  45. const bpmnCanvas = ref()
  46. // const element = ref()
  47. const elementOverlayIds = ref(null)
  48. const overlays = ref(null)
  49. const initBpmnModeler = () => {
  50. if (bpmnModeler) return
  51. bpmnModeler = new BpmnViewer({
  52. container: bpmnCanvas.value,
  53. bpmnRenderer: {}
  54. })
  55. }
  56. /* 创建新的流程图 */
  57. const createNewDiagram = async (xml) => {
  58. // 将字符串转换成图显示出来
  59. let newId = `Process_${new Date().getTime()}`
  60. let newName = `业务流程_${new Date().getTime()}`
  61. let xmlString = xml || DefaultEmptyXML(newId, newName, props.prefix)
  62. try {
  63. let { warnings } = await bpmnModeler.importXML(xmlString)
  64. if (warnings && warnings.length) {
  65. warnings.forEach((warn) => console.warn(warn))
  66. }
  67. // 高亮流程图
  68. await highlightDiagram()
  69. const canvas = bpmnModeler.get('canvas')
  70. canvas.zoom('fit-viewport', 'auto')
  71. } catch (e) {
  72. console.error(e)
  73. // console.error(`[Process Designer Warn]: ${e?.message || e}`);
  74. }
  75. }
  76. /* 高亮流程图 */
  77. // TODO 芋艿:如果多个 endActivity 的话,目前的逻辑可能有一定的问题。https://www.jdon.com/workflow/multi-events.html
  78. const highlightDiagram = async () => {
  79. const activityList = activityLists.value
  80. if (activityList.length === 0) {
  81. return
  82. }
  83. // 参考自 https://gitee.com/tony2y/RuoYi-flowable/blob/master/ruoyi-ui/src/components/Process/index.vue#L222 实现
  84. // 再次基础上,增加不同审批结果的颜色等等
  85. let canvas = bpmnModeler.get('canvas')
  86. let todoActivity = activityList.find((m) => !m.endTime) // 找到待办的任务
  87. let endActivity = activityList[activityList.length - 1] // 获得最后一个任务
  88. // debugger
  89. bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach((n) => {
  90. let activity = activityList.find((m) => m.key === n.id) // 找到对应的活动
  91. if (!activity) {
  92. return
  93. }
  94. if (n.$type === 'bpmn:UserTask') {
  95. // 用户任务
  96. // 处理用户任务的高亮
  97. const task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
  98. if (!task) {
  99. return
  100. }
  101. // 高亮任务
  102. canvas.addMarker(n.id, getResultCss(task.result))
  103. // 如果非通过,就不走后面的线条了
  104. if (task.result !== 2) {
  105. return
  106. }
  107. // 处理 outgoing 出线
  108. const outgoing = getActivityOutgoing(activity)
  109. outgoing?.forEach((nn) => {
  110. // debugger
  111. let targetActivity = activityList.find((m) => m.key === nn.targetRef.id)
  112. // 如果目标活动存在,则根据该活动是否结束,进行【bpmn:SequenceFlow】连线的高亮设置
  113. if (targetActivity) {
  114. canvas.addMarker(nn.id, targetActivity.endTime ? 'highlight' : 'highlight-todo')
  115. } else if (nn.targetRef.$type === 'bpmn:ExclusiveGateway') {
  116. // TODO 芋艿:这个流程,暂时没走到过
  117. canvas.addMarker(nn.id, activity.endTime ? 'highlight' : 'highlight-todo')
  118. canvas.addMarker(nn.targetRef.id, activity.endTime ? 'highlight' : 'highlight-todo')
  119. } else if (nn.targetRef.$type === 'bpmn:EndEvent') {
  120. // TODO 芋艿:这个流程,暂时没走到过
  121. if (!todoActivity && endActivity.key === n.id) {
  122. canvas.addMarker(nn.id, 'highlight')
  123. canvas.addMarker(nn.targetRef.id, 'highlight')
  124. }
  125. if (!activity.endTime) {
  126. canvas.addMarker(nn.id, 'highlight-todo')
  127. canvas.addMarker(nn.targetRef.id, 'highlight-todo')
  128. }
  129. }
  130. })
  131. } else if (n.$type === 'bpmn:ExclusiveGateway') {
  132. // 排它网关
  133. // 设置【bpmn:ExclusiveGateway】排它网关的高亮
  134. canvas.addMarker(n.id, getActivityHighlightCss(activity))
  135. // 查找需要高亮的连线
  136. let matchNN = undefined
  137. let matchActivity = undefined
  138. n.outgoing?.forEach((nn) => {
  139. let targetActivity = activityList.find((m) => m.key === nn.targetRef.id)
  140. if (!targetActivity) {
  141. return
  142. }
  143. // 特殊判断 endEvent 类型的原因,ExclusiveGateway 可能后续连有 2 个路径:
  144. // 1. 一个是 UserTask => EndEvent
  145. // 2. 一个是 EndEvent
  146. // 在选择路径 1 时,其实 EndEvent 可能也存在,导致 1 和 2 都高亮,显然是不正确的。
  147. // 所以,在 matchActivity 为 EndEvent 时,需要进行覆盖~~
  148. if (!matchActivity || matchActivity.type === 'endEvent') {
  149. matchNN = nn
  150. matchActivity = targetActivity
  151. }
  152. })
  153. if (matchNN && matchActivity) {
  154. canvas.addMarker(matchNN.id, getActivityHighlightCss(matchActivity))
  155. }
  156. } else if (n.$type === 'bpmn:ParallelGateway') {
  157. // 并行网关
  158. // 设置【bpmn:ParallelGateway】并行网关的高亮
  159. canvas.addMarker(n.id, getActivityHighlightCss(activity))
  160. n.outgoing?.forEach((nn) => {
  161. // 获得连线是否有指向目标。如果有,则进行高亮
  162. const targetActivity = activityList.find((m) => m.key === nn.targetRef.id)
  163. if (targetActivity) {
  164. canvas.addMarker(nn.id, getActivityHighlightCss(targetActivity)) // 高亮【bpmn:SequenceFlow】连线
  165. // 高亮【...】目标。其中 ... 可以是 bpm:UserTask、也可以是其它的。当然,如果是 bpm:UserTask 的话,其实不做高亮也没问题,因为上面有逻辑做了这块。
  166. canvas.addMarker(nn.targetRef.id, getActivityHighlightCss(targetActivity))
  167. }
  168. })
  169. } else if (n.$type === 'bpmn:StartEvent') {
  170. // 开始节点
  171. n.outgoing?.forEach((nn) => {
  172. // outgoing 例如说【bpmn:SequenceFlow】连线
  173. // 获得连线是否有指向目标。如果有,则进行高亮
  174. let targetActivity = activityList.find((m) => m.key === nn.targetRef.id)
  175. if (targetActivity) {
  176. canvas.addMarker(nn.id, 'highlight') // 高亮【bpmn:SequenceFlow】连线
  177. canvas.addMarker(n.id, 'highlight') // 高亮【bpmn:StartEvent】开始节点(自己)
  178. }
  179. })
  180. } else if (n.$type === 'bpmn:EndEvent') {
  181. // 结束节点
  182. if (!processInstance.value || processInstance.value.result === 1) {
  183. return
  184. }
  185. canvas.addMarker(n.id, getResultCss(processInstance.value.result))
  186. } else if (n.$type === 'bpmn:ServiceTask') {
  187. //服务任务
  188. if (activity.startTime > 0 && activity.endTime === 0) {
  189. //进入执行,标识进行色
  190. canvas.addMarker(n.id, getResultCss(1))
  191. }
  192. if (activity.endTime > 0) {
  193. // 执行完成,节点标识完成色, 所有outgoing标识完成色。
  194. canvas.addMarker(n.id, getResultCss(2))
  195. const outgoing = getActivityOutgoing(activity)
  196. outgoing?.forEach((out) => {
  197. canvas.addMarker(out.id, getResultCss(2))
  198. })
  199. }
  200. }
  201. })
  202. }
  203. const getActivityHighlightCss = (activity) => {
  204. return activity.endTime ? 'highlight' : 'highlight-todo'
  205. }
  206. const getResultCss = (result) => {
  207. if (result === 1) {
  208. // 审批中
  209. return 'highlight-todo'
  210. } else if (result === 2) {
  211. // 已通过
  212. return 'highlight'
  213. } else if (result === 3) {
  214. // 不通过
  215. return 'highlight-reject'
  216. } else if (result === 4) {
  217. // 已取消
  218. return 'highlight-cancel'
  219. }
  220. return ''
  221. }
  222. const getActivityOutgoing = (activity) => {
  223. // 如果有 outgoing,则直接使用它
  224. if (activity.outgoing && activity.outgoing.length > 0) {
  225. return activity.outgoing
  226. }
  227. // 如果没有,则遍历获得起点为它的【bpmn:SequenceFlow】节点们。原因是:bpmn-js 的 UserTask 拿不到 outgoing
  228. const flowElements = bpmnModeler.getDefinitions().rootElements[0].flowElements
  229. const outgoing = []
  230. flowElements.forEach((item) => {
  231. if (item.$type !== 'bpmn:SequenceFlow') {
  232. return
  233. }
  234. if (item.sourceRef.id === activity.key) {
  235. outgoing.push(item)
  236. }
  237. })
  238. return outgoing
  239. }
  240. const initModelListeners = () => {
  241. const EventBus = bpmnModeler.get('eventBus')
  242. // 注册需要的监听事件
  243. EventBus.on('element.hover', function (eventObj) {
  244. let element = eventObj ? eventObj.element : null
  245. elementHover(element)
  246. })
  247. EventBus.on('element.out', function (eventObj) {
  248. let element = eventObj ? eventObj.element : null
  249. elementOut(element)
  250. })
  251. }
  252. // 流程图的元素被 hover
  253. const elementHover = (element) => {
  254. element.value = element
  255. !elementOverlayIds.value && (elementOverlayIds.value = {})
  256. !overlays.value && (overlays.value = bpmnModeler.get('overlays'))
  257. // 展示信息
  258. console.log(activityLists.value, 'activityLists.value')
  259. console.log(element.value, 'element.value')
  260. const activity = activityLists.value.find((m) => m.key === element.value.id)
  261. console.log(activity, 'activityactivityactivityactivity')
  262. // if (!activity) {
  263. // return
  264. // }
  265. if (!elementOverlayIds.value[element.value.id] && element.value.type !== 'bpmn:Process') {
  266. let html = `<div class="element-overlays">
  267. <p>Elemet id: ${element.value.id}</p>
  268. <p>Elemet type: ${element.value.type}</p>
  269. </div>` // 默认值
  270. if (element.value.type === 'bpmn:StartEvent' && processInstance.value) {
  271. html = `<p>发起人:${processInstance.value.startUser.nickname}</p>
  272. <p>部门:${processInstance.value.startUser.deptName}</p>
  273. <p>创建时间:${parseTime(processInstance.value.createTime)}`
  274. } else if (element.value.type === 'bpmn:UserTask') {
  275. // debugger
  276. let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
  277. if (!task) {
  278. return
  279. }
  280. let optionData = getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT)
  281. let dataResult = ''
  282. optionData.forEach((element) => {
  283. if (element.value == task.result) {
  284. dataResult = element.label
  285. }
  286. })
  287. html = `<p>审批人:${task.assigneeUser.nickname}</p>
  288. <p>部门:${task.assigneeUser.deptName}</p>
  289. <p>结果:${dataResult}</p>
  290. <p>创建时间:${parseTime(task.createTime)}</p>`
  291. // html = `<p>审批人:${task.assigneeUser.nickname}</p>
  292. // <p>部门:${task.assigneeUser.deptName}</p>
  293. // <p>结果:${getIntDictOptions(
  294. // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
  295. // task.result
  296. // )}</p>
  297. // <p>创建时间:${parseTime(task.createTime)}</p>`
  298. if (task.endTime) {
  299. html += `<p>结束时间:${parseTime(task.endTime)}</p>`
  300. }
  301. if (task.reason) {
  302. html += `<p>审批建议:${task.reason}</p>`
  303. }
  304. } else if (element.value.type === 'bpmn:ServiceTask' && processInstance.value) {
  305. if (activity.startTime > 0) {
  306. html = `<p>创建时间:${parseTime(activity.startTime)}</p>`
  307. }
  308. if (activity.endTime > 0) {
  309. html += `<p>结束时间:${parseTime(activity.endTime)}</p>`
  310. }
  311. console.log(html)
  312. } else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) {
  313. let optionData = getIntDictOptions(DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT)
  314. let dataResult = ''
  315. optionData.forEach((element) => {
  316. if (element.value == processInstance.value.result) {
  317. dataResult = element.label
  318. }
  319. })
  320. html = `<p>结果:${dataResult}</p>`
  321. // html = `<p>结果:${getIntDictOptions(
  322. // DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
  323. // processInstance.value.result
  324. // )}</p>`
  325. if (processInstance.value.endTime) {
  326. html += `<p>结束时间:${parseTime(processInstance.value.endTime)}</p>`
  327. }
  328. }
  329. console.log(html, 'html111111111111111')
  330. elementOverlayIds.value[element.value.id] = toRaw(overlays.value).add(element.value, {
  331. position: { left: 0, bottom: 0 },
  332. html: `<div class="element-overlays">${html}</div>`
  333. })
  334. }
  335. }
  336. // 流程图的元素被 out
  337. const elementOut = (element) => {
  338. toRaw(overlays.value).remove({ element })
  339. elementOverlayIds.value[element.id] = null
  340. }
  341. const parseTime = (time) => {
  342. if (!time) {
  343. return null
  344. }
  345. const format = '{y}-{m}-{d} {h}:{i}:{s}'
  346. let date
  347. if (typeof time === 'object') {
  348. date = time
  349. } else {
  350. if (typeof time === 'string' && /^[0-9]+$/.test(time)) {
  351. time = parseInt(time)
  352. } else if (typeof time === 'string') {
  353. time = time
  354. .replace(new RegExp(/-/gm), '/')
  355. .replace('T', ' ')
  356. .replace(new RegExp(/\.[\d]{3}/gm), '')
  357. }
  358. if (typeof time === 'number' && time.toString().length === 10) {
  359. time = time * 1000
  360. }
  361. date = new Date(time)
  362. }
  363. const formatObj = {
  364. y: date.getFullYear(),
  365. m: date.getMonth() + 1,
  366. d: date.getDate(),
  367. h: date.getHours(),
  368. i: date.getMinutes(),
  369. s: date.getSeconds(),
  370. a: date.getDay()
  371. }
  372. const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
  373. let value = formatObj[key]
  374. // Note: getDay() returns 0 on Sunday
  375. if (key === 'a') {
  376. return ['日', '一', '二', '三', '四', '五', '六'][value]
  377. }
  378. if (result.length > 0 && value < 10) {
  379. value = '0' + value
  380. }
  381. return value || 0
  382. })
  383. return time_str
  384. }
  385. onMounted(() => {
  386. xml.value = props.value
  387. activityLists.value = props.activityData
  388. // 初始化
  389. initBpmnModeler()
  390. createNewDiagram(xml.value)
  391. // 初始模型的监听器
  392. initModelListeners()
  393. })
  394. onBeforeUnmount(() => {
  395. // this.$once('hook:beforeDestroy', () => {
  396. // })
  397. if (bpmnModeler) bpmnModeler.destroy()
  398. emit('destroy', bpmnModeler)
  399. bpmnModeler = null
  400. })
  401. watch(
  402. () => props.value,
  403. (newValue) => {
  404. xml.value = newValue
  405. createNewDiagram(xml.value)
  406. }
  407. )
  408. watch(
  409. () => props.activityData,
  410. (newActivityData) => {
  411. activityLists.value = newActivityData
  412. createNewDiagram(xml.value)
  413. }
  414. )
  415. watch(
  416. () => props.processInstanceData,
  417. (newProcessInstanceData) => {
  418. processInstance.value = newProcessInstanceData
  419. createNewDiagram(xml.value)
  420. }
  421. )
  422. watch(
  423. () => props.taskData,
  424. (newTaskListData) => {
  425. taskList.value = newTaskListData
  426. createNewDiagram(xml.value)
  427. }
  428. )
  429. </script>
  430. <style>
  431. /** 处理中 */
  432. .highlight-todo.djs-connection > .djs-visual > path {
  433. stroke: #1890ff !important;
  434. stroke-dasharray: 4px !important;
  435. fill-opacity: 0.2 !important;
  436. }
  437. .highlight-todo.djs-shape .djs-visual > :nth-child(1) {
  438. fill: #1890ff !important;
  439. stroke: #1890ff !important;
  440. stroke-dasharray: 4px !important;
  441. fill-opacity: 0.2 !important;
  442. }
  443. :deep(.highlight-todo.djs-connection > .djs-visual > path) {
  444. stroke: #1890ff !important;
  445. stroke-dasharray: 4px !important;
  446. fill-opacity: 0.2 !important;
  447. marker-end: url(#sequenceflow-end-_E7DFDF-_E7DFDF-803g1kf6zwzmcig1y2ulm5egr);
  448. }
  449. :deep(.highlight-todo.djs-shape .djs-visual > :nth-child(1)) {
  450. fill: #1890ff !important;
  451. stroke: #1890ff !important;
  452. stroke-dasharray: 4px !important;
  453. fill-opacity: 0.2 !important;
  454. }
  455. /** 通过 */
  456. .highlight.djs-shape .djs-visual > :nth-child(1) {
  457. fill: green !important;
  458. stroke: green !important;
  459. fill-opacity: 0.2 !important;
  460. }
  461. .highlight.djs-shape .djs-visual > :nth-child(2) {
  462. fill: green !important;
  463. }
  464. .highlight.djs-shape .djs-visual > path {
  465. fill: green !important;
  466. fill-opacity: 0.2 !important;
  467. stroke: green !important;
  468. }
  469. .highlight.djs-connection > .djs-visual > path {
  470. stroke: green !important;
  471. }
  472. .highlight:not(.djs-connection) .djs-visual > :nth-child(1) {
  473. fill: green !important; /* color elements as green */
  474. }
  475. :deep(.highlight.djs-shape .djs-visual > :nth-child(1)) {
  476. fill: green !important;
  477. stroke: green !important;
  478. fill-opacity: 0.2 !important;
  479. }
  480. :deep(.highlight.djs-shape .djs-visual > :nth-child(2)) {
  481. fill: green !important;
  482. }
  483. :deep(.highlight.djs-shape .djs-visual > path) {
  484. fill: green !important;
  485. fill-opacity: 0.2 !important;
  486. stroke: green !important;
  487. }
  488. :deep(.highlight.djs-connection > .djs-visual > path) {
  489. stroke: green !important;
  490. }
  491. /** 不通过 */
  492. .highlight-reject.djs-shape .djs-visual > :nth-child(1) {
  493. fill: red !important;
  494. stroke: red !important;
  495. fill-opacity: 0.2 !important;
  496. }
  497. .highlight-reject.djs-shape .djs-visual > :nth-child(2) {
  498. fill: red !important;
  499. }
  500. .highlight-reject.djs-shape .djs-visual > path {
  501. fill: red !important;
  502. fill-opacity: 0.2 !important;
  503. stroke: red !important;
  504. }
  505. .highlight-reject.djs-connection > .djs-visual > path {
  506. stroke: red !important;
  507. }
  508. .highlight-reject:not(.djs-connection) .djs-visual > :nth-child(1) {
  509. fill: red !important; /* color elements as green */
  510. }
  511. :deep(.highlight-reject.djs-shape .djs-visual > :nth-child(1)) {
  512. fill: red !important;
  513. stroke: red !important;
  514. fill-opacity: 0.2 !important;
  515. }
  516. :deep(.highlight-reject.djs-shape .djs-visual > :nth-child(2)) {
  517. fill: red !important;
  518. }
  519. :deep(.highlight-reject.djs-shape .djs-visual > path) {
  520. fill: red !important;
  521. fill-opacity: 0.2 !important;
  522. stroke: red !important;
  523. }
  524. :deep(.highlight-reject.djs-connection > .djs-visual > path) {
  525. stroke: red !important;
  526. }
  527. /** 已取消 */
  528. .highlight-cancel.djs-shape .djs-visual > :nth-child(1) {
  529. fill: grey !important;
  530. stroke: grey !important;
  531. fill-opacity: 0.2 !important;
  532. }
  533. .highlight-cancel.djs-shape .djs-visual > :nth-child(2) {
  534. fill: grey !important;
  535. }
  536. .highlight-cancel.djs-shape .djs-visual > path {
  537. fill: grey !important;
  538. fill-opacity: 0.2 !important;
  539. stroke: grey !important;
  540. }
  541. .highlight-cancel.djs-connection > .djs-visual > path {
  542. stroke: grey !important;
  543. }
  544. .highlight-cancel:not(.djs-connection) .djs-visual > :nth-child(1) {
  545. fill: grey !important; /* color elements as green */
  546. }
  547. :deep(.highlight-cancel.djs-shape .djs-visual > :nth-child(1)) {
  548. fill: grey !important;
  549. stroke: grey !important;
  550. fill-opacity: 0.2 !important;
  551. }
  552. :deep(.highlight-cancel.djs-shape .djs-visual > :nth-child(2)) {
  553. fill: grey !important;
  554. }
  555. :deep(.highlight-cancel.djs-shape .djs-visual > path) {
  556. fill: grey !important;
  557. fill-opacity: 0.2 !important;
  558. stroke: grey !important;
  559. }
  560. :deep(.highlight-cancel.djs-connection > .djs-visual > path) {
  561. stroke: grey !important;
  562. }
  563. .element-overlays {
  564. box-sizing: border-box;
  565. padding: 8px;
  566. background: rgba(0, 0, 0, 0.6);
  567. border-radius: 4px;
  568. color: #fafafa;
  569. width: 200px;
  570. }
  571. </style>