workflow-editor 0.0.81-up → 0.0.81-up-tmp2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.min.js +3237 -0
- package/dist/style.css +1 -0
- package/es/_virtual/FileSaver.min.mjs +4 -0
- package/es/_virtual/___vite-browser-external.mjs +6 -0
- package/es/_virtual/__vite-browser-external.mjs +4 -0
- package/es/_virtual/_commonjsHelpers.mjs +30 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/_virtual/clipboard.mjs +4 -0
- package/es/_virtual/dayjs.min.mjs +4 -0
- package/es/_virtual/index.mjs +4 -0
- package/es/_virtual/nprogress.mjs +4 -0
- package/es/_virtual/prism.mjs +4 -0
- package/es/_virtual/sax.mjs +4 -0
- package/es/_virtual/string_decoder.mjs +4 -0
- package/es/_virtual/tinymce.mjs +4 -0
- package/es/_virtual/weekOfYear.mjs +4 -0
- package/es/index.mjs +20 -0
- package/es/plugins/formValidatorUtil.mjs +391 -0
- package/es/plugins/index.mjs +9 -0
- package/es/style.css +1 -0
- package/es/vite.svg +1 -0
- package/es/workflow-editor/index.mjs +14 -0
- package/lib/_virtual/FileSaver.min.cjs +1 -0
- package/lib/_virtual/___vite-browser-external.cjs +1 -0
- package/lib/_virtual/__vite-browser-external.cjs +1 -0
- package/lib/_virtual/_commonjsHelpers.cjs +1 -0
- package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/lib/_virtual/clipboard.cjs +1 -0
- package/lib/_virtual/dayjs.min.cjs +1 -0
- package/lib/_virtual/index.cjs +1 -0
- package/lib/_virtual/nprogress.cjs +1 -0
- package/lib/_virtual/prism.cjs +1 -0
- package/lib/_virtual/sax.cjs +1 -0
- package/lib/_virtual/string_decoder.cjs +1 -0
- package/lib/_virtual/tinymce.cjs +1 -0
- package/lib/_virtual/weekOfYear.cjs +1 -0
- package/lib/index.cjs +1 -0
- package/lib/plugins/formValidatorUtil.cjs +1 -0
- package/lib/plugins/index.cjs +1 -0
- package/lib/style.css +1 -0
- package/lib/workflow-editor/index.cjs +1 -0
- package/package.json +5 -3
- package/vite.config.js +49 -11
- package/lib/401-5a92e011.js +0 -101
- package/lib/404-2e472acc.js +0 -26
- package/lib/authredirect-ae6e75b4.js +0 -10
- package/lib/iframe-page-4e84c0f8.js +0 -33
- package/lib/index-27119bd2.js +0 -31464
- package/lib/index-369eae4a.js +0 -13
- package/lib/tab-content-iframe-index-e9146736.js +0 -33
- package/lib/tab-content-index-bbc6792b.js +0 -1241
- package/lib/tache-subprocess-history-d51d6a50.js +0 -56
- package/lib/workflow-editor.css +0 -1
- package/lib/workflow-editor.js +0 -5
- package/lib/workflow-editor.umd.cjs +0 -85
- package/packages/index.js +0 -34
- package/packages/plugins/formValidatorUtil.js +0 -723
- package/packages/plugins/index.js +0 -8
- package/packages/workflow-editor/index.js +0 -14
- package/packages/workflow-editor/src/api.js +0 -7
- package/packages/workflow-editor/src/assets/tab-select.png +0 -0
- package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
- package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
- package/packages/workflow-editor/src/constant.js +0 -8
- package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
- package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
- package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
- package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
- package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
- package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
- package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
- package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
- package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
- package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
- package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
- package/packages/workflow-editor/src/main/canvas.vue +0 -493
- package/packages/workflow-editor/src/main/context-menu.vue +0 -147
- package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
- package/packages/workflow-editor/src/main/selection-region.vue +0 -66
- package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
- package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
- package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
- package/packages/workflow-editor/src/main/toolbox.vue +0 -60
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
- package/packages/workflow-editor/src/process-json.js +0 -624
- package/packages/workflow-editor/src/process-service.js +0 -69
- package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
- package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -268
- package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
- package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
- package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
- package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
- package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
- package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
- package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
- package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
- package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
- package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
- package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -139
- package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
- package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
- package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
- package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
- package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
- package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
- package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
- package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
- package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
- package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -107
- package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
- package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
- package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
- package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
- package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
- package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
- package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
- package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
- package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
- package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
- package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
- package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
- package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
- package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
- package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
- package/packages/workflow-editor/src/store/getters.js +0 -33
- package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
- package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
- package/packages/workflow-editor/src/taches/common-methods.js +0 -21
- package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
- package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
- package/packages/workflow-editor/src/taches/decision.vue +0 -102
- package/packages/workflow-editor/src/taches/end.vue +0 -76
- package/packages/workflow-editor/src/taches/fork.vue +0 -102
- package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
- package/packages/workflow-editor/src/taches/human-task.vue +0 -113
- package/packages/workflow-editor/src/taches/join.vue +0 -91
- package/packages/workflow-editor/src/taches/joint.vue +0 -177
- package/packages/workflow-editor/src/taches/start.vue +0 -76
- package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
- package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
- package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
- package/packages/workflow-editor/src/transitions/transition.vue +0 -209
- package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
- package/packages/workflow-editor/src/util.js +0 -499
- package/packages/workflow-editor/src/workflow-editor.vue +0 -852
- package/packages/workflow-editor/src/workflow-history.vue +0 -153
- package/src/i18n/i18n.js +0 -16
- package/src/i18n/langs/cn.js +0 -521
- package/src/i18n/langs/en.js +0 -529
- /package/{public → dist}/vite.svg +0 -0
package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue
DELETED
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div style="width: 100%;margin-top: 10px;">
|
|
3
|
-
<span v-for="(mapValue, key) in subtableConditionMap" :key="key">
|
|
4
|
-
<el-card class="box-card">
|
|
5
|
-
<div class="clearfix">
|
|
6
|
-
<el-row>
|
|
7
|
-
<el-col :span="12">
|
|
8
|
-
<span>{{ key }}</span>
|
|
9
|
-
</el-col>
|
|
10
|
-
<el-col v-if="selectedFieldMap[key]" :span="12">
|
|
11
|
-
<el-switch
|
|
12
|
-
v-model="selectedFieldMap[key].sumPermission"
|
|
13
|
-
:inactive-text="$t('workflowEditor.condition.accessControl')"
|
|
14
|
-
@change="changeSumPermission(key)"
|
|
15
|
-
/>
|
|
16
|
-
</el-col>
|
|
17
|
-
</el-row>
|
|
18
|
-
<el-row>
|
|
19
|
-
<el-col>
|
|
20
|
-
<span v-if="selectedFieldMap[key] && selectedFieldMap[key].sumPermission">
|
|
21
|
-
<span style="color: cornflowerblue">{{ $t('workflowEditor.condition.formBindingModel') }}:</span>
|
|
22
|
-
<span style="padding-left:5px"><el-input v-model="selectedFieldMap[key].modelName" style="width:300px" /></span>
|
|
23
|
-
<el-button icon="el-icon-refresh" type="text" @click="refreshModelName(key)" />
|
|
24
|
-
</span>
|
|
25
|
-
</el-col>
|
|
26
|
-
</el-row>
|
|
27
|
-
<!-- <span>{{ selectedFieldMap }}</span> -->
|
|
28
|
-
</div>
|
|
29
|
-
<div v-if="selectedFieldMap[key] && selectedFieldMap[key].sumPermission">
|
|
30
|
-
<editable-child-field-setting :setting="selectedFieldMap[key]" :table-name="key" @combinationParameters="combinationParameters" />
|
|
31
|
-
</div>
|
|
32
|
-
</el-card>
|
|
33
|
-
</span>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script>
|
|
38
|
-
import editableChildFieldSetting from './editable-child-field-setting'
|
|
39
|
-
import componentsConfigUtil from './componentsConfigUtil'
|
|
40
|
-
import { mapGetters } from 'vuex'
|
|
41
|
-
export default {
|
|
42
|
-
name: 'EditableChildFields',
|
|
43
|
-
components: {
|
|
44
|
-
editableChildFieldSetting
|
|
45
|
-
},
|
|
46
|
-
props: {
|
|
47
|
-
modelValue: {
|
|
48
|
-
type: [Array, Object],
|
|
49
|
-
default: null
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
data() {
|
|
53
|
-
let selectedFields = []
|
|
54
|
-
if (this.modelValue !== '' && this.modelValue !== null && this.modelValue !== undefined) {
|
|
55
|
-
if (Array.isArray(this.modelValue)) {
|
|
56
|
-
selectedFields = this.modelValue
|
|
57
|
-
} else {
|
|
58
|
-
// 只有一个字段时其实是field对象
|
|
59
|
-
selectedFields.push(this.modelValue)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return {
|
|
63
|
-
selectedFields,
|
|
64
|
-
selectedFieldMap: {}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
computed: {
|
|
68
|
-
...mapGetters('wfEditor', [
|
|
69
|
-
'subtableConditionMap'
|
|
70
|
-
])
|
|
71
|
-
},
|
|
72
|
-
watch: {
|
|
73
|
-
},
|
|
74
|
-
created() {
|
|
75
|
-
if (this.selectedFields && this.selectedFields.length > 0) {
|
|
76
|
-
this.selectedFields.forEach(item => {
|
|
77
|
-
const sss = {}
|
|
78
|
-
const tableName = item.tableName
|
|
79
|
-
if (item.action) {
|
|
80
|
-
if (Array.isArray(item.action)) {
|
|
81
|
-
if (item.action.length > 0) {
|
|
82
|
-
const sssActionArr = []
|
|
83
|
-
const actionVisibleCondition = {}
|
|
84
|
-
item.action.forEach(item1 => {
|
|
85
|
-
sssActionArr.push(item1.name)
|
|
86
|
-
const param = {}
|
|
87
|
-
if (item1.condition) {
|
|
88
|
-
param.condition = this.xmlToData(item1.condition)
|
|
89
|
-
}
|
|
90
|
-
param.parentCondition = item1.parentCondition
|
|
91
|
-
param.userCondition = item1.userCondition
|
|
92
|
-
actionVisibleCondition[item1.name] = param
|
|
93
|
-
// actionVisibleCondition[item1.name] = item1.visibleCondition
|
|
94
|
-
})
|
|
95
|
-
sss.actionArr = sssActionArr
|
|
96
|
-
sss.visibleConditionArr = actionVisibleCondition
|
|
97
|
-
}
|
|
98
|
-
} else {
|
|
99
|
-
const sssActionArr = []
|
|
100
|
-
const actionVisibleCondition = {}
|
|
101
|
-
sssActionArr.push(item.action.name)
|
|
102
|
-
const param = {}
|
|
103
|
-
if (item.action.condition) {
|
|
104
|
-
param.condition = this.xmlToData(item.action.condition)
|
|
105
|
-
}
|
|
106
|
-
param.parentCondition = item.action.parentCondition
|
|
107
|
-
param.userCondition = item.action.userCondition
|
|
108
|
-
actionVisibleCondition[item.action.name] = param
|
|
109
|
-
sss.actionArr = sssActionArr
|
|
110
|
-
sss.visibleConditionArr = actionVisibleCondition
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
if (item.field) {
|
|
114
|
-
if (Array.isArray(item.field)) {
|
|
115
|
-
if (item.field.length > 0) {
|
|
116
|
-
const sssFieldArr = []
|
|
117
|
-
item.field.forEach(item2 => {
|
|
118
|
-
const fieldItem = {}
|
|
119
|
-
fieldItem.name = item2.name
|
|
120
|
-
fieldItem.constraintRule = item2.constraintRule
|
|
121
|
-
fieldItem.condition = this.xmlToData(item2.condition)
|
|
122
|
-
fieldItem.userCondition = item2.userCondition
|
|
123
|
-
fieldItem.parentCondition = item2.parentCondition
|
|
124
|
-
sssFieldArr.push(fieldItem)
|
|
125
|
-
})
|
|
126
|
-
sss.fieldArr = sssFieldArr
|
|
127
|
-
}
|
|
128
|
-
} else {
|
|
129
|
-
const sssFieldArr = []
|
|
130
|
-
const fieldItem = {}
|
|
131
|
-
fieldItem.name = item.field.name
|
|
132
|
-
fieldItem.constraintRule = item.field.constraintRule
|
|
133
|
-
fieldItem.condition = this.xmlToData(item.field.condition)
|
|
134
|
-
fieldItem.userCondition = item.field.userCondition
|
|
135
|
-
fieldItem.parentCondition = item.field.parentCondition
|
|
136
|
-
sssFieldArr.push(fieldItem)
|
|
137
|
-
sss.fieldArr = sssFieldArr
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (item.modelName) {
|
|
141
|
-
sss.modelName = item.modelName
|
|
142
|
-
} else {
|
|
143
|
-
sss.modelName = null
|
|
144
|
-
}
|
|
145
|
-
if (item.permission) {
|
|
146
|
-
sss.sumPermission = item.permission
|
|
147
|
-
} else {
|
|
148
|
-
sss.sumPermission = false
|
|
149
|
-
}
|
|
150
|
-
this.selectedFieldMap[tableName] = sss
|
|
151
|
-
// this.$set(this.selectedFieldMap, tableName, sss)
|
|
152
|
-
})
|
|
153
|
-
}
|
|
154
|
-
if (this.subtableConditionMap) {
|
|
155
|
-
for (var key in this.subtableConditionMap) {
|
|
156
|
-
if (!this.selectedFieldMap[key]) {
|
|
157
|
-
const sss = {}
|
|
158
|
-
sss.tableName = key
|
|
159
|
-
sss.modelName = this.subtableConditionMap[key].modelName
|
|
160
|
-
sss.sumPermission = false
|
|
161
|
-
this.selectedFieldMap[key] = sss
|
|
162
|
-
// this.$set(this.selectedFieldMap, key, sss)
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
mounted() {
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
methods: {
|
|
171
|
-
...componentsConfigUtil,
|
|
172
|
-
combinationParameters(subTableItem) {
|
|
173
|
-
if (subTableItem && subTableItem.tableName) {
|
|
174
|
-
if (this.selectedFields && this.selectedFields.length > 0) {
|
|
175
|
-
const index = this.selectedFields.findIndex((fie) => fie.tableName === subTableItem.tableName)
|
|
176
|
-
if (index !== -1) {
|
|
177
|
-
this.selectedFields[index] = subTableItem
|
|
178
|
-
// this.$set(this.selectedFields, index, subTableItem)
|
|
179
|
-
} else {
|
|
180
|
-
this.selectedFields.push(subTableItem)
|
|
181
|
-
}
|
|
182
|
-
} else {
|
|
183
|
-
this.selectedFields = []
|
|
184
|
-
this.selectedFields.push(subTableItem)
|
|
185
|
-
}
|
|
186
|
-
// this.$emit('input', this.selectedFields)
|
|
187
|
-
this.$emit('update:modelValue', this.selectedFields)
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
refreshModelName(key) {
|
|
191
|
-
if (this.subtableConditionMap && this.subtableConditionMap[key] && this.subtableConditionMap[key].modelName) {
|
|
192
|
-
if (this.selectedFieldMap[key]) {
|
|
193
|
-
const sss = this.selectedFieldMap[key]
|
|
194
|
-
sss.modelName = this.subtableConditionMap[key].modelName
|
|
195
|
-
} else {
|
|
196
|
-
const sss = {}
|
|
197
|
-
sss.modelName = this.subtableConditionMap[key].modelName
|
|
198
|
-
this.selectedFieldMap[key] = sss
|
|
199
|
-
// this.$set(this.selectedFieldMap, key, sss)
|
|
200
|
-
}
|
|
201
|
-
this.$message({
|
|
202
|
-
showClose: true,
|
|
203
|
-
type: 'success',
|
|
204
|
-
message: this.$t('workflowEditorMessage.updateSuccessful')
|
|
205
|
-
})
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
changeSumPermission(key) {
|
|
209
|
-
if (key && this.selectedFieldMap[key]) {
|
|
210
|
-
if (!this.selectedFields) {
|
|
211
|
-
this.selectedFields = []
|
|
212
|
-
// this.$set(this, 'selectedFields', [])
|
|
213
|
-
}
|
|
214
|
-
if (this.selectedFieldMap[key].sumPermission === false) {
|
|
215
|
-
const index = this.selectedFields.findIndex((fie) => fie.tableName === key)
|
|
216
|
-
if (index !== null && index !== undefined && index !== -1) {
|
|
217
|
-
// this.$delete(this.selectedFields, index)
|
|
218
|
-
this.selectedFields[index]['permission'] = false
|
|
219
|
-
// this.$set(this.selectedFields[index], 'permission', false)
|
|
220
|
-
} else {
|
|
221
|
-
this.selectedFields[this.selectedFields.length] = {
|
|
222
|
-
permission: false,
|
|
223
|
-
tableName: key
|
|
224
|
-
}
|
|
225
|
-
// this.$set(this.selectedFields, this.selectedFields.length, {
|
|
226
|
-
// permission: false,
|
|
227
|
-
// tableName: key
|
|
228
|
-
// })
|
|
229
|
-
}
|
|
230
|
-
} else {
|
|
231
|
-
const index = this.selectedFields.findIndex((fie) => fie.tableName === key)
|
|
232
|
-
if (index !== null && index !== undefined && index !== -1) {
|
|
233
|
-
// this.$delete(this.selectedFields, index)
|
|
234
|
-
this.selectedFields[index]['permission'] = true
|
|
235
|
-
// this.$set(this.selectedFields[index], 'permission', true)
|
|
236
|
-
} else {
|
|
237
|
-
this.selectedFields[this.selectedFields.length] = {
|
|
238
|
-
permission: true,
|
|
239
|
-
tableName: key
|
|
240
|
-
}
|
|
241
|
-
// this.$set(this.selectedFields, this.selectedFields.length, {
|
|
242
|
-
// permission: true,
|
|
243
|
-
// tableName: key
|
|
244
|
-
// })
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
// this.$emit('input', this.selectedFields)
|
|
249
|
-
this.$emit('update:modelValue', this.selectedFields)
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
</script>
|
|
254
|
-
|
|
255
|
-
<style lang="scss" scoped>
|
|
256
|
-
|
|
257
|
-
</style>
|
package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue
DELETED
|
@@ -1,430 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
id="appContainer"
|
|
4
|
-
width="60%"
|
|
5
|
-
:title="$t('workflowEditor.task.selectEditableField')"
|
|
6
|
-
model-value
|
|
7
|
-
top="10vh"
|
|
8
|
-
append-to-body
|
|
9
|
-
class="properties-editor-noTab"
|
|
10
|
-
center
|
|
11
|
-
@close="$emit('close')"
|
|
12
|
-
>
|
|
13
|
-
<el-form :model="formModel">
|
|
14
|
-
<!-- <el-transfer
|
|
15
|
-
v-model="formModel.selectedFields"
|
|
16
|
-
filterable
|
|
17
|
-
:filter-method="filterMethod"
|
|
18
|
-
:render-content="renderTransferFunc"
|
|
19
|
-
:filter-placeholder="$t('workflowEditorMessage.pleaseEnterFieldName')"
|
|
20
|
-
:data="availableFields"
|
|
21
|
-
:props="{
|
|
22
|
-
key:'name',
|
|
23
|
-
label:'label'
|
|
24
|
-
}"
|
|
25
|
-
:titles="[this.$t('workflowEditor.task.optionalField'),this.$t('workflowEditor.task.selectedFields')]"
|
|
26
|
-
/> -->
|
|
27
|
-
<!-- <el-checkbox-group v-model="formModel.selectedFields">
|
|
28
|
-
<span :key="count" :v-for="count in availableFieldsCount">
|
|
29
|
-
<el-row>
|
|
30
|
-
<el-col :span="8">
|
|
31
|
-
<el-checkbox label="复选框 A" />
|
|
32
|
-
</el-col>
|
|
33
|
-
<el-col :span="8">
|
|
34
|
-
<el-checkbox label="复选框 A" />
|
|
35
|
-
</el-col>
|
|
36
|
-
<el-col :span="8">
|
|
37
|
-
<el-checkbox label="复选框 A" />
|
|
38
|
-
</el-col>
|
|
39
|
-
</el-row>
|
|
40
|
-
</span>
|
|
41
|
-
</el-checkbox-group> -->
|
|
42
|
-
<el-checkbox-group v-model="formModel.selectedFields">
|
|
43
|
-
<el-row>
|
|
44
|
-
<template v-for="(item, count) in availableFieldsCount" :key="item.prop">
|
|
45
|
-
<el-col
|
|
46
|
-
v-if="availableFields[count * 3 + 0] && !availableFields[count * 3 + 0].baseField"
|
|
47
|
-
:span="8"
|
|
48
|
-
>
|
|
49
|
-
<el-checkbox
|
|
50
|
-
v-if="availableFields[count * 3 + 0].name.indexOf('$') === -1"
|
|
51
|
-
:label="availableFields[count * 3 + 0].name"
|
|
52
|
-
@change="
|
|
53
|
-
pinSelect(
|
|
54
|
-
availableFields[count * 3 + 0].name,
|
|
55
|
-
availableFields[count * 3 + 0].index
|
|
56
|
-
)
|
|
57
|
-
"
|
|
58
|
-
><span :title="availableFields[count * 3 + 0].label">{{
|
|
59
|
-
availableFields[count * 3 + 0].label
|
|
60
|
-
}}</span></el-checkbox
|
|
61
|
-
>
|
|
62
|
-
<el-checkbox
|
|
63
|
-
v-else
|
|
64
|
-
:label="availableFields[count * 3 + 0].name"
|
|
65
|
-
@change="
|
|
66
|
-
pinSelect(
|
|
67
|
-
availableFields[count * 3 + 0].name,
|
|
68
|
-
availableFields[count * 3 + 0].index
|
|
69
|
-
)
|
|
70
|
-
"
|
|
71
|
-
><span
|
|
72
|
-
style="color: #409eff"
|
|
73
|
-
class="ellipsis"
|
|
74
|
-
:title="availableFields[count * 3 + 0].label"
|
|
75
|
-
>{{ availableFields[count * 3 + 0].label }}</span
|
|
76
|
-
></el-checkbox
|
|
77
|
-
>
|
|
78
|
-
</el-col>
|
|
79
|
-
<el-col
|
|
80
|
-
v-if="availableFields[count * 3 + 1] && !availableFields[count * 3 + 1].baseField"
|
|
81
|
-
:span="8"
|
|
82
|
-
>
|
|
83
|
-
<el-checkbox
|
|
84
|
-
v-if="availableFields[count * 3 + 1].name.indexOf('$') === -1"
|
|
85
|
-
:label="availableFields[count * 3 + 1].name"
|
|
86
|
-
@change="
|
|
87
|
-
pinSelect(
|
|
88
|
-
availableFields[count * 3 + 1].name,
|
|
89
|
-
availableFields[count * 3 + 1].index
|
|
90
|
-
)
|
|
91
|
-
"
|
|
92
|
-
><span :title="availableFields[count * 3 + 1].label">{{
|
|
93
|
-
availableFields[count * 3 + 1].label
|
|
94
|
-
}}</span></el-checkbox
|
|
95
|
-
>
|
|
96
|
-
<el-checkbox
|
|
97
|
-
v-else
|
|
98
|
-
:label="availableFields[count * 3 + 1].name"
|
|
99
|
-
@change="
|
|
100
|
-
pinSelect(
|
|
101
|
-
availableFields[count * 3 + 1].name,
|
|
102
|
-
availableFields[count * 3 + 1].index
|
|
103
|
-
)
|
|
104
|
-
"
|
|
105
|
-
><span
|
|
106
|
-
style="color: #409eff"
|
|
107
|
-
class="ellipsis"
|
|
108
|
-
:title="availableFields[count * 3 + 1].label"
|
|
109
|
-
>{{ availableFields[count * 3 + 1].label }}</span
|
|
110
|
-
></el-checkbox
|
|
111
|
-
>
|
|
112
|
-
</el-col>
|
|
113
|
-
<el-col
|
|
114
|
-
v-if="availableFields[count * 3 + 2] && !availableFields[count * 3 + 2].baseField"
|
|
115
|
-
:span="8"
|
|
116
|
-
>
|
|
117
|
-
<el-checkbox
|
|
118
|
-
v-if="availableFields[count * 3 + 2].name.indexOf('$') === -1"
|
|
119
|
-
:label="availableFields[count * 3 + 2].name"
|
|
120
|
-
@change="
|
|
121
|
-
pinSelect(
|
|
122
|
-
availableFields[count * 3 + 2].name,
|
|
123
|
-
availableFields[count * 3 + 2].index
|
|
124
|
-
)
|
|
125
|
-
"
|
|
126
|
-
><span :title="availableFields[count * 3 + 2].label">{{
|
|
127
|
-
availableFields[count * 3 + 2].label
|
|
128
|
-
}}</span></el-checkbox
|
|
129
|
-
>
|
|
130
|
-
<el-checkbox
|
|
131
|
-
v-else
|
|
132
|
-
:label="availableFields[count * 3 + 2].name"
|
|
133
|
-
@change="
|
|
134
|
-
pinSelect(
|
|
135
|
-
availableFields[count * 3 + 2].name,
|
|
136
|
-
availableFields[count * 3 + 2].index
|
|
137
|
-
)
|
|
138
|
-
"
|
|
139
|
-
><span
|
|
140
|
-
style="color: #409eff"
|
|
141
|
-
class="ellipsis"
|
|
142
|
-
:title="availableFields[count * 3 + 2].label"
|
|
143
|
-
>{{ availableFields[count * 3 + 2].label }}</span
|
|
144
|
-
></el-checkbox
|
|
145
|
-
>
|
|
146
|
-
</el-col>
|
|
147
|
-
</template>
|
|
148
|
-
</el-row>
|
|
149
|
-
<el-collapse v-model="activeNames">
|
|
150
|
-
<el-collapse-item :title="$t('workflowEditor.task.baseField')" name="baseField">
|
|
151
|
-
<template v-for="(item, count) in availableFieldsCount" :key="item.prop">
|
|
152
|
-
<span>
|
|
153
|
-
<el-row>
|
|
154
|
-
<el-col
|
|
155
|
-
v-if="
|
|
156
|
-
availableFields[count * 3 + 0] && availableFields[count * 3 + 0].baseField
|
|
157
|
-
"
|
|
158
|
-
:span="8"
|
|
159
|
-
>
|
|
160
|
-
<el-checkbox
|
|
161
|
-
v-if="availableFields[count * 3 + 0].name.indexOf('$') === -1"
|
|
162
|
-
:label="availableFields[count * 3 + 0].name"
|
|
163
|
-
@change="
|
|
164
|
-
pinSelect(
|
|
165
|
-
availableFields[count * 3 + 0].name,
|
|
166
|
-
availableFields[count * 3 + 0].index
|
|
167
|
-
)
|
|
168
|
-
"
|
|
169
|
-
><span :title="availableFields[count * 3 + 0].label">{{
|
|
170
|
-
availableFields[count * 3 + 0].label
|
|
171
|
-
}}</span></el-checkbox
|
|
172
|
-
>
|
|
173
|
-
<el-checkbox
|
|
174
|
-
v-else
|
|
175
|
-
:label="availableFields[count * 3 + 0].name"
|
|
176
|
-
@change="
|
|
177
|
-
pinSelect(
|
|
178
|
-
availableFields[count * 3 + 0].name,
|
|
179
|
-
availableFields[count * 3 + 0].index
|
|
180
|
-
)
|
|
181
|
-
"
|
|
182
|
-
><span
|
|
183
|
-
style="color: #409eff"
|
|
184
|
-
class="ellipsis"
|
|
185
|
-
:title="availableFields[count * 3 + 0].label"
|
|
186
|
-
>{{ availableFields[count * 3 + 0].label }}</span
|
|
187
|
-
></el-checkbox
|
|
188
|
-
>
|
|
189
|
-
</el-col>
|
|
190
|
-
<el-col
|
|
191
|
-
v-if="
|
|
192
|
-
availableFields[count * 3 + 1] && availableFields[count * 3 + 1].baseField
|
|
193
|
-
"
|
|
194
|
-
:span="8"
|
|
195
|
-
>
|
|
196
|
-
<el-checkbox
|
|
197
|
-
v-if="availableFields[count * 3 + 1].name.indexOf('$') === -1"
|
|
198
|
-
:label="availableFields[count * 3 + 1].name"
|
|
199
|
-
@change="
|
|
200
|
-
pinSelect(
|
|
201
|
-
availableFields[count * 3 + 1].name,
|
|
202
|
-
availableFields[count * 3 + 1].index
|
|
203
|
-
)
|
|
204
|
-
"
|
|
205
|
-
><span :title="availableFields[count * 3 + 1].label">{{
|
|
206
|
-
availableFields[count * 3 + 1].label
|
|
207
|
-
}}</span></el-checkbox
|
|
208
|
-
>
|
|
209
|
-
<el-checkbox
|
|
210
|
-
v-else
|
|
211
|
-
:label="availableFields[count * 3 + 1].name"
|
|
212
|
-
@change="
|
|
213
|
-
pinSelect(
|
|
214
|
-
availableFields[count * 3 + 1].name,
|
|
215
|
-
availableFields[count * 3 + 1].index
|
|
216
|
-
)
|
|
217
|
-
"
|
|
218
|
-
><span
|
|
219
|
-
style="color: #409eff"
|
|
220
|
-
class="ellipsis"
|
|
221
|
-
:title="availableFields[count * 3 + 1].label"
|
|
222
|
-
>{{ availableFields[count * 3 + 1].label }}</span
|
|
223
|
-
></el-checkbox
|
|
224
|
-
>
|
|
225
|
-
</el-col>
|
|
226
|
-
<el-col
|
|
227
|
-
v-if="
|
|
228
|
-
availableFields[count * 3 + 2] && availableFields[count * 3 + 2].baseField
|
|
229
|
-
"
|
|
230
|
-
:span="8"
|
|
231
|
-
>
|
|
232
|
-
<el-checkbox
|
|
233
|
-
v-if="availableFields[count * 3 + 2].name.indexOf('$') === -1"
|
|
234
|
-
:label="availableFields[count * 3 + 2].name"
|
|
235
|
-
@change="
|
|
236
|
-
pinSelect(
|
|
237
|
-
availableFields[count * 3 + 2].name,
|
|
238
|
-
availableFields[count * 3 + 2].index
|
|
239
|
-
)
|
|
240
|
-
"
|
|
241
|
-
><span :title="availableFields[count * 3 + 2].label">{{
|
|
242
|
-
availableFields[count * 3 + 2].label
|
|
243
|
-
}}</span></el-checkbox
|
|
244
|
-
>
|
|
245
|
-
<el-checkbox
|
|
246
|
-
v-else
|
|
247
|
-
:label="availableFields[count * 3 + 2].name"
|
|
248
|
-
@change="
|
|
249
|
-
pinSelect(
|
|
250
|
-
availableFields[count * 3 + 2].name,
|
|
251
|
-
availableFields[count * 3 + 2].index
|
|
252
|
-
)
|
|
253
|
-
"
|
|
254
|
-
><span
|
|
255
|
-
style="color: #409eff"
|
|
256
|
-
class="ellipsis"
|
|
257
|
-
:title="availableFields[count * 3 + 2].label"
|
|
258
|
-
>{{ availableFields[count * 3 + 2].label }}</span
|
|
259
|
-
></el-checkbox
|
|
260
|
-
>
|
|
261
|
-
</el-col>
|
|
262
|
-
</el-row>
|
|
263
|
-
</span>
|
|
264
|
-
</template>
|
|
265
|
-
</el-collapse-item>
|
|
266
|
-
</el-collapse>
|
|
267
|
-
</el-checkbox-group>
|
|
268
|
-
|
|
269
|
-
<el-form-item :label="$t('workflowEditor.task.editingMethod')">
|
|
270
|
-
<el-radio-group v-model="formModel.constraintRule">
|
|
271
|
-
<el-radio label="REQUIRED">
|
|
272
|
-
{{ $t('workflowEditorMessage.mustFill') }}
|
|
273
|
-
</el-radio>
|
|
274
|
-
<el-radio label="READ_ONLY">
|
|
275
|
-
{{ $t('workflowEditorMessage.readOnly') }}
|
|
276
|
-
</el-radio>
|
|
277
|
-
</el-radio-group>
|
|
278
|
-
</el-form-item>
|
|
279
|
-
<el-form-item :label="$t('workflowEditor.task.additionalConditions')">
|
|
280
|
-
<el-switch v-model="formModel.showCondition" />
|
|
281
|
-
<additional-condition v-if="formModel.showCondition" v-model="formModel.condition" />
|
|
282
|
-
</el-form-item>
|
|
283
|
-
</el-form>
|
|
284
|
-
<template #footer>
|
|
285
|
-
<el-button type="primary" size="small" @click="setSelectedFields">
|
|
286
|
-
{{ $t('workflowEditorPublicModel.determine') }}
|
|
287
|
-
</el-button>
|
|
288
|
-
<el-button size="small" @click="$emit('close')">
|
|
289
|
-
{{ $t('workflowEditorPublicModel.cancel') }}
|
|
290
|
-
</el-button>
|
|
291
|
-
</template>
|
|
292
|
-
</el-dialog>
|
|
293
|
-
</template>
|
|
294
|
-
|
|
295
|
-
<script>
|
|
296
|
-
import AdditionalCondition from '../common/additional-condition'
|
|
297
|
-
import { mapGetters } from 'vuex'
|
|
298
|
-
export default {
|
|
299
|
-
name: 'EditableFieldSelection',
|
|
300
|
-
components: {
|
|
301
|
-
AdditionalCondition
|
|
302
|
-
},
|
|
303
|
-
props: {
|
|
304
|
-
value: {
|
|
305
|
-
type: Array,
|
|
306
|
-
default: null
|
|
307
|
-
},
|
|
308
|
-
disabledFields: {
|
|
309
|
-
type: Array,
|
|
310
|
-
default: null
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
data() {
|
|
314
|
-
return {
|
|
315
|
-
availableFields: [],
|
|
316
|
-
formModel: {
|
|
317
|
-
selectedFields: [],
|
|
318
|
-
constraintRule: 'REQUIRED',
|
|
319
|
-
showCondition: false,
|
|
320
|
-
condition: ''
|
|
321
|
-
},
|
|
322
|
-
availableFieldsCount: null,
|
|
323
|
-
orange: -1,
|
|
324
|
-
pin: false,
|
|
325
|
-
dialogVisible: true,
|
|
326
|
-
activeNames: ['baseField']
|
|
327
|
-
// renderTransferFunc(h, option) {
|
|
328
|
-
// if (option.name.indexOf('$') === 0) {
|
|
329
|
-
// // 表示是子表字段
|
|
330
|
-
// return <span style='color:#409EFF'>{ option.label }</span>
|
|
331
|
-
// } else {
|
|
332
|
-
// return <span>{ option.label }</span>
|
|
333
|
-
// }
|
|
334
|
-
// }
|
|
335
|
-
}
|
|
336
|
-
},
|
|
337
|
-
computed: {
|
|
338
|
-
...mapGetters('wfEditor', ['formFieldsWithSub'])
|
|
339
|
-
},
|
|
340
|
-
created() {
|
|
341
|
-
let fieldIndex = 0
|
|
342
|
-
this.formFieldsWithSub.map((item) => {
|
|
343
|
-
if (this.disabledFields.indexOf(item.name) < 0) {
|
|
344
|
-
item.index = fieldIndex
|
|
345
|
-
this.availableFields.push(item)
|
|
346
|
-
fieldIndex++
|
|
347
|
-
}
|
|
348
|
-
})
|
|
349
|
-
const length = this.availableFields.length
|
|
350
|
-
this.availableFieldsCount = Math.ceil(length / 3)
|
|
351
|
-
// this.$set(this, 'availableFieldsCount', Math.ceil(length / 3))
|
|
352
|
-
// this.$set(this, 'availableFieldsCount', 21)
|
|
353
|
-
},
|
|
354
|
-
mounted() {
|
|
355
|
-
window.addEventListener('keydown', (code) => {
|
|
356
|
-
console.log('按住')
|
|
357
|
-
if (code.keyCode === 16 && code.shiftKey) {
|
|
358
|
-
this.pin = true
|
|
359
|
-
}
|
|
360
|
-
})
|
|
361
|
-
window.addEventListener('keyup', (code) => {
|
|
362
|
-
console.log('松开')
|
|
363
|
-
if (code.keyCode === 16) {
|
|
364
|
-
this.pin = false
|
|
365
|
-
}
|
|
366
|
-
})
|
|
367
|
-
},
|
|
368
|
-
methods: {
|
|
369
|
-
filterMethod(query, item) {
|
|
370
|
-
if (item.label && item.label.indexOf(query) > -1) {
|
|
371
|
-
return true
|
|
372
|
-
} else {
|
|
373
|
-
console.log('filterMethod--item.label=', item.label, item)
|
|
374
|
-
return false
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
setSelectedFields() {
|
|
378
|
-
const fields = []
|
|
379
|
-
for (const field of this.formModel.selectedFields) {
|
|
380
|
-
fields.push({
|
|
381
|
-
name: field,
|
|
382
|
-
constraintRule: this.formModel.constraintRule,
|
|
383
|
-
condition: this.formModel.showCondition ? this.formModel.condition : ''
|
|
384
|
-
})
|
|
385
|
-
}
|
|
386
|
-
// 之前是$emit('input)事件,会导致字段复选框无法选中
|
|
387
|
-
this.$emit('input-value', fields)
|
|
388
|
-
this.$emit('close')
|
|
389
|
-
},
|
|
390
|
-
pinSelect(item, index) {
|
|
391
|
-
console.log(item, index)
|
|
392
|
-
const dataList = this.availableFields
|
|
393
|
-
const origin = this.origin
|
|
394
|
-
const endIdx = index
|
|
395
|
-
if (this.pin && this.formModel.selectedFields.indexOf(item) !== -1) {
|
|
396
|
-
console.log(this.formModel.selectedFields.indexOf(item))
|
|
397
|
-
const sum = Math.abs(origin - endIdx) + 1
|
|
398
|
-
const min = Math.min(origin, endIdx)
|
|
399
|
-
let i = 0
|
|
400
|
-
while (i < sum) {
|
|
401
|
-
const index = min + i
|
|
402
|
-
if (this.formModel.selectedFields.indexOf(dataList[index].name) === -1) {
|
|
403
|
-
this.formModel.selectedFields.push(dataList[index].name)
|
|
404
|
-
}
|
|
405
|
-
i++
|
|
406
|
-
}
|
|
407
|
-
} else {
|
|
408
|
-
this.origin = index
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
</script>
|
|
414
|
-
|
|
415
|
-
<style lang="scss" scoped>
|
|
416
|
-
#appContainer :deep(.el-checkbox) {
|
|
417
|
-
display: block;
|
|
418
|
-
}
|
|
419
|
-
#appContainer :deep(.el-transfer-panel) {
|
|
420
|
-
width: 400px;
|
|
421
|
-
}
|
|
422
|
-
#appContainer :deep(.ellipsis) {
|
|
423
|
-
display: inline-block;
|
|
424
|
-
overflow: hidden;
|
|
425
|
-
text-overflow: ellipsis;
|
|
426
|
-
white-space: nowrap;
|
|
427
|
-
word-break: keep-all;
|
|
428
|
-
width: 55%;
|
|
429
|
-
}
|
|
430
|
-
</style>
|