workflow-editor 0.9.66-dw → 0.9.66

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 (114) hide show
  1. package/lib/workflow-editor.css +1 -1
  2. package/lib/workflow-editor.umd.min.js +10 -10
  3. package/package.json +2 -2
  4. package/packages/index.js +34 -0
  5. package/packages/plugins/formValidatorUtil.js +528 -0
  6. package/packages/plugins/index.js +8 -0
  7. package/packages/workflow-editor/index.js +14 -0
  8. package/packages/workflow-editor/src/api.js +7 -0
  9. package/packages/workflow-editor/src/assets/wf-editor-icons.js +2 -0
  10. package/packages/workflow-editor/src/constant.js +8 -0
  11. package/packages/workflow-editor/src/json-object-templates/copy-task.js +67 -0
  12. package/packages/workflow-editor/src/json-object-templates/decision.js +11 -0
  13. package/packages/workflow-editor/src/json-object-templates/end.js +14 -0
  14. package/packages/workflow-editor/src/json-object-templates/fork.js +10 -0
  15. package/packages/workflow-editor/src/json-object-templates/human-decision.js +9 -0
  16. package/packages/workflow-editor/src/json-object-templates/human-task.js +199 -0
  17. package/packages/workflow-editor/src/json-object-templates/join.js +10 -0
  18. package/packages/workflow-editor/src/json-object-templates/process.js +98 -0
  19. package/packages/workflow-editor/src/json-object-templates/start.js +13 -0
  20. package/packages/workflow-editor/src/json-object-templates/subprocess.js +30 -0
  21. package/packages/workflow-editor/src/json-object-templates/transition.js +26 -0
  22. package/packages/workflow-editor/src/main/admin-save-dialog.vue +66 -0
  23. package/packages/workflow-editor/src/main/canvas.vue +479 -0
  24. package/packages/workflow-editor/src/main/context-menu.vue +132 -0
  25. package/packages/workflow-editor/src/main/icon-svg.vue +32 -0
  26. package/packages/workflow-editor/src/main/selection-region.vue +66 -0
  27. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +38 -0
  28. package/packages/workflow-editor/src/main/tache-name-input.vue +19 -0
  29. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +35 -0
  30. package/packages/workflow-editor/src/main/toolbox.vue +60 -0
  31. package/packages/workflow-editor/src/main/wf-history-canvas.vue +302 -0
  32. package/packages/workflow-editor/src/process-json.js +622 -0
  33. package/packages/workflow-editor/src/process-service.js +31 -0
  34. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +531 -0
  35. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +276 -0
  36. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +34 -0
  37. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +239 -0
  38. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +47 -0
  39. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +241 -0
  40. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +23 -0
  41. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +116 -0
  42. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +75 -0
  43. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +125 -0
  44. package/packages/workflow-editor/src/properties-editors/common/notice.vue +98 -0
  45. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +179 -0
  46. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +83 -0
  47. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +65 -0
  48. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +355 -0
  49. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +63 -0
  50. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +148 -0
  51. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +233 -0
  52. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +386 -0
  53. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +209 -0
  54. package/packages/workflow-editor/src/properties-editors/common/variables.vue +135 -0
  55. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +90 -0
  56. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +155 -0
  57. package/packages/workflow-editor/src/properties-editors/copy-task.vue +80 -0
  58. package/packages/workflow-editor/src/properties-editors/decision.vue +90 -0
  59. package/packages/workflow-editor/src/properties-editors/fork.vue +72 -0
  60. package/packages/workflow-editor/src/properties-editors/human-decision.vue +44 -0
  61. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +60 -0
  62. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +156 -0
  63. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +291 -0
  64. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +249 -0
  65. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +392 -0
  66. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +241 -0
  67. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +220 -0
  68. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +204 -0
  69. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +59 -0
  70. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +207 -0
  71. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +390 -0
  72. package/packages/workflow-editor/src/properties-editors/human-task.vue +103 -0
  73. package/packages/workflow-editor/src/properties-editors/join.vue +44 -0
  74. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +273 -0
  75. package/packages/workflow-editor/src/properties-editors/process/events.vue +76 -0
  76. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +60 -0
  77. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +95 -0
  78. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +28 -0
  79. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +81 -0
  80. package/packages/workflow-editor/src/properties-editors/process.vue +109 -0
  81. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +187 -0
  82. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +26 -0
  83. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +206 -0
  84. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +64 -0
  85. package/packages/workflow-editor/src/properties-editors/subprocess.vue +79 -0
  86. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +53 -0
  87. package/packages/workflow-editor/src/properties-editors/transition.vue +74 -0
  88. package/packages/workflow-editor/src/properties-editors/user-condition.js +177 -0
  89. package/packages/workflow-editor/src/store/getters.js +27 -0
  90. package/packages/workflow-editor/src/store/workflow-editor.js +125 -0
  91. package/packages/workflow-editor/src/taches/common-methods.js +21 -0
  92. package/packages/workflow-editor/src/taches/copy-task.vue +99 -0
  93. package/packages/workflow-editor/src/taches/custom-task.vue +88 -0
  94. package/packages/workflow-editor/src/taches/decision.vue +102 -0
  95. package/packages/workflow-editor/src/taches/end.vue +76 -0
  96. package/packages/workflow-editor/src/taches/fork.vue +102 -0
  97. package/packages/workflow-editor/src/taches/human-decision.vue +102 -0
  98. package/packages/workflow-editor/src/taches/human-task.vue +113 -0
  99. package/packages/workflow-editor/src/taches/join.vue +91 -0
  100. package/packages/workflow-editor/src/taches/joint.vue +177 -0
  101. package/packages/workflow-editor/src/taches/start.vue +76 -0
  102. package/packages/workflow-editor/src/taches/subprocess.vue +99 -0
  103. package/packages/workflow-editor/src/taches/tache-resizer.vue +80 -0
  104. package/packages/workflow-editor/src/transitions/broken-line.vue +91 -0
  105. package/packages/workflow-editor/src/transitions/curve-line.vue +91 -0
  106. package/packages/workflow-editor/src/transitions/straight-line.vue +26 -0
  107. package/packages/workflow-editor/src/transitions/transition.vue +212 -0
  108. package/packages/workflow-editor/src/transitions/virtual-transition.vue +43 -0
  109. package/packages/workflow-editor/src/util.js +493 -0
  110. package/packages/workflow-editor/src/workflow-editor.vue +605 -0
  111. package/packages/workflow-editor/src/workflow-history.vue +153 -0
  112. package/src/i18n/i18n.js +1 -1
  113. package/src/i18n/langs/cn.js +6 -1
  114. package/src/i18n/langs/en.js +6 -1
