workflow-editor 0.0.7-up → 0.0.8-up
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/package.json +12 -2
- package/index.html +0 -13
- package/packages/index.js +0 -34
- package/packages/plugins/formValidatorUtil.js +0 -533
- package/packages/plugins/index.js +0 -8
- package/packages/workflow-editor/index.js +0 -14
- package/packages/workflow-editor/src/api.js +0 -7
- package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
- package/packages/workflow-editor/src/constant.js +0 -8
- package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
- package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
- package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
- package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
- package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
- package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -199
- package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/process.js +0 -98
- package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
- package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
- package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
- package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -66
- package/packages/workflow-editor/src/main/canvas.vue +0 -483
- package/packages/workflow-editor/src/main/context-menu.vue +0 -132
- package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
- package/packages/workflow-editor/src/main/selection-region.vue +0 -66
- package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
- package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
- package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -35
- package/packages/workflow-editor/src/main/toolbox.vue +0 -60
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -304
- package/packages/workflow-editor/src/process-json.js +0 -623
- package/packages/workflow-editor/src/process-service.js +0 -31
- package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -73
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -531
- package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -276
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -239
- package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -67
- package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -241
- package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
- package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -116
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -75
- package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -125
- package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -72
- package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -101
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -185
- package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -83
- package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -65
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -347
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -63
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -148
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -233
- package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -386
- package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -209
- package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -135
- package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -94
- package/packages/workflow-editor/src/properties-editors/decision.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/fork.vue +0 -72
- package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -44
- package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -160
- package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -291
- package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -249
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -392
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -241
- package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -220
- package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -204
- package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -59
- package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -207
- package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -390
- package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -109
- package/packages/workflow-editor/src/properties-editors/join.vue +0 -44
- package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -273
- package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -76
- package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
- package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -199
- package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
- package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -206
- package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -64
- package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -79
- package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
- package/packages/workflow-editor/src/properties-editors/transition.vue +0 -74
- package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -177
- package/packages/workflow-editor/src/store/getters.js +0 -27
- package/packages/workflow-editor/src/store/workflow-editor.js +0 -125
- package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
- package/packages/workflow-editor/src/taches/common-methods.js +0 -21
- package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
- package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
- package/packages/workflow-editor/src/taches/decision.vue +0 -102
- package/packages/workflow-editor/src/taches/end.vue +0 -76
- package/packages/workflow-editor/src/taches/fork.vue +0 -102
- package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
- package/packages/workflow-editor/src/taches/human-task.vue +0 -113
- package/packages/workflow-editor/src/taches/join.vue +0 -91
- package/packages/workflow-editor/src/taches/joint.vue +0 -177
- package/packages/workflow-editor/src/taches/start.vue +0 -76
- package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
- package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
- package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
- package/packages/workflow-editor/src/transitions/transition.vue +0 -212
- package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
- package/packages/workflow-editor/src/util.js +0 -489
- package/packages/workflow-editor/src/workflow-editor.vue +0 -606
- package/packages/workflow-editor/src/workflow-history.vue +0 -153
- package/public/vite.svg +0 -1
- package/src/i18n/i18n.js +0 -16
- package/src/i18n/langs/cn.js +0 -509
- package/src/i18n/langs/en.js +0 -551
- package/vite.config.js +0 -36
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<g
|
|
3
|
-
:class="{'no-events': draggerToMove!=null}"
|
|
4
|
-
@mousedown.stop="select"
|
|
5
|
-
@dblclick.stop="showPropertiesEditor"
|
|
6
|
-
>
|
|
7
|
-
<text
|
|
8
|
-
:x="text.x"
|
|
9
|
-
:y="text.y"
|
|
10
|
-
text-anchor="middle"
|
|
11
|
-
class="draggable"
|
|
12
|
-
>
|
|
13
|
-
{{ name }}
|
|
14
|
-
</text>
|
|
15
|
-
<component :is="model.lineInfo.type" :owner="model" :class="{'transition':true,'selected':model.isSelected||(model.startJoint.parent.isSelected&&model.endJoint.parent.isSelected)}" />
|
|
16
|
-
<!-- <straight-line :owner="model" :class="{'transition':true,'selected':model.isSelected||(model.startJoint.parent.isSelected&&model.endJoint.parent.isSelected)}"/> -->
|
|
17
|
-
<g v-if="model.isSelected">
|
|
18
|
-
<circle
|
|
19
|
-
v-for="dragger in draggers"
|
|
20
|
-
:key="dragger.position"
|
|
21
|
-
:cx="dragger.x"
|
|
22
|
-
:cy="dragger.y"
|
|
23
|
-
class="transition-dragger"
|
|
24
|
-
r="4"
|
|
25
|
-
@mousedown.stop="startDrag($event,dragger.position)"
|
|
26
|
-
@mouseup="endDrag"
|
|
27
|
-
/>
|
|
28
|
-
</g>
|
|
29
|
-
</g>
|
|
30
|
-
</template>
|
|
31
|
-
<script>
|
|
32
|
-
import { getJoint, getMousePosition, clearAllSelectedComponents, watchShowName } from '../util'
|
|
33
|
-
import { mapGetters, mapMutations } from 'vuex'
|
|
34
|
-
import StraightLine from './straight-line'
|
|
35
|
-
import CurveLine from './curve-line'
|
|
36
|
-
import BrokenLine from './broken-line'
|
|
37
|
-
export default {
|
|
38
|
-
name: 'Transition',
|
|
39
|
-
components: {
|
|
40
|
-
StraightLine,
|
|
41
|
-
CurveLine,
|
|
42
|
-
BrokenLine
|
|
43
|
-
},
|
|
44
|
-
props: {
|
|
45
|
-
model: {
|
|
46
|
-
type: Object,
|
|
47
|
-
default: null
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
data() {
|
|
51
|
-
const point = this.getTextPoint()
|
|
52
|
-
return {
|
|
53
|
-
text: {
|
|
54
|
-
x: point.x,
|
|
55
|
-
y: point.y
|
|
56
|
-
},
|
|
57
|
-
name: this.model.remark
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
computed: {
|
|
61
|
-
...mapGetters('wfEditor', [
|
|
62
|
-
'draggerToMove',
|
|
63
|
-
'processI18n'
|
|
64
|
-
]),
|
|
65
|
-
draggers() {
|
|
66
|
-
const startPoint = getJoint(this.model.startJoint.parent, this.model.startJoint.position)
|
|
67
|
-
startPoint.position = 'start'
|
|
68
|
-
const endPoint = getJoint(this.model.endJoint.parent, this.model.endJoint.position)
|
|
69
|
-
endPoint.position = 'end'
|
|
70
|
-
return [startPoint, endPoint]
|
|
71
|
-
},
|
|
72
|
-
path() {
|
|
73
|
-
return 'M' + this.draggers[0].x + ' ' + this.draggers[0].y + ' L' + this.draggers[1].x + ' ' + this.draggers[1].y
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
created() {
|
|
77
|
-
this.name = watchShowName(this, this.name)
|
|
78
|
-
},
|
|
79
|
-
mounted() {
|
|
80
|
-
// 线条名称内容修改时
|
|
81
|
-
this.$watch('model.remark', function(newVal) {
|
|
82
|
-
this.name = watchShowName(this, newVal)
|
|
83
|
-
if (this.name && this.name !== '') {
|
|
84
|
-
// 计算文本框的x、y坐标
|
|
85
|
-
const point = this.getTextPoint()
|
|
86
|
-
this.text.x = point.x
|
|
87
|
-
this.text.y = point.y
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
// 右键菜单更改线条方式时
|
|
91
|
-
this.$watch('model.lineInfo.type', function(newVal) {
|
|
92
|
-
// 计算文本框的x、y坐标
|
|
93
|
-
const point = this.getTextPoint()
|
|
94
|
-
this.text.x = point.x
|
|
95
|
-
this.text.y = point.y
|
|
96
|
-
})
|
|
97
|
-
// 拖动控制点的位置时
|
|
98
|
-
this.$watch('model.lineInfo.controlPoint', function(newVal) {
|
|
99
|
-
// 计算文本框的x、y坐标
|
|
100
|
-
const point = this.getTextPoint()
|
|
101
|
-
this.text.x = point.x
|
|
102
|
-
this.text.y = point.y
|
|
103
|
-
})
|
|
104
|
-
// 水平拖动起点节点
|
|
105
|
-
this.$watch('model.startJoint.parent.x', function(newVal) {
|
|
106
|
-
// 计算文本框的x、y坐标
|
|
107
|
-
const point = this.getTextPoint()
|
|
108
|
-
this.text.x = point.x
|
|
109
|
-
this.text.y = point.y
|
|
110
|
-
})
|
|
111
|
-
// 垂直拖动起点节点
|
|
112
|
-
this.$watch('model.startJoint.parent.y', function(newVal) {
|
|
113
|
-
// 计算文本框的x、y坐标
|
|
114
|
-
const point = this.getTextPoint()
|
|
115
|
-
this.text.x = point.x
|
|
116
|
-
this.text.y = point.y
|
|
117
|
-
})
|
|
118
|
-
// 水平拖动终点节点
|
|
119
|
-
this.$watch('model.endJoint.parent.x', function(newVal) {
|
|
120
|
-
// 计算文本框的x、y坐标
|
|
121
|
-
const point = this.getTextPoint()
|
|
122
|
-
this.text.x = point.x
|
|
123
|
-
this.text.y = point.y
|
|
124
|
-
})
|
|
125
|
-
// 垂直拖动终点节点
|
|
126
|
-
this.$watch('model.endJoint.parent.y', function(newVal) {
|
|
127
|
-
// 计算文本框的x、y坐标
|
|
128
|
-
const point = this.getTextPoint()
|
|
129
|
-
this.text.x = point.x
|
|
130
|
-
this.text.y = point.y
|
|
131
|
-
})
|
|
132
|
-
},
|
|
133
|
-
methods: {
|
|
134
|
-
...mapMutations('wfEditor', [
|
|
135
|
-
'setMouseDownPosition',
|
|
136
|
-
'setDraggerToMove',
|
|
137
|
-
'setSelectedTransition',
|
|
138
|
-
'setPropertiesEditorFor'
|
|
139
|
-
]),
|
|
140
|
-
getTextPoint() {
|
|
141
|
-
const startPoint = getJoint(this.model.startJoint.parent, this.model.startJoint.position)
|
|
142
|
-
const endPoint = getJoint(this.model.endJoint.parent, this.model.endJoint.position)
|
|
143
|
-
let minX = startPoint.x < endPoint.x ? startPoint.x : endPoint.x
|
|
144
|
-
let minY = startPoint.y < endPoint.y ? startPoint.y : endPoint.y
|
|
145
|
-
let textX = minX + Math.abs(startPoint.x - endPoint.x) / 2
|
|
146
|
-
let textY = minY + Math.abs(startPoint.y - endPoint.y) / 2
|
|
147
|
-
if (this.model.lineInfo.type === 'CurveLine') {
|
|
148
|
-
// 曲线
|
|
149
|
-
const point = this.model.lineInfo.controlPoint
|
|
150
|
-
if (point) {
|
|
151
|
-
minX = startPoint.x < point.x ? startPoint.x : parseFloat(point.x)
|
|
152
|
-
minY = startPoint.y < point.y ? startPoint.y : parseFloat(point.y)
|
|
153
|
-
textX = minX + Math.abs(startPoint.x - point.x) / 2 + 10
|
|
154
|
-
textY = minY + Math.abs(startPoint.y - point.y) / 2 - 10
|
|
155
|
-
}
|
|
156
|
-
} else if (this.model.lineInfo.type === 'BrokenLine') {
|
|
157
|
-
const point = this.model.lineInfo.controlPoint[0]
|
|
158
|
-
if (point) {
|
|
159
|
-
minX = startPoint.x < point.x ? startPoint.x : parseFloat(point.x)
|
|
160
|
-
minY = startPoint.y < point.y ? startPoint.y : parseFloat(point.y)
|
|
161
|
-
textX = minX + Math.abs(startPoint.x - point.x) / 2
|
|
162
|
-
textY = minY + Math.abs(startPoint.y - point.y) / 2 - 10
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
return { x: textX, y: textY }
|
|
166
|
-
},
|
|
167
|
-
select(event) {
|
|
168
|
-
clearAllSelectedComponents()
|
|
169
|
-
this.model.isSelected = true
|
|
170
|
-
this.setSelectedTransition(this.model)
|
|
171
|
-
},
|
|
172
|
-
startDrag(event, position) {
|
|
173
|
-
console.log('start dragging line')
|
|
174
|
-
this.setMouseDownPosition(getMousePosition(event))
|
|
175
|
-
this.setDraggerToMove({
|
|
176
|
-
owner: this.model,
|
|
177
|
-
position,
|
|
178
|
-
originStartJoint: this.model.startJoint,
|
|
179
|
-
originEndJoint: this.model.endJoint
|
|
180
|
-
})
|
|
181
|
-
},
|
|
182
|
-
endDrag() {
|
|
183
|
-
// this.setSe
|
|
184
|
-
},
|
|
185
|
-
showPropertiesEditor() {
|
|
186
|
-
if (this.model.endJoint.parent.type !== 'Decision') {
|
|
187
|
-
this.setPropertiesEditorFor('Transition')
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
</script>
|
|
193
|
-
<style scoped>
|
|
194
|
-
.transition{
|
|
195
|
-
stroke-width: 2;
|
|
196
|
-
stroke:#666;
|
|
197
|
-
fill: none;
|
|
198
|
-
cursor: pointer;
|
|
199
|
-
}
|
|
200
|
-
.selected{
|
|
201
|
-
stroke:red;
|
|
202
|
-
}
|
|
203
|
-
.transition-dragger{
|
|
204
|
-
stroke: red;
|
|
205
|
-
stroke-width: 1;
|
|
206
|
-
fill: white;
|
|
207
|
-
cursor:move;
|
|
208
|
-
}
|
|
209
|
-
.no-events{
|
|
210
|
-
pointer-events: none;
|
|
211
|
-
}
|
|
212
|
-
</style>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<g>
|
|
3
|
-
<path v-show="path" :d="path" class="virtual-transition" marker-end="url(#arrow)" />
|
|
4
|
-
</g>
|
|
5
|
-
</template>
|
|
6
|
-
<script>
|
|
7
|
-
import { getJoint } from '../util'
|
|
8
|
-
import { mapGetters } from 'vuex'
|
|
9
|
-
export default {
|
|
10
|
-
name: 'VirtualTransition',
|
|
11
|
-
props: {
|
|
12
|
-
toPosition: {
|
|
13
|
-
type: Object,
|
|
14
|
-
default: null
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
computed: {
|
|
18
|
-
...mapGetters('wfEditor', [
|
|
19
|
-
'startJoint'
|
|
20
|
-
]),
|
|
21
|
-
path() {
|
|
22
|
-
if (!this.startJoint) {
|
|
23
|
-
return null
|
|
24
|
-
}
|
|
25
|
-
const startJoint = getJoint(this.startJoint.parent, this.startJoint.position)
|
|
26
|
-
// 虚线的endJoint存的就是鼠标的当前位置,此时还没有连接到任何环节上
|
|
27
|
-
const endJoint = this.toPosition
|
|
28
|
-
return 'M' + startJoint.x + ' ' + startJoint.y + ' L' + endJoint.x + ' ' + endJoint.y
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
</script>
|
|
36
|
-
<style>
|
|
37
|
-
.virtual-transition{
|
|
38
|
-
stroke-width: 2;
|
|
39
|
-
stroke:#000;
|
|
40
|
-
stroke-dasharray: 2 2;
|
|
41
|
-
fill: none;
|
|
42
|
-
}
|
|
43
|
-
</style>
|