workflow-editor 0.9.68-dw → 0.9.68

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 (120) 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 +533 -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/auto-task.js +70 -0
  12. package/packages/workflow-editor/src/json-object-templates/copy-task.js +72 -0
  13. package/packages/workflow-editor/src/json-object-templates/decision.js +11 -0
  14. package/packages/workflow-editor/src/json-object-templates/end.js +14 -0
  15. package/packages/workflow-editor/src/json-object-templates/fork.js +10 -0
  16. package/packages/workflow-editor/src/json-object-templates/human-decision.js +9 -0
  17. package/packages/workflow-editor/src/json-object-templates/human-task.js +199 -0
  18. package/packages/workflow-editor/src/json-object-templates/join.js +10 -0
  19. package/packages/workflow-editor/src/json-object-templates/process.js +98 -0
  20. package/packages/workflow-editor/src/json-object-templates/start.js +13 -0
  21. package/packages/workflow-editor/src/json-object-templates/subprocess.js +31 -0
  22. package/packages/workflow-editor/src/json-object-templates/transition.js +26 -0
  23. package/packages/workflow-editor/src/main/admin-save-dialog.vue +66 -0
  24. package/packages/workflow-editor/src/main/canvas.vue +483 -0
  25. package/packages/workflow-editor/src/main/context-menu.vue +132 -0
  26. package/packages/workflow-editor/src/main/icon-svg.vue +32 -0
  27. package/packages/workflow-editor/src/main/selection-region.vue +66 -0
  28. package/packages/workflow-editor/src/main/tache-history-tooltip.vue +38 -0
  29. package/packages/workflow-editor/src/main/tache-name-input.vue +19 -0
  30. package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +35 -0
  31. package/packages/workflow-editor/src/main/toolbox.vue +60 -0
  32. package/packages/workflow-editor/src/main/wf-history-canvas.vue +304 -0
  33. package/packages/workflow-editor/src/process-json.js +623 -0
  34. package/packages/workflow-editor/src/process-service.js +31 -0
  35. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +81 -0
  36. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +155 -0
  37. package/packages/workflow-editor/src/properties-editors/auto-task.vue +73 -0
  38. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +556 -0
  39. package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +276 -0
  40. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +34 -0
  41. package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +239 -0
  42. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +67 -0
  43. package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +241 -0
  44. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +23 -0
  45. package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +116 -0
  46. package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +75 -0
  47. package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +125 -0
  48. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +72 -0
  49. package/packages/workflow-editor/src/properties-editors/common/notice.vue +101 -0
  50. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +185 -0
  51. package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +83 -0
  52. package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +65 -0
  53. package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +355 -0
  54. package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +63 -0
  55. package/packages/workflow-editor/src/properties-editors/common/task-title.vue +148 -0
  56. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +275 -0
  57. package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +386 -0
  58. package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +209 -0
  59. package/packages/workflow-editor/src/properties-editors/common/variables.vue +135 -0
  60. package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +90 -0
  61. package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +155 -0
  62. package/packages/workflow-editor/src/properties-editors/copy-task.vue +94 -0
  63. package/packages/workflow-editor/src/properties-editors/decision.vue +90 -0
  64. package/packages/workflow-editor/src/properties-editors/fork.vue +72 -0
  65. package/packages/workflow-editor/src/properties-editors/human-decision.vue +44 -0
  66. package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +60 -0
  67. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +160 -0
  68. package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +291 -0
  69. package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +249 -0
  70. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +392 -0
  71. package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +241 -0
  72. package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +220 -0
  73. package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +204 -0
  74. package/packages/workflow-editor/src/properties-editors/human-task/events.vue +59 -0
  75. package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +207 -0
  76. package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +390 -0
  77. package/packages/workflow-editor/src/properties-editors/human-task.vue +109 -0
  78. package/packages/workflow-editor/src/properties-editors/join.vue +44 -0
  79. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +273 -0
  80. package/packages/workflow-editor/src/properties-editors/process/events.vue +76 -0
  81. package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +60 -0
  82. package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +95 -0
  83. package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +28 -0
  84. package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +81 -0
  85. package/packages/workflow-editor/src/properties-editors/process.vue +115 -0
  86. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +199 -0
  87. package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +26 -0
  88. package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +206 -0
  89. package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +64 -0
  90. package/packages/workflow-editor/src/properties-editors/subprocess.vue +79 -0
  91. package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +53 -0
  92. package/packages/workflow-editor/src/properties-editors/transition.vue +74 -0
  93. package/packages/workflow-editor/src/properties-editors/user-condition.js +183 -0
  94. package/packages/workflow-editor/src/store/getters.js +27 -0
  95. package/packages/workflow-editor/src/store/workflow-editor.js +125 -0
  96. package/packages/workflow-editor/src/taches/auto-task.vue +99 -0
  97. package/packages/workflow-editor/src/taches/common-methods.js +21 -0
  98. package/packages/workflow-editor/src/taches/copy-task.vue +99 -0
  99. package/packages/workflow-editor/src/taches/custom-task.vue +88 -0
  100. package/packages/workflow-editor/src/taches/decision.vue +102 -0
  101. package/packages/workflow-editor/src/taches/end.vue +76 -0
  102. package/packages/workflow-editor/src/taches/fork.vue +102 -0
  103. package/packages/workflow-editor/src/taches/human-decision.vue +102 -0
  104. package/packages/workflow-editor/src/taches/human-task.vue +113 -0
  105. package/packages/workflow-editor/src/taches/join.vue +91 -0
  106. package/packages/workflow-editor/src/taches/joint.vue +177 -0
  107. package/packages/workflow-editor/src/taches/start.vue +76 -0
  108. package/packages/workflow-editor/src/taches/subprocess.vue +99 -0
  109. package/packages/workflow-editor/src/taches/tache-resizer.vue +80 -0
  110. package/packages/workflow-editor/src/transitions/broken-line.vue +91 -0
  111. package/packages/workflow-editor/src/transitions/curve-line.vue +91 -0
  112. package/packages/workflow-editor/src/transitions/straight-line.vue +26 -0
  113. package/packages/workflow-editor/src/transitions/transition.vue +212 -0
  114. package/packages/workflow-editor/src/transitions/virtual-transition.vue +43 -0
  115. package/packages/workflow-editor/src/util.js +489 -0
  116. package/packages/workflow-editor/src/workflow-editor.vue +607 -0
  117. package/packages/workflow-editor/src/workflow-history.vue +153 -0
  118. package/src/i18n/i18n.js +1 -1
  119. package/src/i18n/langs/cn.js +43 -24
  120. package/src/i18n/langs/en.js +23 -7
