Commit 1bb66e67830cab2d1df5e5d587a4040511cfacc6

Authored by xingyuv
1 parent 0486ec9d

feat: code format

Showing 49 changed files with 1022 additions and 1123 deletions
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/ProcessDesigner.vue
@@ -209,8 +209,7 @@ @@ -209,8 +209,7 @@
209 // import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css' 209 // import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'
210 // import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css' 210 // import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'
211 // import 'bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css' // 右侧框样式 211 // import 'bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css' // 右侧框样式
212 -import { ElTooltip, ElButtonGroup, ElButton, ElMessage, ElMessageBox } from 'element-plus'  
213 -import { computed, onBeforeMount, onBeforeUnmount, onMounted, provide, ref } from 'vue' 212 +import { ElMessage, ElMessageBox } from 'element-plus'
214 import BpmnModeler from 'bpmn-js/lib/Modeler' 213 import BpmnModeler from 'bpmn-js/lib/Modeler'
215 import DefaultEmptyXML from './plugins/defaultEmpty' 214 import DefaultEmptyXML from './plugins/defaultEmpty'
216 // 翻译方法 215 // 翻译方法
@@ -262,9 +261,17 @@ const props = defineProps({ @@ -262,9 +261,17 @@ const props = defineProps({
262 processId: String, // 流程 key 标识 261 processId: String, // 流程 key 标识
263 processName: String, // 流程 name 名字 262 processName: String, // 流程 name 名字
264 formId: Number, // 流程 form 表单编号 263 formId: Number, // 流程 form 表单编号
265 - translations: Object, // 自定义的翻译文件 264 + translations: {
  265 + // 自定义的翻译文件
  266 + type: Object,
  267 + default: () => {}
  268 + },
266 additionalModel: [Object, Array], // 自定义model 269 additionalModel: [Object, Array], // 自定义model
267 - moddleExtension: Object, // 自定义moddle 270 + moddleExtension: {
  271 + // 自定义moddle
  272 + type: Object,
  273 + default: () => {}
  274 + },
268 onlyCustomizeAddi: { 275 onlyCustomizeAddi: {
269 type: Boolean, 276 type: Boolean,
270 default: false 277 default: false
@@ -292,18 +299,18 @@ const props = defineProps({ @@ -292,18 +299,18 @@ const props = defineProps({
292 headerButtonSize: { 299 headerButtonSize: {
293 type: String, 300 type: String,
294 default: 'small', 301 default: 'small',
295 - validator: (value) => ['default', 'medium', 'small', 'mini'].indexOf(value) !== -1 302 + validator: (value: string) => ['default', 'medium', 'small', 'mini'].indexOf(value) !== -1
296 }, 303 },
297 headerButtonType: { 304 headerButtonType: {
298 type: String, 305 type: String,
299 default: 'primary', 306 default: 'primary',
300 - validator: (value) => 307 + validator: (value: string) =>
301 ['default', 'primary', 'success', 'warning', 'danger', 'info'].indexOf(value) !== -1 308 ['default', 'primary', 'success', 'warning', 'danger', 'info'].indexOf(value) !== -1
302 } 309 }
303 }) 310 })
304 311
305 provide('configGlobal', props) 312 provide('configGlobal', props)
306 -let bpmnModeler = null 313 +let bpmnModeler: any = null
307 const defaultZoom = ref(1) 314 const defaultZoom = ref(1)
308 const previewModelVisible = ref(false) 315 const previewModelVisible = ref(false)
309 const simulationStatus = ref(false) 316 const simulationStatus = ref(false)
@@ -313,7 +320,7 @@ const recoverable = ref(false) @@ -313,7 +320,7 @@ const recoverable = ref(false)
313 const revocable = ref(false) 320 const revocable = ref(false)
314 const additionalModules = computed(() => { 321 const additionalModules = computed(() => {
315 console.log(props.additionalModel, 'additionalModel') 322 console.log(props.additionalModel, 'additionalModel')
316 - const Modules = [] 323 + const Modules: any[] = []
317 // 仅保留用户自定义扩展模块 324 // 仅保留用户自定义扩展模块
318 if (props.onlyCustomizeAddi) { 325 if (props.onlyCustomizeAddi) {
319 if (Object.prototype.toString.call(props.additionalModel) == '[object Array]') { 326 if (Object.prototype.toString.call(props.additionalModel) == '[object Array]') {
@@ -361,7 +368,7 @@ const moddleExtensions = computed(() => { @@ -361,7 +368,7 @@ const moddleExtensions = computed(() => {
361 console.log(props.onlyCustomizeModdle, 'props.onlyCustomizeModdle') 368 console.log(props.onlyCustomizeModdle, 'props.onlyCustomizeModdle')
362 console.log(props.moddleExtension, 'props.moddleExtension') 369 console.log(props.moddleExtension, 'props.moddleExtension')
363 console.log(props.prefix, 'props.prefix') 370 console.log(props.prefix, 'props.prefix')
364 - const Extensions = {} 371 + const Extensions: any = {}
365 // 仅使用用户自定义模块 372 // 仅使用用户自定义模块
366 if (props.onlyCustomizeModdle) { 373 if (props.onlyCustomizeModdle) {
367 return props.moddleExtension || null 374 return props.moddleExtension || null
@@ -432,7 +439,7 @@ const initModelListeners = () => { @@ -432,7 +439,7 @@ const initModelListeners = () => {
432 const EventBus = bpmnModeler.get('eventBus') 439 const EventBus = bpmnModeler.get('eventBus')
433 console.log(EventBus, 'EventBus') 440 console.log(EventBus, 'EventBus')
434 // 注册需要的监听事件, 将. 替换为 - , 避免解析异常 441 // 注册需要的监听事件, 将. 替换为 - , 避免解析异常
435 - props.events.forEach((event) => { 442 + props.events.forEach((event: any) => {
436 EventBus.on(event, function (eventObj) { 443 EventBus.on(event, function (eventObj) {
437 let eventName = event.replace(/\./g, '-') 444 let eventName = event.replace(/\./g, '-')
438 // eventName.name = eventName 445 // eventName.name = eventName
@@ -452,7 +459,7 @@ const initModelListeners = () => { @@ -452,7 +459,7 @@ const initModelListeners = () => {
452 emit('commandStack-changed', event) 459 emit('commandStack-changed', event)
453 emit('input', xml) 460 emit('input', xml)
454 emit('change', xml) 461 emit('change', xml)
455 - } catch (e) { 462 + } catch (e: any) {
456 console.error(`[Process Designer Warn]: ${e.message || e}`) 463 console.error(`[Process Designer Warn]: ${e.message || e}`)
457 } 464 }
458 }) 465 })
@@ -478,13 +485,13 @@ const createNewDiagram = async (xml) => { @@ -478,13 +485,13 @@ const createNewDiagram = async (xml) => {
478 if (warnings && warnings.length) { 485 if (warnings && warnings.length) {
479 warnings.forEach((warn) => console.warn(warn)) 486 warnings.forEach((warn) => console.warn(warn))
480 } 487 }
481 - } catch (e) {  
482 - console.error(`[Process Designer Warn]: ${e?.message || e}`) 488 + } catch (e: any) {
  489 + console.error(`[Process Designer Warn]: ${e.message || e}`)
483 } 490 }
484 } 491 }
485 492
486 // 下载流程图到本地 493 // 下载流程图到本地
487 -const downloadProcess = async (type, name) => { 494 +const downloadProcess = async (type) => {
488 try { 495 try {
489 // 按需要类型创建文件并下载 496 // 按需要类型创建文件并下载
490 if (type === 'xml' || type === 'bpmn') { 497 if (type === 'xml' || type === 'bpmn') {
@@ -493,7 +500,7 @@ const downloadProcess = async (type, name) => { @@ -493,7 +500,7 @@ const downloadProcess = async (type, name) => {
493 if (err) { 500 if (err) {
494 console.error(`[Process Designer Warn ]: ${err.message || err}`) 501 console.error(`[Process Designer Warn ]: ${err.message || err}`)
495 } 502 }
496 - let { href, filename } = setEncoded(type.toUpperCase(), name, xml) 503 + let { href, filename } = setEncoded(type.toUpperCase(), xml)
497 downloadFunc(href, filename) 504 downloadFunc(href, filename)
498 } else { 505 } else {
499 const { err, svg } = await bpmnModeler.saveSVG() 506 const { err, svg } = await bpmnModeler.saveSVG()
@@ -501,10 +508,10 @@ const downloadProcess = async (type, name) => { @@ -501,10 +508,10 @@ const downloadProcess = async (type, name) => {
501 if (err) { 508 if (err) {
502 return console.error(err) 509 return console.error(err)
503 } 510 }
504 - let { href, filename } = setEncoded('SVG', name, svg) 511 + let { href, filename } = setEncoded('SVG', svg)
505 downloadFunc(href, filename) 512 downloadFunc(href, filename)
506 } 513 }
507 - } catch (e) { 514 + } catch (e: any) {
508 console.error(`[Process Designer Warn ]: ${e.message || e}`) 515 console.error(`[Process Designer Warn ]: ${e.message || e}`)
509 } 516 }
510 // 文件下载方法 517 // 文件下载方法
@@ -520,7 +527,8 @@ const downloadProcess = async (type, name) => { @@ -520,7 +527,8 @@ const downloadProcess = async (type, name) => {
520 } 527 }
521 528
522 // 根据所需类型进行转码并返回下载地址 529 // 根据所需类型进行转码并返回下载地址
523 -const setEncoded = (type, filename = 'diagram', data) => { 530 +const setEncoded = (type, data) => {
  531 + const filename = 'diagram'
524 const encodedData = encodeURIComponent(data) 532 const encodedData = encodeURIComponent(data)
525 return { 533 return {
526 filename: `${filename}.${type}`, 534 filename: `${filename}.${type}`,
@@ -643,7 +651,7 @@ const previewProcessJson = () => { @@ -643,7 +651,7 @@ const previewProcessJson = () => {
643 // const xmlContent = builder 651 // const xmlContent = builder
644 // console.log(xmlContent, 'xmlContent') 652 // console.log(xmlContent, 'xmlContent')
645 // console.log(xml2js, 'convertconvertconvert') 653 // console.log(xml2js, 'convertconvertconvert')
646 - previewResult.value = rootNodes.parent.toJSON() 654 + previewResult.value = rootNodes.parent?.toJSON() as unknown as string
647 // previewResult.value = jObj 655 // previewResult.value = jObj
648 // previewResult.value = convert.xml2json(xml, {explicitArray : false},{ spaces: 2 }) 656 // previewResult.value = convert.xml2json(xml, {explicitArray : false},{ spaces: 2 })
649 previewType.value = 'json' 657 previewType.value = 'json'
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/ProcessViewer.vue
@@ -9,12 +9,12 @@ @@ -9,12 +9,12 @@
9 <script setup lang="ts" name="MyProcessViewer"> 9 <script setup lang="ts" name="MyProcessViewer">
10 import BpmnViewer from 'bpmn-js/lib/Viewer' 10 import BpmnViewer from 'bpmn-js/lib/Viewer'
11 import DefaultEmptyXML from './plugins/defaultEmpty' 11 import DefaultEmptyXML from './plugins/defaultEmpty'
12 -import { onMounted, onBeforeUnmount, provide, ref, watch, toRaw } from 'vue'  
13 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict' 12 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
14 const props = defineProps({ 13 const props = defineProps({
15 value: { 14 value: {
16 // BPMN XML 字符串 15 // BPMN XML 字符串
17 - type: String 16 + type: String,
  17 + default: ''
18 }, 18 },
19 prefix: { 19 prefix: {
20 // 使用哪个引擎 20 // 使用哪个引擎
@@ -28,7 +28,8 @@ const props = defineProps({ @@ -28,7 +28,8 @@ const props = defineProps({
28 }, 28 },
29 processInstanceData: { 29 processInstanceData: {
30 // 流程实例的数据。传递时,可展示流程发起人等信息 30 // 流程实例的数据。传递时,可展示流程发起人等信息
31 - type: Object 31 + type: Object,
  32 + default: () => {}
32 }, 33 },
33 taskData: { 34 taskData: {
34 // 任务实例的数据。传递时,可展示 UserTask 审核相关的信息 35 // 任务实例的数据。传递时,可展示 UserTask 审核相关的信息
@@ -44,13 +45,13 @@ const emit = defineEmits([&#39;destroy&#39;]) @@ -44,13 +45,13 @@ const emit = defineEmits([&#39;destroy&#39;])
44 let bpmnModeler 45 let bpmnModeler
45 46
46 const xml = ref('') 47 const xml = ref('')
47 -const activityLists = ref([])  
48 -const processInstance = ref(undefined)  
49 -const taskList = ref([]) 48 +const activityLists = ref<any[]>([])
  49 +const processInstance = ref<any>(undefined)
  50 +const taskList = ref<any[]>([])
50 const bpmnCanvas = ref() 51 const bpmnCanvas = ref()
51 // const element = ref() 52 // const element = ref()
52 -const elementOverlayIds = ref(null)  
53 -const overlays = ref(null) 53 +const elementOverlayIds = ref<any>(null)
  54 +const overlays = ref<any>(null)
54 55
55 const initBpmnModeler = () => { 56 const initBpmnModeler = () => {
56 if (bpmnModeler) return 57 if (bpmnModeler) return
@@ -90,18 +91,18 @@ const highlightDiagram = async () =&gt; { @@ -90,18 +91,18 @@ const highlightDiagram = async () =&gt; {
90 // 参考自 https://gitee.com/tony2y/RuoYi-flowable/blob/master/ruoyi-ui/src/components/Process/index.vue#L222 实现 91 // 参考自 https://gitee.com/tony2y/RuoYi-flowable/blob/master/ruoyi-ui/src/components/Process/index.vue#L222 实现
91 // 再次基础上,增加不同审批结果的颜色等等 92 // 再次基础上,增加不同审批结果的颜色等等
92 let canvas = bpmnModeler.get('canvas') 93 let canvas = bpmnModeler.get('canvas')
93 - let todoActivity = activityList.find((m) => !m.endTime) // 找到待办的任务  
94 - let endActivity = activityList[activityList.length - 1] // 获得最后一个任务 94 + let todoActivity: any = activityList.find((m: any) => !m.endTime) // 找到待办的任务
  95 + let endActivity: any = activityList[activityList.length - 1] // 获得最后一个任务
95 // debugger 96 // debugger
96 - bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach((n) => {  
97 - let activity = activityList.find((m) => m.key === n.id) // 找到对应的活动 97 + bpmnModeler.getDefinitions().rootElements[0].flowElements?.forEach((n: any) => {
  98 + let activity: any = activityList.find((m: any) => m.key === n.id) // 找到对应的活动
98 if (!activity) { 99 if (!activity) {
99 return 100 return
100 } 101 }
101 if (n.$type === 'bpmn:UserTask') { 102 if (n.$type === 'bpmn:UserTask') {
102 // 用户任务 103 // 用户任务
103 // 处理用户任务的高亮 104 // 处理用户任务的高亮
104 - const task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId 105 + const task: any = taskList.value.find((m: any) => m.id === activity.taskId) // 找到活动对应的 taskId
105 if (!task) { 106 if (!task) {
106 return 107 return
107 } 108 }
@@ -114,9 +115,9 @@ const highlightDiagram = async () =&gt; { @@ -114,9 +115,9 @@ const highlightDiagram = async () =&gt; {
114 } 115 }
115 // 处理 outgoing 出线 116 // 处理 outgoing 出线
116 const outgoing = getActivityOutgoing(activity) 117 const outgoing = getActivityOutgoing(activity)
117 - outgoing?.forEach((nn) => { 118 + outgoing?.forEach((nn: any) => {
118 // debugger 119 // debugger
119 - let targetActivity = activityList.find((m) => m.key === nn.targetRef.id) 120 + let targetActivity: any = activityList.find((m: any) => m.key === nn.targetRef.id)
120 // 如果目标活动存在,则根据该活动是否结束,进行【bpmn:SequenceFlow】连线的高亮设置 121 // 如果目标活动存在,则根据该活动是否结束,进行【bpmn:SequenceFlow】连线的高亮设置
121 if (targetActivity) { 122 if (targetActivity) {
122 canvas.addMarker(nn.id, targetActivity.endTime ? 'highlight' : 'highlight-todo') 123 canvas.addMarker(nn.id, targetActivity.endTime ? 'highlight' : 'highlight-todo')
@@ -141,10 +142,10 @@ const highlightDiagram = async () =&gt; { @@ -141,10 +142,10 @@ const highlightDiagram = async () =&gt; {
141 // 设置【bpmn:ExclusiveGateway】排它网关的高亮 142 // 设置【bpmn:ExclusiveGateway】排它网关的高亮
142 canvas.addMarker(n.id, getActivityHighlightCss(activity)) 143 canvas.addMarker(n.id, getActivityHighlightCss(activity))
143 // 查找需要高亮的连线 144 // 查找需要高亮的连线
144 - let matchNN = undefined  
145 - let matchActivity = undefined  
146 - n.outgoing?.forEach((nn) => {  
147 - let targetActivity = activityList.find((m) => m.key === nn.targetRef.id) 145 + let matchNN: any = undefined
  146 + let matchActivity: any = undefined
  147 + n.outgoing?.forEach((nn: any) => {
  148 + let targetActivity = activityList.find((m: any) => m.key === nn.targetRef.id)
148 if (!targetActivity) { 149 if (!targetActivity) {
149 return 150 return
150 } 151 }
@@ -165,9 +166,9 @@ const highlightDiagram = async () =&gt; { @@ -165,9 +166,9 @@ const highlightDiagram = async () =&gt; {
165 // 并行网关 166 // 并行网关
166 // 设置【bpmn:ParallelGateway】并行网关的高亮 167 // 设置【bpmn:ParallelGateway】并行网关的高亮
167 canvas.addMarker(n.id, getActivityHighlightCss(activity)) 168 canvas.addMarker(n.id, getActivityHighlightCss(activity))
168 - n.outgoing?.forEach((nn) => { 169 + n.outgoing?.forEach((nn: any) => {
169 // 获得连线是否有指向目标。如果有,则进行高亮 170 // 获得连线是否有指向目标。如果有,则进行高亮
170 - const targetActivity = activityList.find((m) => m.key === nn.targetRef.id) 171 + const targetActivity = activityList.find((m: any) => m.key === nn.targetRef.id)
171 if (targetActivity) { 172 if (targetActivity) {
172 canvas.addMarker(nn.id, getActivityHighlightCss(targetActivity)) // 高亮【bpmn:SequenceFlow】连线 173 canvas.addMarker(nn.id, getActivityHighlightCss(targetActivity)) // 高亮【bpmn:SequenceFlow】连线
173 // 高亮【...】目标。其中 ... 可以是 bpm:UserTask、也可以是其它的。当然,如果是 bpm:UserTask 的话,其实不做高亮也没问题,因为上面有逻辑做了这块。 174 // 高亮【...】目标。其中 ... 可以是 bpm:UserTask、也可以是其它的。当然,如果是 bpm:UserTask 的话,其实不做高亮也没问题,因为上面有逻辑做了这块。
@@ -179,7 +180,7 @@ const highlightDiagram = async () =&gt; { @@ -179,7 +180,7 @@ const highlightDiagram = async () =&gt; {
179 n.outgoing?.forEach((nn) => { 180 n.outgoing?.forEach((nn) => {
180 // outgoing 例如说【bpmn:SequenceFlow】连线 181 // outgoing 例如说【bpmn:SequenceFlow】连线
181 // 获得连线是否有指向目标。如果有,则进行高亮 182 // 获得连线是否有指向目标。如果有,则进行高亮
182 - let targetActivity = activityList.find((m) => m.key === nn.targetRef.id) 183 + let targetActivity = activityList.find((m: any) => m.key === nn.targetRef.id)
183 if (targetActivity) { 184 if (targetActivity) {
184 canvas.addMarker(nn.id, 'highlight') // 高亮【bpmn:SequenceFlow】连线 185 canvas.addMarker(nn.id, 'highlight') // 高亮【bpmn:SequenceFlow】连线
185 canvas.addMarker(n.id, 'highlight') // 高亮【bpmn:StartEvent】开始节点(自己) 186 canvas.addMarker(n.id, 'highlight') // 高亮【bpmn:StartEvent】开始节点(自己)
@@ -235,8 +236,8 @@ const getActivityOutgoing = (activity) =&gt; { @@ -235,8 +236,8 @@ const getActivityOutgoing = (activity) =&gt; {
235 } 236 }
236 // 如果没有,则遍历获得起点为它的【bpmn:SequenceFlow】节点们。原因是:bpmn-js 的 UserTask 拿不到 outgoing 237 // 如果没有,则遍历获得起点为它的【bpmn:SequenceFlow】节点们。原因是:bpmn-js 的 UserTask 拿不到 outgoing
237 const flowElements = bpmnModeler.getDefinitions().rootElements[0].flowElements 238 const flowElements = bpmnModeler.getDefinitions().rootElements[0].flowElements
238 - const outgoing = []  
239 - flowElements.forEach((item) => { 239 + const outgoing: any[] = []
  240 + flowElements.forEach((item: any) => {
240 if (item.$type !== 'bpmn:SequenceFlow') { 241 if (item.$type !== 'bpmn:SequenceFlow') {
241 return 242 return
242 } 243 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/contentPadProvider.js
1 import { assign, forEach, isArray } from 'min-dash' 1 import { assign, forEach, isArray } from 'min-dash'
2 2
3 -import { is } from "bpmn-js/lib/util/ModelUtil" 3 +import { is } from 'bpmn-js/lib/util/ModelUtil'
4 4
5 -import { isExpanded, isEventSubProcess } from "bpmn-js/lib/util/DiUtil" 5 +import { isExpanded, isEventSubProcess } from 'bpmn-js/lib/util/DiUtil'
6 6
7 -import { isAny } from "bpmn-js/lib/features/modeling/util/ModelingUtil" 7 +import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil'
8 8
9 -import { getChildLanes } from "bpmn-js/lib/features/modeling/util/LaneUtil" 9 +import { getChildLanes } from 'bpmn-js/lib/features/modeling/util/LaneUtil'
10 10
11 -import { hasPrimaryModifier } from "diagram-js/lib/util/Mouse" 11 +import { hasPrimaryModifier } from 'diagram-js/lib/util/Mouse'
12 12
13 /** 13 /**
14 * A provider for BPMN 2.0 elements context pad 14 * A provider for BPMN 2.0 elements context pad
15 */ 15 */
16 -export default function ContextPadProvider ( 16 +export default function ContextPadProvider(
17 config, 17 config,
18 injector, 18 injector,
19 eventBus, 19 eventBus,
@@ -25,8 +25,7 @@ export default function ContextPadProvider ( @@ -25,8 +25,7 @@ export default function ContextPadProvider (
25 popupMenu, 25 popupMenu,
26 canvas, 26 canvas,
27 rules, 27 rules,
28 - translate,  
29 - elementRegistry 28 + translate
30 ) { 29 ) {
31 config = config || {} 30 config = config || {}
32 31
@@ -45,10 +44,10 @@ export default function ContextPadProvider ( @@ -45,10 +44,10 @@ export default function ContextPadProvider (
45 this._translate = translate 44 this._translate = translate
46 45
47 if (config.autoPlace !== false) { 46 if (config.autoPlace !== false) {
48 - this._autoPlace = injector.get("autoPlace", false) 47 + this._autoPlace = injector.get('autoPlace', false)
49 } 48 }
50 49
51 - eventBus.on("create.end", 250, function (event) { 50 + eventBus.on('create.end', 250, function (event) {
52 const context = event.context, 51 const context = event.context,
53 shape = context.shape 52 shape = context.shape
54 53
@@ -65,19 +64,19 @@ export default function ContextPadProvider ( @@ -65,19 +64,19 @@ export default function ContextPadProvider (
65 } 64 }
66 65
67 ContextPadProvider.$inject = [ 66 ContextPadProvider.$inject = [
68 - "config.contextPad",  
69 - "injector",  
70 - "eventBus",  
71 - "contextPad",  
72 - "modeling",  
73 - "elementFactory",  
74 - "connect",  
75 - "create",  
76 - "popupMenu",  
77 - "canvas",  
78 - "rules",  
79 - "translate",  
80 - "elementRegistry" 67 + 'config.contextPad',
  68 + 'injector',
  69 + 'eventBus',
  70 + 'contextPad',
  71 + 'modeling',
  72 + 'elementFactory',
  73 + 'connect',
  74 + 'create',
  75 + 'popupMenu',
  76 + 'canvas',
  77 + 'rules',
  78 + 'translate',
  79 + 'elementRegistry'
81 ] 80 ]
82 81
83 ContextPadProvider.prototype.getContextPadEntries = function (element) { 82 ContextPadProvider.prototype.getContextPadEntries = function (element) {
@@ -94,21 +93,21 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -94,21 +93,21 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
94 93
95 const actions = {} 94 const actions = {}
96 95
97 - if (element.type === "label") { 96 + if (element.type === 'label') {
98 return actions 97 return actions
99 } 98 }
100 99
101 const businessObject = element.businessObject 100 const businessObject = element.businessObject
102 101
103 - function startConnect (event, element) { 102 + function startConnect(event, element) {
104 connect.start(event, element) 103 connect.start(event, element)
105 } 104 }
106 105
107 - function removeElement () { 106 + function removeElement() {
108 modeling.removeElements([element]) 107 modeling.removeElements([element])
109 } 108 }
110 109
111 - function getReplaceMenuPosition (element) { 110 + function getReplaceMenuPosition(element) {
112 const Y_OFFSET = 5 111 const Y_OFFSET = 5
113 112
114 const diagramContainer = canvas.getContainer(), 113 const diagramContainer = canvas.getContainer(),
@@ -138,13 +137,13 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -138,13 +137,13 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
138 * 137 *
139 * @return {Object} descriptor 138 * @return {Object} descriptor
140 */ 139 */
141 - function appendAction (type, className, title, options) {  
142 - if (typeof title !== "string") { 140 + function appendAction(type, className, title, options) {
  141 + if (typeof title !== 'string') {
143 options = title 142 options = title
144 - title = translate("Append {type}", { type: type.replace(/^bpmn:/, "") }) 143 + title = translate('Append {type}', { type: type.replace(/^bpmn:/, '') })
145 } 144 }
146 145
147 - function appendStart (event, element) { 146 + function appendStart(event, element) {
148 const shape = elementFactory.createShape(assign({ type: type }, options)) 147 const shape = elementFactory.createShape(assign({ type: type }, options))
149 create.start(event, shape, { 148 create.start(event, shape, {
150 source: element 149 source: element
@@ -153,14 +152,14 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -153,14 +152,14 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
153 152
154 const append = autoPlace 153 const append = autoPlace
155 ? function (event, element) { 154 ? function (event, element) {
156 - const shape = elementFactory.createShape(assign({ type: type }, options)) 155 + const shape = elementFactory.createShape(assign({ type: type }, options))
157 156
158 - autoPlace.append(element, shape)  
159 - } 157 + autoPlace.append(element, shape)
  158 + }
160 : appendStart 159 : appendStart
161 160
162 return { 161 return {
163 - group: "model", 162 + group: 'model',
164 className: className, 163 className: className,
165 title: title, 164 title: title,
166 action: { 165 action: {
@@ -170,7 +169,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -170,7 +169,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
170 } 169 }
171 } 170 }
172 171
173 - function splitLaneHandler (count) { 172 + function splitLaneHandler(count) {
174 return function (event, element) { 173 return function (event, element) {
175 // actual split 174 // actual split
176 modeling.splitLane(element, count) 175 modeling.splitLane(element, count)
@@ -181,17 +180,17 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -181,17 +180,17 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
181 } 180 }
182 } 181 }
183 182
184 - if (isAny(businessObject, ["bpmn:Lane", "bpmn:Participant"]) && isExpanded(businessObject)) { 183 + if (isAny(businessObject, ['bpmn:Lane', 'bpmn:Participant']) && isExpanded(businessObject)) {
185 const childLanes = getChildLanes(element) 184 const childLanes = getChildLanes(element)
186 185
187 assign(actions, { 186 assign(actions, {
188 - "lane-insert-above": {  
189 - group: "lane-insert-above",  
190 - className: "bpmn-icon-lane-insert-above",  
191 - title: translate("Add Lane above"), 187 + 'lane-insert-above': {
  188 + group: 'lane-insert-above',
  189 + className: 'bpmn-icon-lane-insert-above',
  190 + title: translate('Add Lane above'),
192 action: { 191 action: {
193 click: function (event, element) { 192 click: function (event, element) {
194 - modeling.addLane(element, "top") 193 + modeling.addLane(element, 'top')
195 } 194 }
196 } 195 }
197 } 196 }
@@ -200,10 +199,10 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -200,10 +199,10 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
200 if (childLanes.length < 2) { 199 if (childLanes.length < 2) {
201 if (element.height >= 120) { 200 if (element.height >= 120) {
202 assign(actions, { 201 assign(actions, {
203 - "lane-divide-two": {  
204 - group: "lane-divide",  
205 - className: "bpmn-icon-lane-divide-two",  
206 - title: translate("Divide into two Lanes"), 202 + 'lane-divide-two': {
  203 + group: 'lane-divide',
  204 + className: 'bpmn-icon-lane-divide-two',
  205 + title: translate('Divide into two Lanes'),
207 action: { 206 action: {
208 click: splitLaneHandler(2) 207 click: splitLaneHandler(2)
209 } 208 }
@@ -213,10 +212,10 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -213,10 +212,10 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
213 212
214 if (element.height >= 180) { 213 if (element.height >= 180) {
215 assign(actions, { 214 assign(actions, {
216 - "lane-divide-three": {  
217 - group: "lane-divide",  
218 - className: "bpmn-icon-lane-divide-three",  
219 - title: translate("Divide into three Lanes"), 215 + 'lane-divide-three': {
  216 + group: 'lane-divide',
  217 + className: 'bpmn-icon-lane-divide-three',
  218 + title: translate('Divide into three Lanes'),
220 action: { 219 action: {
221 click: splitLaneHandler(3) 220 click: splitLaneHandler(3)
222 } 221 }
@@ -226,79 +225,102 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -226,79 +225,102 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
226 } 225 }
227 226
228 assign(actions, { 227 assign(actions, {
229 - "lane-insert-below": {  
230 - group: "lane-insert-below",  
231 - className: "bpmn-icon-lane-insert-below",  
232 - title: translate("Add Lane below"), 228 + 'lane-insert-below': {
  229 + group: 'lane-insert-below',
  230 + className: 'bpmn-icon-lane-insert-below',
  231 + title: translate('Add Lane below'),
233 action: { 232 action: {
234 click: function (event, element) { 233 click: function (event, element) {
235 - modeling.addLane(element, "bottom") 234 + modeling.addLane(element, 'bottom')
236 } 235 }
237 } 236 }
238 } 237 }
239 }) 238 })
240 } 239 }
241 240
242 - if (is(businessObject, "bpmn:FlowNode")) {  
243 - if (is(businessObject, "bpmn:EventBasedGateway")) { 241 + if (is(businessObject, 'bpmn:FlowNode')) {
  242 + if (is(businessObject, 'bpmn:EventBasedGateway')) {
244 assign(actions, { 243 assign(actions, {
245 - "append.receive-task": appendAction("bpmn:ReceiveTask", "bpmn-icon-receive-task", translate("Append ReceiveTask")),  
246 - "append.message-intermediate-event": appendAction(  
247 - "bpmn:IntermediateCatchEvent",  
248 - "bpmn-icon-intermediate-event-catch-message",  
249 - translate("Append MessageIntermediateCatchEvent"),  
250 - { eventDefinitionType: "bpmn:MessageEventDefinition" } 244 + 'append.receive-task': appendAction(
  245 + 'bpmn:ReceiveTask',
  246 + 'bpmn-icon-receive-task',
  247 + translate('Append ReceiveTask')
  248 + ),
  249 + 'append.message-intermediate-event': appendAction(
  250 + 'bpmn:IntermediateCatchEvent',
  251 + 'bpmn-icon-intermediate-event-catch-message',
  252 + translate('Append MessageIntermediateCatchEvent'),
  253 + { eventDefinitionType: 'bpmn:MessageEventDefinition' }
251 ), 254 ),
252 - "append.timer-intermediate-event": appendAction(  
253 - "bpmn:IntermediateCatchEvent",  
254 - "bpmn-icon-intermediate-event-catch-timer",  
255 - translate("Append TimerIntermediateCatchEvent"),  
256 - { eventDefinitionType: "bpmn:TimerEventDefinition" } 255 + 'append.timer-intermediate-event': appendAction(
  256 + 'bpmn:IntermediateCatchEvent',
  257 + 'bpmn-icon-intermediate-event-catch-timer',
  258 + translate('Append TimerIntermediateCatchEvent'),
  259 + { eventDefinitionType: 'bpmn:TimerEventDefinition' }
257 ), 260 ),
258 - "append.condition-intermediate-event": appendAction(  
259 - "bpmn:IntermediateCatchEvent",  
260 - "bpmn-icon-intermediate-event-catch-condition",  
261 - translate("Append ConditionIntermediateCatchEvent"),  
262 - { eventDefinitionType: "bpmn:ConditionalEventDefinition" } 261 + 'append.condition-intermediate-event': appendAction(
  262 + 'bpmn:IntermediateCatchEvent',
  263 + 'bpmn-icon-intermediate-event-catch-condition',
  264 + translate('Append ConditionIntermediateCatchEvent'),
  265 + { eventDefinitionType: 'bpmn:ConditionalEventDefinition' }
263 ), 266 ),
264 - "append.signal-intermediate-event": appendAction(  
265 - "bpmn:IntermediateCatchEvent",  
266 - "bpmn-icon-intermediate-event-catch-signal",  
267 - translate("Append SignalIntermediateCatchEvent"),  
268 - { eventDefinitionType: "bpmn:SignalEventDefinition" } 267 + 'append.signal-intermediate-event': appendAction(
  268 + 'bpmn:IntermediateCatchEvent',
  269 + 'bpmn-icon-intermediate-event-catch-signal',
  270 + translate('Append SignalIntermediateCatchEvent'),
  271 + { eventDefinitionType: 'bpmn:SignalEventDefinition' }
269 ) 272 )
270 }) 273 })
271 - } else if (isEventType(businessObject, "bpmn:BoundaryEvent", "bpmn:CompensateEventDefinition")) { 274 + } else if (
  275 + isEventType(businessObject, 'bpmn:BoundaryEvent', 'bpmn:CompensateEventDefinition')
  276 + ) {
272 assign(actions, { 277 assign(actions, {
273 - "append.compensation-activity": appendAction("bpmn:Task", "bpmn-icon-task", translate("Append compensation activity"), {  
274 - isForCompensation: true  
275 - }) 278 + 'append.compensation-activity': appendAction(
  279 + 'bpmn:Task',
  280 + 'bpmn-icon-task',
  281 + translate('Append compensation activity'),
  282 + {
  283 + isForCompensation: true
  284 + }
  285 + )
276 }) 286 })
277 } else if ( 287 } else if (
278 - !is(businessObject, "bpmn:EndEvent") && 288 + !is(businessObject, 'bpmn:EndEvent') &&
279 !businessObject.isForCompensation && 289 !businessObject.isForCompensation &&
280 - !isEventType(businessObject, "bpmn:IntermediateThrowEvent", "bpmn:LinkEventDefinition") && 290 + !isEventType(businessObject, 'bpmn:IntermediateThrowEvent', 'bpmn:LinkEventDefinition') &&
281 !isEventSubProcess(businessObject) 291 !isEventSubProcess(businessObject)
282 ) { 292 ) {
283 assign(actions, { 293 assign(actions, {
284 - "append.end-event": appendAction("bpmn:EndEvent", "bpmn-icon-end-event-none", translate("Append EndEvent")),  
285 - "append.gateway": appendAction("bpmn:ExclusiveGateway", "bpmn-icon-gateway-none", translate("Append Gateway")),  
286 - "append.append-task": appendAction("bpmn:UserTask", "bpmn-icon-user-task", translate("Append Task")),  
287 - "append.intermediate-event": appendAction(  
288 - "bpmn:IntermediateThrowEvent",  
289 - "bpmn-icon-intermediate-event-none",  
290 - translate("Append Intermediate/Boundary Event") 294 + 'append.end-event': appendAction(
  295 + 'bpmn:EndEvent',
  296 + 'bpmn-icon-end-event-none',
  297 + translate('Append EndEvent')
  298 + ),
  299 + 'append.gateway': appendAction(
  300 + 'bpmn:ExclusiveGateway',
  301 + 'bpmn-icon-gateway-none',
  302 + translate('Append Gateway')
  303 + ),
  304 + 'append.append-task': appendAction(
  305 + 'bpmn:UserTask',
  306 + 'bpmn-icon-user-task',
  307 + translate('Append Task')
  308 + ),
  309 + 'append.intermediate-event': appendAction(
  310 + 'bpmn:IntermediateThrowEvent',
  311 + 'bpmn-icon-intermediate-event-none',
  312 + translate('Append Intermediate/Boundary Event')
291 ) 313 )
292 }) 314 })
293 } 315 }
294 } 316 }
295 317
296 - if (!popupMenu.isEmpty(element, "bpmn-replace")) { 318 + if (!popupMenu.isEmpty(element, 'bpmn-replace')) {
297 // Replace menu entry 319 // Replace menu entry
298 assign(actions, { 320 assign(actions, {
299 replace: { 321 replace: {
300 - group: "edit",  
301 - className: "bpmn-icon-screw-wrench", 322 + group: 'edit',
  323 + className: 'bpmn-icon-screw-wrench',
302 title: '修改类型', 324 title: '修改类型',
303 action: { 325 action: {
304 click: function (event, element) { 326 click: function (event, element) {
@@ -306,21 +328,32 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -306,21 +328,32 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
306 cursor: { x: event.x, y: event.y } 328 cursor: { x: event.x, y: event.y }
307 }) 329 })
308 330
309 - popupMenu.open(element, "bpmn-replace", position) 331 + popupMenu.open(element, 'bpmn-replace', position)
310 } 332 }
311 } 333 }
312 } 334 }
313 }) 335 })
314 } 336 }
315 337
316 - if (isAny(businessObject, ["bpmn:FlowNode", "bpmn:InteractionNode", "bpmn:DataObjectReference", "bpmn:DataStoreReference"])) { 338 + if (
  339 + isAny(businessObject, [
  340 + 'bpmn:FlowNode',
  341 + 'bpmn:InteractionNode',
  342 + 'bpmn:DataObjectReference',
  343 + 'bpmn:DataStoreReference'
  344 + ])
  345 + ) {
317 assign(actions, { 346 assign(actions, {
318 - "append.text-annotation": appendAction("bpmn:TextAnnotation", "bpmn-icon-text-annotation"), 347 + 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation'),
319 348
320 connect: { 349 connect: {
321 - group: "connect",  
322 - className: "bpmn-icon-connection-multi",  
323 - title: translate("Connect using " + (businessObject.isForCompensation ? "" : "Sequence/MessageFlow or ") + "Association"), 350 + group: 'connect',
  351 + className: 'bpmn-icon-connection-multi',
  352 + title: translate(
  353 + 'Connect using ' +
  354 + (businessObject.isForCompensation ? '' : 'Sequence/MessageFlow or ') +
  355 + 'Association'
  356 + ),
324 action: { 357 action: {
325 click: startConnect, 358 click: startConnect,
326 dragstart: startConnect 359 dragstart: startConnect
@@ -329,12 +362,12 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -329,12 +362,12 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
329 }) 362 })
330 } 363 }
331 364
332 - if (isAny(businessObject, ["bpmn:DataObjectReference", "bpmn:DataStoreReference"])) { 365 + if (isAny(businessObject, ['bpmn:DataObjectReference', 'bpmn:DataStoreReference'])) {
333 assign(actions, { 366 assign(actions, {
334 connect: { 367 connect: {
335 - group: "connect",  
336 - className: "bpmn-icon-connection-multi",  
337 - title: translate("Connect using DataInputAssociation"), 368 + group: 'connect',
  369 + className: 'bpmn-icon-connection-multi',
  370 + title: translate('Connect using DataInputAssociation'),
338 action: { 371 action: {
339 click: startConnect, 372 click: startConnect,
340 dragstart: startConnect 373 dragstart: startConnect
@@ -343,9 +376,9 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -343,9 +376,9 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
343 }) 376 })
344 } 377 }
345 378
346 - if (is(businessObject, "bpmn:Group")) { 379 + if (is(businessObject, 'bpmn:Group')) {
347 assign(actions, { 380 assign(actions, {
348 - "append.text-annotation": appendAction("bpmn:TextAnnotation", "bpmn-icon-text-annotation") 381 + 'append.text-annotation': appendAction('bpmn:TextAnnotation', 'bpmn-icon-text-annotation')
349 }) 382 })
350 } 383 }
351 384
@@ -360,9 +393,9 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -360,9 +393,9 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
360 if (deleteAllowed) { 393 if (deleteAllowed) {
361 assign(actions, { 394 assign(actions, {
362 delete: { 395 delete: {
363 - group: "edit",  
364 - className: "bpmn-icon-trash",  
365 - title: translate("Remove"), 396 + group: 'edit',
  397 + className: 'bpmn-icon-trash',
  398 + title: translate('Remove'),
366 action: { 399 action: {
367 click: removeElement 400 click: removeElement
368 } 401 }
@@ -375,7 +408,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) { @@ -375,7 +408,7 @@ ContextPadProvider.prototype.getContextPadEntries = function (element) {
375 408
376 // helpers ///////// 409 // helpers /////////
377 410
378 -function isEventType (eventBo, type, definition) { 411 +function isEventType(eventBo, type, definition) {
379 const isType = eventBo.$instanceOf(type) 412 const isType = eventBo.$instanceOf(type)
380 let isDefinition = false 413 let isDefinition = false
381 414
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/content-pad/index.js
1 -import CustomContextPadProvider from "./contentPadProvider"; 1 +import CustomContextPadProvider from './contentPadProvider'
2 2
3 export default { 3 export default {
4 - __init__: ["contextPadProvider"],  
5 - contextPadProvider: ["type", CustomContextPadProvider]  
6 -}; 4 + __init__: ['contextPadProvider'],
  5 + contextPadProvider: ['type', CustomContextPadProvider]
  6 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/defaultEmpty.js
1 export default (key, name, type) => { 1 export default (key, name, type) => {
2 - if (!type) type = "camunda"; 2 + if (!type) type = 'camunda'
3 const TYPE_TARGET = { 3 const TYPE_TARGET = {
4 - activiti: "http://activiti.org/bpmn",  
5 - camunda: "http://bpmn.io/schema/bpmn",  
6 - flowable: "http://flowable.org/bpmn"  
7 - }; 4 + activiti: 'http://activiti.org/bpmn',
  5 + camunda: 'http://bpmn.io/schema/bpmn',
  6 + flowable: 'http://flowable.org/bpmn'
  7 + }
8 return `<?xml version="1.0" encoding="UTF-8"?> 8 return `<?xml version="1.0" encoding="UTF-8"?>
9 <bpmn2:definitions 9 <bpmn2:definitions
10 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 10 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -20,5 +20,5 @@ export default (key, name, type) =&gt; { @@ -20,5 +20,5 @@ export default (key, name, type) =&gt; {
20 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${key}"> 20 <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="${key}">
21 </bpmndi:BPMNPlane> 21 </bpmndi:BPMNPlane>
22 </bpmndi:BPMNDiagram> 22 </bpmndi:BPMNDiagram>
23 -</bpmn2:definitions>`;  
24 -}; 23 +</bpmn2:definitions>`
  24 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/activitiDescriptor.json
@@ -10,9 +10,7 @@ @@ -10,9 +10,7 @@
10 { 10 {
11 "name": "Definitions", 11 "name": "Definitions",
12 "isAbstract": true, 12 "isAbstract": true,
13 - "extends": [  
14 - "bpmn:Definitions"  
15 - ], 13 + "extends": ["bpmn:Definitions"],
16 "properties": [ 14 "properties": [
17 { 15 {
18 "name": "diagramRelationId", 16 "name": "diagramRelationId",
@@ -23,9 +21,7 @@ @@ -23,9 +21,7 @@
23 }, 21 },
24 { 22 {
25 "name": "InOutBinding", 23 "name": "InOutBinding",
26 - "superClass": [  
27 - "Element"  
28 - ], 24 + "superClass": ["Element"],
29 "isAbstract": true, 25 "isAbstract": true,
30 "properties": [ 26 "properties": [
31 { 27 {
@@ -63,34 +59,22 @@ @@ -63,34 +59,22 @@
63 }, 59 },
64 { 60 {
65 "name": "In", 61 "name": "In",
66 - "superClass": [  
67 - "InOutBinding"  
68 - ], 62 + "superClass": ["InOutBinding"],
69 "meta": { 63 "meta": {
70 - "allowedIn": [  
71 - "bpmn:CallActivity"  
72 - ] 64 + "allowedIn": ["bpmn:CallActivity"]
73 } 65 }
74 }, 66 },
75 { 67 {
76 "name": "Out", 68 "name": "Out",
77 - "superClass": [  
78 - "InOutBinding"  
79 - ], 69 + "superClass": ["InOutBinding"],
80 "meta": { 70 "meta": {
81 - "allowedIn": [  
82 - "bpmn:CallActivity"  
83 - ] 71 + "allowedIn": ["bpmn:CallActivity"]
84 } 72 }
85 }, 73 },
86 { 74 {
87 "name": "AsyncCapable", 75 "name": "AsyncCapable",
88 "isAbstract": true, 76 "isAbstract": true,
89 - "extends": [  
90 - "bpmn:Activity",  
91 - "bpmn:Gateway",  
92 - "bpmn:Event"  
93 - ], 77 + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"],
94 "properties": [ 78 "properties": [
95 { 79 {
96 "name": "async", 80 "name": "async",
@@ -121,10 +105,7 @@ @@ -121,10 +105,7 @@
121 { 105 {
122 "name": "JobPriorized", 106 "name": "JobPriorized",
123 "isAbstract": true, 107 "isAbstract": true,
124 - "extends": [  
125 - "bpmn:Process",  
126 - "activiti:AsyncCapable"  
127 - ], 108 + "extends": ["bpmn:Process", "activiti:AsyncCapable"],
128 "properties": [ 109 "properties": [
129 { 110 {
130 "name": "jobPriority", 111 "name": "jobPriority",
@@ -136,9 +117,7 @@ @@ -136,9 +117,7 @@
136 { 117 {
137 "name": "SignalEventDefinition", 118 "name": "SignalEventDefinition",
138 "isAbstract": true, 119 "isAbstract": true,
139 - "extends": [  
140 - "bpmn:SignalEventDefinition"  
141 - ], 120 + "extends": ["bpmn:SignalEventDefinition"],
142 "properties": [ 121 "properties": [
143 { 122 {
144 "name": "async", 123 "name": "async",
@@ -151,9 +130,7 @@ @@ -151,9 +130,7 @@
151 { 130 {
152 "name": "ErrorEventDefinition", 131 "name": "ErrorEventDefinition",
153 "isAbstract": true, 132 "isAbstract": true,
154 - "extends": [  
155 - "bpmn:ErrorEventDefinition"  
156 - ], 133 + "extends": ["bpmn:ErrorEventDefinition"],
157 "properties": [ 134 "properties": [
158 { 135 {
159 "name": "errorCodeVariable", 136 "name": "errorCodeVariable",
@@ -170,9 +147,7 @@ @@ -170,9 +147,7 @@
170 { 147 {
171 "name": "Error", 148 "name": "Error",
172 "isAbstract": true, 149 "isAbstract": true,
173 - "extends": [  
174 - "bpmn:Error"  
175 - ], 150 + "extends": ["bpmn:Error"],
176 "properties": [ 151 "properties": [
177 { 152 {
178 "name": "activiti:errorMessage", 153 "name": "activiti:errorMessage",
@@ -183,9 +158,7 @@ @@ -183,9 +158,7 @@
183 }, 158 },
184 { 159 {
185 "name": "PotentialStarter", 160 "name": "PotentialStarter",
186 - "superClass": [  
187 - "Element"  
188 - ], 161 + "superClass": ["Element"],
189 "properties": [ 162 "properties": [
190 { 163 {
191 "name": "resourceAssignmentExpression", 164 "name": "resourceAssignmentExpression",
@@ -196,10 +169,7 @@ @@ -196,10 +169,7 @@
196 { 169 {
197 "name": "FormSupported", 170 "name": "FormSupported",
198 "isAbstract": true, 171 "isAbstract": true,
199 - "extends": [  
200 - "bpmn:StartEvent",  
201 - "bpmn:UserTask"  
202 - ], 172 + "extends": ["bpmn:StartEvent", "bpmn:UserTask"],
203 "properties": [ 173 "properties": [
204 { 174 {
205 "name": "formHandlerClass", 175 "name": "formHandlerClass",
@@ -216,10 +186,7 @@ @@ -216,10 +186,7 @@
216 { 186 {
217 "name": "TemplateSupported", 187 "name": "TemplateSupported",
218 "isAbstract": true, 188 "isAbstract": true,
219 - "extends": [  
220 - "bpmn:Process",  
221 - "bpmn:FlowElement"  
222 - ], 189 + "extends": ["bpmn:Process", "bpmn:FlowElement"],
223 "properties": [ 190 "properties": [
224 { 191 {
225 "name": "modelerTemplate", 192 "name": "modelerTemplate",
@@ -231,7 +198,7 @@ @@ -231,7 +198,7 @@
231 { 198 {
232 "name": "Initiator", 199 "name": "Initiator",
233 "isAbstract": true, 200 "isAbstract": true,
234 - "extends": [ "bpmn:StartEvent" ], 201 + "extends": ["bpmn:StartEvent"],
235 "properties": [ 202 "properties": [
236 { 203 {
237 "name": "initiator", 204 "name": "initiator",
@@ -243,9 +210,7 @@ @@ -243,9 +210,7 @@
243 { 210 {
244 "name": "ScriptTask", 211 "name": "ScriptTask",
245 "isAbstract": true, 212 "isAbstract": true,
246 - "extends": [  
247 - "bpmn:ScriptTask"  
248 - ], 213 + "extends": ["bpmn:ScriptTask"],
249 "properties": [ 214 "properties": [
250 { 215 {
251 "name": "resultVariable", 216 "name": "resultVariable",
@@ -262,9 +227,7 @@ @@ -262,9 +227,7 @@
262 { 227 {
263 "name": "Process", 228 "name": "Process",
264 "isAbstract": true, 229 "isAbstract": true,
265 - "extends": [  
266 - "bpmn:Process"  
267 - ], 230 + "extends": ["bpmn:Process"],
268 "properties": [ 231 "properties": [
269 { 232 {
270 "name": "candidateStarterGroups", 233 "name": "candidateStarterGroups",
@@ -293,18 +256,16 @@ @@ -293,18 +256,16 @@
293 "default": true 256 "default": true
294 }, 257 },
295 { 258 {
296 - "name":"executionListener", 259 + "name": "executionListener",
297 "isAbstract": true, 260 "isAbstract": true,
298 - "type":"Expression" 261 + "type": "Expression"
299 } 262 }
300 ] 263 ]
301 }, 264 },
302 { 265 {
303 "name": "EscalationEventDefinition", 266 "name": "EscalationEventDefinition",
304 "isAbstract": true, 267 "isAbstract": true,
305 - "extends": [  
306 - "bpmn:EscalationEventDefinition"  
307 - ], 268 + "extends": ["bpmn:EscalationEventDefinition"],
308 "properties": [ 269 "properties": [
309 { 270 {
310 "name": "escalationCodeVariable", 271 "name": "escalationCodeVariable",
@@ -316,9 +277,7 @@ @@ -316,9 +277,7 @@
316 { 277 {
317 "name": "FormalExpression", 278 "name": "FormalExpression",
318 "isAbstract": true, 279 "isAbstract": true,
319 - "extends": [  
320 - "bpmn:FormalExpression"  
321 - ], 280 + "extends": ["bpmn:FormalExpression"],
322 "properties": [ 281 "properties": [
323 { 282 {
324 "name": "resource", 283 "name": "resource",
@@ -329,19 +288,15 @@ @@ -329,19 +288,15 @@
329 }, 288 },
330 { 289 {
331 "name": "multiinstance_type", 290 "name": "multiinstance_type",
332 - "superClass":[  
333 - "Element"  
334 - ] 291 + "superClass": ["Element"]
335 }, 292 },
336 { 293 {
337 "name": "multiinstance_condition", 294 "name": "multiinstance_condition",
338 - "superClass":[  
339 - "Element"  
340 - ] 295 + "superClass": ["Element"]
341 }, 296 },
342 { 297 {
343 "name": "Assignable", 298 "name": "Assignable",
344 - "extends": [ "bpmn:UserTask" ], 299 + "extends": ["bpmn:UserTask"],
345 "properties": [ 300 "properties": [
346 { 301 {
347 "name": "assignee", 302 "name": "assignee",
@@ -382,7 +337,7 @@ @@ -382,7 +337,7 @@
382 }, 337 },
383 { 338 {
384 "name": "CallActivity", 339 "name": "CallActivity",
385 - "extends": [ "bpmn:CallActivity" ], 340 + "extends": ["bpmn:CallActivity"],
386 "properties": [ 341 "properties": [
387 { 342 {
388 "name": "calledElementBinding", 343 "name": "calledElementBinding",
@@ -471,9 +426,7 @@ @@ -471,9 +426,7 @@
471 }, 426 },
472 { 427 {
473 "name": "DmnCapable", 428 "name": "DmnCapable",
474 - "extends": [  
475 - "bpmn:BusinessRuleTask"  
476 - ], 429 + "extends": ["bpmn:BusinessRuleTask"],
477 "properties": [ 430 "properties": [
478 { 431 {
479 "name": "decisionRef", 432 "name": "decisionRef",
@@ -506,9 +459,7 @@ @@ -506,9 +459,7 @@
506 }, 459 },
507 { 460 {
508 "name": "ExternalCapable", 461 "name": "ExternalCapable",
509 - "extends": [  
510 - "activiti:ServiceTaskLike"  
511 - ], 462 + "extends": ["activiti:ServiceTaskLike"],
512 "properties": [ 463 "properties": [
513 { 464 {
514 "name": "type", 465 "name": "type",
@@ -524,10 +475,7 @@ @@ -524,10 +475,7 @@
524 }, 475 },
525 { 476 {
526 "name": "TaskPriorized", 477 "name": "TaskPriorized",
527 - "extends": [  
528 - "bpmn:Process",  
529 - "activiti:ExternalCapable"  
530 - ], 478 + "extends": ["bpmn:Process", "activiti:ExternalCapable"],
531 "properties": [ 479 "properties": [
532 { 480 {
533 "name": "taskPriority", 481 "name": "taskPriority",
@@ -538,11 +486,9 @@ @@ -538,11 +486,9 @@
538 }, 486 },
539 { 487 {
540 "name": "Properties", 488 "name": "Properties",
541 - "superClass": [  
542 - "Element"  
543 - ], 489 + "superClass": ["Element"],
544 "meta": { 490 "meta": {
545 - "allowedIn": [ "*" ] 491 + "allowedIn": ["*"]
546 }, 492 },
547 "properties": [ 493 "properties": [
548 { 494 {
@@ -554,9 +500,7 @@ @@ -554,9 +500,7 @@
554 }, 500 },
555 { 501 {
556 "name": "Property", 502 "name": "Property",
557 - "superClass": [  
558 - "Element"  
559 - ], 503 + "superClass": ["Element"],
560 "properties": [ 504 "properties": [
561 { 505 {
562 "name": "id", 506 "name": "id",
@@ -577,13 +521,9 @@ @@ -577,13 +521,9 @@
577 }, 521 },
578 { 522 {
579 "name": "Connector", 523 "name": "Connector",
580 - "superClass": [  
581 - "Element"  
582 - ], 524 + "superClass": ["Element"],
583 "meta": { 525 "meta": {
584 - "allowedIn": [  
585 - "activiti:ServiceTaskLike"  
586 - ] 526 + "allowedIn": ["activiti:ServiceTaskLike"]
587 }, 527 },
588 "properties": [ 528 "properties": [
589 { 529 {
@@ -598,14 +538,9 @@ @@ -598,14 +538,9 @@
598 }, 538 },
599 { 539 {
600 "name": "InputOutput", 540 "name": "InputOutput",
601 - "superClass": [  
602 - "Element"  
603 - ], 541 + "superClass": ["Element"],
604 "meta": { 542 "meta": {
605 - "allowedIn": [  
606 - "bpmn:FlowNode",  
607 - "activiti:Connector"  
608 - ] 543 + "allowedIn": ["bpmn:FlowNode", "activiti:Connector"]
609 }, 544 },
610 "properties": [ 545 "properties": [
611 { 546 {
@@ -653,7 +588,7 @@ @@ -653,7 +588,7 @@
653 }, 588 },
654 { 589 {
655 "name": "List", 590 "name": "List",
656 - "superClass": [ "InputOutputParameterDefinition" ], 591 + "superClass": ["InputOutputParameterDefinition"],
657 "properties": [ 592 "properties": [
658 { 593 {
659 "name": "items", 594 "name": "items",
@@ -664,7 +599,7 @@ @@ -664,7 +599,7 @@
664 }, 599 },
665 { 600 {
666 "name": "Map", 601 "name": "Map",
667 - "superClass": [ "InputOutputParameterDefinition" ], 602 + "superClass": ["InputOutputParameterDefinition"],
668 "properties": [ 603 "properties": [
669 { 604 {
670 "name": "entries", 605 "name": "entries",
@@ -694,9 +629,7 @@ @@ -694,9 +629,7 @@
694 }, 629 },
695 { 630 {
696 "name": "Value", 631 "name": "Value",
697 - "superClass": [  
698 - "InputOutputParameterDefinition"  
699 - ], 632 + "superClass": ["InputOutputParameterDefinition"],
700 "properties": [ 633 "properties": [
701 { 634 {
702 "name": "id", 635 "name": "id",
@@ -717,7 +650,7 @@ @@ -717,7 +650,7 @@
717 }, 650 },
718 { 651 {
719 "name": "Script", 652 "name": "Script",
720 - "superClass": [ "InputOutputParameterDefinition" ], 653 + "superClass": ["InputOutputParameterDefinition"],
721 "properties": [ 654 "properties": [
722 { 655 {
723 "name": "scriptFormat", 656 "name": "scriptFormat",
@@ -738,7 +671,7 @@ @@ -738,7 +671,7 @@
738 }, 671 },
739 { 672 {
740 "name": "Field", 673 "name": "Field",
741 - "superClass": [ "Element" ], 674 + "superClass": ["Element"],
742 "meta": { 675 "meta": {
743 "allowedIn": [ 676 "allowedIn": [
744 "activiti:ServiceTaskLike", 677 "activiti:ServiceTaskLike",
@@ -769,17 +702,17 @@ @@ -769,17 +702,17 @@
769 }, 702 },
770 { 703 {
771 "name": "InputParameter", 704 "name": "InputParameter",
772 - "superClass": [ "InputOutputParameter" ] 705 + "superClass": ["InputOutputParameter"]
773 }, 706 },
774 { 707 {
775 "name": "OutputParameter", 708 "name": "OutputParameter",
776 - "superClass": [ "InputOutputParameter" ] 709 + "superClass": ["InputOutputParameter"]
777 }, 710 },
778 { 711 {
779 "name": "Collectable", 712 "name": "Collectable",
780 "isAbstract": true, 713 "isAbstract": true,
781 - "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ],  
782 - "superClass": [ "activiti:AsyncCapable" ], 714 + "extends": ["bpmn:MultiInstanceLoopCharacteristics"],
  715 + "superClass": ["activiti:AsyncCapable"],
783 "properties": [ 716 "properties": [
784 { 717 {
785 "name": "collection", 718 "name": "collection",
@@ -795,12 +728,9 @@ @@ -795,12 +728,9 @@
795 }, 728 },
796 { 729 {
797 "name": "FailedJobRetryTimeCycle", 730 "name": "FailedJobRetryTimeCycle",
798 - "superClass": [ "Element" ], 731 + "superClass": ["Element"],
799 "meta": { 732 "meta": {
800 - "allowedIn": [  
801 - "activiti:AsyncCapable",  
802 - "bpmn:MultiInstanceLoopCharacteristics"  
803 - ] 733 + "allowedIn": ["activiti:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"]
804 }, 734 },
805 "properties": [ 735 "properties": [
806 { 736 {
@@ -812,7 +742,7 @@ @@ -812,7 +742,7 @@
812 }, 742 },
813 { 743 {
814 "name": "ExecutionListener", 744 "name": "ExecutionListener",
815 - "superClass": [ "Element" ], 745 + "superClass": ["Element"],
816 "meta": { 746 "meta": {
817 "allowedIn": [ 747 "allowedIn": [
818 "bpmn:Task", 748 "bpmn:Task",
@@ -871,11 +801,9 @@ @@ -871,11 +801,9 @@
871 }, 801 },
872 { 802 {
873 "name": "TaskListener", 803 "name": "TaskListener",
874 - "superClass": [ "Element" ], 804 + "superClass": ["Element"],
875 "meta": { 805 "meta": {
876 - "allowedIn": [  
877 - "bpmn:UserTask"  
878 - ] 806 + "allowedIn": ["bpmn:UserTask"]
879 }, 807 },
880 "properties": [ 808 "properties": [
881 { 809 {
@@ -911,12 +839,9 @@ @@ -911,12 +839,9 @@
911 }, 839 },
912 { 840 {
913 "name": "FormProperty", 841 "name": "FormProperty",
914 - "superClass": [ "Element" ], 842 + "superClass": ["Element"],
915 "meta": { 843 "meta": {
916 - "allowedIn": [  
917 - "bpmn:StartEvent",  
918 - "bpmn:UserTask"  
919 - ] 844 + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"]
920 }, 845 },
921 "properties": [ 846 "properties": [
922 { 847 {
@@ -978,7 +903,7 @@ @@ -978,7 +903,7 @@
978 }, 903 },
979 { 904 {
980 "name": "FormProperty", 905 "name": "FormProperty",
981 - "superClass": [ "Element" ], 906 + "superClass": ["Element"],
982 "properties": [ 907 "properties": [
983 { 908 {
984 "name": "id", 909 "name": "id",
@@ -1022,7 +947,7 @@ @@ -1022,7 +947,7 @@
1022 }, 947 },
1023 { 948 {
1024 "name": "Validation", 949 "name": "Validation",
1025 - "superClass": [ "Element" ], 950 + "superClass": ["Element"],
1026 "properties": [ 951 "properties": [
1027 { 952 {
1028 "name": "constraints", 953 "name": "constraints",
@@ -1033,7 +958,7 @@ @@ -1033,7 +958,7 @@
1033 }, 958 },
1034 { 959 {
1035 "name": "Constraint", 960 "name": "Constraint",
1036 - "superClass": [ "Element" ], 961 + "superClass": ["Element"],
1037 "properties": [ 962 "properties": [
1038 { 963 {
1039 "name": "name", 964 "name": "name",
@@ -1050,9 +975,7 @@ @@ -1050,9 +975,7 @@
1050 { 975 {
1051 "name": "ConditionalEventDefinition", 976 "name": "ConditionalEventDefinition",
1052 "isAbstract": true, 977 "isAbstract": true,
1053 - "extends": [  
1054 - "bpmn:ConditionalEventDefinition"  
1055 - ], 978 + "extends": ["bpmn:ConditionalEventDefinition"],
1056 "properties": [ 979 "properties": [
1057 { 980 {
1058 "name": "variableName", 981 "name": "variableName",
@@ -1067,5 +990,5 @@ @@ -1067,5 +990,5 @@
1067 ] 990 ]
1068 } 991 }
1069 ], 992 ],
1070 - "emumerations": [ ] 993 + "emumerations": []
1071 } 994 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/camundaDescriptor.json
@@ -10,9 +10,7 @@ @@ -10,9 +10,7 @@
10 { 10 {
11 "name": "Definitions", 11 "name": "Definitions",
12 "isAbstract": true, 12 "isAbstract": true,
13 - "extends": [  
14 - "bpmn:Definitions"  
15 - ], 13 + "extends": ["bpmn:Definitions"],
16 "properties": [ 14 "properties": [
17 { 15 {
18 "name": "diagramRelationId", 16 "name": "diagramRelationId",
@@ -23,9 +21,7 @@ @@ -23,9 +21,7 @@
23 }, 21 },
24 { 22 {
25 "name": "InOutBinding", 23 "name": "InOutBinding",
26 - "superClass": [  
27 - "Element"  
28 - ], 24 + "superClass": ["Element"],
29 "isAbstract": true, 25 "isAbstract": true,
30 "properties": [ 26 "properties": [
31 { 27 {
@@ -63,35 +59,22 @@ @@ -63,35 +59,22 @@
63 }, 59 },
64 { 60 {
65 "name": "In", 61 "name": "In",
66 - "superClass": [  
67 - "InOutBinding"  
68 - ], 62 + "superClass": ["InOutBinding"],
69 "meta": { 63 "meta": {
70 - "allowedIn": [  
71 - "bpmn:CallActivity",  
72 - "bpmn:SignalEventDefinition"  
73 - ] 64 + "allowedIn": ["bpmn:CallActivity", "bpmn:SignalEventDefinition"]
74 } 65 }
75 }, 66 },
76 { 67 {
77 "name": "Out", 68 "name": "Out",
78 - "superClass": [  
79 - "InOutBinding"  
80 - ], 69 + "superClass": ["InOutBinding"],
81 "meta": { 70 "meta": {
82 - "allowedIn": [  
83 - "bpmn:CallActivity"  
84 - ] 71 + "allowedIn": ["bpmn:CallActivity"]
85 } 72 }
86 }, 73 },
87 { 74 {
88 "name": "AsyncCapable", 75 "name": "AsyncCapable",
89 "isAbstract": true, 76 "isAbstract": true,
90 - "extends": [  
91 - "bpmn:Activity",  
92 - "bpmn:Gateway",  
93 - "bpmn:Event"  
94 - ], 77 + "extends": ["bpmn:Activity", "bpmn:Gateway", "bpmn:Event"],
95 "properties": [ 78 "properties": [
96 { 79 {
97 "name": "async", 80 "name": "async",
@@ -122,10 +105,7 @@ @@ -122,10 +105,7 @@
122 { 105 {
123 "name": "JobPriorized", 106 "name": "JobPriorized",
124 "isAbstract": true, 107 "isAbstract": true,
125 - "extends": [  
126 - "bpmn:Process",  
127 - "camunda:AsyncCapable"  
128 - ], 108 + "extends": ["bpmn:Process", "camunda:AsyncCapable"],
129 "properties": [ 109 "properties": [
130 { 110 {
131 "name": "jobPriority", 111 "name": "jobPriority",
@@ -137,9 +117,7 @@ @@ -137,9 +117,7 @@
137 { 117 {
138 "name": "SignalEventDefinition", 118 "name": "SignalEventDefinition",
139 "isAbstract": true, 119 "isAbstract": true,
140 - "extends": [  
141 - "bpmn:SignalEventDefinition"  
142 - ], 120 + "extends": ["bpmn:SignalEventDefinition"],
143 "properties": [ 121 "properties": [
144 { 122 {
145 "name": "async", 123 "name": "async",
@@ -152,9 +130,7 @@ @@ -152,9 +130,7 @@
152 { 130 {
153 "name": "ErrorEventDefinition", 131 "name": "ErrorEventDefinition",
154 "isAbstract": true, 132 "isAbstract": true,
155 - "extends": [  
156 - "bpmn:ErrorEventDefinition"  
157 - ], 133 + "extends": ["bpmn:ErrorEventDefinition"],
158 "properties": [ 134 "properties": [
159 { 135 {
160 "name": "errorCodeVariable", 136 "name": "errorCodeVariable",
@@ -171,9 +147,7 @@ @@ -171,9 +147,7 @@
171 { 147 {
172 "name": "Error", 148 "name": "Error",
173 "isAbstract": true, 149 "isAbstract": true,
174 - "extends": [  
175 - "bpmn:Error"  
176 - ], 150 + "extends": ["bpmn:Error"],
177 "properties": [ 151 "properties": [
178 { 152 {
179 "name": "camunda:errorMessage", 153 "name": "camunda:errorMessage",
@@ -184,9 +158,7 @@ @@ -184,9 +158,7 @@
184 }, 158 },
185 { 159 {
186 "name": "PotentialStarter", 160 "name": "PotentialStarter",
187 - "superClass": [  
188 - "Element"  
189 - ], 161 + "superClass": ["Element"],
190 "properties": [ 162 "properties": [
191 { 163 {
192 "name": "resourceAssignmentExpression", 164 "name": "resourceAssignmentExpression",
@@ -197,10 +169,7 @@ @@ -197,10 +169,7 @@
197 { 169 {
198 "name": "FormSupported", 170 "name": "FormSupported",
199 "isAbstract": true, 171 "isAbstract": true,
200 - "extends": [  
201 - "bpmn:StartEvent",  
202 - "bpmn:UserTask"  
203 - ], 172 + "extends": ["bpmn:StartEvent", "bpmn:UserTask"],
204 "properties": [ 173 "properties": [
205 { 174 {
206 "name": "formHandlerClass", 175 "name": "formHandlerClass",
@@ -217,10 +186,7 @@ @@ -217,10 +186,7 @@
217 { 186 {
218 "name": "TemplateSupported", 187 "name": "TemplateSupported",
219 "isAbstract": true, 188 "isAbstract": true,
220 - "extends": [  
221 - "bpmn:Process",  
222 - "bpmn:FlowElement"  
223 - ], 189 + "extends": ["bpmn:Process", "bpmn:FlowElement"],
224 "properties": [ 190 "properties": [
225 { 191 {
226 "name": "modelerTemplate", 192 "name": "modelerTemplate",
@@ -237,7 +203,7 @@ @@ -237,7 +203,7 @@
237 { 203 {
238 "name": "Initiator", 204 "name": "Initiator",
239 "isAbstract": true, 205 "isAbstract": true,
240 - "extends": [ "bpmn:StartEvent" ], 206 + "extends": ["bpmn:StartEvent"],
241 "properties": [ 207 "properties": [
242 { 208 {
243 "name": "initiator", 209 "name": "initiator",
@@ -249,9 +215,7 @@ @@ -249,9 +215,7 @@
249 { 215 {
250 "name": "ScriptTask", 216 "name": "ScriptTask",
251 "isAbstract": true, 217 "isAbstract": true,
252 - "extends": [  
253 - "bpmn:ScriptTask"  
254 - ], 218 + "extends": ["bpmn:ScriptTask"],
255 "properties": [ 219 "properties": [
256 { 220 {
257 "name": "resultVariable", 221 "name": "resultVariable",
@@ -268,9 +232,7 @@ @@ -268,9 +232,7 @@
268 { 232 {
269 "name": "Process", 233 "name": "Process",
270 "isAbstract": true, 234 "isAbstract": true,
271 - "extends": [  
272 - "bpmn:Process"  
273 - ], 235 + "extends": ["bpmn:Process"],
274 "properties": [ 236 "properties": [
275 { 237 {
276 "name": "candidateStarterGroups", 238 "name": "candidateStarterGroups",
@@ -303,9 +265,7 @@ @@ -303,9 +265,7 @@
303 { 265 {
304 "name": "EscalationEventDefinition", 266 "name": "EscalationEventDefinition",
305 "isAbstract": true, 267 "isAbstract": true,
306 - "extends": [  
307 - "bpmn:EscalationEventDefinition"  
308 - ], 268 + "extends": ["bpmn:EscalationEventDefinition"],
309 "properties": [ 269 "properties": [
310 { 270 {
311 "name": "escalationCodeVariable", 271 "name": "escalationCodeVariable",
@@ -317,9 +277,7 @@ @@ -317,9 +277,7 @@
317 { 277 {
318 "name": "FormalExpression", 278 "name": "FormalExpression",
319 "isAbstract": true, 279 "isAbstract": true,
320 - "extends": [  
321 - "bpmn:FormalExpression"  
322 - ], 280 + "extends": ["bpmn:FormalExpression"],
323 "properties": [ 281 "properties": [
324 { 282 {
325 "name": "resource", 283 "name": "resource",
@@ -330,7 +288,7 @@ @@ -330,7 +288,7 @@
330 }, 288 },
331 { 289 {
332 "name": "Assignable", 290 "name": "Assignable",
333 - "extends": [ "bpmn:UserTask" ], 291 + "extends": ["bpmn:UserTask"],
334 "properties": [ 292 "properties": [
335 { 293 {
336 "name": "assignee", 294 "name": "assignee",
@@ -366,7 +324,7 @@ @@ -366,7 +324,7 @@
366 }, 324 },
367 { 325 {
368 "name": "CallActivity", 326 "name": "CallActivity",
369 - "extends": [ "bpmn:CallActivity" ], 327 + "extends": ["bpmn:CallActivity"],
370 "properties": [ 328 "properties": [
371 { 329 {
372 "name": "calledElementBinding", 330 "name": "calledElementBinding",
@@ -455,9 +413,7 @@ @@ -455,9 +413,7 @@
455 }, 413 },
456 { 414 {
457 "name": "DmnCapable", 415 "name": "DmnCapable",
458 - "extends": [  
459 - "bpmn:BusinessRuleTask"  
460 - ], 416 + "extends": ["bpmn:BusinessRuleTask"],
461 "properties": [ 417 "properties": [
462 { 418 {
463 "name": "decisionRef", 419 "name": "decisionRef",
@@ -490,9 +446,7 @@ @@ -490,9 +446,7 @@
490 }, 446 },
491 { 447 {
492 "name": "ExternalCapable", 448 "name": "ExternalCapable",
493 - "extends": [  
494 - "camunda:ServiceTaskLike"  
495 - ], 449 + "extends": ["camunda:ServiceTaskLike"],
496 "properties": [ 450 "properties": [
497 { 451 {
498 "name": "type", 452 "name": "type",
@@ -508,10 +462,7 @@ @@ -508,10 +462,7 @@
508 }, 462 },
509 { 463 {
510 "name": "TaskPriorized", 464 "name": "TaskPriorized",
511 - "extends": [  
512 - "bpmn:Process",  
513 - "camunda:ExternalCapable"  
514 - ], 465 + "extends": ["bpmn:Process", "camunda:ExternalCapable"],
515 "properties": [ 466 "properties": [
516 { 467 {
517 "name": "taskPriority", 468 "name": "taskPriority",
@@ -522,11 +473,9 @@ @@ -522,11 +473,9 @@
522 }, 473 },
523 { 474 {
524 "name": "Properties", 475 "name": "Properties",
525 - "superClass": [  
526 - "Element"  
527 - ], 476 + "superClass": ["Element"],
528 "meta": { 477 "meta": {
529 - "allowedIn": [ "*" ] 478 + "allowedIn": ["*"]
530 }, 479 },
531 "properties": [ 480 "properties": [
532 { 481 {
@@ -538,9 +487,7 @@ @@ -538,9 +487,7 @@
538 }, 487 },
539 { 488 {
540 "name": "Property", 489 "name": "Property",
541 - "superClass": [  
542 - "Element"  
543 - ], 490 + "superClass": ["Element"],
544 "properties": [ 491 "properties": [
545 { 492 {
546 "name": "id", 493 "name": "id",
@@ -561,13 +508,9 @@ @@ -561,13 +508,9 @@
561 }, 508 },
562 { 509 {
563 "name": "Connector", 510 "name": "Connector",
564 - "superClass": [  
565 - "Element"  
566 - ], 511 + "superClass": ["Element"],
567 "meta": { 512 "meta": {
568 - "allowedIn": [  
569 - "camunda:ServiceTaskLike"  
570 - ] 513 + "allowedIn": ["camunda:ServiceTaskLike"]
571 }, 514 },
572 "properties": [ 515 "properties": [
573 { 516 {
@@ -582,14 +525,9 @@ @@ -582,14 +525,9 @@
582 }, 525 },
583 { 526 {
584 "name": "InputOutput", 527 "name": "InputOutput",
585 - "superClass": [  
586 - "Element"  
587 - ], 528 + "superClass": ["Element"],
588 "meta": { 529 "meta": {
589 - "allowedIn": [  
590 - "bpmn:FlowNode",  
591 - "camunda:Connector"  
592 - ] 530 + "allowedIn": ["bpmn:FlowNode", "camunda:Connector"]
593 }, 531 },
594 "properties": [ 532 "properties": [
595 { 533 {
@@ -637,7 +575,7 @@ @@ -637,7 +575,7 @@
637 }, 575 },
638 { 576 {
639 "name": "List", 577 "name": "List",
640 - "superClass": [ "InputOutputParameterDefinition" ], 578 + "superClass": ["InputOutputParameterDefinition"],
641 "properties": [ 579 "properties": [
642 { 580 {
643 "name": "items", 581 "name": "items",
@@ -648,7 +586,7 @@ @@ -648,7 +586,7 @@
648 }, 586 },
649 { 587 {
650 "name": "Map", 588 "name": "Map",
651 - "superClass": [ "InputOutputParameterDefinition" ], 589 + "superClass": ["InputOutputParameterDefinition"],
652 "properties": [ 590 "properties": [
653 { 591 {
654 "name": "entries", 592 "name": "entries",
@@ -678,9 +616,7 @@ @@ -678,9 +616,7 @@
678 }, 616 },
679 { 617 {
680 "name": "Value", 618 "name": "Value",
681 - "superClass": [  
682 - "InputOutputParameterDefinition"  
683 - ], 619 + "superClass": ["InputOutputParameterDefinition"],
684 "properties": [ 620 "properties": [
685 { 621 {
686 "name": "id", 622 "name": "id",
@@ -701,7 +637,7 @@ @@ -701,7 +637,7 @@
701 }, 637 },
702 { 638 {
703 "name": "Script", 639 "name": "Script",
704 - "superClass": [ "InputOutputParameterDefinition" ], 640 + "superClass": ["InputOutputParameterDefinition"],
705 "properties": [ 641 "properties": [
706 { 642 {
707 "name": "scriptFormat", 643 "name": "scriptFormat",
@@ -722,7 +658,7 @@ @@ -722,7 +658,7 @@
722 }, 658 },
723 { 659 {
724 "name": "Field", 660 "name": "Field",
725 - "superClass": [ "Element" ], 661 + "superClass": ["Element"],
726 "meta": { 662 "meta": {
727 "allowedIn": [ 663 "allowedIn": [
728 "camunda:ServiceTaskLike", 664 "camunda:ServiceTaskLike",
@@ -753,17 +689,17 @@ @@ -753,17 +689,17 @@
753 }, 689 },
754 { 690 {
755 "name": "InputParameter", 691 "name": "InputParameter",
756 - "superClass": [ "InputOutputParameter" ] 692 + "superClass": ["InputOutputParameter"]
757 }, 693 },
758 { 694 {
759 "name": "OutputParameter", 695 "name": "OutputParameter",
760 - "superClass": [ "InputOutputParameter" ] 696 + "superClass": ["InputOutputParameter"]
761 }, 697 },
762 { 698 {
763 "name": "Collectable", 699 "name": "Collectable",
764 "isAbstract": true, 700 "isAbstract": true,
765 - "extends": [ "bpmn:MultiInstanceLoopCharacteristics" ],  
766 - "superClass": [ "camunda:AsyncCapable" ], 701 + "extends": ["bpmn:MultiInstanceLoopCharacteristics"],
  702 + "superClass": ["camunda:AsyncCapable"],
767 "properties": [ 703 "properties": [
768 { 704 {
769 "name": "collection", 705 "name": "collection",
@@ -779,12 +715,9 @@ @@ -779,12 +715,9 @@
779 }, 715 },
780 { 716 {
781 "name": "FailedJobRetryTimeCycle", 717 "name": "FailedJobRetryTimeCycle",
782 - "superClass": [ "Element" ], 718 + "superClass": ["Element"],
783 "meta": { 719 "meta": {
784 - "allowedIn": [  
785 - "camunda:AsyncCapable",  
786 - "bpmn:MultiInstanceLoopCharacteristics"  
787 - ] 720 + "allowedIn": ["camunda:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"]
788 }, 721 },
789 "properties": [ 722 "properties": [
790 { 723 {
@@ -796,7 +729,7 @@ @@ -796,7 +729,7 @@
796 }, 729 },
797 { 730 {
798 "name": "ExecutionListener", 731 "name": "ExecutionListener",
799 - "superClass": [ "Element" ], 732 + "superClass": ["Element"],
800 "meta": { 733 "meta": {
801 "allowedIn": [ 734 "allowedIn": [
802 "bpmn:Task", 735 "bpmn:Task",
@@ -855,11 +788,9 @@ @@ -855,11 +788,9 @@
855 }, 788 },
856 { 789 {
857 "name": "TaskListener", 790 "name": "TaskListener",
858 - "superClass": [ "Element" ], 791 + "superClass": ["Element"],
859 "meta": { 792 "meta": {
860 - "allowedIn": [  
861 - "bpmn:UserTask"  
862 - ] 793 + "allowedIn": ["bpmn:UserTask"]
863 }, 794 },
864 "properties": [ 795 "properties": [
865 { 796 {
@@ -905,12 +836,9 @@ @@ -905,12 +836,9 @@
905 }, 836 },
906 { 837 {
907 "name": "FormProperty", 838 "name": "FormProperty",
908 - "superClass": [ "Element" ], 839 + "superClass": ["Element"],
909 "meta": { 840 "meta": {
910 - "allowedIn": [  
911 - "bpmn:StartEvent",  
912 - "bpmn:UserTask"  
913 - ] 841 + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"]
914 }, 842 },
915 "properties": [ 843 "properties": [
916 { 844 {
@@ -972,12 +900,9 @@ @@ -972,12 +900,9 @@
972 }, 900 },
973 { 901 {
974 "name": "FormData", 902 "name": "FormData",
975 - "superClass": [ "Element" ], 903 + "superClass": ["Element"],
976 "meta": { 904 "meta": {
977 - "allowedIn": [  
978 - "bpmn:StartEvent",  
979 - "bpmn:UserTask"  
980 - ] 905 + "allowedIn": ["bpmn:StartEvent", "bpmn:UserTask"]
981 }, 906 },
982 "properties": [ 907 "properties": [
983 { 908 {
@@ -994,7 +919,7 @@ @@ -994,7 +919,7 @@
994 }, 919 },
995 { 920 {
996 "name": "FormField", 921 "name": "FormField",
997 - "superClass": [ "Element" ], 922 + "superClass": ["Element"],
998 "properties": [ 923 "properties": [
999 { 924 {
1000 "name": "id", 925 "name": "id",
@@ -1038,7 +963,7 @@ @@ -1038,7 +963,7 @@
1038 }, 963 },
1039 { 964 {
1040 "name": "Validation", 965 "name": "Validation",
1041 - "superClass": [ "Element" ], 966 + "superClass": ["Element"],
1042 "properties": [ 967 "properties": [
1043 { 968 {
1044 "name": "constraints", 969 "name": "constraints",
@@ -1049,7 +974,7 @@ @@ -1049,7 +974,7 @@
1049 }, 974 },
1050 { 975 {
1051 "name": "Constraint", 976 "name": "Constraint",
1052 - "superClass": [ "Element" ], 977 + "superClass": ["Element"],
1053 "properties": [ 978 "properties": [
1054 { 979 {
1055 "name": "name", 980 "name": "name",
@@ -1066,9 +991,7 @@ @@ -1066,9 +991,7 @@
1066 { 991 {
1067 "name": "ConditionalEventDefinition", 992 "name": "ConditionalEventDefinition",
1068 "isAbstract": true, 993 "isAbstract": true,
1069 - "extends": [  
1070 - "bpmn:ConditionalEventDefinition"  
1071 - ], 994 + "extends": ["bpmn:ConditionalEventDefinition"],
1072 "properties": [ 995 "properties": [
1073 { 996 {
1074 "name": "variableName", 997 "name": "variableName",
@@ -1083,5 +1006,5 @@ @@ -1083,5 +1006,5 @@
1083 ] 1006 ]
1084 } 1007 }
1085 ], 1008 ],
1086 - "emumerations": [ ] 1009 + "emumerations": []
1087 } 1010 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/descriptor/flowableDescriptor.json
@@ -875,10 +875,7 @@ @@ -875,10 +875,7 @@
875 "name": "FailedJobRetryTimeCycle", 875 "name": "FailedJobRetryTimeCycle",
876 "superClass": ["Element"], 876 "superClass": ["Element"],
877 "meta": { 877 "meta": {
878 - "allowedIn": [  
879 - "flowable:AsyncCapable",  
880 - "bpmn:MultiInstanceLoopCharacteristics"  
881 - ] 878 + "allowedIn": ["flowable:AsyncCapable", "bpmn:MultiInstanceLoopCharacteristics"]
882 }, 879 },
883 "properties": [ 880 "properties": [
884 { 881 {
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/activitiExtension.js
1 -"use strict" 1 +'use strict'
2 2
3 import { some } from 'min-dash' 3 import { some } from 'min-dash'
4 4
@@ -6,20 +6,25 @@ import { some } from &#39;min-dash&#39; @@ -6,20 +6,25 @@ import { some } from &#39;min-dash&#39;
6 // const some = some 6 // const some = some
7 7
8 const ALLOWED_TYPES = { 8 const ALLOWED_TYPES = {
9 - FailedJobRetryTimeCycle: ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:Activity'], 9 + FailedJobRetryTimeCycle: [
  10 + 'bpmn:StartEvent',
  11 + 'bpmn:BoundaryEvent',
  12 + 'bpmn:IntermediateCatchEvent',
  13 + 'bpmn:Activity'
  14 + ],
10 Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], 15 Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'],
11 Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'] 16 Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']
12 } 17 }
13 18
14 -function is (element, type) {  
15 - return element && typeof element.$instanceOf === "function" && element.$instanceOf(type) 19 +function is(element, type) {
  20 + return element && typeof element.$instanceOf === 'function' && element.$instanceOf(type)
16 } 21 }
17 22
18 -function exists (element) { 23 +function exists(element) {
19 return element && element.length 24 return element && element.length
20 } 25 }
21 26
22 -function includesType (collection, type) { 27 +function includesType(collection, type) {
23 return ( 28 return (
24 exists(collection) && 29 exists(collection) &&
25 some(collection, function (element) { 30 some(collection, function (element) {
@@ -28,22 +33,22 @@ function includesType (collection, type) { @@ -28,22 +33,22 @@ function includesType (collection, type) {
28 ) 33 )
29 } 34 }
30 35
31 -function anyType (element, types) { 36 +function anyType(element, types) {
32 return some(types, function (type) { 37 return some(types, function (type) {
33 return is(element, type) 38 return is(element, type)
34 }) 39 })
35 } 40 }
36 41
37 -function isAllowed (propName, propDescriptor, newElement) { 42 +function isAllowed(propName, propDescriptor, newElement) {
38 const name = propDescriptor.name, 43 const name = propDescriptor.name,
39 types = ALLOWED_TYPES[name.replace(/activiti:/, '')] 44 types = ALLOWED_TYPES[name.replace(/activiti:/, '')]
40 45
41 return name === propName && anyType(newElement, types) 46 return name === propName && anyType(newElement, types)
42 } 47 }
43 48
44 -function ActivitiModdleExtension (eventBus) { 49 +function ActivitiModdleExtension(eventBus) {
45 eventBus.on( 50 eventBus.on(
46 - "property.clone", 51 + 'property.clone',
47 function (context) { 52 function (context) {
48 const newElement = context.newElement, 53 const newElement = context.newElement,
49 propDescriptor = context.propertyDescriptor 54 propDescriptor = context.propertyDescriptor
@@ -54,26 +59,25 @@ function ActivitiModdleExtension (eventBus) { @@ -54,26 +59,25 @@ function ActivitiModdleExtension (eventBus) {
54 ) 59 )
55 } 60 }
56 61
57 -ActivitiModdleExtension.$inject = ["eventBus"] 62 +ActivitiModdleExtension.$inject = ['eventBus']
58 63
59 ActivitiModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) { 64 ActivitiModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) {
60 - if (isAllowed("activiti:FailedJobRetryTimeCycle", propDescriptor, newElement)) { 65 + if (isAllowed('activiti:FailedJobRetryTimeCycle', propDescriptor, newElement)) {
61 return ( 66 return (
62 - includesType(newElement.eventDefinitions, "bpmn:TimerEventDefinition") ||  
63 - includesType(newElement.eventDefinitions, "bpmn:SignalEventDefinition") ||  
64 - is(newElement.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics") 67 + includesType(newElement.eventDefinitions, 'bpmn:TimerEventDefinition') ||
  68 + includesType(newElement.eventDefinitions, 'bpmn:SignalEventDefinition') ||
  69 + is(newElement.loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics')
65 ) 70 )
66 } 71 }
67 72
68 - if (isAllowed("activiti:Connector", propDescriptor, newElement)) {  
69 - return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition") 73 + if (isAllowed('activiti:Connector', propDescriptor, newElement)) {
  74 + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition')
70 } 75 }
71 76
72 - if (isAllowed("activiti:Field", propDescriptor, newElement)) {  
73 - return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition") 77 + if (isAllowed('activiti:Field', propDescriptor, newElement)) {
  78 + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition')
74 } 79 }
75 } 80 }
76 81
77 // module.exports = ActivitiModdleExtension; 82 // module.exports = ActivitiModdleExtension;
78 export default ActivitiModdleExtension 83 export default ActivitiModdleExtension
79 -  
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/activiti/index.js
@@ -3,9 +3,9 @@ @@ -3,9 +3,9 @@
3 * address https://github.com/igdianov/activiti-bpmn-moddle 3 * address https://github.com/igdianov/activiti-bpmn-moddle
4 * */ 4 * */
5 5
6 -import activitiExtension from "./activitiExtension" 6 +import activitiExtension from './activitiExtension'
7 7
8 export default { 8 export default {
9 - __init__: ["ActivitiModdleExtension"],  
10 - ActivitiModdleExtension: ["type", activitiExtension] 9 + __init__: ['ActivitiModdleExtension'],
  10 + ActivitiModdleExtension: ['type', activitiExtension]
11 } 11 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/extension.js
1 -"use strict" 1 +'use strict'
2 2
3 -  
4 -import {  
5 - isFunction,  
6 - isObject,  
7 - some  
8 -} from 'min-dash' 3 +import { isFunction, isObject, some } from 'min-dash'
9 4
10 // const isFunction = isFunction, 5 // const isFunction = isFunction,
11 // isObject = isObject, 6 // isObject = isObject,
@@ -16,10 +11,11 @@ import { @@ -16,10 +11,11 @@ import {
16 11
17 const WILDCARD = '*' 12 const WILDCARD = '*'
18 13
19 -function CamundaModdleExtension (eventBus) { 14 +function CamundaModdleExtension(eventBus) {
  15 + // eslint-disable-next-line @typescript-eslint/no-this-alias
20 const self = this 16 const self = this
21 17
22 - eventBus.on("moddleCopy.canCopyProperty", function (context) { 18 + eventBus.on('moddleCopy.canCopyProperty', function (context) {
23 const property = context.property, 19 const property = context.property,
24 parent = context.parent 20 parent = context.parent
25 21
@@ -27,7 +23,7 @@ function CamundaModdleExtension (eventBus) { @@ -27,7 +23,7 @@ function CamundaModdleExtension (eventBus) {
27 }) 23 })
28 } 24 }
29 25
30 -CamundaModdleExtension.$inject = ["eventBus"] 26 +CamundaModdleExtension.$inject = ['eventBus']
31 27
32 /** 28 /**
33 * Check wether to disallow copying property. 29 * Check wether to disallow copying property.
@@ -40,15 +36,15 @@ CamundaModdleExtension.prototype.canCopyProperty = function (property, parent) { @@ -40,15 +36,15 @@ CamundaModdleExtension.prototype.canCopyProperty = function (property, parent) {
40 36
41 // (2) check more complex scenarios 37 // (2) check more complex scenarios
42 38
43 - if (is(property, "camunda:InputOutput") && !this.canHostInputOutput(parent)) { 39 + if (is(property, 'camunda:InputOutput') && !this.canHostInputOutput(parent)) {
44 return false 40 return false
45 } 41 }
46 42
47 - if (isAny(property, ["camunda:Connector", "camunda:Field"]) && !this.canHostConnector(parent)) { 43 + if (isAny(property, ['camunda:Connector', 'camunda:Field']) && !this.canHostConnector(parent)) {
48 return false 44 return false
49 } 45 }
50 46
51 - if (is(property, "camunda:In") && !this.canHostIn(parent)) { 47 + if (is(property, 'camunda:In') && !this.canHostIn(parent)) {
52 return false 48 return false
53 } 49 }
54 } 50 }
@@ -68,21 +64,19 @@ CamundaModdleExtension.prototype.canHostInputOutput = function (parent) { @@ -68,21 +64,19 @@ CamundaModdleExtension.prototype.canHostInputOutput = function (parent) {
68 return false 64 return false
69 } 65 }
70 66
71 - if (isAny(flowNode, ["bpmn:StartEvent", "bpmn:Gateway", "bpmn:BoundaryEvent"])) { 67 + if (isAny(flowNode, ['bpmn:StartEvent', 'bpmn:Gateway', 'bpmn:BoundaryEvent'])) {
72 return false 68 return false
73 } 69 }
74 70
75 - return !(is(flowNode, "bpmn:SubProcess") && flowNode.get("triggeredByEvent"))  
76 -  
77 - 71 + return !(is(flowNode, 'bpmn:SubProcess') && flowNode.get('triggeredByEvent'))
78 } 72 }
79 73
80 CamundaModdleExtension.prototype.canHostConnector = function (parent) { 74 CamundaModdleExtension.prototype.canHostConnector = function (parent) {
81 const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike') 75 const serviceTaskLike = getParent(parent, 'camunda:ServiceTaskLike')
82 76
83 - if (is(serviceTaskLike, "bpmn:MessageEventDefinition")) { 77 + if (is(serviceTaskLike, 'bpmn:MessageEventDefinition')) {
84 // only allow on throw and end events 78 // only allow on throw and end events
85 - return getParent(parent, "bpmn:IntermediateThrowEvent") || getParent(parent, "bpmn:EndEvent") 79 + return getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent')
86 } 80 }
87 81
88 return true 82 return true
@@ -99,7 +93,7 @@ CamundaModdleExtension.prototype.canHostIn = function (parent) { @@ -99,7 +93,7 @@ CamundaModdleExtension.prototype.canHostIn = function (parent) {
99 93
100 if (signalEventDefinition) { 94 if (signalEventDefinition) {
101 // only allow on throw and end events 95 // only allow on throw and end events
102 - return getParent(parent, "bpmn:IntermediateThrowEvent") || getParent(parent, "bpmn:EndEvent") 96 + return getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent')
103 } 97 }
104 98
105 return true 99 return true
@@ -110,17 +104,17 @@ export default CamundaModdleExtension @@ -110,17 +104,17 @@ export default CamundaModdleExtension
110 104
111 // helpers ////////// 105 // helpers //////////
112 106
113 -function is (element, type) { 107 +function is(element, type) {
114 return element && isFunction(element.$instanceOf) && element.$instanceOf(type) 108 return element && isFunction(element.$instanceOf) && element.$instanceOf(type)
115 } 109 }
116 110
117 -function isAny (element, types) { 111 +function isAny(element, types) {
118 return some(types, function (t) { 112 return some(types, function (t) {
119 return is(element, t) 113 return is(element, t)
120 }) 114 })
121 } 115 }
122 116
123 -function getParent (element, type) { 117 +function getParent(element, type) {
124 if (!type) { 118 if (!type) {
125 return element.$parent 119 return element.$parent
126 } 120 }
@@ -136,7 +130,7 @@ function getParent (element, type) { @@ -136,7 +130,7 @@ function getParent (element, type) {
136 return getParent(element.$parent, type) 130 return getParent(element.$parent, type)
137 } 131 }
138 132
139 -function isAllowedInParent (property, parent) { 133 +function isAllowedInParent(property, parent) {
140 // (1) find property descriptor 134 // (1) find property descriptor
141 const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type) 135 const descriptor = property.$type && property.$model.getTypeDescriptor(property.$type)
142 136
@@ -152,6 +146,6 @@ function isAllowedInParent (property, parent) { @@ -152,6 +146,6 @@ function isAllowedInParent (property, parent) {
152 }) 146 })
153 } 147 }
154 148
155 -function isWildcard (allowedIn) { 149 +function isWildcard(allowedIn) {
156 return allowedIn.indexOf(WILDCARD) !== -1 150 return allowedIn.indexOf(WILDCARD) !== -1
157 } 151 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/camunda/index.js
1 -"use strict" 1 +'use strict'
2 2
3 -import extension from "./extension" 3 +import extension from './extension'
4 4
5 export default { 5 export default {
6 - __init__: ["camundaModdleExtension"],  
7 - camundaModdleExtension: ["type", extension] 6 + __init__: ['camundaModdleExtension'],
  7 + camundaModdleExtension: ['type', extension]
8 } 8 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/flowableExtension.js
1 -"use strict" 1 +'use strict'
2 2
3 import { some } from 'min-dash' 3 import { some } from 'min-dash'
4 4
5 // const some = some 5 // const some = some
6 // const some = require('min-dash').some 6 // const some = require('min-dash').some
7 7
8 -  
9 -  
10 const ALLOWED_TYPES = { 8 const ALLOWED_TYPES = {
11 - FailedJobRetryTimeCycle: ['bpmn:StartEvent', 'bpmn:BoundaryEvent', 'bpmn:IntermediateCatchEvent', 'bpmn:Activity'], 9 + FailedJobRetryTimeCycle: [
  10 + 'bpmn:StartEvent',
  11 + 'bpmn:BoundaryEvent',
  12 + 'bpmn:IntermediateCatchEvent',
  13 + 'bpmn:Activity'
  14 + ],
12 Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'], 15 Connector: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'],
13 Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent'] 16 Field: ['bpmn:EndEvent', 'bpmn:IntermediateThrowEvent']
14 } 17 }
15 18
16 -function is (element, type) {  
17 - return element && typeof element.$instanceOf === "function" && element.$instanceOf(type) 19 +function is(element, type) {
  20 + return element && typeof element.$instanceOf === 'function' && element.$instanceOf(type)
18 } 21 }
19 22
20 -function exists (element) { 23 +function exists(element) {
21 return element && element.length 24 return element && element.length
22 } 25 }
23 26
24 -function includesType (collection, type) { 27 +function includesType(collection, type) {
25 return ( 28 return (
26 exists(collection) && 29 exists(collection) &&
27 some(collection, function (element) { 30 some(collection, function (element) {
@@ -30,22 +33,22 @@ function includesType (collection, type) { @@ -30,22 +33,22 @@ function includesType (collection, type) {
30 ) 33 )
31 } 34 }
32 35
33 -function anyType (element, types) { 36 +function anyType(element, types) {
34 return some(types, function (type) { 37 return some(types, function (type) {
35 return is(element, type) 38 return is(element, type)
36 }) 39 })
37 } 40 }
38 41
39 -function isAllowed (propName, propDescriptor, newElement) { 42 +function isAllowed(propName, propDescriptor, newElement) {
40 const name = propDescriptor.name, 43 const name = propDescriptor.name,
41 types = ALLOWED_TYPES[name.replace(/flowable:/, '')] 44 types = ALLOWED_TYPES[name.replace(/flowable:/, '')]
42 45
43 return name === propName && anyType(newElement, types) 46 return name === propName && anyType(newElement, types)
44 } 47 }
45 48
46 -function FlowableModdleExtension (eventBus) { 49 +function FlowableModdleExtension(eventBus) {
47 eventBus.on( 50 eventBus.on(
48 - "property.clone", 51 + 'property.clone',
49 function (context) { 52 function (context) {
50 const newElement = context.newElement, 53 const newElement = context.newElement,
51 propDescriptor = context.propertyDescriptor 54 propDescriptor = context.propertyDescriptor
@@ -56,23 +59,23 @@ function FlowableModdleExtension (eventBus) { @@ -56,23 +59,23 @@ function FlowableModdleExtension (eventBus) {
56 ) 59 )
57 } 60 }
58 61
59 -FlowableModdleExtension.$inject = ["eventBus"] 62 +FlowableModdleExtension.$inject = ['eventBus']
60 63
61 FlowableModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) { 64 FlowableModdleExtension.prototype.canCloneProperty = function (newElement, propDescriptor) {
62 - if (isAllowed("flowable:FailedJobRetryTimeCycle", propDescriptor, newElement)) { 65 + if (isAllowed('flowable:FailedJobRetryTimeCycle', propDescriptor, newElement)) {
63 return ( 66 return (
64 - includesType(newElement.eventDefinitions, "bpmn:TimerEventDefinition") ||  
65 - includesType(newElement.eventDefinitions, "bpmn:SignalEventDefinition") ||  
66 - is(newElement.loopCharacteristics, "bpmn:MultiInstanceLoopCharacteristics") 67 + includesType(newElement.eventDefinitions, 'bpmn:TimerEventDefinition') ||
  68 + includesType(newElement.eventDefinitions, 'bpmn:SignalEventDefinition') ||
  69 + is(newElement.loopCharacteristics, 'bpmn:MultiInstanceLoopCharacteristics')
67 ) 70 )
68 } 71 }
69 72
70 - if (isAllowed("flowable:Connector", propDescriptor, newElement)) {  
71 - return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition") 73 + if (isAllowed('flowable:Connector', propDescriptor, newElement)) {
  74 + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition')
72 } 75 }
73 76
74 - if (isAllowed("flowable:Field", propDescriptor, newElement)) {  
75 - return includesType(newElement.eventDefinitions, "bpmn:MessageEventDefinition") 77 + if (isAllowed('flowable:Field', propDescriptor, newElement)) {
  78 + return includesType(newElement.eventDefinitions, 'bpmn:MessageEventDefinition')
76 } 79 }
77 } 80 }
78 81
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/extension-moddle/flowable/index.js
@@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
2 * @author igdianov 2 * @author igdianov
3 * address https://github.com/igdianov/activiti-bpmn-moddle 3 * address https://github.com/igdianov/activiti-bpmn-moddle
4 * */ 4 * */
5 -import flowableExtension from "./flowableExtension" 5 +import flowableExtension from './flowableExtension'
6 6
7 export default { 7 export default {
8 - __init__: ["FlowableModdleExtension"],  
9 - FlowableModdleExtension: ["type", flowableExtension] 8 + __init__: ['FlowableModdleExtension'],
  9 + FlowableModdleExtension: ['type', flowableExtension]
10 } 10 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/palette/CustomPalette.js
1 import PaletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider' 1 import PaletteProvider from 'bpmn-js/lib/features/palette/PaletteProvider'
2 -import { assign } from "min-dash"  
3 -  
4 -export default function CustomPalette (palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) {  
5 - PaletteProvider.call(this, palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate, 2000) 2 +import { assign } from 'min-dash'
  3 +
  4 +export default function CustomPalette(
  5 + palette,
  6 + create,
  7 + elementFactory,
  8 + spaceTool,
  9 + lassoTool,
  10 + handTool,
  11 + globalConnect,
  12 + translate
  13 +) {
  14 + PaletteProvider.call(
  15 + this,
  16 + palette,
  17 + create,
  18 + elementFactory,
  19 + spaceTool,
  20 + lassoTool,
  21 + handTool,
  22 + globalConnect,
  23 + translate,
  24 + 2000
  25 + )
6 } 26 }
7 27
8 -const F = function () { } // 核心,利用空对象作为中介; 28 +const F = function () {} // 核心,利用空对象作为中介;
9 F.prototype = PaletteProvider.prototype // 核心,将父类的原型赋值给空对象F; 29 F.prototype = PaletteProvider.prototype // 核心,将父类的原型赋值给空对象F;
10 30
11 // 利用中介函数重写原型链方法 31 // 利用中介函数重写原型链方法
@@ -19,8 +39,8 @@ F.prototype.getPaletteEntries = function () { @@ -19,8 +39,8 @@ F.prototype.getPaletteEntries = function () {
19 globalConnect = this._globalConnect, 39 globalConnect = this._globalConnect,
20 translate = this._translate 40 translate = this._translate
21 41
22 - function createAction (type, group, className, title, options) {  
23 - function createListener (event) { 42 + function createAction(type, group, className, title, options) {
  43 + function createListener(event) {
24 const shape = elementFactory.createShape(assign({ type: type }, options)) 44 const shape = elementFactory.createShape(assign({ type: type }, options))
25 45
26 if (options) { 46 if (options) {
@@ -35,7 +55,7 @@ F.prototype.getPaletteEntries = function () { @@ -35,7 +55,7 @@ F.prototype.getPaletteEntries = function () {
35 return { 55 return {
36 group: group, 56 group: group,
37 className: className, 57 className: className,
38 - title: title || translate("Create {type}", { type: shortType }), 58 + title: title || translate('Create {type}', { type: shortType }),
39 action: { 59 action: {
40 dragstart: createListener, 60 dragstart: createListener,
41 click: createListener 61 click: createListener
@@ -43,7 +63,7 @@ F.prototype.getPaletteEntries = function () { @@ -43,7 +63,7 @@ F.prototype.getPaletteEntries = function () {
43 } 63 }
44 } 64 }
45 65
46 - function createSubprocess (event) { 66 + function createSubprocess(event) {
47 const subProcess = elementFactory.createShape({ 67 const subProcess = elementFactory.createShape({
48 type: 'bpmn:SubProcess', 68 type: 'bpmn:SubProcess',
49 x: 0, 69 x: 0,
@@ -65,14 +85,14 @@ F.prototype.getPaletteEntries = function () { @@ -65,14 +85,14 @@ F.prototype.getPaletteEntries = function () {
65 }) 85 })
66 } 86 }
67 87
68 - function createParticipant (event) { 88 + function createParticipant(event) {
69 create.start(event, elementFactory.createParticipantShape()) 89 create.start(event, elementFactory.createParticipantShape())
70 } 90 }
71 91
72 assign(actions, { 92 assign(actions, {
73 - "hand-tool": {  
74 - group: "tools",  
75 - className: "bpmn-icon-hand-tool", 93 + 'hand-tool': {
  94 + group: 'tools',
  95 + className: 'bpmn-icon-hand-tool',
76 title: '激活抓手工具', 96 title: '激活抓手工具',
77 // title: translate("Activate the hand tool"), 97 // title: translate("Activate the hand tool"),
78 action: { 98 action: {
@@ -81,77 +101,121 @@ F.prototype.getPaletteEntries = function () { @@ -81,77 +101,121 @@ F.prototype.getPaletteEntries = function () {
81 } 101 }
82 } 102 }
83 }, 103 },
84 - "lasso-tool": {  
85 - group: "tools",  
86 - className: "bpmn-icon-lasso-tool",  
87 - title: translate("Activate the lasso tool"), 104 + 'lasso-tool': {
  105 + group: 'tools',
  106 + className: 'bpmn-icon-lasso-tool',
  107 + title: translate('Activate the lasso tool'),
88 action: { 108 action: {
89 click: function (event) { 109 click: function (event) {
90 lassoTool.activateSelection(event) 110 lassoTool.activateSelection(event)
91 } 111 }
92 } 112 }
93 }, 113 },
94 - "space-tool": {  
95 - group: "tools",  
96 - className: "bpmn-icon-space-tool",  
97 - title: translate("Activate the create/remove space tool"), 114 + 'space-tool': {
  115 + group: 'tools',
  116 + className: 'bpmn-icon-space-tool',
  117 + title: translate('Activate the create/remove space tool'),
98 action: { 118 action: {
99 click: function (event) { 119 click: function (event) {
100 spaceTool.activateSelection(event) 120 spaceTool.activateSelection(event)
101 } 121 }
102 } 122 }
103 }, 123 },
104 - "global-connect-tool": {  
105 - group: "tools",  
106 - className: "bpmn-icon-connection-multi",  
107 - title: translate("Activate the global connect tool"), 124 + 'global-connect-tool': {
  125 + group: 'tools',
  126 + className: 'bpmn-icon-connection-multi',
  127 + title: translate('Activate the global connect tool'),
108 action: { 128 action: {
109 click: function (event) { 129 click: function (event) {
110 globalConnect.toggle(event) 130 globalConnect.toggle(event)
111 } 131 }
112 } 132 }
113 }, 133 },
114 - "tool-separator": {  
115 - group: "tools", 134 + 'tool-separator': {
  135 + group: 'tools',
116 separator: true 136 separator: true
117 }, 137 },
118 - "create.start-event": createAction("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", translate("Create StartEvent")),  
119 - "create.intermediate-event": createAction(  
120 - "bpmn:IntermediateThrowEvent",  
121 - "event",  
122 - "bpmn-icon-intermediate-event-none",  
123 - translate("Create Intermediate/Boundary Event") 138 + 'create.start-event': createAction(
  139 + 'bpmn:StartEvent',
  140 + 'event',
  141 + 'bpmn-icon-start-event-none',
  142 + translate('Create StartEvent')
  143 + ),
  144 + 'create.intermediate-event': createAction(
  145 + 'bpmn:IntermediateThrowEvent',
  146 + 'event',
  147 + 'bpmn-icon-intermediate-event-none',
  148 + translate('Create Intermediate/Boundary Event')
  149 + ),
  150 + 'create.end-event': createAction(
  151 + 'bpmn:EndEvent',
  152 + 'event',
  153 + 'bpmn-icon-end-event-none',
  154 + translate('Create EndEvent')
  155 + ),
  156 + 'create.exclusive-gateway': createAction(
  157 + 'bpmn:ExclusiveGateway',
  158 + 'gateway',
  159 + 'bpmn-icon-gateway-none',
  160 + translate('Create Gateway')
  161 + ),
  162 + 'create.user-task': createAction(
  163 + 'bpmn:UserTask',
  164 + 'activity',
  165 + 'bpmn-icon-user-task',
  166 + translate('Create User Task')
  167 + ),
  168 + 'create.data-object': createAction(
  169 + 'bpmn:DataObjectReference',
  170 + 'data-object',
  171 + 'bpmn-icon-data-object',
  172 + translate('Create DataObjectReference')
  173 + ),
  174 + 'create.data-store': createAction(
  175 + 'bpmn:DataStoreReference',
  176 + 'data-store',
  177 + 'bpmn-icon-data-store',
  178 + translate('Create DataStoreReference')
124 ), 179 ),
125 - "create.end-event": createAction("bpmn:EndEvent", "event", "bpmn-icon-end-event-none", translate("Create EndEvent")),  
126 - "create.exclusive-gateway": createAction("bpmn:ExclusiveGateway", "gateway", "bpmn-icon-gateway-none", translate("Create Gateway")),  
127 - "create.user-task": createAction("bpmn:UserTask", "activity", "bpmn-icon-user-task", translate("Create User Task")),  
128 - "create.data-object": createAction("bpmn:DataObjectReference", "data-object", "bpmn-icon-data-object", translate("Create DataObjectReference")),  
129 - "create.data-store": createAction("bpmn:DataStoreReference", "data-store", "bpmn-icon-data-store", translate("Create DataStoreReference")),  
130 - "create.subprocess-expanded": {  
131 - group: "activity",  
132 - className: "bpmn-icon-subprocess-expanded",  
133 - title: translate("Create expanded SubProcess"), 180 + 'create.subprocess-expanded': {
  181 + group: 'activity',
  182 + className: 'bpmn-icon-subprocess-expanded',
  183 + title: translate('Create expanded SubProcess'),
134 action: { 184 action: {
135 dragstart: createSubprocess, 185 dragstart: createSubprocess,
136 click: createSubprocess 186 click: createSubprocess
137 } 187 }
138 }, 188 },
139 - "create.participant-expanded": {  
140 - group: "collaboration",  
141 - className: "bpmn-icon-participant",  
142 - title: translate("Create Pool/Participant"), 189 + 'create.participant-expanded': {
  190 + group: 'collaboration',
  191 + className: 'bpmn-icon-participant',
  192 + title: translate('Create Pool/Participant'),
143 action: { 193 action: {
144 dragstart: createParticipant, 194 dragstart: createParticipant,
145 click: createParticipant 195 click: createParticipant
146 } 196 }
147 }, 197 },
148 - "create.group": createAction("bpmn:Group", "artifact", "bpmn-icon-group", translate("Create Group")) 198 + 'create.group': createAction(
  199 + 'bpmn:Group',
  200 + 'artifact',
  201 + 'bpmn-icon-group',
  202 + translate('Create Group')
  203 + )
149 }) 204 })
150 205
151 return actions 206 return actions
152 } 207 }
153 208
154 -CustomPalette.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"] 209 +CustomPalette.$inject = [
  210 + 'palette',
  211 + 'create',
  212 + 'elementFactory',
  213 + 'spaceTool',
  214 + 'lassoTool',
  215 + 'handTool',
  216 + 'globalConnect',
  217 + 'translate'
  218 +]
155 219
156 CustomPalette.prototype = new F() // 核心,将 F的实例赋值给子类; 220 CustomPalette.prototype = new F() // 核心,将 F的实例赋值给子类;
157 CustomPalette.prototype.constructor = CustomPalette // 修复子类CustomPalette的构造器指向,防止原型链的混乱; 221 CustomPalette.prototype.constructor = CustomPalette // 修复子类CustomPalette的构造器指向,防止原型链的混乱;
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/palette/index.js
@@ -14,9 +14,9 @@ @@ -14,9 +14,9 @@
14 // paletteProvider: ["type", PaletteProvider] 14 // paletteProvider: ["type", PaletteProvider]
15 // }; 15 // };
16 16
17 -import CustomPalette from "./CustomPalette"; 17 +import CustomPalette from './CustomPalette'
18 18
19 export default { 19 export default {
20 - __init__: ["paletteProvider"],  
21 - paletteProvider: ["type", CustomPalette]  
22 -}; 20 + __init__: ['paletteProvider'],
  21 + paletteProvider: ['type', CustomPalette]
  22 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/palette/paletteProvider.js
1 -import { assign } from "min-dash" 1 +import { assign } from 'min-dash'
2 2
3 /** 3 /**
4 * A palette provider for BPMN 2.0 elements. 4 * A palette provider for BPMN 2.0 elements.
5 */ 5 */
6 -export default function PaletteProvider (palette, create, elementFactory, spaceTool, lassoTool, handTool, globalConnect, translate) { 6 +export default function PaletteProvider(
  7 + palette,
  8 + create,
  9 + elementFactory,
  10 + spaceTool,
  11 + lassoTool,
  12 + handTool,
  13 + globalConnect,
  14 + translate
  15 +) {
7 this._palette = palette 16 this._palette = palette
8 this._create = create 17 this._create = create
9 this._elementFactory = elementFactory 18 this._elementFactory = elementFactory
@@ -16,7 +25,16 @@ export default function PaletteProvider (palette, create, elementFactory, spaceT @@ -16,7 +25,16 @@ export default function PaletteProvider (palette, create, elementFactory, spaceT
16 palette.registerProvider(this) 25 palette.registerProvider(this)
17 } 26 }
18 27
19 -PaletteProvider.$inject = ["palette", "create", "elementFactory", "spaceTool", "lassoTool", "handTool", "globalConnect", "translate"] 28 +PaletteProvider.$inject = [
  29 + 'palette',
  30 + 'create',
  31 + 'elementFactory',
  32 + 'spaceTool',
  33 + 'lassoTool',
  34 + 'handTool',
  35 + 'globalConnect',
  36 + 'translate'
  37 +]
20 38
21 PaletteProvider.prototype.getPaletteEntries = function () { 39 PaletteProvider.prototype.getPaletteEntries = function () {
22 const actions = {}, 40 const actions = {},
@@ -28,8 +46,8 @@ PaletteProvider.prototype.getPaletteEntries = function () { @@ -28,8 +46,8 @@ PaletteProvider.prototype.getPaletteEntries = function () {
28 globalConnect = this._globalConnect, 46 globalConnect = this._globalConnect,
29 translate = this._translate 47 translate = this._translate
30 48
31 - function createAction (type, group, className, title, options) {  
32 - function createListener (event) { 49 + function createAction(type, group, className, title, options) {
  50 + function createListener(event) {
33 const shape = elementFactory.createShape(assign({ type: type }, options)) 51 const shape = elementFactory.createShape(assign({ type: type }, options))
34 52
35 if (options) { 53 if (options) {
@@ -44,7 +62,7 @@ PaletteProvider.prototype.getPaletteEntries = function () { @@ -44,7 +62,7 @@ PaletteProvider.prototype.getPaletteEntries = function () {
44 return { 62 return {
45 group: group, 63 group: group,
46 className: className, 64 className: className,
47 - title: title || translate("Create {type}", { type: shortType }), 65 + title: title || translate('Create {type}', { type: shortType }),
48 action: { 66 action: {
49 dragstart: createListener, 67 dragstart: createListener,
50 click: createListener 68 click: createListener
@@ -52,7 +70,7 @@ PaletteProvider.prototype.getPaletteEntries = function () { @@ -52,7 +70,7 @@ PaletteProvider.prototype.getPaletteEntries = function () {
52 } 70 }
53 } 71 }
54 72
55 - function createSubprocess (event) { 73 + function createSubprocess(event) {
56 const subProcess = elementFactory.createShape({ 74 const subProcess = elementFactory.createShape({
57 type: 'bpmn:SubProcess', 75 type: 'bpmn:SubProcess',
58 x: 0, 76 x: 0,
@@ -74,86 +92,121 @@ PaletteProvider.prototype.getPaletteEntries = function () { @@ -74,86 +92,121 @@ PaletteProvider.prototype.getPaletteEntries = function () {
74 }) 92 })
75 } 93 }
76 94
77 - function createParticipant (event) { 95 + function createParticipant(event) {
78 create.start(event, elementFactory.createParticipantShape()) 96 create.start(event, elementFactory.createParticipantShape())
79 } 97 }
80 98
81 assign(actions, { 99 assign(actions, {
82 - "hand-tool": {  
83 - group: "tools",  
84 - className: "bpmn-icon-hand-tool",  
85 - title: translate("Activate the hand tool"), 100 + 'hand-tool': {
  101 + group: 'tools',
  102 + className: 'bpmn-icon-hand-tool',
  103 + title: translate('Activate the hand tool'),
86 action: { 104 action: {
87 click: function (event) { 105 click: function (event) {
88 handTool.activateHand(event) 106 handTool.activateHand(event)
89 } 107 }
90 } 108 }
91 }, 109 },
92 - "lasso-tool": {  
93 - group: "tools",  
94 - className: "bpmn-icon-lasso-tool",  
95 - title: translate("Activate the lasso tool"), 110 + 'lasso-tool': {
  111 + group: 'tools',
  112 + className: 'bpmn-icon-lasso-tool',
  113 + title: translate('Activate the lasso tool'),
96 action: { 114 action: {
97 click: function (event) { 115 click: function (event) {
98 lassoTool.activateSelection(event) 116 lassoTool.activateSelection(event)
99 } 117 }
100 } 118 }
101 }, 119 },
102 - "space-tool": {  
103 - group: "tools",  
104 - className: "bpmn-icon-space-tool",  
105 - title: translate("Activate the create/remove space tool"), 120 + 'space-tool': {
  121 + group: 'tools',
  122 + className: 'bpmn-icon-space-tool',
  123 + title: translate('Activate the create/remove space tool'),
106 action: { 124 action: {
107 click: function (event) { 125 click: function (event) {
108 spaceTool.activateSelection(event) 126 spaceTool.activateSelection(event)
109 } 127 }
110 } 128 }
111 }, 129 },
112 - "global-connect-tool": {  
113 - group: "tools",  
114 - className: "bpmn-icon-connection-multi",  
115 - title: translate("Activate the global connect tool"), 130 + 'global-connect-tool': {
  131 + group: 'tools',
  132 + className: 'bpmn-icon-connection-multi',
  133 + title: translate('Activate the global connect tool'),
116 action: { 134 action: {
117 click: function (event) { 135 click: function (event) {
118 globalConnect.toggle(event) 136 globalConnect.toggle(event)
119 } 137 }
120 } 138 }
121 }, 139 },
122 - "tool-separator": {  
123 - group: "tools", 140 + 'tool-separator': {
  141 + group: 'tools',
124 separator: true 142 separator: true
125 }, 143 },
126 - "create.start-event": createAction("bpmn:StartEvent", "event", "bpmn-icon-start-event-none", translate("Create StartEvent")),  
127 - "create.intermediate-event": createAction(  
128 - "bpmn:IntermediateThrowEvent",  
129 - "event",  
130 - "bpmn-icon-intermediate-event-none",  
131 - translate("Create Intermediate/Boundary Event") 144 + 'create.start-event': createAction(
  145 + 'bpmn:StartEvent',
  146 + 'event',
  147 + 'bpmn-icon-start-event-none',
  148 + translate('Create StartEvent')
132 ), 149 ),
133 - "create.end-event": createAction("bpmn:EndEvent", "event", "bpmn-icon-end-event-none", translate("Create EndEvent")),  
134 - "create.exclusive-gateway": createAction("bpmn:ExclusiveGateway", "gateway", "bpmn-icon-gateway-none", translate("Create Gateway")),  
135 - "create.user-task": createAction("bpmn:UserTask", "activity", "bpmn-icon-user-task", translate("Create User Task")),  
136 - "create.data-object": createAction("bpmn:DataObjectReference", "data-object", "bpmn-icon-data-object", translate("Create DataObjectReference")),  
137 - "create.data-store": createAction("bpmn:DataStoreReference", "data-store", "bpmn-icon-data-store", translate("Create DataStoreReference")),  
138 - "create.subprocess-expanded": {  
139 - group: "activity",  
140 - className: "bpmn-icon-subprocess-expanded",  
141 - title: translate("Create expanded SubProcess"), 150 + 'create.intermediate-event': createAction(
  151 + 'bpmn:IntermediateThrowEvent',
  152 + 'event',
  153 + 'bpmn-icon-intermediate-event-none',
  154 + translate('Create Intermediate/Boundary Event')
  155 + ),
  156 + 'create.end-event': createAction(
  157 + 'bpmn:EndEvent',
  158 + 'event',
  159 + 'bpmn-icon-end-event-none',
  160 + translate('Create EndEvent')
  161 + ),
  162 + 'create.exclusive-gateway': createAction(
  163 + 'bpmn:ExclusiveGateway',
  164 + 'gateway',
  165 + 'bpmn-icon-gateway-none',
  166 + translate('Create Gateway')
  167 + ),
  168 + 'create.user-task': createAction(
  169 + 'bpmn:UserTask',
  170 + 'activity',
  171 + 'bpmn-icon-user-task',
  172 + translate('Create User Task')
  173 + ),
  174 + 'create.data-object': createAction(
  175 + 'bpmn:DataObjectReference',
  176 + 'data-object',
  177 + 'bpmn-icon-data-object',
  178 + translate('Create DataObjectReference')
  179 + ),
  180 + 'create.data-store': createAction(
  181 + 'bpmn:DataStoreReference',
  182 + 'data-store',
  183 + 'bpmn-icon-data-store',
  184 + translate('Create DataStoreReference')
  185 + ),
  186 + 'create.subprocess-expanded': {
  187 + group: 'activity',
  188 + className: 'bpmn-icon-subprocess-expanded',
  189 + title: translate('Create expanded SubProcess'),
142 action: { 190 action: {
143 dragstart: createSubprocess, 191 dragstart: createSubprocess,
144 click: createSubprocess 192 click: createSubprocess
145 } 193 }
146 }, 194 },
147 - "create.participant-expanded": {  
148 - group: "collaboration",  
149 - className: "bpmn-icon-participant",  
150 - title: translate("Create Pool/Participant"), 195 + 'create.participant-expanded': {
  196 + group: 'collaboration',
  197 + className: 'bpmn-icon-participant',
  198 + title: translate('Create Pool/Participant'),
151 action: { 199 action: {
152 dragstart: createParticipant, 200 dragstart: createParticipant,
153 click: createParticipant 201 click: createParticipant
154 } 202 }
155 }, 203 },
156 - "create.group": createAction("bpmn:Group", "artifact", "bpmn-icon-group", translate("Create Group")) 204 + 'create.group': createAction(
  205 + 'bpmn:Group',
  206 + 'artifact',
  207 + 'bpmn-icon-group',
  208 + translate('Create Group')
  209 + )
157 }) 210 })
158 211
159 return actions 212 return actions
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/translate/customTranslate.js
@@ -22,20 +22,23 @@ @@ -22,20 +22,23 @@
22 // } 22 // }
23 23
24 export default function customTranslate(translations) { 24 export default function customTranslate(translations) {
25 - return function(template, replacements) {  
26 - replacements = replacements || {}; 25 + return function (template, replacements) {
  26 + replacements = replacements || {}
27 // Translate 27 // Translate
28 - template = translations[template] || template; 28 + template = translations[template] || template
29 29
30 // Replace 30 // Replace
31 - return template.replace(/{([^}]+)}/g, function(_, key) {  
32 - let str = replacements[key];  
33 - if (translations[replacements[key]] !== null && translations[replacements[key]] !== undefined) { 31 + return template.replace(/{([^}]+)}/g, function (_, key) {
  32 + let str = replacements[key]
  33 + if (
  34 + translations[replacements[key]] !== null &&
  35 + translations[replacements[key]] !== undefined
  36 + ) {
34 // eslint-disable-next-line no-mixed-spaces-and-tabs 37 // eslint-disable-next-line no-mixed-spaces-and-tabs
35 - str = translations[replacements[key]]; 38 + str = translations[replacements[key]]
36 // eslint-disable-next-line no-mixed-spaces-and-tabs 39 // eslint-disable-next-line no-mixed-spaces-and-tabs
37 } 40 }
38 - return str || "{" + key + "}";  
39 - });  
40 - }; 41 + return str || '{' + key + '}'
  42 + })
  43 + }
41 } 44 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/designer/plugins/translate/zh.js
@@ -6,233 +6,235 @@ @@ -6,233 +6,235 @@
6 */ 6 */
7 export default { 7 export default {
8 // 添加部分 8 // 添加部分
9 - "Append EndEvent": "追加结束事件",  
10 - "Append Gateway": "追加网关",  
11 - "Append Task": "追加任务",  
12 - "Append Intermediate/Boundary Event": "追加中间抛出事件/边界事件", 9 + 'Append EndEvent': '追加结束事件',
  10 + 'Append Gateway': '追加网关',
  11 + 'Append Task': '追加任务',
  12 + 'Append Intermediate/Boundary Event': '追加中间抛出事件/边界事件',
13 13
14 - "Activate the global connect tool": "激活全局连接工具",  
15 - "Append {type}": "添加 {type}",  
16 - "Add Lane above": "在上面添加道",  
17 - "Divide into two Lanes": "分割成两个道",  
18 - "Divide into three Lanes": "分割成三个道",  
19 - "Add Lane below": "在下面添加道",  
20 - "Append compensation activity": "追加补偿活动",  
21 - "Change type": "修改类型",  
22 - "Connect using Association": "使用关联连接",  
23 - "Connect using Sequence/MessageFlow or Association": "使用顺序/消息流或者关联连接",  
24 - "Connect using DataInputAssociation": "使用数据输入关联连接",  
25 - Remove: "移除",  
26 - "Activate the hand tool": "激活抓手工具",  
27 - "Activate the lasso tool": "激活套索工具",  
28 - "Activate the create/remove space tool": "激活创建/删除空间工具",  
29 - "Create expanded SubProcess": "创建扩展子过程",  
30 - "Create IntermediateThrowEvent/BoundaryEvent": "创建中间抛出事件/边界事件",  
31 - "Create Pool/Participant": "创建池/参与者",  
32 - "Parallel Multi Instance": "并行多重事件",  
33 - "Sequential Multi Instance": "时序多重事件",  
34 - DataObjectReference: "数据对象参考",  
35 - DataStoreReference: "数据存储参考",  
36 - Loop: "循环",  
37 - "Ad-hoc": "即席",  
38 - "Create {type}": "创建 {type}",  
39 - Task: "任务",  
40 - "Send Task": "发送任务",  
41 - "Receive Task": "接收任务",  
42 - "User Task": "用户任务",  
43 - "Manual Task": "手工任务",  
44 - "Business Rule Task": "业务规则任务",  
45 - "Service Task": "服务任务",  
46 - "Script Task": "脚本任务",  
47 - "Call Activity": "调用活动",  
48 - "Sub Process (collapsed)": "子流程(折叠的)",  
49 - "Sub Process (expanded)": "子流程(展开的)",  
50 - "Start Event": "开始事件",  
51 - StartEvent: "开始事件",  
52 - "Intermediate Throw Event": "中间事件",  
53 - "End Event": "结束事件",  
54 - EndEvent: "结束事件",  
55 - "Create StartEvent": "创建开始事件",  
56 - "Create EndEvent": "创建结束事件",  
57 - "Create Task": "创建任务",  
58 - "Create User Task": "创建用户任务",  
59 - "Create Gateway": "创建网关",  
60 - "Create DataObjectReference": "创建数据对象",  
61 - "Create DataStoreReference": "创建数据存储",  
62 - "Create Group": "创建分组",  
63 - "Create Intermediate/Boundary Event": "创建中间/边界事件",  
64 - "Message Start Event": "消息开始事件",  
65 - "Timer Start Event": "定时开始事件",  
66 - "Conditional Start Event": "条件开始事件",  
67 - "Signal Start Event": "信号开始事件",  
68 - "Error Start Event": "错误开始事件",  
69 - "Escalation Start Event": "升级开始事件",  
70 - "Compensation Start Event": "补偿开始事件",  
71 - "Message Start Event (non-interrupting)": "消息开始事件(非中断)",  
72 - "Timer Start Event (non-interrupting)": "定时开始事件(非中断)",  
73 - "Conditional Start Event (non-interrupting)": "条件开始事件(非中断)",  
74 - "Signal Start Event (non-interrupting)": "信号开始事件(非中断)",  
75 - "Escalation Start Event (non-interrupting)": "升级开始事件(非中断)",  
76 - "Message Intermediate Catch Event": "消息中间捕获事件",  
77 - "Message Intermediate Throw Event": "消息中间抛出事件",  
78 - "Timer Intermediate Catch Event": "定时中间捕获事件",  
79 - "Escalation Intermediate Throw Event": "升级中间抛出事件",  
80 - "Conditional Intermediate Catch Event": "条件中间捕获事件",  
81 - "Link Intermediate Catch Event": "链接中间捕获事件",  
82 - "Link Intermediate Throw Event": "链接中间抛出事件",  
83 - "Compensation Intermediate Throw Event": "补偿中间抛出事件",  
84 - "Signal Intermediate Catch Event": "信号中间捕获事件",  
85 - "Signal Intermediate Throw Event": "信号中间抛出事件",  
86 - "Message End Event": "消息结束事件",  
87 - "Escalation End Event": "定时结束事件",  
88 - "Error End Event": "错误结束事件",  
89 - "Cancel End Event": "取消结束事件",  
90 - "Compensation End Event": "补偿结束事件",  
91 - "Signal End Event": "信号结束事件",  
92 - "Terminate End Event": "终止结束事件",  
93 - "Message Boundary Event": "消息边界事件",  
94 - "Message Boundary Event (non-interrupting)": "消息边界事件(非中断)",  
95 - "Timer Boundary Event": "定时边界事件",  
96 - "Timer Boundary Event (non-interrupting)": "定时边界事件(非中断)",  
97 - "Escalation Boundary Event": "升级边界事件",  
98 - "Escalation Boundary Event (non-interrupting)": "升级边界事件(非中断)",  
99 - "Conditional Boundary Event": "条件边界事件",  
100 - "Conditional Boundary Event (non-interrupting)": "条件边界事件(非中断)",  
101 - "Error Boundary Event": "错误边界事件",  
102 - "Cancel Boundary Event": "取消边界事件",  
103 - "Signal Boundary Event": "信号边界事件",  
104 - "Signal Boundary Event (non-interrupting)": "信号边界事件(非中断)",  
105 - "Compensation Boundary Event": "补偿边界事件",  
106 - "Exclusive Gateway": "互斥网关",  
107 - "Parallel Gateway": "并行网关",  
108 - "Inclusive Gateway": "相容网关",  
109 - "Complex Gateway": "复杂网关",  
110 - "Event based Gateway": "事件网关",  
111 - Transaction: "转运",  
112 - "Sub Process": "子流程",  
113 - "Event Sub Process": "事件子流程",  
114 - "Collapsed Pool": "折叠池",  
115 - "Expanded Pool": "展开池", 14 + 'Activate the global connect tool': '激活全局连接工具',
  15 + 'Append {type}': '添加 {type}',
  16 + 'Add Lane above': '在上面添加道',
  17 + 'Divide into two Lanes': '分割成两个道',
  18 + 'Divide into three Lanes': '分割成三个道',
  19 + 'Add Lane below': '在下面添加道',
  20 + 'Append compensation activity': '追加补偿活动',
  21 + 'Change type': '修改类型',
  22 + 'Connect using Association': '使用关联连接',
  23 + 'Connect using Sequence/MessageFlow or Association': '使用顺序/消息流或者关联连接',
  24 + 'Connect using DataInputAssociation': '使用数据输入关联连接',
  25 + Remove: '移除',
  26 + 'Activate the hand tool': '激活抓手工具',
  27 + 'Activate the lasso tool': '激活套索工具',
  28 + 'Activate the create/remove space tool': '激活创建/删除空间工具',
  29 + 'Create expanded SubProcess': '创建扩展子过程',
  30 + 'Create IntermediateThrowEvent/BoundaryEvent': '创建中间抛出事件/边界事件',
  31 + 'Create Pool/Participant': '创建池/参与者',
  32 + 'Parallel Multi Instance': '并行多重事件',
  33 + 'Sequential Multi Instance': '时序多重事件',
  34 + DataObjectReference: '数据对象参考',
  35 + DataStoreReference: '数据存储参考',
  36 + Loop: '循环',
  37 + 'Ad-hoc': '即席',
  38 + 'Create {type}': '创建 {type}',
  39 + Task: '任务',
  40 + 'Send Task': '发送任务',
  41 + 'Receive Task': '接收任务',
  42 + 'User Task': '用户任务',
  43 + 'Manual Task': '手工任务',
  44 + 'Business Rule Task': '业务规则任务',
  45 + 'Service Task': '服务任务',
  46 + 'Script Task': '脚本任务',
  47 + 'Call Activity': '调用活动',
  48 + 'Sub Process (collapsed)': '子流程(折叠的)',
  49 + 'Sub Process (expanded)': '子流程(展开的)',
  50 + 'Start Event': '开始事件',
  51 + StartEvent: '开始事件',
  52 + 'Intermediate Throw Event': '中间事件',
  53 + 'End Event': '结束事件',
  54 + EndEvent: '结束事件',
  55 + 'Create StartEvent': '创建开始事件',
  56 + 'Create EndEvent': '创建结束事件',
  57 + 'Create Task': '创建任务',
  58 + 'Create User Task': '创建用户任务',
  59 + 'Create Gateway': '创建网关',
  60 + 'Create DataObjectReference': '创建数据对象',
  61 + 'Create DataStoreReference': '创建数据存储',
  62 + 'Create Group': '创建分组',
  63 + 'Create Intermediate/Boundary Event': '创建中间/边界事件',
  64 + 'Message Start Event': '消息开始事件',
  65 + 'Timer Start Event': '定时开始事件',
  66 + 'Conditional Start Event': '条件开始事件',
  67 + 'Signal Start Event': '信号开始事件',
  68 + 'Error Start Event': '错误开始事件',
  69 + 'Escalation Start Event': '升级开始事件',
  70 + 'Compensation Start Event': '补偿开始事件',
  71 + 'Message Start Event (non-interrupting)': '消息开始事件(非中断)',
  72 + 'Timer Start Event (non-interrupting)': '定时开始事件(非中断)',
  73 + 'Conditional Start Event (non-interrupting)': '条件开始事件(非中断)',
  74 + 'Signal Start Event (non-interrupting)': '信号开始事件(非中断)',
  75 + 'Escalation Start Event (non-interrupting)': '升级开始事件(非中断)',
  76 + 'Message Intermediate Catch Event': '消息中间捕获事件',
  77 + 'Message Intermediate Throw Event': '消息中间抛出事件',
  78 + 'Timer Intermediate Catch Event': '定时中间捕获事件',
  79 + 'Escalation Intermediate Throw Event': '升级中间抛出事件',
  80 + 'Conditional Intermediate Catch Event': '条件中间捕获事件',
  81 + 'Link Intermediate Catch Event': '链接中间捕获事件',
  82 + 'Link Intermediate Throw Event': '链接中间抛出事件',
  83 + 'Compensation Intermediate Throw Event': '补偿中间抛出事件',
  84 + 'Signal Intermediate Catch Event': '信号中间捕获事件',
  85 + 'Signal Intermediate Throw Event': '信号中间抛出事件',
  86 + 'Message End Event': '消息结束事件',
  87 + 'Escalation End Event': '定时结束事件',
  88 + 'Error End Event': '错误结束事件',
  89 + 'Cancel End Event': '取消结束事件',
  90 + 'Compensation End Event': '补偿结束事件',
  91 + 'Signal End Event': '信号结束事件',
  92 + 'Terminate End Event': '终止结束事件',
  93 + 'Message Boundary Event': '消息边界事件',
  94 + 'Message Boundary Event (non-interrupting)': '消息边界事件(非中断)',
  95 + 'Timer Boundary Event': '定时边界事件',
  96 + 'Timer Boundary Event (non-interrupting)': '定时边界事件(非中断)',
  97 + 'Escalation Boundary Event': '升级边界事件',
  98 + 'Escalation Boundary Event (non-interrupting)': '升级边界事件(非中断)',
  99 + 'Conditional Boundary Event': '条件边界事件',
  100 + 'Conditional Boundary Event (non-interrupting)': '条件边界事件(非中断)',
  101 + 'Error Boundary Event': '错误边界事件',
  102 + 'Cancel Boundary Event': '取消边界事件',
  103 + 'Signal Boundary Event': '信号边界事件',
  104 + 'Signal Boundary Event (non-interrupting)': '信号边界事件(非中断)',
  105 + 'Compensation Boundary Event': '补偿边界事件',
  106 + 'Exclusive Gateway': '互斥网关',
  107 + 'Parallel Gateway': '并行网关',
  108 + 'Inclusive Gateway': '相容网关',
  109 + 'Complex Gateway': '复杂网关',
  110 + 'Event based Gateway': '事件网关',
  111 + Transaction: '转运',
  112 + 'Sub Process': '子流程',
  113 + 'Event Sub Process': '事件子流程',
  114 + 'Collapsed Pool': '折叠池',
  115 + 'Expanded Pool': '展开池',
116 116
117 // Errors 117 // Errors
118 - "no parent for {element} in {parent}": "在{parent}里,{element}没有父类",  
119 - "no shape type specified": "没有指定的形状类型",  
120 - "flow elements must be children of pools/participants": "流元素必须是池/参与者的子类",  
121 - "out of bounds release": "out of bounds release",  
122 - "more than {count} child lanes": "子道大于{count} ",  
123 - "element required": "元素不能为空",  
124 - "diagram not part of bpmn:Definitions": "流程图不符合bpmn规范",  
125 - "no diagram to display": "没有可展示的流程图",  
126 - "no process or collaboration to display": "没有可展示的流程/协作",  
127 - "element {element} referenced by {referenced}#{property} not yet drawn": "由{referenced}#{property}引用的{element}元素仍未绘制",  
128 - "already rendered {element}": "{element} 已被渲染",  
129 - "failed to import {element}": "导入{element}失败", 118 + 'no parent for {element} in {parent}': '在{parent}里,{element}没有父类',
  119 + 'no shape type specified': '没有指定的形状类型',
  120 + 'flow elements must be children of pools/participants': '流元素必须是池/参与者的子类',
  121 + 'out of bounds release': 'out of bounds release',
  122 + 'more than {count} child lanes': '子道大于{count} ',
  123 + 'element required': '元素不能为空',
  124 + 'diagram not part of bpmn:Definitions': '流程图不符合bpmn规范',
  125 + 'no diagram to display': '没有可展示的流程图',
  126 + 'no process or collaboration to display': '没有可展示的流程/协作',
  127 + 'element {element} referenced by {referenced}#{property} not yet drawn':
  128 + '由{referenced}#{property}引用的{element}元素仍未绘制',
  129 + 'already rendered {element}': '{element} 已被渲染',
  130 + 'failed to import {element}': '导入{element}失败',
130 //属性面板的参数 131 //属性面板的参数
131 - Id: "编号",  
132 - Name: "名称",  
133 - General: "常规",  
134 - Details: "详情",  
135 - "Message Name": "消息名称",  
136 - Message: "消息",  
137 - Initiator: "创建者",  
138 - "Asynchronous Continuations": "持续异步",  
139 - "Asynchronous Before": "异步前",  
140 - "Asynchronous After": "异步后",  
141 - "Job Configuration": "工作配置",  
142 - Exclusive: "排除",  
143 - "Job Priority": "工作优先级",  
144 - "Retry Time Cycle": "重试时间周期",  
145 - Documentation: "文档",  
146 - "Element Documentation": "元素文档",  
147 - "History Configuration": "历史配置",  
148 - "History Time To Live": "历史的生存时间",  
149 - Forms: "表单",  
150 - "Form Key": "表单key",  
151 - "Form Fields": "表单字段",  
152 - "Business Key": "业务key",  
153 - "Form Field": "表单字段",  
154 - ID: "编号",  
155 - Type: "类型",  
156 - Label: "名称",  
157 - "Default Value": "默认值",  
158 - "Default Flow": "默认流转路径",  
159 - "Conditional Flow": "条件流转路径",  
160 - "Sequence Flow": "普通流转路径",  
161 - Validation: "校验",  
162 - "Add Constraint": "添加约束",  
163 - Config: "配置",  
164 - Properties: "属性",  
165 - "Add Property": "添加属性",  
166 - Value: "值",  
167 - Listeners: "监听器",  
168 - "Execution Listener": "执行监听",  
169 - "Event Type": "事件类型",  
170 - "Listener Type": "监听器类型",  
171 - "Java Class": "Java类",  
172 - Expression: "表达式",  
173 - "Must provide a value": "必须提供一个值",  
174 - "Delegate Expression": "代理表达式",  
175 - Script: "脚本",  
176 - "Script Format": "脚本格式",  
177 - "Script Type": "脚本类型",  
178 - "Inline Script": "内联脚本",  
179 - "External Script": "外部脚本",  
180 - Resource: "资源",  
181 - "Field Injection": "字段注入",  
182 - Extensions: "扩展",  
183 - "Input/Output": "输入/输出",  
184 - "Input Parameters": "输入参数",  
185 - "Output Parameters": "输出参数",  
186 - Parameters: "参数",  
187 - "Output Parameter": "输出参数",  
188 - "Timer Definition Type": "定时器定义类型",  
189 - "Timer Definition": "定时器定义",  
190 - Date: "日期",  
191 - Duration: "持续",  
192 - Cycle: "循环",  
193 - Signal: "信号",  
194 - "Signal Name": "信号名称",  
195 - Escalation: "升级",  
196 - Error: "错误",  
197 - "Link Name": "链接名称",  
198 - Condition: "条件名称",  
199 - "Variable Name": "变量名称",  
200 - "Variable Event": "变量事件",  
201 - "Specify more than one variable change event as a comma separated list.": "多个变量事件以逗号隔开",  
202 - "Wait for Completion": "等待完成",  
203 - "Activity Ref": "活动参考",  
204 - "Version Tag": "版本标签",  
205 - Executable: "可执行文件",  
206 - "External Task Configuration": "扩展任务配置",  
207 - "Task Priority": "任务优先级",  
208 - External: "外部",  
209 - Connector: "连接器",  
210 - "Must configure Connector": "必须配置连接器",  
211 - "Connector Id": "连接器编号",  
212 - Implementation: "实现方式",  
213 - "Field Injections": "字段注入",  
214 - Fields: "字段",  
215 - "Result Variable": "结果变量",  
216 - Topic: "主题",  
217 - "Configure Connector": "配置连接器",  
218 - "Input Parameter": "输入参数",  
219 - Assignee: "代理人",  
220 - "Candidate Users": "候选用户",  
221 - "Candidate Groups": "候选组",  
222 - "Due Date": "到期时间",  
223 - "Follow Up Date": "跟踪日期",  
224 - Priority: "优先级",  
225 - "The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)":  
226 - "跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00",  
227 - "The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)":  
228 - "跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00",  
229 - Variables: "变量",  
230 - "Candidate Starter Configuration": "候选人起动器配置",  
231 - "Candidate Starter Groups": "候选人起动器组",  
232 - "This maps to the process definition key.": "这映射到流程定义键。",  
233 - "Candidate Starter Users": "候选人起动器的用户",  
234 - "Specify more than one user as a comma separated list.": "指定多个用户作为逗号分隔的列表。",  
235 - "Tasklist Configuration": "Tasklist配置",  
236 - Startable: "启动",  
237 - "Specify more than one group as a comma separated list.": "指定多个组作为逗号分隔的列表。"  
238 -}; 132 + Id: '编号',
  133 + Name: '名称',
  134 + General: '常规',
  135 + Details: '详情',
  136 + 'Message Name': '消息名称',
  137 + Message: '消息',
  138 + Initiator: '创建者',
  139 + 'Asynchronous Continuations': '持续异步',
  140 + 'Asynchronous Before': '异步前',
  141 + 'Asynchronous After': '异步后',
  142 + 'Job Configuration': '工作配置',
  143 + Exclusive: '排除',
  144 + 'Job Priority': '工作优先级',
  145 + 'Retry Time Cycle': '重试时间周期',
  146 + Documentation: '文档',
  147 + 'Element Documentation': '元素文档',
  148 + 'History Configuration': '历史配置',
  149 + 'History Time To Live': '历史的生存时间',
  150 + Forms: '表单',
  151 + 'Form Key': '表单key',
  152 + 'Form Fields': '表单字段',
  153 + 'Business Key': '业务key',
  154 + 'Form Field': '表单字段',
  155 + ID: '编号',
  156 + Type: '类型',
  157 + Label: '名称',
  158 + 'Default Value': '默认值',
  159 + 'Default Flow': '默认流转路径',
  160 + 'Conditional Flow': '条件流转路径',
  161 + 'Sequence Flow': '普通流转路径',
  162 + Validation: '校验',
  163 + 'Add Constraint': '添加约束',
  164 + Config: '配置',
  165 + Properties: '属性',
  166 + 'Add Property': '添加属性',
  167 + Value: '值',
  168 + Listeners: '监听器',
  169 + 'Execution Listener': '执行监听',
  170 + 'Event Type': '事件类型',
  171 + 'Listener Type': '监听器类型',
  172 + 'Java Class': 'Java类',
  173 + Expression: '表达式',
  174 + 'Must provide a value': '必须提供一个值',
  175 + 'Delegate Expression': '代理表达式',
  176 + Script: '脚本',
  177 + 'Script Format': '脚本格式',
  178 + 'Script Type': '脚本类型',
  179 + 'Inline Script': '内联脚本',
  180 + 'External Script': '外部脚本',
  181 + Resource: '资源',
  182 + 'Field Injection': '字段注入',
  183 + Extensions: '扩展',
  184 + 'Input/Output': '输入/输出',
  185 + 'Input Parameters': '输入参数',
  186 + 'Output Parameters': '输出参数',
  187 + Parameters: '参数',
  188 + 'Output Parameter': '输出参数',
  189 + 'Timer Definition Type': '定时器定义类型',
  190 + 'Timer Definition': '定时器定义',
  191 + Date: '日期',
  192 + Duration: '持续',
  193 + Cycle: '循环',
  194 + Signal: '信号',
  195 + 'Signal Name': '信号名称',
  196 + Escalation: '升级',
  197 + Error: '错误',
  198 + 'Link Name': '链接名称',
  199 + Condition: '条件名称',
  200 + 'Variable Name': '变量名称',
  201 + 'Variable Event': '变量事件',
  202 + 'Specify more than one variable change event as a comma separated list.':
  203 + '多个变量事件以逗号隔开',
  204 + 'Wait for Completion': '等待完成',
  205 + 'Activity Ref': '活动参考',
  206 + 'Version Tag': '版本标签',
  207 + Executable: '可执行文件',
  208 + 'External Task Configuration': '扩展任务配置',
  209 + 'Task Priority': '任务优先级',
  210 + External: '外部',
  211 + Connector: '连接器',
  212 + 'Must configure Connector': '必须配置连接器',
  213 + 'Connector Id': '连接器编号',
  214 + Implementation: '实现方式',
  215 + 'Field Injections': '字段注入',
  216 + Fields: '字段',
  217 + 'Result Variable': '结果变量',
  218 + Topic: '主题',
  219 + 'Configure Connector': '配置连接器',
  220 + 'Input Parameter': '输入参数',
  221 + Assignee: '代理人',
  222 + 'Candidate Users': '候选用户',
  223 + 'Candidate Groups': '候选组',
  224 + 'Due Date': '到期时间',
  225 + 'Follow Up Date': '跟踪日期',
  226 + Priority: '优先级',
  227 + 'The follow up date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
  228 + '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00',
  229 + 'The due date as an EL expression (e.g. ${someDate} or an ISO date (e.g. 2015-06-26T09:54:00)':
  230 + '跟踪日期必须符合EL表达式,如: ${someDate} ,或者一个ISO标准日期,如:2015-06-26T09:54:00',
  231 + Variables: '变量',
  232 + 'Candidate Starter Configuration': '候选人起动器配置',
  233 + 'Candidate Starter Groups': '候选人起动器组',
  234 + 'This maps to the process definition key.': '这映射到流程定义键。',
  235 + 'Candidate Starter Users': '候选人起动器的用户',
  236 + 'Specify more than one user as a comma separated list.': '指定多个用户作为逗号分隔的列表。',
  237 + 'Tasklist Configuration': 'Tasklist配置',
  238 + Startable: '启动',
  239 + 'Specify more than one group as a comma separated list.': '指定多个组作为逗号分隔的列表。'
  240 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/PropertiesPanel.vue
@@ -73,8 +73,6 @@ import ElementListeners from &#39;./listeners/ElementListeners.vue&#39; @@ -73,8 +73,6 @@ import ElementListeners from &#39;./listeners/ElementListeners.vue&#39;
73 import ElementProperties from './properties/ElementProperties.vue' 73 import ElementProperties from './properties/ElementProperties.vue'
74 // import ElementForm from './form/ElementForm.vue' 74 // import ElementForm from './form/ElementForm.vue'
75 import UserTaskListeners from './listeners/UserTaskListeners.vue' 75 import UserTaskListeners from './listeners/UserTaskListeners.vue'
76 -import { provide, ref, watch, onBeforeUnmount, onMounted } from 'vue'  
77 -import { ElCollapse, ElCollapseItem, ElLink } from 'element-plus'  
78 /** 76 /**
79 * 侧边栏 77 * 侧边栏
80 * @Author MiyueFE 78 * @Author MiyueFE
@@ -82,7 +80,10 @@ import { ElCollapse, ElCollapseItem, ElLink } from &#39;element-plus&#39; @@ -82,7 +80,10 @@ import { ElCollapse, ElCollapseItem, ElLink } from &#39;element-plus&#39;
82 * @Date 2021年3月31日18:57:51 80 * @Date 2021年3月31日18:57:51
83 */ 81 */
84 const props = defineProps({ 82 const props = defineProps({
85 - bpmnModeler: Object, 83 + bpmnModeler: {
  84 + type: Object,
  85 + default: () => {}
  86 + },
86 prefix: { 87 prefix: {
87 type: String, 88 type: String,
88 default: 'camunda' 89 default: 'camunda'
@@ -101,7 +102,7 @@ const props = defineProps({ @@ -101,7 +102,7 @@ const props = defineProps({
101 const activeTab = ref('base') 102 const activeTab = ref('base')
102 const elementId = ref('') 103 const elementId = ref('')
103 const elementType = ref('') 104 const elementType = ref('')
104 -const elementBusinessObject = ref({}) // 元素 businessObject 镜像,提供给需要做判断的组件使用 105 +const elementBusinessObject = ref<any>({}) // 元素 businessObject 镜像,提供给需要做判断的组件使用
105 const conditionFormVisible = ref(false) // 流转条件设置 106 const conditionFormVisible = ref(false) // 流转条件设置
106 const formVisible = ref(false) // 表单配置 107 const formVisible = ref(false) // 表单配置
107 const bpmnElement = ref() 108 const bpmnElement = ref()
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/base/ElementBaseInfo.vue
@@ -38,15 +38,19 @@ @@ -38,15 +38,19 @@
38 </div> 38 </div>
39 </template> 39 </template>
40 <script setup lang="ts" name="ElementBaseInfo"> 40 <script setup lang="ts" name="ElementBaseInfo">
41 -import { ref, reactive, watch, onMounted, onBeforeUnmount, toRaw } from 'vue'  
42 -import { ElLink, ElForm, ElFormItem, ElInput } from 'element-plus'  
43 const props = defineProps({ 41 const props = defineProps({
44 - businessObject: Object,  
45 - model: Object // 流程模型的数据 42 + businessObject: {
  43 + type: Object,
  44 + default: () => {}
  45 + },
  46 + model: {
  47 + type: Object,
  48 + default: () => {}
  49 + }
46 }) 50 })
47 -const needProps = ref({}) 51 +const needProps = ref<any>({})
48 const bpmnElement = ref() 52 const bpmnElement = ref()
49 -const elementBaseInfo = ref({}) 53 +const elementBaseInfo = ref<any>({})
50 // 流程表单的下拉框的数据 54 // 流程表单的下拉框的数据
51 // const forms = ref([]) 55 // const forms = ref([])
52 // 流程模型的校验 56 // 流程模型的校验
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue
@@ -63,14 +63,11 @@ @@ -63,14 +63,11 @@
63 </template> 63 </template>
64 64
65 <script setup lang="ts" name="FlowCondition"> 65 <script setup lang="ts" name="FlowCondition">
66 -import { ref, nextTick, watch, onBeforeUnmount, toRaw } from 'vue'  
67 -import { ElSelect, ElForm, ElFormItem, ElInput, ElOption } from 'element-plus'  
68 -  
69 const props = defineProps({ 66 const props = defineProps({
70 businessObject: Object, 67 businessObject: Object,
71 type: String 68 type: String
72 }) 69 })
73 -const flowConditionForm = ref({}) 70 +const flowConditionForm = ref<any>({})
74 const bpmnElement = ref() 71 const bpmnElement = ref()
75 const bpmnElementSource = ref() 72 const bpmnElementSource = ref()
76 const bpmnElementSourceRef = ref() 73 const bpmnElementSourceRef = ref()
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/form/ElementForm.vue
@@ -205,20 +205,6 @@ @@ -205,20 +205,6 @@
205 </template> 205 </template>
206 206
207 <script setup lang="ts" name="ElementForm"> 207 <script setup lang="ts" name="ElementForm">
208 -import { ref, inject, watch, nextTick, toRaw } from 'vue'  
209 -import {  
210 - ElDialog,  
211 - ElForm,  
212 - ElFormItem,  
213 - ElSelect,  
214 - ElOption,  
215 - ElDivider,  
216 - ElTable,  
217 - ElTableColumn,  
218 - ElButton,  
219 - ElDrawer,  
220 - ElInput  
221 -} from 'element-plus'  
222 const props = defineProps({ 208 const props = defineProps({
223 id: String, 209 id: String,
224 type: String 210 type: String
@@ -229,8 +215,8 @@ const width = inject(&#39;width&#39;) @@ -229,8 +215,8 @@ const width = inject(&#39;width&#39;)
229 const formKey = ref('') 215 const formKey = ref('')
230 const businessKey = ref('') 216 const businessKey = ref('')
231 const optionModelTitle = ref('') 217 const optionModelTitle = ref('')
232 -const fieldList = ref([])  
233 -const formFieldForm = ref({}) 218 +const fieldList = ref<any[]>([])
  219 +const formFieldForm = ref<any>({})
234 const fieldType = ref({ 220 const fieldType = ref({
235 long: '长整型', 221 long: '长整型',
236 string: '字符串', 222 string: '字符串',
@@ -243,11 +229,11 @@ const formFieldIndex = ref(-1) // 编辑中的字段, -1 为新增 @@ -243,11 +229,11 @@ const formFieldIndex = ref(-1) // 编辑中的字段, -1 为新增
243 const formFieldOptionIndex = ref(-1) // 编辑中的字段配置项, -1 为新增 229 const formFieldOptionIndex = ref(-1) // 编辑中的字段配置项, -1 为新增
244 const fieldModelVisible = ref(false) 230 const fieldModelVisible = ref(false)
245 const fieldOptionModelVisible = ref(false) 231 const fieldOptionModelVisible = ref(false)
246 -const fieldOptionForm = ref({}) // 当前激活的字段配置项数据 232 +const fieldOptionForm = ref<any>({}) // 当前激活的字段配置项数据
247 const fieldOptionType = ref('') // 当前激活的字段配置项弹窗 类型 233 const fieldOptionType = ref('') // 当前激活的字段配置项弹窗 类型
248 -const fieldEnumList = ref([]) // 枚举值列表  
249 -const fieldConstraintsList = ref([]) // 约束条件列表  
250 -const fieldPropertiesList = ref([]) // 绑定属性列表 234 +const fieldEnumList = ref<any[]>([]) // 枚举值列表
  235 +const fieldConstraintsList = ref<any[]>([]) // 约束条件列表
  236 +const fieldPropertiesList = ref<any[]>([]) // 绑定属性列表
251 const bpmnELement = ref() 237 const bpmnELement = ref()
252 const elExtensionElements = ref() 238 const elExtensionElements = ref()
253 const formData = ref() 239 const formData = ref()
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/index.js
1 -import MyPropertiesPanel from "./PropertiesPanel.vue"; 1 +import MyPropertiesPanel from './PropertiesPanel.vue'
2 2
3 -MyPropertiesPanel.install = function(Vue) {  
4 - Vue.component(MyPropertiesPanel.name, MyPropertiesPanel);  
5 -}; 3 +MyPropertiesPanel.install = function (Vue) {
  4 + Vue.component(MyPropertiesPanel.name, MyPropertiesPanel)
  5 +}
6 6
7 -export default MyPropertiesPanel; 7 +export default MyPropertiesPanel
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/ElementListeners.vue
@@ -15,11 +15,7 @@ @@ -15,11 +15,7 @@
15 >编辑</el-button 15 >编辑</el-button
16 > 16 >
17 <el-divider direction="vertical" /> 17 <el-divider direction="vertical" />
18 - <el-button  
19 - size="small"  
20 - link  
21 - style="color: #ff4d4f"  
22 - @click="removeListener(scope.row, scope.$index)" 18 + <el-button size="small" link style="color: #ff4d4f" @click="removeListener(scope.$index)"
23 >移除</el-button 19 >移除</el-button
24 > 20 >
25 </template> 21 </template>
@@ -171,7 +167,7 @@ @@ -171,7 +167,7 @@
171 size="small" 167 size="small"
172 link 168 link
173 style="color: #ff4d4f" 169 style="color: #ff4d4f"
174 - @click="removeListenerField(scope.row, scope.$index)" 170 + @click="removeListenerField(scope.$index)"
175 >移除</el-button 171 >移除</el-button
176 > 172 >
177 </template> 173 </template>
@@ -268,11 +264,11 @@ const props = defineProps({ @@ -268,11 +264,11 @@ const props = defineProps({
268 }) 264 })
269 const prefix = inject('prefix') 265 const prefix = inject('prefix')
270 const width = inject('width') 266 const width = inject('width')
271 -const elementListenersList = ref([]) // 监听器列表  
272 -const listenerForm = ref({}) // 监听器详情表单 267 +const elementListenersList = ref<any[]>([]) // 监听器列表
  268 +const listenerForm = ref<any>({}) // 监听器详情表单
273 const listenerFormModelVisible = ref(false) // 监听器 编辑 侧边栏显示状态 269 const listenerFormModelVisible = ref(false) // 监听器 编辑 侧边栏显示状态
274 -const fieldsListOfListener = ref([])  
275 -const listenerFieldForm = ref({}) // 监听器 注入字段 详情表单 270 +const fieldsListOfListener = ref<any[]>([])
  271 +const listenerFieldForm = ref<any>({}) // 监听器 注入字段 详情表单
276 const listenerFieldFormModelVisible = ref(false) // 监听器 注入字段表单弹窗 显示状态 272 const listenerFieldFormModelVisible = ref(false) // 监听器 注入字段表单弹窗 显示状态
277 const editingListenerIndex = ref(-1) // 监听器所在下标,-1 为新增 273 const editingListenerIndex = ref(-1) // 监听器所在下标,-1 为新增
278 const editingListenerFieldIndex = ref(-1) // 字段所在下标,-1 为新增 274 const editingListenerFieldIndex = ref(-1) // 字段所在下标,-1 为新增
@@ -296,7 +292,7 @@ const resetListenersList = () =&gt; { @@ -296,7 +292,7 @@ const resetListenersList = () =&gt; {
296 ) 292 )
297 } 293 }
298 // 打开 监听器详情 侧边栏 294 // 打开 监听器详情 侧边栏
299 -const openListenerForm = (listener, index) => { 295 +const openListenerForm = (listener, index?) => {
300 if (listener) { 296 if (listener) {
301 listenerForm.value = initListenerForm(listener) 297 listenerForm.value = initListenerForm(listener)
302 editingListenerIndex.value = index 298 editingListenerIndex.value = index
@@ -322,7 +318,7 @@ const openListenerForm = (listener, index) =&gt; { @@ -322,7 +318,7 @@ const openListenerForm = (listener, index) =&gt; {
322 }) 318 })
323 } 319 }
324 // 打开监听器字段编辑弹窗 320 // 打开监听器字段编辑弹窗
325 -const openListenerFieldForm = (field, index) => { 321 +const openListenerFieldForm = (field, index?) => {
326 listenerFieldForm.value = field ? JSON.parse(JSON.stringify(field)) : {} 322 listenerFieldForm.value = field ? JSON.parse(JSON.stringify(field)) : {}
327 editingListenerFieldIndex.value = field ? index : -1 323 editingListenerFieldIndex.value = field ? index : -1
328 listenerFieldFormModelVisible.value = true 324 listenerFieldFormModelVisible.value = true
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/UserTaskListeners.vue
@@ -288,20 +288,7 @@ @@ -288,20 +288,7 @@
288 </div> 288 </div>
289 </template> 289 </template>
290 <script lang="ts" setup name="UserTaskListeners"> 290 <script lang="ts" setup name="UserTaskListeners">
291 -import { ref, inject, watch, nextTick } from 'vue'  
292 -import {  
293 - ElDialog,  
294 - ElForm,  
295 - ElFormItem,  
296 - ElSelect,  
297 - ElOption,  
298 - ElDivider,  
299 - ElTable,  
300 - ElTableColumn,  
301 - ElMessageBox,  
302 - ElButton,  
303 - ElDrawer  
304 -} from 'element-plus' 291 +import { ElMessageBox } from 'element-plus'
305 import { createListenerObject, updateElementExtensions } from '../../utils' 292 import { createListenerObject, updateElementExtensions } from '../../utils'
306 import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from './utilSelf' 293 import { initListenerForm, initListenerType, eventType, listenerType, fieldType } from './utilSelf'
307 const props = defineProps({ 294 const props = defineProps({
@@ -310,17 +297,17 @@ const props = defineProps({ @@ -310,17 +297,17 @@ const props = defineProps({
310 }) 297 })
311 const prefix = inject('prefix') 298 const prefix = inject('prefix')
312 const width = inject('width') 299 const width = inject('width')
313 -const elementListenersList = ref([]) 300 +const elementListenersList = ref<any[]>([])
314 const listenerEventTypeObject = ref(eventType) 301 const listenerEventTypeObject = ref(eventType)
315 const listenerTypeObject = ref(listenerType) 302 const listenerTypeObject = ref(listenerType)
316 const listenerFormModelVisible = ref(false) 303 const listenerFormModelVisible = ref(false)
317 -const listenerForm = ref({}) 304 +const listenerForm = ref<any>({})
318 const fieldTypeObject = ref(fieldType) 305 const fieldTypeObject = ref(fieldType)
319 -const fieldsListOfListener = ref([]) 306 +const fieldsListOfListener = ref<any[]>([])
320 const listenerFieldFormModelVisible = ref(false) // 监听器 注入字段表单弹窗 显示状态 307 const listenerFieldFormModelVisible = ref(false) // 监听器 注入字段表单弹窗 显示状态
321 const editingListenerIndex = ref(-1) // 监听器所在下标,-1 为新增 308 const editingListenerIndex = ref(-1) // 监听器所在下标,-1 为新增
322 const editingListenerFieldIndex = ref(-1) // 字段所在下标,-1 为新增 309 const editingListenerFieldIndex = ref(-1) // 字段所在下标,-1 为新增
323 -const listenerFieldForm = ref({}) // 监听器 注入字段 详情表单 310 +const listenerFieldForm = ref<any>({}) // 监听器 注入字段 详情表单
324 const bpmnElement = ref() 311 const bpmnElement = ref()
325 const bpmnElementListeners = ref() 312 const bpmnElementListeners = ref()
326 const otherExtensionList = ref() 313 const otherExtensionList = ref()
@@ -342,7 +329,7 @@ const resetListenersList = () =&gt; { @@ -342,7 +329,7 @@ const resetListenersList = () =&gt; {
342 initListenerType(listener) 329 initListenerType(listener)
343 ) 330 )
344 } 331 }
345 -const openListenerForm = (listener, index) => { 332 +const openListenerForm = (listener, index?) => {
346 if (listener) { 333 if (listener) {
347 listenerForm.value = initListenerForm(listener) 334 listenerForm.value = initListenerForm(listener)
348 editingListenerIndex.value = index 335 editingListenerIndex.value = index
@@ -366,7 +353,7 @@ const openListenerForm = (listener, index) =&gt; { @@ -366,7 +353,7 @@ const openListenerForm = (listener, index) =&gt; {
366 }) 353 })
367 } 354 }
368 // 移除监听器 355 // 移除监听器
369 -const removeListener = (listener, index) => { 356 +const removeListener = (listener, index?) => {
370 console.log(listener, 'listener') 357 console.log(listener, 'listener')
371 ElMessageBox.confirm('确认移除该监听器吗?', '提示', { 358 ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
372 confirmButtonText: '确 认', 359 confirmButtonText: '确 认',
@@ -408,7 +395,7 @@ const saveListenerConfig = async () =&gt; { @@ -408,7 +395,7 @@ const saveListenerConfig = async () =&gt; {
408 listenerForm.value = {} 395 listenerForm.value = {}
409 } 396 }
410 // 打开监听器字段编辑弹窗 397 // 打开监听器字段编辑弹窗
411 -const openListenerFieldForm = (field, index) => { 398 +const openListenerFieldForm = (field, index?) => {
412 listenerFieldForm.value = field ? JSON.parse(JSON.stringify(field)) : {} 399 listenerFieldForm.value = field ? JSON.parse(JSON.stringify(field)) : {}
413 editingListenerFieldIndex.value = field ? index : -1 400 editingListenerFieldIndex.value = field ? index : -1
414 listenerFieldFormModelVisible.value = true 401 listenerFieldFormModelVisible.value = true
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/listeners/template.js
1 -export const template = isTaskListener => { 1 +export const template = (isTaskListener) => {
2 return ` 2 return `
3 <div class="panel-tab__content"> 3 <div class="panel-tab__content">
4 <el-table :data="elementListenersList" size="small" border> 4 <el-table :data="elementListenersList" size="small" border>
@@ -97,20 +97,21 @@ export const template = isTaskListener =&gt; { @@ -97,20 +97,21 @@ export const template = isTaskListener =&gt; {
97 <el-input v-model="listenerForm.resource" clearable /> 97 <el-input v-model="listenerForm.resource" clearable />
98 </el-form-item> 98 </el-form-item>
99 </template> 99 </template>
100 - ${isTaskListener  
101 - ? "<el-form-item label='定时器类型' prop='eventDefinitionType' key='eventDefinitionType'>" +  
102 - "<el-select v-model='listenerForm.eventDefinitionType'>" +  
103 - "<el-option label='日期' value='date' />" +  
104 - "<el-option label='持续时长' value='duration' />" +  
105 - "<el-option label='循环' value='cycle' />" +  
106 - "<el-option label='无' value='' />" +  
107 - "</el-select>" +  
108 - "</el-form-item>" +  
109 - "<el-form-item v-if='!!listenerForm.eventDefinitionType' label='定时器' prop='eventDefinitions' key='eventDefinitions'>" +  
110 - "<el-input v-model='listenerForm.eventDefinitions' clearable />" +  
111 - "</el-form-item>"  
112 - : ""  
113 - } 100 + ${
  101 + isTaskListener
  102 + ? "<el-form-item label='定时器类型' prop='eventDefinitionType' key='eventDefinitionType'>" +
  103 + "<el-select v-model='listenerForm.eventDefinitionType'>" +
  104 + "<el-option label='日期' value='date' />" +
  105 + "<el-option label='持续时长' value='duration' />" +
  106 + "<el-option label='循环' value='cycle' />" +
  107 + "<el-option label='无' value='' />" +
  108 + '</el-select>' +
  109 + '</el-form-item>' +
  110 + "<el-form-item v-if='!!listenerForm.eventDefinitionType' label='定时器' prop='eventDefinitions' key='eventDefinitions'>" +
  111 + "<el-input v-model='listenerForm.eventDefinitions' clearable />" +
  112 + '</el-form-item>'
  113 + : ''
  114 + }
114 </el-form> 115 </el-form>
115 <el-divider /> 116 <el-divider />
116 <p class="listener-filed__title"> 117 <p class="listener-filed__title">
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/multi-instance/ElementMultiInstance.vue
@@ -69,8 +69,6 @@ @@ -69,8 +69,6 @@
69 </template> 69 </template>
70 70
71 <script setup lang="ts" name="ElementMultiInstance"> 71 <script setup lang="ts" name="ElementMultiInstance">
72 -import { inject, ref, onBeforeUnmount, watch, toRaw } from 'vue'  
73 -import { ElForm, ElFormItem, ElSelect, ElOption, ElCheckbox, ElInput } from 'element-plus'  
74 const props = defineProps({ 72 const props = defineProps({
75 businessObject: Object, 73 businessObject: Object,
76 type: String 74 type: String
@@ -86,7 +84,7 @@ const defaultLoopInstanceForm = ref({ @@ -86,7 +84,7 @@ const defaultLoopInstanceForm = ref({
86 asyncBefore: false, 84 asyncBefore: false,
87 exclusive: false 85 exclusive: false
88 }) 86 })
89 -const loopInstanceForm = ref({}) 87 +const loopInstanceForm = ref<any>({})
90 const bpmnElement = ref(null) 88 const bpmnElement = ref(null)
91 const multiLoopInstance = ref(null) 89 const multiLoopInstance = ref(null)
92 90
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/other/ElementOtherConfig.vue
@@ -17,8 +17,6 @@ @@ -17,8 +17,6 @@
17 </template> 17 </template>
18 18
19 <script setup lang="ts" name="ElementOtherConfig"> 19 <script setup lang="ts" name="ElementOtherConfig">
20 -import { ref, watch, nextTick, onBeforeUnmount, toRaw } from 'vue'  
21 -import { ElInput } from 'element-plus'  
22 const props = defineProps({ 20 const props = defineProps({
23 id: String 21 id: String
24 }) 22 })
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/properties/ElementProperties.vue
@@ -53,18 +53,7 @@ @@ -53,18 +53,7 @@
53 </template> 53 </template>
54 54
55 <script setup lang="ts" name="ElementProperties"> 55 <script setup lang="ts" name="ElementProperties">
56 -import { ref, inject, nextTick, watch, toRaw } from 'vue'  
57 -import {  
58 - ElMessageBox,  
59 - ElDialog,  
60 - ElButton,  
61 - ElForm,  
62 - ElFormItem,  
63 - ElTable,  
64 - ElTableColumn,  
65 - ElDivider,  
66 - ElInput  
67 -} from 'element-plus' 56 +import { ElMessageBox } from 'element-plus'
68 const props = defineProps({ 57 const props = defineProps({
69 id: String, 58 id: String,
70 type: String 59 type: String
@@ -72,8 +61,8 @@ const props = defineProps({ @@ -72,8 +61,8 @@ const props = defineProps({
72 const prefix = inject('prefix') 61 const prefix = inject('prefix')
73 // const width = inject('width') 62 // const width = inject('width')
74 63
75 -const elementPropertyList = ref([])  
76 -const propertyForm = ref({}) 64 +const elementPropertyList = ref<any[]>([])
  65 +const propertyForm = ref<any>({})
77 const editingPropertyIndex = ref(-1) 66 const editingPropertyIndex = ref(-1)
78 const propertyFormModelVisible = ref(false) 67 const propertyFormModelVisible = ref(false)
79 const bpmnElement = ref() 68 const bpmnElement = ref()
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/signal-message/SignalAndMessage.vue
@@ -57,11 +57,11 @@ import { @@ -57,11 +57,11 @@ import {
57 ElInput 57 ElInput
58 } from 'element-plus' 58 } from 'element-plus'
59 import { ref, computed, onMounted } from 'vue' 59 import { ref, computed, onMounted } from 'vue'
60 -const signalList = ref([])  
61 -const messageList = ref([]) 60 +const signalList = ref<any[]>([])
  61 +const messageList = ref<any[]>([])
62 const modelVisible = ref(false) 62 const modelVisible = ref(false)
63 const modelType = ref('') 63 const modelType = ref('')
64 -const modelObjectForm = ref({}) 64 +const modelObjectForm = ref<any>({})
65 const rootElements = ref() 65 const rootElements = ref()
66 const messageIdMap = ref() 66 const messageIdMap = ref()
67 const signalIdMap = ref() 67 const signalIdMap = ref()
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/task/ElementTask.vue
@@ -21,8 +21,6 @@ @@ -21,8 +21,6 @@
21 </template> 21 </template>
22 22
23 <script setup lang="ts" name="ElementTaskConfig"> 23 <script setup lang="ts" name="ElementTaskConfig">
24 -import { ref, watch } from 'vue'  
25 -import { ElForm, ElFormItem, ElCheckbox } from 'element-plus'  
26 import UserTask from './task-components/UserTask.vue' 24 import UserTask from './task-components/UserTask.vue'
27 import ScriptTask from './task-components/ScriptTask.vue' 25 import ScriptTask from './task-components/ScriptTask.vue'
28 import ReceiveTask from './task-components/ReceiveTask.vue' 26 import ReceiveTask from './task-components/ReceiveTask.vue'
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/task/task-components/ReceiveTask.vue
@@ -49,19 +49,20 @@ @@ -49,19 +49,20 @@
49 </template> 49 </template>
50 50
51 <script setup lang="ts" name="ReceiveTask"> 51 <script setup lang="ts" name="ReceiveTask">
52 -import { ref, watch, onBeforeUnmount, onMounted, nextTick, toRaw } from 'vue'  
53 -import { ElMessage, ElFormItem, ElDialog, ElForm, ElSelect, ElOption } from 'element-plus'  
54 const props = defineProps({ 52 const props = defineProps({
55 id: String, 53 id: String,
56 type: String 54 type: String
57 }) 55 })
  56 +
  57 +const message = useMessage()
  58 +
58 const bindMessageId = ref('') 59 const bindMessageId = ref('')
59 -const newMessageForm = ref({})  
60 -const messageMap = ref({}) 60 +const newMessageForm = ref<any>({})
  61 +const messageMap = ref<any>({})
61 const messageModelVisible = ref(false) 62 const messageModelVisible = ref(false)
62 -const bpmnElement = ref()  
63 -const bpmnMessageRefsMap = ref()  
64 -const bpmnRootElements = ref() 63 +const bpmnElement = ref<any>()
  64 +const bpmnMessageRefsMap = ref<any>()
  65 +const bpmnRootElements = ref<any>()
65 66
66 const getBindMessage = () => { 67 const getBindMessage = () => {
67 bpmnElement.value = window.bpmnInstances.bpmnElement 68 bpmnElement.value = window.bpmnInstances.bpmnElement
@@ -73,7 +74,7 @@ const openMessageModel = () =&gt; { @@ -73,7 +74,7 @@ const openMessageModel = () =&gt; {
73 } 74 }
74 const createNewMessage = () => { 75 const createNewMessage = () => {
75 if (messageMap.value[newMessageForm.value.id]) { 76 if (messageMap.value[newMessageForm.value.id]) {
76 - ElMessage.error('该消息已存在,请修改id后重新保存') 77 + message.error('该消息已存在,请修改id后重新保存')
77 return 78 return
78 } 79 }
79 const newMessage = window.bpmnInstances.moddle.create('bpmn:Message', newMessageForm.value) 80 const newMessage = window.bpmnInstances.moddle.create('bpmn:Message', newMessageForm.value)
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/task/task-components/ScriptTask.vue
@@ -57,7 +57,7 @@ const defaultTaskForm = ref({ @@ -57,7 +57,7 @@ const defaultTaskForm = ref({
57 resource: '', 57 resource: '',
58 resultVariable: '' 58 resultVariable: ''
59 }) 59 })
60 -const scriptTaskForm = ref({}) 60 +const scriptTaskForm = ref<any>({})
61 const bpmnElement = ref() 61 const bpmnElement = ref()
62 62
63 const resetTaskForm = () => { 63 const resetTaskForm = () => {
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/penal/task/task-components/UserTask.vue
@@ -38,8 +38,6 @@ @@ -38,8 +38,6 @@
38 </template> 38 </template>
39 39
40 <script setup lang="ts" name="UserTask"> 40 <script setup lang="ts" name="UserTask">
41 -import { ref, watch, nextTick, onBeforeUnmount, toRaw } from 'vue'  
42 -import { ElLink, ElFormItem, ElInput } from 'element-plus'  
43 const props = defineProps({ 41 const props = defineProps({
44 id: String, 42 id: String,
45 type: String 43 type: String
@@ -52,7 +50,7 @@ const defaultTaskForm = ref({ @@ -52,7 +50,7 @@ const defaultTaskForm = ref({
52 followUpDate: '', 50 followUpDate: '',
53 priority: '' 51 priority: ''
54 }) 52 })
55 -const userTaskForm = ref({}) 53 +const userTaskForm = ref<any>({})
56 // const mockData=ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) 54 // const mockData=ref([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
57 const bpmnElement = ref() 55 const bpmnElement = ref()
58 const resetTaskForm = () => { 56 const resetTaskForm = () => {
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/theme/element-variables.scss
@@ -5,7 +5,7 @@ $--color-danger: #ff4d4f; @@ -5,7 +5,7 @@ $--color-danger: #ff4d4f;
5 /* 改变 icon 字体路径变量,必需 */ 5 /* 改变 icon 字体路径变量,必需 */
6 $--font-path: '~element-ui/lib/theme-chalk/fonts'; 6 $--font-path: '~element-ui/lib/theme-chalk/fonts';
7 7
8 -@import "~element-ui/packages/theme-chalk/src/index"; 8 +@import '~element-ui/packages/theme-chalk/src/index';
9 9
10 .el-table td, 10 .el-table td,
11 .el-table th { 11 .el-table th {
@@ -20,7 +20,7 @@ $--font-path: &#39;~element-ui/lib/theme-chalk/fonts&#39;; @@ -20,7 +20,7 @@ $--font-path: &#39;~element-ui/lib/theme-chalk/fonts&#39;;
20 box-sizing: border-box; 20 box-sizing: border-box;
21 border-bottom: 1px solid #e8e8e8; 21 border-bottom: 1px solid #e8e8e8;
22 } 22 }
23 -div[class^="el-drawer"]:focus, 23 +div[class^='el-drawer']:focus,
24 span:focus { 24 span:focus {
25 outline: none; 25 outline: none;
26 } 26 }
@@ -63,7 +63,7 @@ span:focus { @@ -63,7 +63,7 @@ span:focus {
63 width: 100%; 63 width: 100%;
64 } 64 }
65 .el-divider:not(.el-divider--horizontal) { 65 .el-divider:not(.el-divider--horizontal) {
66 - margin: 0 8px ; 66 + margin: 0 8px;
67 } 67 }
68 .el-divider.el-divider--horizontal { 68 .el-divider.el-divider--horizontal {
69 margin: 16px 0; 69 margin: 16px 0;
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/package/theme/index.scss
1 -@import "./process-designer.scss";  
2 -@import "./process-panel.scss";  
3 \ No newline at end of file 1 \ No newline at end of file
  2 +@import './process-designer.scss';
  3 +@import './process-panel.scss';
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/highlight/index.js
1 -const hljs = require("highlight.js/lib/core");  
2 -hljs.registerLanguage("xml", require("highlight.js/lib/languages/xml"));  
3 -hljs.registerLanguage("json", require("highlight.js/lib/languages/json")); 1 +const hljs = require('highlight.js/lib/core')
  2 +hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml'))
  3 +hljs.registerLanguage('json', require('highlight.js/lib/languages/json'))
4 4
5 -module.exports = hljs; 5 +module.exports = hljs
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/modules/custom-renderer/CustomRenderer.js
1 -import BpmnRenderer from "bpmn-js/lib/draw/BpmnRenderer"; 1 +import BpmnRenderer from 'bpmn-js/lib/draw/BpmnRenderer'
2 2
3 export default function CustomRenderer(config, eventBus, styles, pathMap, canvas, textRenderer) { 3 export default function CustomRenderer(config, eventBus, styles, pathMap, canvas, textRenderer) {
4 - BpmnRenderer.call(this, config, eventBus, styles, pathMap, canvas, textRenderer, 2000); 4 + BpmnRenderer.call(this, config, eventBus, styles, pathMap, canvas, textRenderer, 2000)
5 5
6 - this.handlers["label"] = function() {  
7 - return null;  
8 - }; 6 + this.handlers['label'] = function () {
  7 + return null
  8 + }
9 } 9 }
10 10
11 -const F = function() {}; // 核心,利用空对象作为中介;  
12 -F.prototype = BpmnRenderer.prototype; // 核心,将父类的原型赋值给空对象F;  
13 -CustomRenderer.prototype = new F(); // 核心,将 F的实例赋值给子类;  
14 -CustomRenderer.prototype.constructor = CustomRenderer; // 修复子类CustomRenderer的构造器指向,防止原型链的混乱; 11 +const F = function () {} // 核心,利用空对象作为中介;
  12 +F.prototype = BpmnRenderer.prototype // 核心,将父类的原型赋值给空对象F;
  13 +CustomRenderer.prototype = new F() // 核心,将 F的实例赋值给子类;
  14 +CustomRenderer.prototype.constructor = CustomRenderer // 修复子类CustomRenderer的构造器指向,防止原型链的混乱;
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/modules/custom-renderer/index.js
1 -import CustomRenderer from "./CustomRenderer"; 1 +import CustomRenderer from './CustomRenderer'
2 2
3 export default { 3 export default {
4 - __init__: ["customRenderer"],  
5 - customRenderer: ["type", CustomRenderer]  
6 -}; 4 + __init__: ['customRenderer'],
  5 + customRenderer: ['type', CustomRenderer]
  6 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/modules/rules/CustomRules.js
1 -import BpmnRules from "bpmn-js/lib/features/rules/BpmnRules";  
2 -import inherits from "inherits"; 1 +import BpmnRules from 'bpmn-js/lib/features/rules/BpmnRules'
  2 +import inherits from 'inherits'
3 3
4 export default function CustomRules(eventBus) { 4 export default function CustomRules(eventBus) {
5 - BpmnRules.call(this, eventBus); 5 + BpmnRules.call(this, eventBus)
6 } 6 }
7 7
8 -inherits(CustomRules, BpmnRules); 8 +inherits(CustomRules, BpmnRules)
9 9
10 -CustomRules.prototype.canDrop = function() {  
11 - return false;  
12 -}; 10 +CustomRules.prototype.canDrop = function () {
  11 + return false
  12 +}
13 13
14 -CustomRules.prototype.canMove = function() {  
15 - return false;  
16 -}; 14 +CustomRules.prototype.canMove = function () {
  15 + return false
  16 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/modules/rules/index.js
1 -import CustomRules from "./CustomRules"; 1 +import CustomRules from './CustomRules'
2 2
3 export default { 3 export default {
4 - __init__: ["customRules"],  
5 - customRules: ["type", CustomRules]  
6 -}; 4 + __init__: ['customRules'],
  5 + customRules: ['type', CustomRules]
  6 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/utils/directive/clickOutSide.js
1 //outside.js 1 //outside.js
2 2
3 -const ctx = "@@clickoutsideContext"; 3 +const ctx = '@@clickoutsideContext'
4 4
5 export default { 5 export default {
6 bind(el, binding, vnode) { 6 bind(el, binding, vnode) {
7 - const ele = el;  
8 - const documentHandler = e => { 7 + const ele = el
  8 + const documentHandler = (e) => {
9 if (!vnode.context || ele.contains(e.target)) { 9 if (!vnode.context || ele.contains(e.target)) {
10 - return false; 10 + return false
11 } 11 }
12 // 调用指令回调 12 // 调用指令回调
13 if (binding.expression) { 13 if (binding.expression) {
14 - vnode.context[el[ctx].methodName](e); 14 + vnode.context[el[ctx].methodName](e)
15 } else { 15 } else {
16 - el[ctx].bindingFn(e); 16 + el[ctx].bindingFn(e)
17 } 17 }
18 - }; 18 + }
19 // 将方法添加到ele 19 // 将方法添加到ele
20 ele[ctx] = { 20 ele[ctx] = {
21 documentHandler, 21 documentHandler,
22 methodName: binding.expression, 22 methodName: binding.expression,
23 bindingFn: binding.value 23 bindingFn: binding.value
24 - }; 24 + }
25 25
26 setTimeout(() => { 26 setTimeout(() => {
27 - document.addEventListener("touchstart", documentHandler); // 为document绑定事件  
28 - }); 27 + document.addEventListener('touchstart', documentHandler) // 为document绑定事件
  28 + })
29 }, 29 },
30 update(el, binding) { 30 update(el, binding) {
31 - const ele = el;  
32 - ele[ctx].methodName = binding.expression;  
33 - ele[ctx].bindingFn = binding.value; 31 + const ele = el
  32 + ele[ctx].methodName = binding.expression
  33 + ele[ctx].bindingFn = binding.value
34 }, 34 },
35 unbind(el) { 35 unbind(el) {
36 - document.removeEventListener("touchstart", el[ctx].documentHandler); // 解绑  
37 - delete el[ctx]; 36 + document.removeEventListener('touchstart', el[ctx].documentHandler) // 解绑
  37 + delete el[ctx]
38 } 38 }
39 -}; 39 +}
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/utils/index.js
1 export function debounce(fn, delay = 500) { 1 export function debounce(fn, delay = 500) {
2 - let timer;  
3 - return function(...args) { 2 + let timer
  3 + return function (...args) {
4 if (timer) { 4 if (timer) {
5 - clearTimeout(timer);  
6 - timer = null; 5 + clearTimeout(timer)
  6 + timer = null
7 } 7 }
8 - timer = setTimeout(fn.bind(this, ...args), delay);  
9 - }; 8 + timer = setTimeout(fn.bind(this, ...args), delay)
  9 + }
10 } 10 }
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/utils/log.js deleted
1 -class Log {  
2 - static type = ["primary", "success", "warn", "error", "info"];  
3 -  
4 - static typeColor(type = "default") {  
5 - let color = "";  
6 - switch (type) {  
7 - case "primary":  
8 - color = "#2d8cf0";  
9 - break;  
10 - case "success":  
11 - color = "#19be6b";  
12 - break;  
13 - case "info":  
14 - color = "#909399";  
15 - break;  
16 - case "warn":  
17 - color = "#ff9900";  
18 - break;  
19 - case "error":  
20 - color = "#f03f14";  
21 - break;  
22 - case "default":  
23 - color = "#35495E";  
24 - break;  
25 - default:  
26 - color = type;  
27 - break;  
28 - }  
29 - return color;  
30 - }  
31 -  
32 - static print(text, type = "default", back = false) {  
33 - if (typeof text === "object") {  
34 - // 如果是對象則調用打印對象方式  
35 - console.dir(text);  
36 - return;  
37 - }  
38 - if (back) {  
39 - // 如果是打印帶背景圖的  
40 - console.log(`%c ${text} `, `background:${this.typeColor(type)}; padding: 2px; border-radius: 4px;color: #fff;`);  
41 - } else {  
42 - console.log(`%c ${text} `, `color: ${this.typeColor(type)};`);  
43 - }  
44 - }  
45 -  
46 - static pretty(title, text, type = "primary") {  
47 - if (typeof text === "object") {  
48 - console.log(  
49 - `%c ${title} %c`,  
50 - `background:${this.typeColor(type)};border:1px solid ${this.typeColor(type)}; padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`  
51 - );  
52 - console.dir(text);  
53 - return;  
54 - }  
55 - console.log(  
56 - `%c ${title} %c ${text} %c`,  
57 - `background:${this.typeColor(type)};border:1px solid ${this.typeColor(type)}; padding: 1px; border-radius: 4px 0 0 4px; color: #fff;`,  
58 - `border:1px solid ${this.typeColor(type)}; padding: 1px; border-radius: 0 4px 4px 0; color: ${this.typeColor(type)};`,  
59 - "background:transparent"  
60 - );  
61 - }  
62 -}  
63 -export default Log;  
yudao-ui-admin-vue3/src/components/bpmnProcessDesigner/src/utils/xml2json.js
1 function xmlStr2XmlObj(xmlStr) { 1 function xmlStr2XmlObj(xmlStr) {
2 - let xmlObj = {}; 2 + let xmlObj = {}
3 if (document.all) { 3 if (document.all) {
4 - const xmlDom = new window.ActiveXObject("Microsoft.XMLDOM");  
5 - xmlDom.loadXML(xmlStr);  
6 - xmlObj = xmlDom; 4 + const xmlDom = new window.ActiveXObject('Microsoft.XMLDOM')
  5 + xmlDom.loadXML(xmlStr)
  6 + xmlObj = xmlDom
7 } else { 7 } else {
8 - xmlObj = new DOMParser().parseFromString(xmlStr, "text/xml"); 8 + xmlObj = new DOMParser().parseFromString(xmlStr, 'text/xml')
9 } 9 }
10 - return xmlObj; 10 + return xmlObj
11 } 11 }
12 12
13 function xml2json(xml) { 13 function xml2json(xml) {
14 try { 14 try {
15 - let obj = {}; 15 + let obj = {}
16 if (xml.children.length > 0) { 16 if (xml.children.length > 0) {
17 for (let i = 0; i < xml.children.length; i++) { 17 for (let i = 0; i < xml.children.length; i++) {
18 - const item = xml.children.item(i);  
19 - const nodeName = item.nodeName;  
20 - if (typeof obj[nodeName] == "undefined") {  
21 - obj[nodeName] = xml2json(item); 18 + const item = xml.children.item(i)
  19 + const nodeName = item.nodeName
  20 + if (typeof obj[nodeName] == 'undefined') {
  21 + obj[nodeName] = xml2json(item)
22 } else { 22 } else {
23 - if (typeof obj[nodeName].push == "undefined") {  
24 - const old = obj[nodeName];  
25 - obj[nodeName] = [];  
26 - obj[nodeName].push(old); 23 + if (typeof obj[nodeName].push == 'undefined') {
  24 + const old = obj[nodeName]
  25 + obj[nodeName] = []
  26 + obj[nodeName].push(old)
27 } 27 }
28 - obj[nodeName].push(xml2json(item)); 28 + obj[nodeName].push(xml2json(item))
29 } 29 }
30 } 30 }
31 } else { 31 } else {
32 - obj = xml.textContent; 32 + obj = xml.textContent
33 } 33 }
34 - return obj; 34 + return obj
35 } catch (e) { 35 } catch (e) {
36 - console.log(e.message); 36 + console.log(e.message)
37 } 37 }
38 } 38 }
39 39
40 function xmlObj2json(xml) { 40 function xmlObj2json(xml) {
41 - const xmlObj = xmlStr2XmlObj(xml);  
42 - console.log(xmlObj);  
43 - let jsonObj = {}; 41 + const xmlObj = xmlStr2XmlObj(xml)
  42 + console.log(xmlObj)
  43 + let jsonObj = {}
44 if (xmlObj.childNodes.length > 0) { 44 if (xmlObj.childNodes.length > 0) {
45 - jsonObj = xml2json(xmlObj); 45 + jsonObj = xml2json(xmlObj)
46 } 46 }
47 - return jsonObj; 47 + return jsonObj
48 } 48 }
49 49
50 -export default xmlObj2json; 50 +export default xmlObj2json
yudao-ui-admin-vue3/src/types/auto-components.d.ts
@@ -23,13 +23,17 @@ declare module &#39;@vue/runtime-core&#39; { @@ -23,13 +23,17 @@ declare module &#39;@vue/runtime-core&#39; {
23 Editor: typeof import('./../components/Editor/src/Editor.vue')['default'] 23 Editor: typeof import('./../components/Editor/src/Editor.vue')['default']
24 ElBadge: typeof import('element-plus/es')['ElBadge'] 24 ElBadge: typeof import('element-plus/es')['ElBadge']
25 ElButton: typeof import('element-plus/es')['ElButton'] 25 ElButton: typeof import('element-plus/es')['ElButton']
  26 + ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
26 ElCard: typeof import('element-plus/es')['ElCard'] 27 ElCard: typeof import('element-plus/es')['ElCard']
27 ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] 28 ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
28 ElCol: typeof import('element-plus/es')['ElCol'] 29 ElCol: typeof import('element-plus/es')['ElCol']
  30 + ElCollapse: typeof import('element-plus/es')['ElCollapse']
  31 + ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
29 ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition'] 32 ElCollapseTransition: typeof import('element-plus/es')['ElCollapseTransition']
30 ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] 33 ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
31 ElDescriptions: typeof import('element-plus/es')['ElDescriptions'] 34 ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
32 ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem'] 35 ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
  36 + ElDialog: typeof import('element-plus/es')['ElDialog']
33 ElDivider: typeof import('element-plus/es')['ElDivider'] 37 ElDivider: typeof import('element-plus/es')['ElDivider']
34 ElDrawer: typeof import('element-plus/es')['ElDrawer'] 38 ElDrawer: typeof import('element-plus/es')['ElDrawer']
35 ElDropdown: typeof import('element-plus/es')['ElDropdown'] 39 ElDropdown: typeof import('element-plus/es')['ElDropdown']
@@ -47,26 +51,21 @@ declare module &#39;@vue/runtime-core&#39; { @@ -47,26 +51,21 @@ declare module &#39;@vue/runtime-core&#39; {
47 ElIcon: typeof import('element-plus/es')['ElIcon'] 51 ElIcon: typeof import('element-plus/es')['ElIcon']
48 ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] 52 ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
49 ElInput: typeof import('element-plus/es')['ElInput'] 53 ElInput: typeof import('element-plus/es')['ElInput']
50 - ElInputNumber: typeof import('element-plus/es')['ElInputNumber']  
51 ElLink: typeof import('element-plus/es')['ElLink'] 54 ElLink: typeof import('element-plus/es')['ElLink']
52 ElOption: typeof import('element-plus/es')['ElOption'] 55 ElOption: typeof import('element-plus/es')['ElOption']
53 ElPopover: typeof import('element-plus/es')['ElPopover'] 56 ElPopover: typeof import('element-plus/es')['ElPopover']
54 ElRadio: typeof import('element-plus/es')['ElRadio'] 57 ElRadio: typeof import('element-plus/es')['ElRadio']
55 - ElRadioButton: typeof import('element-plus/es')['ElRadioButton']  
56 ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] 58 ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
57 ElRow: typeof import('element-plus/es')['ElRow'] 59 ElRow: typeof import('element-plus/es')['ElRow']
58 ElSelect: typeof import('element-plus/es')['ElSelect'] 60 ElSelect: typeof import('element-plus/es')['ElSelect']
59 ElSkeleton: typeof import('element-plus/es')['ElSkeleton'] 61 ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
60 ElSwitch: typeof import('element-plus/es')['ElSwitch'] 62 ElSwitch: typeof import('element-plus/es')['ElSwitch']
  63 + ElTable: typeof import('element-plus/es')['ElTable']
61 ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] 64 ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
62 ElTabPane: typeof import('element-plus/es')['ElTabPane'] 65 ElTabPane: typeof import('element-plus/es')['ElTabPane']
63 ElTabs: typeof import('element-plus/es')['ElTabs'] 66 ElTabs: typeof import('element-plus/es')['ElTabs']
64 ElTag: typeof import('element-plus/es')['ElTag'] 67 ElTag: typeof import('element-plus/es')['ElTag']
65 - ElTimeline: typeof import('element-plus/es')['ElTimeline']  
66 - ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']  
67 ElTooltip: typeof import('element-plus/es')['ElTooltip'] 68 ElTooltip: typeof import('element-plus/es')['ElTooltip']
68 - ElTree: typeof import('element-plus/es')['ElTree']  
69 - ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect']  
70 ElUpload: typeof import('element-plus/es')['ElUpload'] 69 ElUpload: typeof import('element-plus/es')['ElUpload']
71 Error: typeof import('./../components/Error/src/Error.vue')['default'] 70 Error: typeof import('./../components/Error/src/Error.vue')['default']
72 FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default'] 71 FlowCondition: typeof import('./../components/bpmnProcessDesigner/package/penal/flow-condition/FlowCondition.vue')['default']
yudao-ui-admin-vue3/src/views/bpm/processInstance/detail.vue
@@ -212,9 +212,9 @@ const { proxy } = getCurrentInstance() @@ -212,9 +212,9 @@ const { proxy } = getCurrentInstance()
212 // ========== 审批信息 ========== 212 // ========== 审批信息 ==========
213 const id = query.id as unknown as number 213 const id = query.id as unknown as number
214 const processInstanceLoading = ref(false) // 流程实例的加载中 214 const processInstanceLoading = ref(false) // 流程实例的加载中
215 -const processInstance = ref({}) // 流程实例  
216 -const runningTasks = ref([]) // 运行中的任务  
217 -const auditForms = ref([]) // 审批任务的表单 215 +const processInstance = ref<any>({}) // 流程实例
  216 +const runningTasks = ref<any[]>([]) // 运行中的任务
  217 +const auditForms = ref<any[]>([]) // 审批任务的表单
218 const auditRule = reactive({ 218 const auditRule = reactive({
219 reason: [{ required: true, message: '审批建议不能为空', trigger: 'blur' }] 219 reason: [{ required: true, message: '审批建议不能为空', trigger: 'blur' }]
220 }) 220 })
@@ -260,7 +260,7 @@ const detailForm = ref({ @@ -260,7 +260,7 @@ const detailForm = ref({
260 260
261 // ========== 审批记录 ========== 261 // ========== 审批记录 ==========
262 const tasksLoad = ref(true) 262 const tasksLoad = ref(true)
263 -const tasks = ref([]) 263 +const tasks = ref<any[]>([])
264 264
265 const getTimelineItemIcon = (item) => { 265 const getTimelineItemIcon = (item) => {
266 if (item.result === 1) { 266 if (item.result === 1) {
@@ -304,7 +304,7 @@ const updateAssigneeRules = ref({ @@ -304,7 +304,7 @@ const updateAssigneeRules = ref({
304 assigneeUserId: [{ required: true, message: '新审批人不能为空', trigger: 'change' }] 304 assigneeUserId: [{ required: true, message: '新审批人不能为空', trigger: 'change' }]
305 }) 305 })
306 const updateAssigneeFormRef = ref() 306 const updateAssigneeFormRef = ref()
307 -const userOptions = ref([]) 307 +const userOptions = ref<any[]>([])
308 308
309 // 处理转派审批人 309 // 处理转派审批人
310 const handleUpdateAssignee = (task) => { 310 const handleUpdateAssignee = (task) => {
yudao-ui-admin-vue3/tsconfig.json
@@ -29,7 +29,8 @@ @@ -29,7 +29,8 @@
29 "element-plus/global", 29 "element-plus/global",
30 "@types/intro.js", 30 "@types/intro.js",
31 "@types/qrcode", 31 "@types/qrcode",
32 - "vite-plugin-svg-icons/client" 32 + "vite-plugin-svg-icons/client",
  33 + "@form-create/element-ui/types"
33 ], 34 ],
34 "typeRoots": ["./node_modules/@types/", "./types"] 35 "typeRoots": ["./node_modules/@types/", "./types"]
35 }, 36 },