workflow-editor 0.0.81-up-tmp12 → 0.0.81-up-tmp15

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.
Files changed (126) hide show
  1. package/es/style.css +143 -143
  2. package/lib/style.css +146 -146
  3. package/package.json +7 -1
  4. package/.prettierrc.json +0 -9
  5. package/index.html +0 -13
  6. package/packages/index.js +0 -50
  7. package/packages/plugins/formValidatorUtil.js +0 -723
  8. package/packages/plugins/index.js +0 -8
  9. package/packages/workflow-editor/index.js +0 -14
  10. package/packages/workflow-editor/src/api.js +0 -7
  11. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  12. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  13. package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
  14. package/packages/workflow-editor/src/constant.js +0 -8
  15. package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
  16. package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
  17. package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
  18. package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
  19. package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
  20. package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
  21. package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
  22. package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
  23. package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
  24. package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
  25. package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
  26. package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
  27. package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
  28. package/packages/workflow-editor/src/main/canvas.vue +0 -493
  29. package/packages/workflow-editor/src/main/context-menu.vue +0 -147
  30. package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
  31. package/packages/workflow-editor/src/main/selection-region.vue +0 -66
  32. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
  33. package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
  34. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
  35. package/packages/workflow-editor/src/main/toolbox.vue +0 -60
  36. package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
  37. package/packages/workflow-editor/src/process-json.js +0 -624
  38. package/packages/workflow-editor/src/process-service.js +0 -68
  39. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
  40. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
  41. package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
  42. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
  43. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
  44. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
  45. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -268
  46. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
  47. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
  48. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
  49. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
  50. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
  51. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
  52. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
  53. package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
  54. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
  55. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
  56. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
  57. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
  58. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
  59. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
  60. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
  61. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
  62. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
  63. package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -139
  64. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
  65. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
  66. package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
  67. package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
  68. package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
  69. package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
  70. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
  71. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
  72. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
  73. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
  74. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
  75. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
  76. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
  77. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
  78. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
  79. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
  80. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
  81. package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -107
  82. package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
  83. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
  84. package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
  85. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
  86. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
  87. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
  88. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
  89. package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
  90. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
  91. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
  92. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
  93. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
  94. package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
  95. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
  96. package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
  97. package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
  98. package/packages/workflow-editor/src/store/getters.js +0 -33
  99. package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
  100. package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
  101. package/packages/workflow-editor/src/taches/common-methods.js +0 -21
  102. package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
  103. package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
  104. package/packages/workflow-editor/src/taches/decision.vue +0 -102
  105. package/packages/workflow-editor/src/taches/end.vue +0 -76
  106. package/packages/workflow-editor/src/taches/fork.vue +0 -102
  107. package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
  108. package/packages/workflow-editor/src/taches/human-task.vue +0 -113
  109. package/packages/workflow-editor/src/taches/join.vue +0 -91
  110. package/packages/workflow-editor/src/taches/joint.vue +0 -177
  111. package/packages/workflow-editor/src/taches/start.vue +0 -76
  112. package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
  113. package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
  114. package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
  115. package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
  116. package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
  117. package/packages/workflow-editor/src/transitions/transition.vue +0 -209
  118. package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
  119. package/packages/workflow-editor/src/util.js +0 -499
  120. package/packages/workflow-editor/src/workflow-editor.vue +0 -852
  121. package/packages/workflow-editor/src/workflow-history.vue +0 -153
  122. package/public/vite.svg +0 -1
  123. package/src/i18n/i18n.js +0 -16
  124. package/src/i18n/langs/cn.js +0 -521
  125. package/src/i18n/langs/en.js +0 -529
  126. package/vite.config.js +0 -103