@@ -0,0 +1,390 @@
1
+ <template>
2
+ <el-dialog
3
+ :show-close="true"
4
+ :append-to-body="true"
5
+ style="width:100%"
6
+ :title="$t('workflowEditor.condition.combinationCondition')"
7
+ visible
8
+ @close="closeButtonSetting"
9
+ >
10
+ <div style="overflow-y:auto;max-height: 500px">
11
+ <div class="operation-area">
12
+ <el-button size="small" @click="savebuttonSetting">
13
+ <span> {{ $t('workflowEditorPublicModel.save') }}</span>
14
+ </el-button>
15
+ </div>
16
+ <div>
17
+ <el-card class="box-card" shadow="never">
18
+ <div slot="header" class="clearfix">
19
+ <span>{{ $t('workflowEditor.condition.personnelScope') }}</span>
20
+ </div>
21
+ <div>
22
+ <common-user-condition v-model="myUserCondition" used-in="transactor" />
23
+ </div>
24
+ </el-card>
25
+ <el-card class="box-card" shadow="never">
26
+ <div slot="header" class="clearfix">
27
+ <span>{{ $t('workflowEditor.condition.mainTableConditions') }}</span>
28
+ </div>
29
+ <div>
30
+ <additional-condition v-model="myParentCondition" />
31
+ </div>
32
+ </el-card>
33
+ <el-card v-if="isAdd === false" class="box-card" shadow="never">
34
+ <div slot="header">
35
+ <span>{{ $t('workflowEditor.condition.subtableCondition') }}</span>
36
+ </div>
37
+ <div>
38
+ <el-row style="padding-bottom: 8px">
39
+ <el-button type="primary" size="mini" plain icon="el-icon-circle-plus-outline" @click="add">
40
+ {{ $t('workflowEditorPublicModel.add') }}
41
+ </el-button>
42
+ <el-button type="primary" size="mini" plain icon="el-icon-delete" @click="remove">
43
+ {{ $t('workflowEditorPublicModel.delete') }}
44
+ </el-button>
45
+ </el-row>
46
+ <el-table
47
+ id="tableDataDialog"
48
+ ref="table"
49
+ :data="tableData"
50
+ border
51
+ style="width: 100%"
52
+ highlight-current-row
53
+ @current-change="handleCurrentChange"
54
+ >
55
+ <el-table-column prop="leftBracket" label="(" width="90">
56
+ <template slot-scope="scope">
57
+ <el-select v-model="scope.row.leftBracket" size="small" clearable @focus="selectRow(scope.row)">
58
+ <el-option label="" value="" />
59
+ <el-option label="(" value="(" />
60
+ <el-option label="((" value="((" />
61
+ <el-option label="(((" value="(((" />
62
+ </el-select>
63
+ </template>
64
+ </el-table-column>
65
+ <el-table-column :label="$t('workflowEditor.common.fieldName')" width="200">
66
+ <template slot-scope="scope">
67
+ <el-select v-model="scope.row.propName" :filter-method="searchField" size="small" clearable filterable @focus="selectRow(scope.row)" @change="changeFieldName(scope.$index)">
68
+ <el-option
69
+ v-for="item in attributeArr"
70
+ :key="item.value"
71
+ :label="item.label"
72
+ :value="item.value"
73
+ />
74
+ </el-select>
75
+ </template>
76
+ </el-table-column>
77
+ <el-table-column :label="$t('workflowEditor.common.operator')" width="110">
78
+ <template slot-scope="scope">
79
+ <el-select v-model="scope.row.operator" size="small" clearable @focus="selectRow(scope.row)">
80
+ <el-option v-for="option in operationArr[scope.$index]" :key="option.name" :label="option.label" :value="option.name" />
81
+ </el-select>
82
+ </template>
83
+ </el-table-column>
84
+ <el-table-column :label="$t('workflowEditor.common.value')">
85
+ <template slot-scope="scope">
86
+ <el-select v-if="!scope.row.propValueType" v-model="scope.row.propValueType" size="small" @focus="selectRow(scope.row)">
87
+ <el-option :label="$t('workflowEditor.condition.fillInManually')" value="input" />
88
+ <el-option :label="$t('workflowEditor.condition.environmentVariable')" value="context" />
89
+ <el-option :label="$t('workflowEditor.condition.requestParameters')" value="request" />
90
+ <el-option :label="$t('workflowEditor.condition.mainTableField')" value="obj" />
91
+ <el-option :label="$t('workflowEditor.condition.databaseFields')" value="subObj" />
92
+ <el-option :label="$t('workflowEditor.condition.taskFields')" value="task" />
93
+ <el-option :label="$t('workflowEditor.condition.systemParameter')" value="custom" />
94
+ </el-select>
95
+ <el-select v-if="scope.row.propValueType === 'context'" v-model="scope.row.propValue" clearable size="small" :title="scope.row.propValue" filterable default-first-option allow-create @change="changePropValue(scope.$index)" @focus="selectRow(scope.row)">
96
+ <el-option :label="$t('workflowEditor.condition.currentTime')" value="${context.currentTime}" />
97
+ <el-option :label="$t('workflowEditor.condition.currentTransactor')" value="${context.currentTransactor}" />
98
+ <el-option :label="$t('workflowEditor.condition.currentTransactorName')" value="${context.currentTransactorName}" />
99
+ <el-option :label="$t('workflowEditor.condition.currentTransactorId')" value="${context.currentTransactorId}" />
100
+ <el-option :label="$t('workflowEditor.condition.currentTransactorMainDepartmentId')" value="${context.currentTransactorMainDepartmentId}" />
101
+ <el-option :label="$t('workflowEditor.condition.currentTransactorMainDepartment')" value="${context.currentTransactorMainDepartment}" />
102
+ <el-option :label="$t('workflowEditor.condition.currentTransactorRoleId')" value="${context.currentTransactorRoleId}" />
103
+ <el-option :label="$t('workflowEditor.condition.currentTransactorRole')" value="${context.currentTransactorRole}" />
104
+ <el-option :label="$t('workflowEditor.condition.currentTransactorWorkGroupId')" value="${context.currentTransactorWorkGroupId}" />
105
+ <el-option :label="$t('workflowEditor.condition.currentTransactorWorkGroup')" value="${context.currentTransactorWorkGroup}" />
106
+ </el-select>
107
+ <el-select v-if="scope.row.propValueType === 'task'" v-model="scope.row.propValue" clearable size="small" :title="scope.row.propValue" filterable default-first-option allow-create @change="changePropValue(scope.$index)" @focus="selectRow(scope.row)">
108
+ <el-option :label="$t('workflowEditor.condition.currentHandler')" value="${task.transactor}" />
109
+ <el-option :label="$t('workflowEditor.condition.currentTaskClient')" value="${task.trustor}" />
110
+ <el-option :label="$t('workflowEditor.condition.currentAssignor')" value="${task.assigner}" />
111
+ <el-option :label="$t('workflowEditor.condition.linkName')" value="${task.name}" />
112
+ <el-option :label="$t('workflowEditor.condition.linkCode')" value="${task.nodeId}" />
113
+ </el-select>
114
+ <el-date-picker
115
+ v-if="scope.row.dataType === 'DATE' && scope.row.propValueType === 'input'"
116
+ v-model="scope.row.propValue"
117
+ size="small"
118
+ clearable
119
+ value-format="yyyy-MM-dd"
120
+ :title="scope.row.propValue"
121
+ type="date"
122
+ @change="changePropValue(scope.$index)"
123
+ />
124
+ <el-date-picker
125
+ v-if="scope.row.dataType === 'TIME' && scope.row.propValueType === 'input'"
126
+ v-model="scope.row.propValue"
127
+ size="small"
128
+ :title="scope.row.propValue"
129
+ clearable
130
+ value-format="yyyy-MM-dd HH:mm:ss"
131
+ type="datetime"
132
+ @change="changePropValue(scope.$index)"
133
+ />
134
+ <el-input v-if="scope.row.dataType !== 'TIME' && scope.row.dataType !== 'DATE' && scope.row.propValueType === 'input'" v-model.trim="scope.row.propValue" :title="scope.row.propValue" clearable size="small" @change="changePropValue(scope.$index)" />
135
+ <el-input v-if="scope.row.propValueType === 'request'" v-model.trim="scope.row.propValue" :title="scope.row.propValue" clearable size="small" @change="changePropValue(scope.$index)" />
136
+ <el-select v-if="scope.row.propValueType === 'subObj'" v-model="scope.row.propValue" :title="scope.row.propValue" :filter-method="searchField" size="small" clearable filterable @change="changePropValue(scope.$index)">
137
+ <el-option
138
+ v-for="item in attributeArr"
139
+ :key="'${subObj.' +item.value + '}'"
140
+ :label="item.label"
141
+ :value="'${subObj.' +item.value + '}'"
142
+ />
143
+ </el-select>
144
+ <el-select v-if="scope.row.propValueType === 'obj'" v-model="scope.row.propValue" :title="scope.row.propValue" size="small" clearable filterable @change="changePropValue(scope.$index)">
145
+ <el-option
146
+ v-for="item in parentAttributeArr"
147
+ :key="'${obj.' +item.value + '}'"
148
+ :label="item.label"
149
+ :value="'${obj.' +item.value + '}'"
150
+ />
151
+ </el-select>
152
+ <el-select v-if="scope.row.propValueType === 'custom'" v-model="scope.row.propValue" :title="scope.row.propValue" size="small" clearable filterable @change="changePropValue(scope.$index)">
153
+ <el-option
154
+ v-for="key in propSettingKeyList"
155
+ :key="'${custom.' + key + '}'"
156
+ :label="key"
157
+ :value="'${custom.' + key + '}'"
158
+ />
159
+ </el-select>
160
+ </template>
161
+ </el-table-column>
162
+ <el-table-column prop="rightBracket" label=")" width="90" @focus="selectRow(scope.row)">
163
+ <template slot-scope="scope">
164
+ <el-select v-model="scope.row.rightBracket" size="small" clearable>
165
+ <el-option label="" value="" />
166
+ <el-option label=")" value=")" />
167
+ <el-option label="))" value="))" />
168
+ <el-option label=")))" value=")))" />
169
+ </el-select>
170
+ </template>
171
+ </el-table-column>
172
+ <el-table-column :label="$t('workflowEditorPublicModel.andOr')" prop="logicOperator" width="110">
173
+ <template slot-scope="scope">
174
+ <el-select v-model="scope.row.logicOperator" size="small" clearable @focus="selectRow(scope.row)">
175
+ <el-option :label="$t('workflowEditor.process.perhaps')" value="condition.operator.or" />
176
+ <el-option :label="$t('workflowEditor.process.also')" value="condition.operator.and" />
177
+ </el-select>
178
+ </template>
179
+ </el-table-column>
180
+ </el-table>
181
+ </div>
182
+ </el-card>
183
+ </div>
184
+ </div>
185
+ </el-dialog>
186
+ </template>
187
+ <script>
188
+
189
+ // import modulePageService from '@/subsystems/mms/api/module-page'
190
+ import componentsConfigUtil from './componentsConfigUtil'
191
+ import AdditionalCondition from '../common/additional-condition'
192
+ import CommonUserCondition from '../common/common-user-condition'
193
+ import { mapGetters } from 'vuex'
194
+
195
+ export default {
196
+ components: {
197
+ AdditionalCondition,
198
+ CommonUserCondition
199
+ },
200
+ props: {
201
+ conditionList: {
202
+ type: [Array, String],
203
+ default: null
204
+ },
205
+ userCondition: {
206
+ type: String,
207
+ default: null
208
+ },
209
+ parentCondition: {
210
+ type: String,
211
+ default: null
212
+ },
213
+ attributeMap: {
214
+ type: Object,
215
+ default: null
216
+ },
217
+ isAdd: {
218
+ type: Boolean,
219
+ default: false
220
+ }
221
+ },
222
+ data() {
223
+ let myUserCondition
224
+ if (this.userCondition && this.userCondition !== '') {
225
+ myUserCondition = this.userCondition
226
+ }
227
+ let myParentCondition
228
+ if (this.parentCondition && this.parentCondition !== '') {
229
+ myParentCondition = this.parentCondition
230
+ }
231
+ return {
232
+ myUserCondition,
233
+ myParentCondition,
234
+ tableData: null,
235
+ attributeArr: [],
236
+ fieldMap: {},
237
+ fieldNameMap: {},
238
+ queryList: [],
239
+ operationArr: [],
240
+ parentAttributeArr: []
241
+ }
242
+ },
243
+ created() {
244
+ this.getAttributeArr()
245
+ // if (this.tableData === null || this.tableData === undefined) {
246
+ // this.add()
247
+ // }
248
+ },
249
+ computed: {
250
+ ...mapGetters('wfEditor', [
251
+ 'propSettingKeyList'
252
+ ])
253
+ },
254
+ mounted() {
255
+ if (this.conditionList) {
256
+ if (typeof (this.conditionList) === 'object') {
257
+ this.tableData = this.conditionList
258
+ } else {
259
+ this.tableData = this.xmlToData(this.conditionList)
260
+ }
261
+ this.getOperatorsArr(this.tableData)
262
+ }
263
+ },
264
+ methods: {
265
+ ...componentsConfigUtil,
266
+ // 添加
267
+ add() {
268
+ if (!this.tableData) {
269
+ this.tableData = []
270
+ }
271
+ this.tableData.push(
272
+ {
273
+ leftBracket: '',
274
+ propName: '',
275
+ operator: '',
276
+ propValue: '',
277
+ rightBracket: '',
278
+ logicOperator: 'condition.operator.or',
279
+ dataType: '',
280
+ propDbName: ''
281
+ }
282
+ )
283
+ this.operationArr.push([])
284
+ },
285
+ // 删除
286
+ remove() {
287
+ if (this.currentRow === null) {
288
+ this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
289
+ return
290
+ }
291
+ let index = this.getRowIndex(this.currentRow)
292
+ this.tableData.splice(index, 1)
293
+ if (this.tableData.length > 0) {
294
+ index = (index <= (this.tableData.length - 1) ? index : (this.tableData.length - 1))
295
+ this.$refs.table.setCurrentRow(this.tableData[index])
296
+ }
297
+ },
298
+ // 改变选择的属性
299
+ changeFieldName(index) {
300
+ // const selectData = this.$refs.table.store.states.data
301
+ const propName = this.currentRow.propName
302
+ const item = this.fieldMap[propName]
303
+ if (item) {
304
+ this.tableData[index].dataType = item.type
305
+ this.tableData[index].propDbName = item.propDbName
306
+ }
307
+ this.operationArr[index] = this.getOperators(item)
308
+ },
309
+ // 根据code获取属性
310
+ getAttributeArr() {
311
+ if (this.attributeMap && this.attributeMap.attributeArr) {
312
+ this.attributeArr = this.attributeMap.attributeArr
313
+ this.queryList = this.attributeMap.attributeArr
314
+ this.fieldMap = this.attributeMap.fieldMap
315
+ this.fieldNameMap = this.attributeMap.fieldNameMap
316
+ this.parentAttributeArr = this.attributeMap.parentAttributeArr
317
+ }
318
+ },
319
+ // 选择行
320
+ selectRow(row) {
321
+ this.attributeArr = this.queryList
322
+ this.$refs.table.setCurrentRow(row)
323
+ },
324
+ handleCurrentChange(val) {
325
+ this.currentRow = val
326
+ },
327
+ // 属性搜索方法
328
+ searchField(query) {
329
+ if (query) {
330
+ this.attributeArr = this.queryList.filter(item => {
331
+ return item.label.indexOf(query) > -1 || item.value.indexOf(query) > -1
332
+ })
333
+ }
334
+ },
335
+ getRowIndex(row) {
336
+ for (let i = 0; i < this.tableData.length; i++) {
337
+ if (this.tableData[i].propName === row.propName) {
338
+ return i
339
+ }
340
+ }
341
+ return -1
342
+ },
343
+ // 保存关闭方法
344
+ savebuttonSetting() {
345
+ if (this.tableData && this.tableData.length > 0) {
346
+ for (var i = 0; i < this.tableData.length; i++) {
347
+ const item = this.tableData[i]
348
+ if (!item.propName) {
349
+ this.$alert(this.$t('workflowEditorMessage.blankFieldNameOrValue'))
350
+ return
351
+ }
352
+ }
353
+ }
354
+ const param = {
355
+ userCondition: this.myUserCondition,
356
+ parentCondition: this.myParentCondition,
357
+ condition: this.tableData
358
+ }
359
+ this.$emit('close', param)
360
+ },
361
+ closeButtonSetting() {
362
+ this.$emit('close', null)
363
+ },
364
+ changePropValue(index) {
365
+ if (this.tableData[index] && this.tableData[index].propValue) {
366
+ if (this.tableData[index].propValueType) {
367
+ if (this.tableData[index].propValueType === 'request') {
368
+ if (this.tableData[index].propValue.indexOf('${request.') === -1) {
369
+ this.tableData[index].propValue = '${request.' + this.tableData[index].propValue
370
+ }
371
+ if (this.tableData[index].propValue.indexOf('}') === -1) {
372
+ this.tableData[index].propValue = this.tableData[index].propValue + '}'
373
+ }
374
+ }
375
+ if (this.tableData[index].propValueType === 'input') {
376
+ if (this.tableData[index].propValue.indexOf('${input.') === -1) {
377
+ this.tableData[index].propValue = '${input.' + this.tableData[index].propValue
378
+ }
379
+ if (this.tableData[index].propValue.indexOf('}') === -1) {
380
+ this.tableData[index].propValue = this.tableData[index].propValue + '}'
381
+ }
382
+ }
383
+ }
384
+ } else {
385
+ this.$set(this.tableData[index], 'propValueType', null)
386
+ }
387
+ }
388
+ }
389
+ }
390
+ </script>
@@ -0,0 +1,109 @@
1
+ <template>
2
+ <el-dialog
3
+ visible
4
+ top="10vh"
5
+ :title="$t('workflowEditor.task.linkAttribute')"
6
+ :center="true"
7
+ append-to-body
8
+ custom-class="properties-editor"
9
+ @open="$emit('open')"
10
+ @opend="$emit('opend')"
11
+ @close="$emit('close')"
12
+ @closed="$emit('closed')"
13
+ >
14
+ <el-tabs v-model="activeTab" type="border-card" @tab-click="handleClick">
15
+ <el-tab-pane :label="$t('workflowEditor.task.basicProperties')" name="basicProperties">
16
+ <basic-properties
17
+ :id.sync="model.ref.attr.id"
18
+ :name.sync="model.ref.attr.name"
19
+ :model="model.ref.basicProperties"
20
+ />
21
+ </el-tab-pane>
22
+ <el-tab-pane :label="$t('workflowEditor.task.settingOfHandler')" name="transactors">
23
+ <transactor-settings :model="model.ref.transactorSettings" :basic-properties="model.ref.basicProperties" />
24
+ </el-tab-pane>
25
+ <el-tab-pane :label="$t('workflowEditor.task.permissionSettings')" name="permissions">
26
+ <permission-settings v-model="model.ref.permissionSettings" />
27
+ </el-tab-pane>
28
+ <el-tab-pane :label="$t('workflowEditor.task.autoFillInFieldSettings')" name="autoFilledFields">
29
+ <auto-filled-fields v-model="model.ref.autoFilledFields" />
30
+ </el-tab-pane>
31
+ <el-tab-pane :label="$t('workflowEditor.task.reminderSettings')" name="reminders">
32
+ <!-- <reminder v-model="model.ref.reminder" /> -->
33
+ <notice-reminder :reminder-value="model.ref.reminder" :task-notice-value="model.ref.taskNotice" />
34
+ </el-tab-pane>
35
+ <el-tab-pane :label="$t('workflowEditor.task.eventProcessing')" name="events">
36
+ <events v-model="model.ref.events" />
37
+ </el-tab-pane>
38
+ <el-tab-pane :label="$t('workflowEditor.task.linkVariable')" name="variables">
39
+ <variables v-model="model.ref.variables" />
40
+ </el-tab-pane>
41
+ </el-tabs>
42
+ </el-dialog>
43
+ </template>
44
+
45
+ <script>
46
+ import BasicProperties from './human-task/basic-properties'
47
+ import PermissionSettings from './human-task/permission-settings'
48
+ import TransactorSettings from './common/transactor-settings'
49
+ import AutoFilledFields from './common/auto-filled-fields'
50
+ // import Reminder from './common/reminder'
51
+ import Variables from './common/variables'
52
+ import Events from './human-task/events'
53
+ import NoticeReminder from './common/notice-reminder.vue'
54
+ export default {
55
+ name: 'HumanTaskPropertiesEditor',
56
+ components: {
57
+ BasicProperties,
58
+ TransactorSettings,
59
+ PermissionSettings,
60
+ AutoFilledFields,
61
+ // Reminder,
62
+ Events,
63
+ Variables,
64
+ NoticeReminder
65
+
66
+ },
67
+ props: {
68
+ model: {
69
+ type: Object,
70
+ default: null
71
+ }
72
+ },
73
+ data() {
74
+ console.log(this.model)
75
+ if (!this.model.ref.taskNotice) {
76
+ this.model.ref.taskNotice = {}
77
+ }
78
+ return {
79
+ activeTab: 'basicProperties'
80
+ }
81
+ },
82
+ computed: {
83
+ formModel() {
84
+ return this.model.ref
85
+ }
86
+ },
87
+ mounted() {
88
+ this.$watch('model.ref.attr.id', function(newVal, oldVal) {
89
+ this.model.id = newVal
90
+ })
91
+ this.$watch('model.ref.attr.name', function(newVal, oldVal) {
92
+ this.model.name = newVal
93
+ })
94
+ },
95
+ methods: {
96
+ handleClick(tab, event) {
97
+ // console.log(tab, event)
98
+ }
99
+ }
100
+ }
101
+ </script>
102
+
103
+ <style scoped>
104
+ /* 使用深度作用选择器(vue-loader的功能)">>>"符号重新定义了.el-dialog__body,不影响其他页面的同名样式*/
105
+ .properties-editor >>> .el-dialog__body{
106
+ padding-top: 0
107
+ }
108
+ </style>
109
+
@@ -0,0 +1,44 @@
1
+ <template>
2
+ <el-dialog
3
+ visible
4
+ :title="$t('workflowEditor.task.convergedProperties')"
5
+ :center="true"
6
+ append-to-body
7
+ @open="$emit('open')"
8
+ @opend="$emit('opend')"
9
+ @close="$emit('close')"
10
+ @closed="$emit('closed')"
11
+ >
12
+ <el-form>
13
+ <el-form-item :label="$t('workflowEditor.task.name')" label-width="40px">
14
+ <el-input v-model="formModel.attr.name" />
15
+ </el-form-item>
16
+ </el-form>
17
+ </el-dialog>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ name: 'ForkPropertiesEditor',
23
+ props: {
24
+ model: {
25
+ type: Object,
26
+ default: null
27
+ }
28
+ },
29
+ computed: {
30
+ formModel() {
31
+ return this.model.ref
32
+ }
33
+ },
34
+ mounted() {
35
+ this.$watch('model.ref.attr.name', function(newVal) {
36
+ this.model.name = newVal
37
+ })
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <style lang="scss" scoped>
43
+
44
+ </style>