@@ -0,0 +1,153 @@
1
+ <template>
2
+ <div
3
+ ref="wfEditor"
4
+ style="position:relative;height:100%;"
5
+ >
6
+ <div
7
+ class="main"
8
+ >
9
+ <section>
10
+ <wf-history-canvas
11
+ onselectstart="return false"
12
+ :process="process"
13
+ :histories="histories"
14
+ :current-tasks="currentTasks"
15
+ :all-process-i18n="allProcessI18n"
16
+ :show-history="true"
17
+ class="canvas"
18
+ @contextmenu.native.prevent="showContextMenu"
19
+ />
20
+ </section>
21
+ </div>
22
+ </div>
23
+ </template>
24
+ <script>
25
+ import './assets/wf-editor-icons.js'
26
+ import { mapGetters, mapMutations } from 'vuex'
27
+ import { removeTextProperty, initializeProcessData, processTemplate } from './util'
28
+ import WfHistoryCanvas from './main/wf-history-canvas'
29
+ import convert from 'xml-js'
30
+ import ApiJs from './api'
31
+ export default {
32
+ name: 'WorkflowHistory',
33
+ components: {
34
+ WfHistoryCanvas
35
+ },
36
+ props: {
37
+ // 实例id
38
+ id: {
39
+ type: Number,
40
+ default: null
41
+ }
42
+ },
43
+ data: function() {
44
+ return {
45
+ process: null,
46
+ histories: [],
47
+ currentTasks: [],
48
+ allProcessI18n: null
49
+ }
50
+ },
51
+ computed: {
52
+ ...mapGetters(
53
+ 'wfEditor', ['componentToDraw', 'taches', 'transitions', 'contextMenuVisible']
54
+ ),
55
+ ...mapGetters([
56
+ 'sidebar'
57
+ ])
58
+
59
+ },
60
+ watch: {
61
+
62
+ },
63
+ created: function() {
64
+ this.showHistory()
65
+ },
66
+ mounted: function() {
67
+
68
+ },
69
+ methods: {
70
+ ...ApiJs,
71
+ ...mapMutations('wfEditor', [
72
+ 'setComponentToDraw',
73
+ 'clearCanvas',
74
+ 'setContextMenuVisible',
75
+ 'setProcessI18n'
76
+ ]),
77
+ showHistory() {
78
+ // 打开或新建流程图时先清空画布,开发过程中代码热更新的时候可以避免节点重复
79
+ this.clearCanvas()
80
+ if (this.id) {
81
+ this.$http.get(this.baseAPI + '/wf-editor/i18n-settings/get-bundle-info?workflowId=' + this.id).then(processI18n => {
82
+ this.allProcessI18n = processI18n
83
+ const url = this.baseAPI + '/wf-editor/instance-histories/' + this.id
84
+ this.$http.get(url).then(data => {
85
+ this.initProcessByXml(data.xml)
86
+ let mainBundleCode
87
+ if (data.histories && data.histories.length > 0) {
88
+ mainBundleCode = data.histories[0].bundleCode
89
+ }
90
+ if (!mainBundleCode && data.currentTasks && data.currentTasks.length > 0) {
91
+ mainBundleCode = data.currentTasks[0].bundleCode
92
+ }
93
+ if (mainBundleCode) {
94
+ this.setProcessI18n(processI18n[mainBundleCode])
95
+ }
96
+ this.histories = data.histories
97
+ this.currentTasks = data.currentTasks
98
+ })
99
+ })
100
+ } else {
101
+ this.process = processTemplate.newProcess()
102
+ initializeProcessData(this.process)
103
+ }
104
+ },
105
+ showContextMenu(event) {
106
+
107
+ },
108
+ initProcessByXml(xml) {
109
+ const options = { nativeType: true, attributesKey: 'attr', compact: true, ignoreComment: true, spaces: 4 }
110
+ const processObj = convert.xml2js(xml, options)
111
+ removeTextProperty(processObj.process)
112
+ this.process = processObj.process
113
+
114
+ initializeProcessData(this.process)
115
+ }
116
+ }
117
+ }
118
+ </script>
119
+ <style lang="scss" scoped>
120
+ .main{
121
+ position: relative;
122
+ display:flex;
123
+ height: 100%;
124
+ width:100%;
125
+ }
126
+ .canvas-container{
127
+ position: relative;
128
+ // display:flex;
129
+ height: 100%;
130
+ width:100%;
131
+ }
132
+
133
+ section{
134
+ overflow: hidden;
135
+ width:100%;
136
+ height:100%;
137
+ padding: 0;
138
+ // min-height: 500px;
139
+ }
140
+ .canvas{
141
+ overflow: auto;
142
+ height:100%;
143
+ // border:1px solid red;
144
+ // background: #ffffff;
145
+ padding: 0;
146
+ min-height: 500px;
147
+
148
+ }
149
+ .canvas /deep/ .draggable{
150
+ cursor: default;
151
+ }
152
+ </style>
153
+
package/src/i18n/i18n.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import Vue from 'vue'
2
- import locale from '@gcommon/gcommon-ui/lib/locale'
2
+ import locale from 'element-ui/lib/locale'
3
3
  import VueI18n from 'vue-i18n'
