workflow-editor 0.9.67-boe1 → 0.9.67-boe10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/workflow-editor.css +1 -1
- package/lib/workflow-editor.umd.min.js +8 -8
- package/package.json +2 -2
- package/packages/plugins/formValidatorUtil.js +6 -1
- package/packages/workflow-editor/src/json-object-templates/auto-task.js +70 -0
- package/packages/workflow-editor/src/json-object-templates/copy-task.js +5 -0
- package/packages/workflow-editor/src/json-object-templates/subprocess.js +2 -1
- package/packages/workflow-editor/src/main/canvas.vue +5 -1
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +3 -1
- package/packages/workflow-editor/src/process-json.js +2 -1
- package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +81 -0
- package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +155 -0
- package/packages/workflow-editor/src/properties-editors/auto-task.vue +73 -0
- package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +1 -1
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +4 -1
- package/packages/workflow-editor/src/properties-editors/copy-task.vue +15 -1
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +5 -1
- package/packages/workflow-editor/src/properties-editors/human-task.vue +1 -1
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +18 -6
- package/packages/workflow-editor/src/taches/auto-task.vue +99 -0
- package/packages/workflow-editor/src/util.js +32 -36
- package/packages/workflow-editor/src/workflow-editor.vue +1 -0
- package/src/i18n/langs/cn.js +11 -6
- package/src/i18n/langs/en.js +7 -2
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<g
|
|
3
|
+
@mousedown.stop="startDrag"
|
|
4
|
+
@mouseup="endDrag"
|
|
5
|
+
@mouseenter="showJoints"
|
|
6
|
+
@mouseleave="hideJoints"
|
|
7
|
+
@dblclick.stop="setPropertiesEditorFor('AutoTask')"
|
|
8
|
+
>
|
|
9
|
+
<rect
|
|
10
|
+
ref="tache"
|
|
11
|
+
:width="model.width"
|
|
12
|
+
:height="model.height"
|
|
13
|
+
:class="{'draggable':true,'task-tache':true, 'selected':model.isSelected}"
|
|
14
|
+
:x="model.x"
|
|
15
|
+
:y="model.y"
|
|
16
|
+
rx="6"
|
|
17
|
+
ry="6"
|
|
18
|
+
/>
|
|
19
|
+
<text
|
|
20
|
+
:x="text.x"
|
|
21
|
+
:y="text.y"
|
|
22
|
+
text-anchor="middle"
|
|
23
|
+
class="draggable"
|
|
24
|
+
>
|
|
25
|
+
{{ name }}
|
|
26
|
+
</text>
|
|
27
|
+
<joint
|
|
28
|
+
v-for="position in jointPoints"
|
|
29
|
+
:key="position"
|
|
30
|
+
:parent="model"
|
|
31
|
+
:position="position"
|
|
32
|
+
/>
|
|
33
|
+
<tache-resizer
|
|
34
|
+
v-for="position in resizers"
|
|
35
|
+
:key="position"
|
|
36
|
+
:owner="model"
|
|
37
|
+
:position="position"
|
|
38
|
+
/>
|
|
39
|
+
</g>
|
|
40
|
+
</template>
|
|
41
|
+
<script>
|
|
42
|
+
import { mapGetters, mapMutations } from 'vuex'
|
|
43
|
+
import Joint from './joint'
|
|
44
|
+
import TacheResizer from './tache-resizer'
|
|
45
|
+
import tacheMethods from './common-methods'
|
|
46
|
+
import { watchShowName } from '../util'
|
|
47
|
+
export default {
|
|
48
|
+
name: 'AutoTask',
|
|
49
|
+
components: {
|
|
50
|
+
Joint,
|
|
51
|
+
TacheResizer
|
|
52
|
+
},
|
|
53
|
+
props: {
|
|
54
|
+
model: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: null
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
data() {
|
|
60
|
+
return {
|
|
61
|
+
// 一个tache有上右下左四个连接点,这四个连接点的坐标根据tache的位置和大小计算出来
|
|
62
|
+
jointPoints: [],
|
|
63
|
+
resizers: ['NW', 'NE', 'SW', 'SE'],
|
|
64
|
+
name: this.model.name
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
computed: {
|
|
68
|
+
...mapGetters('wfEditor', [
|
|
69
|
+
'selectedTaches',
|
|
70
|
+
'processI18n'
|
|
71
|
+
]),
|
|
72
|
+
text() {
|
|
73
|
+
return {
|
|
74
|
+
x: this.model.x + this.model.width / 2,
|
|
75
|
+
y: this.model.y + this.model.height / 2
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
created() {
|
|
80
|
+
this.name = watchShowName(this, this.name)
|
|
81
|
+
},
|
|
82
|
+
mounted() {
|
|
83
|
+
this.$watch('model.name', function(newVal) {
|
|
84
|
+
this.name = watchShowName(this, newVal)
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
methods: {
|
|
88
|
+
...mapMutations('wfEditor', [
|
|
89
|
+
'setPropertiesEditorFor',
|
|
90
|
+
'setContextMenuVisible'
|
|
91
|
+
]),
|
|
92
|
+
...tacheMethods
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</script>
|
|
96
|
+
<style>
|
|
97
|
+
|
|
98
|
+
</style>
|
|
99
|
+
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
|
|
2
2
|
import { getLanguageWithLocale } from 'imatrix-ui/src/utils/util'
|
|
3
|
+
import i18n from '../../../src/i18n/i18n'
|
|
4
|
+
import newAutoTask from './json-object-templates/auto-task'
|
|
5
|
+
import newCopyTask from './json-object-templates/copy-task'
|
|
6
|
+
import newDecision from './json-object-templates/decision'
|
|
7
|
+
import newEnd from './json-object-templates/end'
|
|
8
|
+
import newFork from './json-object-templates/fork'
|
|
9
|
+
import newHumanDecision from './json-object-templates/human-decision'
|
|
10
|
+
import newHumanTask from './json-object-templates/human-task'
|
|
11
|
+
import newJoin from './json-object-templates/join'
|
|
12
|
+
import newProcess from './json-object-templates/process'
|
|
13
|
+
import newStart from './json-object-templates/start'
|
|
14
|
+
import newSubprocess from './json-object-templates/subprocess'
|
|
15
|
+
import newTransition from './json-object-templates/transition'
|
|
3
16
|
function getStore() {
|
|
4
17
|
return window.$store
|
|
5
18
|
}
|
|
@@ -92,6 +105,16 @@ export function getComponentList() {
|
|
|
92
105
|
height: 40,
|
|
93
106
|
color: '#0777D4'
|
|
94
107
|
},
|
|
108
|
+
{
|
|
109
|
+
name: 'AutoTask',
|
|
110
|
+
label: getI18n().t('workflowEditor.task.autoTask'),
|
|
111
|
+
icon: 'human-task',
|
|
112
|
+
type: '',
|
|
113
|
+
round: false,
|
|
114
|
+
width: 80,
|
|
115
|
+
height: 40,
|
|
116
|
+
color: '#0777D4'
|
|
117
|
+
},
|
|
95
118
|
{
|
|
96
119
|
name: 'End',
|
|
97
120
|
label: getI18n().t('workflowEditor.task.end'),
|
|
@@ -269,7 +292,7 @@ function clearAllSelectedComponents() {
|
|
|
269
292
|
*/
|
|
270
293
|
function removeTextProperty(obj) {
|
|
271
294
|
const keys = Object.getOwnPropertyNames(obj)
|
|
272
|
-
keys.forEach(function(key) {
|
|
295
|
+
keys.forEach(function (key) {
|
|
273
296
|
if (typeof obj[key] === 'object') {
|
|
274
297
|
if (obj[key]._text !== undefined) {
|
|
275
298
|
obj[key] = obj[key]._text
|
|
@@ -290,7 +313,7 @@ function removeTextProperty(obj) {
|
|
|
290
313
|
})
|
|
291
314
|
}
|
|
292
315
|
function generateTaches(type, arr) {
|
|
293
|
-
if (!arr)arr = []
|
|
316
|
+
if (!arr) arr = []
|
|
294
317
|
if (!Array.isArray(arr)) {
|
|
295
318
|
arr = [arr]
|
|
296
319
|
}
|
|
@@ -312,7 +335,7 @@ function generateTaches(type, arr) {
|
|
|
312
335
|
}
|
|
313
336
|
}
|
|
314
337
|
function generateTransitions(type, arr) {
|
|
315
|
-
if (!arr)arr = []
|
|
338
|
+
if (!arr) arr = []
|
|
316
339
|
if (!Array.isArray(arr)) {
|
|
317
340
|
arr = [arr]
|
|
318
341
|
}
|
|
@@ -361,6 +384,7 @@ function initializeProcessData(process) {
|
|
|
361
384
|
generateTaches('Subprocess', process.subprocess)
|
|
362
385
|
generateTaches('HumanDecision', process.humanDecision)
|
|
363
386
|
generateTaches('CopyTask', process.copyTask)
|
|
387
|
+
generateTaches('AutoTask', process.autoTask)
|
|
364
388
|
generateTaches('Start', process.start)
|
|
365
389
|
generateTaches('End', process.end)
|
|
366
390
|
generateTransitions('Transition', process.transition)
|
|
@@ -442,39 +466,9 @@ function watchShowName(vm, newVal) {
|
|
|
442
466
|
return showName
|
|
443
467
|
}
|
|
444
468
|
export {
|
|
445
|
-
getComponentInfo,
|
|
446
|
-
|
|
447
|
-
getMousePosition,
|
|
448
|
-
getClientMousePosition,
|
|
449
|
-
getMouseOffset,
|
|
450
|
-
getVirtualRegion,
|
|
451
|
-
getRealRegion,
|
|
452
|
-
startDragTache,
|
|
453
|
-
endDragTache,
|
|
454
|
-
clearAllSelectedComponents,
|
|
455
|
-
removeTextProperty,
|
|
456
|
-
initializeProcessData,
|
|
457
|
-
findOutgoingTransitionsByTacheId,
|
|
458
|
-
findIncomingTransitionsByTacheId,
|
|
459
|
-
findTacheById,
|
|
460
|
-
deepCopy,
|
|
461
|
-
updateTransitionsWhenTacheIdChanged,
|
|
462
|
-
validateTacheCode,
|
|
463
|
-
getI18n,
|
|
464
|
-
watchShowName
|
|
469
|
+
clearAllSelectedComponents, deepCopy, endDragTache, findIncomingTransitionsByTacheId, findOutgoingTransitionsByTacheId, findTacheById, getClientMousePosition, getComponentInfo, getI18n, getJoint, getMouseOffset, getMousePosition, getRealRegion, getVirtualRegion, initializeProcessData, removeTextProperty, startDragTache, updateTransitionsWhenTacheIdChanged,
|
|
470
|
+
validateTacheCode, watchShowName
|
|
465
471
|
}
|
|
466
|
-
import newProcess from './json-object-templates/process'
|
|
467
|
-
import newHumanTask from './json-object-templates/human-task'
|
|
468
|
-
import newDecision from './json-object-templates/decision'
|
|
469
|
-
import newStart from './json-object-templates/start'
|
|
470
|
-
import newEnd from './json-object-templates/end'
|
|
471
|
-
import newTransition from './json-object-templates/transition'
|
|
472
|
-
import newSubprocess from './json-object-templates/subprocess'
|
|
473
|
-
import newFork from './json-object-templates/fork'
|
|
474
|
-
import newJoin from './json-object-templates/join'
|
|
475
|
-
import newHumanDecision from './json-object-templates/human-decision'
|
|
476
|
-
import i18n from '../../../src/i18n/i18n'
|
|
477
|
-
import newCopyTask from './json-object-templates/copy-task'
|
|
478
472
|
|
|
479
473
|
const processTemplate = {
|
|
480
474
|
newProcess,
|
|
@@ -487,7 +481,9 @@ const processTemplate = {
|
|
|
487
481
|
newFork,
|
|
488
482
|
newJoin,
|
|
489
483
|
newHumanDecision,
|
|
490
|
-
newCopyTask
|
|
484
|
+
newCopyTask,
|
|
485
|
+
newAutoTask
|
|
491
486
|
}
|
|
492
487
|
|
|
493
488
|
export { processTemplate }
|
|
489
|
+
|
package/src/i18n/langs/cn.js
CHANGED
|
@@ -30,7 +30,7 @@ const cn = {
|
|
|
30
30
|
i18nEn: '英文',
|
|
31
31
|
i18nKey: '国际化key',
|
|
32
32
|
subprocessTitle: '子流程流转历史',
|
|
33
|
-
custom:'自定义'
|
|
33
|
+
custom: '自定义'
|
|
34
34
|
},
|
|
35
35
|
workflowEditorMessage: {
|
|
36
36
|
requiredAndMustBeADate: '必填且必须为日期',
|
|
@@ -139,9 +139,9 @@ const cn = {
|
|
|
139
139
|
variableName: '变量名',
|
|
140
140
|
variableValue: '变量值',
|
|
141
141
|
selectField: '选择字段',
|
|
142
|
-
taskNotice:'待办通知',
|
|
143
|
-
reminderNotice:'催办通知',
|
|
144
|
-
customMsg:'自定义消息内容'
|
|
142
|
+
taskNotice: '待办通知',
|
|
143
|
+
reminderNotice: '催办通知',
|
|
144
|
+
customMsg: '自定义消息内容'
|
|
145
145
|
},
|
|
146
146
|
// 流程属性
|
|
147
147
|
process: {
|
|
@@ -320,7 +320,8 @@ const cn = {
|
|
|
320
320
|
isNotNull: '不等于Null',
|
|
321
321
|
defaultMailTemplate: '默认邮件模板',
|
|
322
322
|
trustTask: '委托任务',
|
|
323
|
-
subprocessIsSharedForm: '主子流程共用表单'
|
|
323
|
+
subprocessIsSharedForm: '主子流程共用表单',
|
|
324
|
+
generateForParttimeDept: '为兼职部门人员生成任务'
|
|
324
325
|
},
|
|
325
326
|
// 环节属性
|
|
326
327
|
task: {
|
|
@@ -426,7 +427,11 @@ const cn = {
|
|
|
426
427
|
cCtask: '抄送任务',
|
|
427
428
|
canItBeRejected: '是否可驳回',
|
|
428
429
|
selectMailTemplate: '选择通知模板',
|
|
429
|
-
selectTemplate: '选择模板'
|
|
430
|
+
selectTemplate: '选择模板',
|
|
431
|
+
autoTask: '自动任务',
|
|
432
|
+
newAutoTask: '新自动任务',
|
|
433
|
+
propertiesOfAutoTask: '自动任务的属性',
|
|
434
|
+
custombeanName: '自定义bean'
|
|
430
435
|
},
|
|
431
436
|
// 流向属性
|
|
432
437
|
transition: {
|
package/src/i18n/langs/en.js
CHANGED
|
@@ -320,7 +320,8 @@ const en = {
|
|
|
320
320
|
isNotNull: 'Is Not Null',
|
|
321
321
|
defaultMailTemplate: 'Default Mail Template',
|
|
322
322
|
trustTask: 'Trust Task',
|
|
323
|
-
subprocessIsSharedForm: 'Main process and subprocess shared form'
|
|
323
|
+
subprocessIsSharedForm: 'Main process and subprocess shared form',
|
|
324
|
+
generateForParttimeDept: 'Generate tasks for part-time department personnel'
|
|
324
325
|
},
|
|
325
326
|
// 环节属性
|
|
326
327
|
task: {
|
|
@@ -426,7 +427,11 @@ const en = {
|
|
|
426
427
|
cCtask: 'CC Task',
|
|
427
428
|
canItBeRejected: 'Can It Be Rejected',
|
|
428
429
|
selectMailTemplate: 'Select Notice Template',
|
|
429
|
-
selectTemplate: 'Select Template'
|
|
430
|
+
selectTemplate: 'Select Template',
|
|
431
|
+
autoTask: 'Auto Task',
|
|
432
|
+
newAutoTask: 'New Auto Task',
|
|
433
|
+
propertiesOfAutoTask: 'Properties Of Auto Task',
|
|
434
|
+
custombeanName: 'Custom Bean Name'
|
|
430
435
|
},
|
|
431
436
|
// 流向属性
|
|
432
437
|
transition: {
|