workflow-editor 0.0.80-up → 0.0.81-up-tmp1

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 (175) hide show
  1. package/dist/index.full.min.js +3237 -0
  2. package/dist/style.css +1 -0
  3. package/es/_virtual/FileSaver.min.mjs +4 -0
  4. package/es/_virtual/___vite-browser-external.mjs +6 -0
  5. package/es/_virtual/__vite-browser-external.mjs +4 -0
  6. package/es/_virtual/_commonjsHelpers.mjs +30 -0
  7. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  8. package/es/_virtual/clipboard.mjs +4 -0
  9. package/es/_virtual/dayjs.min.mjs +4 -0
  10. package/es/_virtual/index.mjs +4 -0
  11. package/es/_virtual/nprogress.mjs +4 -0
  12. package/es/_virtual/prism.mjs +4 -0
  13. package/es/_virtual/sax.mjs +4 -0
  14. package/es/_virtual/string_decoder.mjs +4 -0
  15. package/es/_virtual/tinymce.mjs +4 -0
  16. package/es/_virtual/weekOfYear.mjs +4 -0
  17. package/es/index.mjs +20 -0
  18. package/es/plugins/formValidatorUtil.mjs +391 -0
  19. package/es/plugins/index.mjs +9 -0
  20. package/es/style.css +1 -0
  21. package/es/vite.svg +1 -0
  22. package/es/workflow-editor/index.mjs +14 -0
  23. package/lib/_virtual/FileSaver.min.cjs +1 -0
  24. package/lib/_virtual/___vite-browser-external.cjs +1 -0
  25. package/lib/_virtual/__vite-browser-external.cjs +1 -0
  26. package/lib/_virtual/_commonjsHelpers.cjs +1 -0
  27. package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
  28. package/lib/_virtual/clipboard.cjs +1 -0
  29. package/lib/_virtual/dayjs.min.cjs +1 -0
  30. package/lib/_virtual/index.cjs +1 -0
  31. package/lib/_virtual/nprogress.cjs +1 -0
  32. package/lib/_virtual/prism.cjs +1 -0
  33. package/lib/_virtual/sax.cjs +1 -0
  34. package/lib/_virtual/string_decoder.cjs +1 -0
  35. package/lib/_virtual/tinymce.cjs +1 -0
  36. package/lib/_virtual/weekOfYear.cjs +1 -0
  37. package/lib/index.cjs +1 -0
  38. package/lib/plugins/formValidatorUtil.cjs +1 -0
  39. package/lib/plugins/index.cjs +1 -0
  40. package/lib/style.css +1 -0
  41. package/lib/workflow-editor/index.cjs +1 -0
  42. package/package.json +5 -3
  43. package/vite.config.js +44 -10
  44. package/lib/401-d594cba0.js +0 -101
  45. package/lib/404-c88c55f1.js +0 -26
  46. package/lib/authredirect-ae6e75b4.js +0 -10
  47. package/lib/iframe-page-f8737ba6.js +0 -33
  48. package/lib/index-369eae4a.js +0 -13
  49. package/lib/index-9b4d762a.js +0 -31387
  50. package/lib/tab-content-iframe-index-5455fdb0.js +0 -33
  51. package/lib/tab-content-index-5d75237c.js +0 -1241
  52. package/lib/tache-subprocess-history-26084654.js +0 -56
  53. package/lib/workflow-editor.css +0 -1
  54. package/lib/workflow-editor.js +0 -5
  55. package/lib/workflow-editor.umd.cjs +0 -85
  56. package/packages/index.js +0 -34
  57. package/packages/plugins/formValidatorUtil.js +0 -723
  58. package/packages/plugins/index.js +0 -8
  59. package/packages/workflow-editor/index.js +0 -14
  60. package/packages/workflow-editor/src/api.js +0 -7
  61. package/packages/workflow-editor/src/assets/tab-select.png +0 -0
  62. package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
  63. package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
  64. package/packages/workflow-editor/src/constant.js +0 -8
  65. package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
  66. package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
  67. package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
  68. package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
  69. package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
  70. package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
  71. package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
  72. package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
  73. package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
  74. package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
  75. package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
  76. package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
  77. package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
  78. package/packages/workflow-editor/src/main/canvas.vue +0 -493
  79. package/packages/workflow-editor/src/main/context-menu.vue +0 -147
  80. package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
  81. package/packages/workflow-editor/src/main/selection-region.vue +0 -66
  82. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
  83. package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
  84. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
  85. package/packages/workflow-editor/src/main/toolbox.vue +0 -60
  86. package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
  87. package/packages/workflow-editor/src/process-json.js +0 -624
  88. package/packages/workflow-editor/src/process-service.js +0 -69
  89. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
  90. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
  91. package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
  92. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
  93. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
  94. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
  95. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -239
  96. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
  97. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
  98. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
  99. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
  100. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
  101. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
  102. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
  103. package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
  104. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
  105. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
  106. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
  107. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
  108. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
  109. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
  110. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
  111. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
  112. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
  113. package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -138
  114. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
  115. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
  116. package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
  117. package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
  118. package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
  119. package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
  120. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
  121. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
  122. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
  123. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
  124. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
  125. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
  126. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
  127. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
  128. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
  129. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
  130. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
  131. package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -116
  132. package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
  133. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
  134. package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
  135. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
  136. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
  137. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
  138. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
  139. package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
  140. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
  141. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
  142. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
  143. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
  144. package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
  145. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
  146. package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
  147. package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
  148. package/packages/workflow-editor/src/store/getters.js +0 -33
  149. package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
  150. package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
  151. package/packages/workflow-editor/src/taches/common-methods.js +0 -21
  152. package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
  153. package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
  154. package/packages/workflow-editor/src/taches/decision.vue +0 -102
  155. package/packages/workflow-editor/src/taches/end.vue +0 -76
  156. package/packages/workflow-editor/src/taches/fork.vue +0 -102
  157. package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
  158. package/packages/workflow-editor/src/taches/human-task.vue +0 -113
  159. package/packages/workflow-editor/src/taches/join.vue +0 -91
  160. package/packages/workflow-editor/src/taches/joint.vue +0 -177
  161. package/packages/workflow-editor/src/taches/start.vue +0 -76
  162. package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
  163. package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
  164. package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
  165. package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
  166. package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
  167. package/packages/workflow-editor/src/transitions/transition.vue +0 -209
  168. package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
  169. package/packages/workflow-editor/src/util.js +0 -499
  170. package/packages/workflow-editor/src/workflow-editor.vue +0 -852
  171. package/packages/workflow-editor/src/workflow-history.vue +0 -153
  172. package/src/i18n/i18n.js +0 -16
  173. package/src/i18n/langs/cn.js +0 -521
  174. package/src/i18n/langs/en.js +0 -529
  175. /package/{public → dist}/vite.svg +0 -0