4
4
  import en from './langs/en'
5
5
  import cn from './langs/cn'
@@ -37,6 +37,7 @@ const cn = {
37
37
  requiredAndMustBeDecimal: '必填且必须为小数',
38
38
  mustFill: '必填',
39
39
  recordLine: '第{row}行记录',
40
+ pageRecordLine: '第{pageNum}页第{row}行记录',
40
41
  currentHandlingPersonnel: '当前办理人员',
41
42
  pleaseSelect: '请选择',
42
43
  pleaseSelectARow: '请选中一行',
@@ -223,6 +224,8 @@ const cn = {
223
224
  handlingYyThePersonnelOfTheDepartmentOfTheInitiator: '发起人所在部门人员办理',
224
225
  personnelOfTheDepartmentWhereTheInitiatorWorksParticipateInTheHandling: '发起人所在部门人员参与办理',
225
226
  selectSpecificHandler: '选择具体办理人',
227
+ selectOneFromDept: '同一部门仅需一人办理',
228
+ generateOneInstanceFromDept: '同一部门生成一个实例',
226
229
  selectionMethod: '选择方式',
227
230
  manualSelection: '人工选择',
228
231
  autoSelect: '自动选择',
@@ -311,7 +314,9 @@ const cn = {
311
314
  getSubprocessEntityBeanInfo: '该bean需要实现接口tech.imatrix.wf.core.OnStartingSubProcess',
312
315
  isNull: '等于Null',
313
316
  isNotNull: '不等于Null',
314
- defaultMailTemplate: '默认邮件模板'
317
+ defaultMailTemplate: '默认邮件模板',
318
+ trustTask: '委托任务',
319
+ subprocessIsSharedForm: '主子流程共用表单'
315
320
  },
316
321
  // 环节属性
317
322
  task: {
@@ -37,6 +37,7 @@ const en = {
37
37
  requiredAndMustBeDecimal: 'Required And Must Be Decimal',
38
38
  mustFill: 'Must Fill',
39
39
  recordLine: 'Record Line {row}',
40
+ pageRecordLine: 'Record in row {row} of page {pageNum}',
40
41
  currentHandlingPersonnel: 'Current Handling Personnel',
41
42
  pleaseSelect: 'Please Select',
42
43
  pleaseSelectARow: 'Please Select A Row',
@@ -223,6 +224,8 @@ const en = {
223
224
  handlingYyThePersonnelOfTheDepartmentOfTheInitiator: 'Handling By The Personnel Of The Department Of The Initiator',
224
225
  personnelOfTheDepartmentWhereTheInitiatorWorksParticipateInTheHandling: 'Personnel Of The Department Where The Initiator Works Participate In The Handling',
225
226
  selectSpecificHandler: 'Select Specific Handler',
227
+ selectOneFromDept: 'Only one person is required to handle the same department',
228
+ generateOneInstanceFromDept: 'Generate an instance from the same department',
226
229
  selectionMethod: 'Selection Method',
227
230
  manualSelection: 'Manual Selection',
228
231
  autoSelect: 'Auto Select',
@@ -311,7 +314,9 @@ const en = {
311
314
  getSubprocessEntityBeanInfo: 'The bean needs to implement the interface "tech.imatrix.wf.core.OnStartingSubProcess"',
312
315
  isNull: 'Is Null',
313
316
  isNotNull: 'Is Not Null',
314
- defaultMailTemplate: 'Default Mail Template'
317
+ defaultMailTemplate: 'Default Mail Template',
318
+ trustTask: 'Trust Task',
319
+ subprocessIsSharedForm: 'Main process and subprocess shared form'
315
320
  },
316
321
  // 环节属性
317
322
  task: {