@@ -1,309 +0,0 @@
1
- <template>
2
- <div ref="svgContainer" style="position:relative">
3
- <svg
4
- id="svg"
5
- width="2000"
6
- height="2000"
7
- @mousedown="mousedown"
8
- @mousemove="mousemove"
9
- @mouseup="mouseup"
10
- @mouseleave="mouseleave"
11
- >
12
- <defs>
13
- <marker id="arrow" markerWidth="10" markerHeight="10" refX="6" refY="2" orient="auto" markerUnits="strokeWidth">
14
- <path d="M0,0 L0,4 L6,2 z" fill="#666" />
15
- </marker>
16
- </defs>
17
- <component
18
- :is="tache.type"
19
- v-for="tache in taches"
20
- :key="tache.id"
21
- :model="tache"
22
- :class="[getTacheClass(tache)]"
23
- :display-mode="tache.displayMode"
24
- @mouseenter.native="showTacheHistoryTooltip(tache,$event)"
25
- @mouseleave.native="hideTacheHistoryTooltip(tache)"
26
- @mousemove.native="updateTacheHistoryTooltipPosition"
27
- @click.native="showSubprocessHistory(tache)"
28
- />
29
- <!-- <transition
30
- v-for="transition in transitions"
31
- :key="transition.id"
32
- :model="transition"
33
- /> -->
34
- <!--必须这样写,否则线条不显示-->
35
- <component :is="'transition'"
36
- v-for="transition in transitions"
37
- :key="transition.id"
38
- :model="transition"/>
39
- </svg>
40
- <tache-history-tooltip v-if="showHistory&&tacheHistoryInfo" :style="tooltipPosition" :content="tacheHistoryInfo" />
41
- <tache-subprocess-history-dialog v-if="showSubprocessDialog" :workflow-id="subWorkflowId" @close="closeSubprocessHistory" />
42
- </div>
43
- </template>
44
-
45
- <script>
46
- import Start from '../taches/start'
47
- import End from '../taches/end'
48
- import HumanTask from '../taches/human-task'
49
- import Decision from '../taches/decision'
50
- import Subprocess from '../taches/subprocess'
51
- import CustomTask from '../taches/custom-task'
52
- import Fork from '../taches/fork'
53
- import Join from '../taches/join'
54
- import HumanDecision from '../taches/human-decision'
55
- import CopyTask from '../taches/copy-task'
56
- import AutoTask from '../taches/auto-task'
57
- import Transition from '../transitions/transition'
58
- import TacheHistoryTooltip from './tache-history-tooltip'
59
- import { mapGetters } from 'vuex'
60
- import { getMousePosition } from '../util'
61
- import { i18nOperation } from 'agilebuilder-ui'
62
- import { getLanguageWithLocale } from 'agilebuilder-ui'
63
- import TacheSubprocessHistoryDialog from './tache-subprocess-history-dialog'
64
-
65
- export default {
66
- name: 'WfHistoryCanvas',
67
- components: {
68
- Start,
69
- End,
70
- HumanTask,
71
- Decision,
72
- Subprocess,
73
- CustomTask,
74
- Fork,
75
- Join,
76
- HumanDecision,
77
- CopyTask,
78
- Transition,
79
- TacheHistoryTooltip,
80
- TacheSubprocessHistoryDialog,
81
- AutoTask
82
- },
83
- props: {
84
- process: {
85
- type: Object,
86
- default: null
87
- },
88
- histories: {
89
- type: Array,
90
- default: null
91
- },
92
- currentTasks: {
93
- type: Array,
94
- default: null
95
- },
96
- // 主子流程的国际化配置
97
- allProcessI18n: {
98
- type: Object,
99
- default: null
100
- }
101
- },
102
- data: function() {
103
- return {
104
- showHistory: false,
105
- tooltipPosition: null,
106
- tacheHistoryInfo: null,
107
- showSubprocessDialog: false,
108
- subWorkflowId: null // 子流程最新实例
109
- }
110
- },
111
- computed: {
112
- ...mapGetters('wfEditor', [
113
- 'taches',
114
- 'transitions',
115
- 'processI18n'
116
- ])
117
- // classifiedTaches() {
118
- // this.taches.map(tache => {
119
- // this.tagPassedTache(tache)
120
- // this.tagCurrentTache(tache)
121
- // })
122
- // return this.taches
123
- // }
124
-
125
- },
126
- mounted: function() {
127
-
128
- },
129
- methods: {
130
- getTacheClass(tache) {
131
- // 先判断是否为当前节点 (流程中一个节点可能走多次,这个节点会同时出现在当前和历史节点中)
132
- if (this.getCurrentTache(tache)) {
133
- return 'current-tache'
134
- } else {
135
- const passTache = this.getPassedTache(tache)
136
- if (passTache && passTache.current) {
137
- // 子流程时会进入该判断
138
- return 'current-tache'
139
- } else if (passTache) {
140
- return 'passed-tache'
141
- } else {
142
- return ''
143
- }
144
- }
145
- },
146
- getPassedTache(tache) {
147
- let result = null
148
- for (const item of this.histories) {
149
- if ((item.historyType === 'PROCESS_START' && tache.ref.attr.id && tache.ref.attr.id === 'start') ||
150
- (item.historyType === 'PROCESS_END' && tache.ref.attr.id && tache.ref.attr.id === 'end') ||
151
- (tache.ref.attr.name && item.taskName && item.taskName === tache.ref.attr.name)) {
152
- result = item
153
- break
154
- }
155
- }
156
- return result
157
- },
158
- // 获得当前环节的流转历史信息,多条件流转历史记录之间换行显示。因为一个环节可能会走多次
159
- getPassedTacheHistories(tache) {
160
- const result = []
161
- for (const item of this.histories) {
162
- if ((item.historyType === 'PROCESS_START' && tache.ref.attr.id && tache.ref.attr.id === 'start') ||
163
- (item.historyType === 'PROCESS_END' && tache.ref.attr.id && tache.ref.attr.id === 'end') ||
164
- (tache.ref.attr.name && item.taskName && item.taskName === tache.ref.attr.name)) {
165
- result.push(this.i18nOperation(item))
166
- }
167
- }
168
- return result
169
- },
170
- i18nOperation(item) {
171
- let oneProcessI18n
172
- let processNameI18n
173
- const language = getLanguageWithLocale()
174
- const bundleCode = item.bundleCode
175
- if (bundleCode && bundleCode !== '' && this.processI18n) {
176
- oneProcessI18n = this.processI18n[bundleCode]
177
- }
178
- if (oneProcessI18n && oneProcessI18n['processName']) {
179
- processNameI18n = oneProcessI18n['processName'][language]
180
- }
181
- return i18nOperation(item, processNameI18n, oneProcessI18n, language)
182
- },
183
- getCurrentTache(tache) {
184
- let result = null
185
- for (const item of this.currentTasks) {
186
- if (item.taskName === tache.ref.attr.name) {
187
- result = item
188
- break
189
- }
190
- }
191
- return result
192
- },
193
- getTacheHistory(tache) {
194
- let content = null
195
- let historyText
196
- const histories = this.getPassedTacheHistories(tache)
197
- if (histories && histories.length > 0) {
198
- historyText = histories.join('</br>')
199
- }
200
- const current = this.getCurrentTache(tache)
201
- if (current) {
202
- content = this.$t('workflowEditorMessage.currentHandlingPersonnel') + ': ' + current.transactionResult
203
- if (historyText) {
204
- content += '</br>' + historyText
205
- }
206
- } else {
207
- content = historyText
208
- }
209
- return content
210
- },
211
- forbidSelection() {
212
- return false
213
- },
214
- mousedown(event) {
215
- console.log('mousedown')
216
- },
217
- mousemove(event) {
218
- },
219
- // 有些组件上的mouseup,会传播到canvas上来
220
- mouseup(event) {
221
-
222
- },
223
- mouseleave(event) {
224
-
225
- },
226
-
227
- endDrag(event) {
228
-
229
- },
230
- showTacheHistoryTooltip(tache, event) {
231
- this.tacheHistoryInfo = this.getTacheHistory(tache)
232
- this.showHistory = true
233
- },
234
- hideTacheHistoryTooltip() {
235
- // this.tacheHistoryInfo = null
236
- this.showHistory = false
237
- },
238
- updateTacheHistoryTooltipPosition(event) {
239
- const position = getMousePosition(event)
240
- this.tooltipPosition = {
241
- // 提示框的位置要偏离鼠标指针5px,防止提示框不停闪烁
242
- left: position.x + 5 + 'px',
243
- top: position.y + 5 + 'px'
244
- }
245
- },
246
- // 查看子流程流转历史
247
- showSubprocessHistory(tache) {
248
- const history = this.getPassedTache(tache)
249
- if (history && history.hasChildren !== undefined && history.hasChildren === true) {
250
- if (history.children && history.children.length > 0) {
251
- this.subWorkflowId = history.children[0].workflowId
252
- }
253
- this.showSubprocessDialog = true
254
- }
255
- },
256
- closeSubprocessHistory() {
257
- this.showSubprocessDialog = false
258
- }
259
- }
260
- }
261
- </script>
262
- <style >
263
- #svg{
264
- /* border:1px solid red; */
265
- background: white;
266
- background-image:
267
- linear-gradient(rgba(242,242,242,.7) 1px, transparent 0),
268
- linear-gradient(90deg, rgba(242,242,242,.7) 1px, transparent 0),
269
- linear-gradient(#e5e5e5 1px, transparent 0),
270
- linear-gradient(90deg,#e5e5e5 1px, transparent 0);
271
- background-size:
272
- 15px 15px,
273
- 15px 15px,
274
- 75px 75px,
275
- 75px 75px;
276
- }
277
- g{
278
- font-size: 16px;
279
- }
280
- g text{
281
- dominant-baseline: middle;
282
- }
283
- .selected{
284
- fill: #fff;
285
- stroke: #f00;
286
- stroke-width: 2;
287
- }
288
- .task-tache{
289
- fill: #fff;
290
- stroke: #666;
291
- stroke-width: 2;
292
- }
293
- .passed-tache .task-tache{
294
- fill: green;
295
- stroke: green;
296
- stroke-width: 2;
297
- }
298
- .current-tache .task-tache{
299
- fill: red;
300
- stroke: red;
301
- stroke-width: 2;
302
- }
303
- .passed-tache text{
304
- fill:white;
305
- }
306
- .current-tache text{
307
- fill: white
308
- }
309
- </style>