@@ -1,320 +0,0 @@
1
- <template>
2
- <div style="overflow: auto;width: 100%;">
3
- <el-row>
4
- <el-button type="primary" size="small" plain icon="CirclePlus" @click="add">
5
- {{ $t('workflowEditorPublicModel.add') }}
6
- </el-button>
7
- <el-button type="primary" size="small" plain icon="ArrowRight" @click="insert">
8
- {{ $t('workflowEditorPublicModel.insert') }}
9
- </el-button>
10
- <!-- <el-button type="primary" size="small" plain @click="modify">
11
- 修改
12
- </el-button> -->
13
- <el-button type="primary" size="small" plain icon="Delete" @click="remove">
14
- {{ $t('workflowEditorPublicModel.delete') }}
15
- </el-button>
16
- <el-button type="primary" size="small" plain icon="View" @click="view">
17
- {{ $t('workflowEditorPublicModel.viewConditions') }}
18
- </el-button>
19
- </el-row>
20
- <el-table
21
- ref="table"
22
- :data="tableData"
23
- row-key="id"
24
- border
25
- style="width: 100%; padding-top: 10px"
26
- highlight-current-row
27
- @current-change="handleCurrentChange"
28
- >
29
- <el-table-column prop="leftBracket" label="(" width="90">
30
- <template v-slot="scope">
31
- <el-select v-model="scope.row.leftBracket" placeholder="" @focus="selectRow(scope.row)">
32
- <el-option label="" value="" />
33
- <el-option label="(" value="(" />
34
- <el-option label="((" value="((" />
35
- <el-option label="(((" value="(((" />
36
- </el-select>
37
- </template>
38
- </el-table-column>
39
- <el-table-column :label="$t('workflowEditor.common.fieldName')" width="200">
40
- <template v-slot="scope">
41
- <el-input :value="format(scope.row.key)" @click="selectField(scope.row)" />
42
- </template>
43
- </el-table-column>
44
- <el-table-column :label="$t('workflowEditor.common.operator')" width="130">
45
- <template v-slot="scope">
46
- <el-select v-model="scope.row.operator" placeholder="" @focus="selectRow(scope.row)">
47
- <el-option
48
- v-for="option in getOperatorOptions(scope.row.key)"
49
- :key="option.name"
50
- :label="option.label"
51
- :value="option.name"
52
- />
53
- </el-select>
54
- </template>
55
- </el-table-column>
56
- <el-table-column :label="$t('workflowEditor.common.value')">
57
- <template v-slot="scope">
58
- <el-input
59
- v-if="scope.row.key.indexOf('${field[') >= 0 || isTransitionOtherField(scope.row.key)"
60
- v-model.trim="scope.row.value"
61
- />
62
- <el-select
63
- v-else-if="scope.row.key === '${approvalResult}'"
64
- v-model.trim="scope.row.value"
65
- >
66
- <el-option value="同意" :label="$t('workflowEditorPublicModel.agree')" />
67
- <el-option value="不同意" :label="$t('workflowEditorPublicModel.disagree')" />
68
- </el-select>
69
- <el-input
70
- v-else
71
- :value="format(scope.row.value, scope.row)"
72
- readonly
73
- @click="selectValue"
74
- />
75
- </template>
76
- </el-table-column>
77
- <el-table-column prop="rightBracket" label=")" width="90" @focus="selectRow(scope.row)">
78
- <template v-slot="scope">
79
- <el-select v-model="scope.row.rightBracket" placeholder="">
80
- <el-option label="" value="" />
81
- <el-option label=")" value=")" />
82
- <el-option label="))" value="))" />
83
- <el-option label=")))" value=")))" />
84
- </el-select>
85
- </template>
86
- </el-table-column>
87
- <el-table-column
88
- prop="logicOperator"
89
- :label="$t('workflowEditorPublicModel.andOr')"
90
- width="110"
91
- >
92
- <template v-slot="scope">
93
- <el-select
94
- v-model="scope.row.logicOperator"
95
- :placeholder="$t('workflowEditorMessage.pleaseSelect')"
96
- @focus="selectRow(scope.row)"
97
- >
98
- <el-option
99
- :label="$t('workflowEditor.process.perhaps')"
100
- value="condition.operator.or"
101
- />
102
- <el-option :label="$t('workflowEditor.process.also')" value="condition.operator.and" />
103
- </el-select>
104
- </template>
105
- </el-table-column>
106
- </el-table>
107
- <value-selection-dialog
108
- v-if="currentInput"
109
- :title="valueDialogTitle"
110
- :show-organization="showOrganization"
111
- :standard-fields="availableStandardFields"
112
- :org-type="orgType"
113
- @close="closeValueDialog"
114
- />
115
- </div>
116
- </template>
117
- <script>
118
- import {
119
- getFieldLabel,
120
- parseCondition,
121
- generateCondition,
122
- displayCondition,
123
- getRelatedStandardFields,
124
- getOperators,
125
- getStandardFieldsByTacheType,
126
- isTransitionOtherField
127
- } from './additional-condition-utils'
128
- import { standardFields } from './additional-condition-utils'
129
- import ValueSelectionDialog from '../common/value-selection-dialog'
130
- import { mapGetters } from 'vuex'
131
- export default {
132
- name: 'AdditionalCondition',
133
- components: {
134
- ValueSelectionDialog
135
- },
136
- props: {
137
- modelValue: {
138
- type: String,
139
- default: null
140
- },
141
- isTransition: {
142
- type: Boolean,
143
- default: false
144
- }
145
- },
146
- data() {
147
- const tableData = []
148
- const count = parseCondition(tableData, this.modelValue)
149
-
150
- return {
151
- standardFields,
152
- tableData,
153
- count: count,
154
- currentRow: null,
155
- currentInput: null,
156
- options: [],
157
- valueDialogTitle: null,
158
- showOrganization: true,
159
- orgType: null
160
- }
161
- },
162
- computed: {
163
- ...mapGetters('wfEditor', ['formFields']),
164
- availableStandardFields() {
165
- if (this.currentInput === 'key') {
166
- return getStandardFieldsByTacheType(this.isTransition)
167
- } else {
168
- return getRelatedStandardFields(this.currentRow.key)
169
- }
170
- }
171
- },
172
- mounted() {
173
- if (this.tableData.length > 0) {
174
- this.$refs.table.setCurrentRow(this.tableData[this.tableData.length - 1])
175
- }
176
- this.$watch(
177
- 'tableData',
178
- function (newVal, oldVal) {
179
- // this.$emit('input', generateCondition(this.tableData))
180
- this.$emit('update:modelValue', generateCondition(this.tableData))
181
- },
182
- {
183
- deep: true
184
- }
185
- )
186
- },
187
- methods: {
188
- format(value, row) {
189
- console.log('row', row)
190
- if (value === '' || value === undefined || value === null) return ''
191
- return getFieldLabel(value)
192
- },
193
- getOperatorOptions(fieldName) {
194
- // console.log('---getOperatorOptions---fieldName=', fieldName)
195
- return getOperators(fieldName)
196
- },
197
- selectRow(row) {
198
- this.$refs.table.setCurrentRow(row)
199
- },
200
- openValueDialog(row) {
201
- this.showValueDialog = true
202
- this.selectRow(row)
203
- },
204
- closeValueDialog(selectedValue) {
205
- if (selectedValue !== undefined && selectedValue !== '') {
206
- // 改变字段时需要清空value
207
- if (this.currentInput === 'key' && this.currentRow.key !== selectedValue) {
208
- this.currentRow.operator = ''
209
- this.currentRow.value = ''
210
- }
211
- // currentInput为key或者value
212
- this.currentRow[this.currentInput] = selectedValue
213
- }
214
- this.currentInput = ''
215
- },
216
- getCondition(row) {
217
- return row.key + ' ' + row.operator + ' ' + row.value
218
- },
219
- handleCurrentChange(val) {
220
- this.currentRow = val
221
- },
222
- getRowIndex(row) {
223
- for (let i = 0; i < this.tableData.length; i++) {
224
- if (this.tableData[i].id === row.id) {
225
- return i
226
- }
227
- }
228
- return -1
229
- },
230
- add() {
231
- if (
232
- this.count === null ||
233
- this.count === undefined ||
234
- this.count.isNaN ||
235
- this.count === 'NaN'
236
- ) {
237
- this.count = 0
238
- }
239
- const newRow = {
240
- id: this.count,
241
- leftBracket: '',
242
- key: '',
243
- operator: '',
244
- value: '',
245
- rightBracket: '',
246
- logicOperator: 'condition.operator.or'
247
- }
248
- this.tableData.push(newRow)
249
- this.$refs.table.setCurrentRow(newRow)
250
- this.count++
251
- },
252
- insert() {
253
- if (this.currentRow === null) {
254
- this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
255
- return
256
- }
257
- const newRow = {
258
- id: this.count,
259
- leftBracket: '',
260
- key: '',
261
- operator: 'operator.text.eq',
262
- value: '',
263
- rightBracket: '',
264
- logicOperator: 'condition.operator.or'
265
- }
266
- this.tableData.splice(this.getRowIndex(this.currentRow), 0, newRow)
267
- this.$refs.table.setCurrentRow(newRow)
268
- this.count++
269
- },
270
- remove() {
271
- if (this.currentRow === null) {
272
- this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
273
- return
274
- }
275
- let index = this.getRowIndex(this.currentRow)
276
- this.tableData.splice(index, 1)
277
- if (this.tableData.length > 0) {
278
- index = index <= this.tableData.length - 1 ? index : this.tableData.length - 1
279
- this.$refs.table.setCurrentRow(this.tableData[index])
280
- }
281
- },
282
- view() {
283
- let result = displayCondition(this.tableData)
284
- if (result === '') {
285
- result = this.$t('workflowEditorMessage.conditionsHaveNotBeenSet')
286
- }
287
- this.$confirm(result, this.$t('workflowEditorMessage.viewConditions'), {
288
- showConfirmButton: false,
289
- showCancelButton: false,
290
- // 增加这个空的回退函数防止报错
291
- callback: function () {}
292
- })
293
- },
294
- selectField(row) {
295
- this.selectRow(row)
296
- this.currentInput = 'key'
297
- this.valueDialogTitle = this.$t('workflowEditorMessage.fieldSettings')
298
- this.showOrganization = false
299
- },
300
- selectValue() {
301
- this.currentInput = 'value'
302
- this.valueDialogTitle = this.$t('workflowEditorMessage.valueSetting')
303
- this.showOrganization = true
304
- this.orgType = this.getStandardFieldOrgType()
305
- },
306
- getStandardFieldOrgType() {
307
- const fields = this.standardFields.filter((standardField) => {
308
- return standardField.name === this.currentRow.key
309
- })
310
- if (fields.length > 0) {
311
- return fields[0].orgType
312
- }
313
- return ''
314
- },
315
- isTransitionOtherField(fieldName) {
316
- return isTransitionOtherField(fieldName)
317
- }
318
- }
319
- }
320
- </script>
@@ -1,34 +0,0 @@
1
- import {getI18n} from '../../../../workflow-editor/src/util'
2
- export const standardValues = {
3
- '${currentTime}': getI18n().t('workflowEditor.process.handlingTimeOfThisLink'),
4
- '${currentTransactorId}': getI18n().t('workflowEditor.process.handlerIDOfThisLink'),
5
- '${currentTransactorMainDepartmentId}': getI18n().t('workflowEditor.process.currentHandlerPrincipalDepartmentID'),
6
- '${currentTransactorDirectSuperiorId}': getI18n().t('workflowEditor.process.iDOfTheImmediateSuperiorOfTheCurrentHandler'),
7
- '${currentTransactorDirectSuperiorMainDepartmentId}': getI18n().t('workflowEditor.process.iDOfTheSuperiorDepartmentDirectlyUnderTheCurrentHandler'),
8
- '${currentTransactor}': getI18n().t('workflowEditor.process.loginNameOfTheHandlerInThisLink'),
9
- '${currentTransactorName }': getI18n().t('workflowEditor.process.NameOfCurrentHandler'),
10
- '${currentTransactorDepartment }': getI18n().t('workflowEditor.process.CurrentHandlerDepartment'),
11
- '${currentTransactorDepartmentId}': getI18n().t('workflowEditor.process.CurrentHandlerDepartmentID'),
12
- '${currentTransactorMainDepartment}': getI18n().t('workflowEditor.process.CurrentManagersPrincipalDepartment'),
13
- '${currentTransactorSuperiorDepartmentId}': getI18n().t('workflowEditor.process.iDOfSsuperiorDepartmentOfCurrentHandler'),
14
- '${currentTransactorSuperiorDepartment}': getI18n().t('workflowEditor.process.CurrentHandlersSuperiorDepartment'),
15
- '${currentTransactorUpstageDepartment}': getI18n().t('workflowEditor.process.TopDepartmentOfCurrentHandler'),
16
- '${currentTransactorUpstageDepartmentId}': getI18n().t('workflowEditor.process.TopDepartmentIDOfCurrentHandler'),
17
- '${currentTransactorRole}': getI18n().t('workflowEditor.process.CurrentHandlerRole'),
18
- '${currentTransactorRoleId}': getI18n().t('workflowEditor.process.CurrentHandlerRoleID'),
19
- '${currentTransactorWorkGroup}': getI18n().t('workflowEditor.process.currentHandlerWorkingGroup'),
20
- '${currentTransactorWorkGroupId}': getI18n().t('workflowEditor.process.CurrentHandlerWorkingGroupID'),
21
- '${currentTransactorDirectSuperior}': getI18n().t('workflowEditor.process.LoginNameOfTheImmediateSuperiorOfTheCurrentHandler'),
22
- '${currentTransactorDirectSuperiorName}': getI18n().t('workflowEditor.process.nameOfTheImmediateSuperiorOfTheCurrentHandler'),
23
- '${currentTransactorDirectSuperiorDepartment}': getI18n().t('workflowEditor.process.currentHandlersDirectSuperiorDepartment'),
24
- '${currentTransactorDirectSuperiorDepartmentId}': getI18n().t('workflowEditor.process.currentManagersIdDirectlyUnderTheSuperior'),
25
- '${currentTransactorDirectSuperiorMainDepartment}': getI18n().t('workflowEditor.process.currentManagersDirectSuperiorDepartment'),
26
- '${currentTransactorDirectSuperiorRole}': getI18n().t('workflowEditor.process.currentManagersDirectSuperiorRole'),
27
- '${currentTransactorDirectSuperiorRoleId}': getI18n().t('workflowEditor.process.currentHandlersDirectSuperiorRoleID'),
28
- '${currentTransactorDirectSuperiorWorkGroup}': getI18n().t('workflowEditor.process.currentManagersDirectSuperiorWork'),
29
- '${currentTransactorDirectSuperiorWorkGroupId}': getI18n().t('workflowEditor.process.iDOfTheWorkingGroupDirectlyUnderTheCurrentHandler'),
30
- '${currentOperation}': getI18n().t('workflowEditor.process.operationsPerformedInThisPhase'),
31
- '${previousTransactorId}': getI18n().t('workflowEditor.process.handlerIDOfThePreviousLink'),
32
- '${previousTransactor}': getI18n().t('workflowEditor.process.lastLinkHandlerLogin'),
33
- '${previousTransactorName}': getI18n().t('workflowEditor.process.nameOfHandlerInThePreviousLink')
34
- }
@@ -1,239 +0,0 @@
1
- <template>
2
- <div>
3
- <el-row style="margin-bottom:5px">
4
- <el-button type="primary" size="small" plain icon="CirclePlus" @click="add">
5
- {{ $t('workflowEditorPublicModel.add') }}
6
- </el-button>
7
- <el-button type="primary" size="small" plain icon="Delete" @click="remove">
8
- {{ $t('workflowEditorPublicModel.delete') }}
9
- </el-button>
10
- </el-row>
11
- <el-table
12
- ref="table"
13
- :data="tableData"
14
- border
15
- highlight-current-row
16
- style="width: 100%"
17
- @current-change="handleCurrentChange"
18
- >
19
- <el-table-column
20
- type="index"
21
- width="50"
22
- />
23
- <el-table-column
24
- prop="name"
25
- :label="$t('workflowEditor.common.name')"
26
- width="150"
27
- >
28
- <template v-slot="scope">
29
- <el-input
30
- :value="getFieldLabel(scope.row.name)"
31
- :placeholder="$t('workflowEditorMessage.pleaseEnterContent')"
32
- readonly
33
- @click="showFormFields=true"
34
- @blur="checkName(scope.row.name)"
35
- />
36
- </template>
37
- </el-table-column>
38
- <el-table-column
39
- prop="value"
40
- :label="$t('workflowEditor.common.fieldValue')"
41
- width="200"
42
- >
43
- <template v-slot="scope">
44
- <el-select
45
- v-model="scope.row.value"
46
- multiple
47
- filterable
48
- allow-create
49
- default-first-option
50
- :placeholder="$t('workflowEditorMessage.pleaseSelect')"
51
- @blur="checkValue(scope.row.value)"
52
- >
53
- <el-option
54
- v-for="key in keys"
55
- :key="key"
56
- :label="standardValues[key]"
57
- :value="key"
58
- />
59
- </el-select>
60
- </template>
61
- </el-table-column>
62
- <el-table-column
63
- prop="separator"
64
- :label="$t('workflowEditor.common.separator')"
65
- >
66
- <template v-slot="scope">
67
- <el-input v-model.trim="scope.row.separator" />
68
- </template>
69
- </el-table-column>
70
- <el-table-column
71
- prop="fillType"
72
- :label="$t('workflowEditor.common.fillInMethod')"
73
- >
74
- <template v-slot="scope">
75
- <el-select v-model="scope.row.fillType">
76
- <el-option :label="$t('workflowEditor.common.cover')" value="cover" />
77
- <el-option :label="$t('workflowEditor.common.append')" value="append" />
78
- <el-option :label="$t('workflowEditor.common.insertToFront')" value="prepend" />
79
- </el-select>
80
- </template>
81
- </el-table-column>
82
- <el-table-column
83
- prop="fillTime"
84
- :label="$t('workflowEditor.common.fillInTime')"
85
- >
86
- <template v-slot="scope">
87
- <el-select v-model="scope.row.fillTime">
88
- <el-option :label="$t('workflowEditor.common.fillInBeforeHandling')" value="before" />
89
- <el-option :label="$t('workflowEditor.common.fillInAfterHandling')" value="after" />
90
- </el-select>
91
- </template>
92
- </el-table-column>
93
- </el-table>
94
- <form-fields v-if="showFormFields" @close="setField" />
95
- </div>
96
- </template>
97
- <script>
98
- import { standardValues } from './auto-filled-fields-utils'
99
- import FormFields from '../common/form-fields'
100
- import { getFormFieldLabel } from '../common/form-fields-utils'
101
- export default {
102
- name: 'AutoFilledFields',
103
- components: {
104
- FormFields
105
- },
106
- props: {
107
- modelValue: {
108
- type: Object,
109
- default: () => { return {} }
110
- }
111
- },
112
- data() {
113
- const tableData = []
114
- if (this.modelValue.field !== undefined && this.modelValue.field !== null) {
115
- // xml中有多个field时是数组,只有一个field时是Object
116
- if (Array.isArray(this.modelValue.field)) {
117
- this.modelValue.field.map(field => {
118
- const row = { ...field }
119
- if (typeof (field.value) === 'string' && field.value.indexOf('+') !== -1) {
120
- row.value = field.value.split('+')
121
- } else {
122
- row.value = []
123
- row.value.push(field.value)
124
- }
125
- tableData.push(row)
126
- })
127
- } else {
128
- const row = { ...this.modelValue.field }
129
- if (typeof (this.modelValue.field.value) === 'string' && this.modelValue.field.value.indexOf('+') !== -1) {
130
- row.value = this.modelValue.field.value.split('+')
131
- } else {
132
- row.value = []
133
- row.value.push(this.modelValue.field.value)
134
- }
135
- tableData.push(row)
136
- }
137
- }
138
- return {
139
- tableData,
140
- currentRow: null,
141
- standardValues,
142
- showFormFields: false
143
- }
144
- },
145
- computed: {
146
- keys() {
147
- return Object.keys(this.standardValues)
148
- }
149
- },
150
- watch: {
151
-
152
- },
153
- mounted() {
154
- if (this.tableData && this.tableData.length > 0) {
155
- this.setCurrentRow(this.tableData[0])
156
- }
157
- this.$watch('tableData', function() {
158
- const fields = []
159
- this.tableData.map(row => {
160
- if (row.name !== '' && row.value.length > 0) {
161
- const field = { ...row }
162
- field.value = row.value.join('+')
163
- fields.push(field)
164
- }
165
- })
166
-
167
- this.$emit('update:modelValue', {
168
- field: fields
169
- })
170
- }, {
171
- // deep为true可以监控数组中的元素的某个属性的变化
172
- deep: true
173
- })
174
- },
175
- created() {
176
- },
177
- methods: {
178
- add() {
179
- for (let i = 0; i < this.tableData.length; i++) {
180
- if (this.tableData[i].name === '' || this.tableData[i].value === '') {
181
- this.$alert(this.$t('workflowEditorMessage.theFieldNameOrFieldValueInLineCannotBeEmpty', { row: (i + 1) }))
182
- return
183
- }
184
- }
185
- const newRow = {
186
- name: '',
187
- value: [],
188
- separator: '',
189
- fillType: 'cover',
190
- fillTime: 'after'
191
- }
192
- this.tableData.push(newRow)
193
- this.setCurrentRow(newRow)
194
- },
195
- remove() {
196
- if (this.currentRow === null) {
197
- this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
198
- return
199
- }
200
- let index
201
- for (let i = 0; i < this.tableData.length; i++) {
202
- if (this.tableData[i].name === this.currentRow.name) {
203
- index = i
204
- break
205
- }
206
- }
207
- this.tableData.splice(index, 1)
208
- // 当前选中的index如果是最后一行,那么删除后,index会等于length造成下标越界,因此需要让index等于新的最后一行
209
- index = (index <= (this.tableData.length - 1) ? index : (this.tableData.length - 1))
210
- this.setCurrentRow(this.tableData[index])
211
- },
212
- setCurrentRow(row) {
213
- this.$refs.table.setCurrentRow(row)
214
- },
215
- handleCurrentChange(val) {
216
- this.currentRow = val
217
- },
218
- checkName(name) {
219
- if (!this.showFormFields && name === '') {
220
- this.$alert(this.$t('workflowEditorMessage.fieldNameCannotBeEmpty'))
221
- }
222
- },
223
- checkValue(value) {
224
- if (value.length === 0) {
225
- this.$alert(this.$t('workflowEditorMessage.fieldValueCannotBeEmpty'))
226
- }
227
- },
228
- setField(name) {
229
- if (name !== undefined) {
230
- this.currentRow.name = name
231
- }
232
- this.showFormFields = false
233
- },
234
- getFieldLabel(name) {
235
- return getFormFieldLabel(name)
236
- }
237
- }
238
- }
239
- </script>
@@ -1,81 +0,0 @@
1
- <template>
2
- <div>
3
- <el-form-item :label="label">
4
- <el-checkbox-group v-model="tools">
5
- <el-checkbox label="mail">
6
- {{ $t('workflowEditorPublicModel.mail') }}
7
- </el-checkbox>
8
- <!-- <el-checkbox label="sms">
9
- {{ $t('workflowEditorPublicModel.message') }}
10
- </el-checkbox>
11
- <el-checkbox label="app">
12
- {{ $t('workflowEditorPublicModel.App') }}
13
- </el-checkbox>
14
- <el-checkbox label="dingding">
15
- {{ $t('workflowEditorPublicModel.dingding') }}
16
- </el-checkbox> -->
17
- <el-checkbox label="DINGDING">
18
- {{ $t('workflowEditorPublicModel.dingding') }}
19
- </el-checkbox>
20
- <el-checkbox label="QIWEI">
21
- {{ $t('workflowEditorPublicModel.qiwei') }}
22
- </el-checkbox>
23
- <el-checkbox label="FEISHU">
24
- {{ $t('workflowEditorPublicModel.feishu') }}
25
- </el-checkbox>
26
- <el-checkbox label="custom">
27
- {{ $t('workflowEditorPublicModel.custom') }}
28
- </el-checkbox>
29
- </el-checkbox-group>
30
- </el-form-item>
31
- <el-form-item
32
- label-width="110"
33
- v-if="tools.indexOf('custom') >= 0"
34
- :label="$t('workflowEditor.common.customMsg')"
35
- >
36
- <el-input v-model="myCustomMsg" />
37
- </el-form-item>
38
- </div>
39
- </template>
40
- <script>
41
- export default {
42
- name: 'CommonNoticeTool',
43
- props: {
44
- label: {
45
- type: String,
46
- default: null
47
- },
48
- modelValue: {
49
- type: String,
50
- default: null
51
- },
52
- customMsg: {
53
- type: String,
54
- default: null
55
- }
56
- },
57
- data() {
58
- let tools = []
59
- if (this.modelValue && this.modelValue !== '' && this.modelValue !== null) {
60
- tools = this.modelValue.split(',')
61
- }
62
- let myCustomMsg = ''
63
- if (this.customMsg && this.customMsg !== '' && this.customMsg !== null) {
64
- myCustomMsg = this.customMsg
65
- }
66
- return {
67
- tools,
68
- myCustomMsg
69
- }
70
- },
71
- watch: {
72
- tools(val) {
73
- // this.$emit('input', this.tools.join(','))
74
- this.$emit('update:modelValue', this.tools.join(','))
75
- },
76
- myCustomMsg(val) {
77
- this.$emit('input-msg', this.myCustomMsg)
78
- }
79
- }
80
- }
81
- </script>