workflow-editor 0.0.81-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.
- 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 +44 -10
- 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
|
@@ -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,268 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-card class="box-card">
|
|
4
|
-
<template #header> 表单自动填充字段设置 </template>
|
|
5
|
-
<el-row style="margin-bottom: 5px">
|
|
6
|
-
<el-button type="primary" size="small" plain icon="CirclePlus" @click="add">
|
|
7
|
-
{{ $t('workflowEditorPublicModel.add') }}
|
|
8
|
-
</el-button>
|
|
9
|
-
<el-button type="primary" size="small" plain icon="Delete" @click="remove">
|
|
10
|
-
{{ $t('workflowEditorPublicModel.delete') }}
|
|
11
|
-
</el-button>
|
|
12
|
-
</el-row>
|
|
13
|
-
<el-table
|
|
14
|
-
ref="table"
|
|
15
|
-
:data="tableData"
|
|
16
|
-
border
|
|
17
|
-
highlight-current-row
|
|
18
|
-
style="width: 100%"
|
|
19
|
-
@current-change="handleCurrentChange"
|
|
20
|
-
>
|
|
21
|
-
<el-table-column type="index" width="50" />
|
|
22
|
-
<el-table-column prop="name" :label="$t('workflowEditor.common.name')" width="150">
|
|
23
|
-
<template v-slot="scope">
|
|
24
|
-
<el-input
|
|
25
|
-
:value="getFieldLabel(scope.row.name)"
|
|
26
|
-
:placeholder="$t('workflowEditorMessage.pleaseEnterContent')"
|
|
27
|
-
readonly
|
|
28
|
-
@click="showFormFields = true"
|
|
29
|
-
@blur="checkName(scope.row.name)"
|
|
30
|
-
/>
|
|
31
|
-
</template>
|
|
32
|
-
</el-table-column>
|
|
33
|
-
<el-table-column prop="value" :label="$t('workflowEditor.common.fieldValue')" width="200">
|
|
34
|
-
<template v-slot="scope">
|
|
35
|
-
<el-select
|
|
36
|
-
v-model="scope.row.value"
|
|
37
|
-
multiple
|
|
38
|
-
filterable
|
|
39
|
-
allow-create
|
|
40
|
-
default-first-option
|
|
41
|
-
:placeholder="$t('workflowEditorMessage.pleaseSelect')"
|
|
42
|
-
@blur="checkValue(scope.row.value)"
|
|
43
|
-
>
|
|
44
|
-
<el-option v-for="key in keys" :key="key" :label="standardValues[key]" :value="key" />
|
|
45
|
-
</el-select>
|
|
46
|
-
</template>
|
|
47
|
-
</el-table-column>
|
|
48
|
-
<el-table-column prop="separator" :label="$t('workflowEditor.common.separator')">
|
|
49
|
-
<template v-slot="scope">
|
|
50
|
-
<el-input v-model.trim="scope.row.separator" />
|
|
51
|
-
</template>
|
|
52
|
-
</el-table-column>
|
|
53
|
-
<el-table-column prop="fillType" :label="$t('workflowEditor.common.fillInMethod')">
|
|
54
|
-
<template v-slot="scope">
|
|
55
|
-
<el-select v-model="scope.row.fillType">
|
|
56
|
-
<el-option :label="$t('workflowEditor.common.cover')" value="cover" />
|
|
57
|
-
<el-option :label="$t('workflowEditor.common.append')" value="append" />
|
|
58
|
-
<el-option :label="$t('workflowEditor.common.insertToFront')" value="prepend" />
|
|
59
|
-
</el-select>
|
|
60
|
-
</template>
|
|
61
|
-
</el-table-column>
|
|
62
|
-
<el-table-column prop="fillTime" :label="$t('workflowEditor.common.fillInTime')">
|
|
63
|
-
<template v-slot="scope">
|
|
64
|
-
<el-select v-model="scope.row.fillTime">
|
|
65
|
-
<el-option :label="$t('workflowEditor.common.fillInBeforeHandling')" value="before" />
|
|
66
|
-
<el-option :label="$t('workflowEditor.common.fillInAfterHandling')" value="after" />
|
|
67
|
-
</el-select>
|
|
68
|
-
</template>
|
|
69
|
-
</el-table-column>
|
|
70
|
-
</el-table>
|
|
71
|
-
</el-card>
|
|
72
|
-
<el-card class="box-card" style="margin-top: 10px">
|
|
73
|
-
<template #header> 办理意见 </template>
|
|
74
|
-
<el-form-item :label="'意见来源字段'" label-width="100">
|
|
75
|
-
<el-input
|
|
76
|
-
:value="getFieldLabel(opinionAutoSetting.opinionSourceField)"
|
|
77
|
-
:placeholder="$t('workflowEditorMessage.pleaseSelect')"
|
|
78
|
-
readonly
|
|
79
|
-
:clearable="true"
|
|
80
|
-
@click="selectOpinionField"
|
|
81
|
-
>
|
|
82
|
-
<template #append>
|
|
83
|
-
<el-button icon="Delete" @click="clearOpinionField" />
|
|
84
|
-
</template>
|
|
85
|
-
</el-input>
|
|
86
|
-
</el-form-item>
|
|
87
|
-
</el-card>
|
|
88
|
-
<form-fields v-if="showFormFields" @close="setField" />
|
|
89
|
-
</div>
|
|
90
|
-
</template>
|
|
91
|
-
<script>
|
|
92
|
-
import { standardValues } from './auto-filled-fields-utils'
|
|
93
|
-
import FormFields from '../common/form-fields'
|
|
94
|
-
import { getFormFieldLabel } from '../common/form-fields-utils'
|
|
95
|
-
export default {
|
|
96
|
-
name: 'AutoFilledFields',
|
|
97
|
-
components: {
|
|
98
|
-
FormFields
|
|
99
|
-
},
|
|
100
|
-
props: {
|
|
101
|
-
modelValue: {
|
|
102
|
-
type: Object,
|
|
103
|
-
default: () => {
|
|
104
|
-
return {}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
opinionSetting: {
|
|
108
|
-
type: Object,
|
|
109
|
-
default: () => {
|
|
110
|
-
return {}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
data() {
|
|
115
|
-
const tableData = []
|
|
116
|
-
if (this.modelValue.field !== undefined && this.modelValue.field !== null) {
|
|
117
|
-
// xml中有多个field时是数组,只有一个field时是Object
|
|
118
|
-
if (Array.isArray(this.modelValue.field)) {
|
|
119
|
-
this.modelValue.field.map((field) => {
|
|
120
|
-
const row = { ...field }
|
|
121
|
-
if (typeof field.value === 'string' && field.value.indexOf('+') !== -1) {
|
|
122
|
-
row.value = field.value.split('+')
|
|
123
|
-
} else {
|
|
124
|
-
row.value = []
|
|
125
|
-
row.value.push(field.value)
|
|
126
|
-
}
|
|
127
|
-
tableData.push(row)
|
|
128
|
-
})
|
|
129
|
-
} else {
|
|
130
|
-
const row = { ...this.modelValue.field }
|
|
131
|
-
if (typeof this.modelValue.field.value === 'string' && this.modelValue.field.value.indexOf('+') !== -1) {
|
|
132
|
-
row.value = this.modelValue.field.value.split('+')
|
|
133
|
-
} else {
|
|
134
|
-
row.value = []
|
|
135
|
-
row.value.push(this.modelValue.field.value)
|
|
136
|
-
}
|
|
137
|
-
tableData.push(row)
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
let opinionAutoSetting = {}
|
|
141
|
-
if (this.opinionSetting && this.opinionSetting.opinionSourceField) {
|
|
142
|
-
opinionAutoSetting = { ...this.opinionSetting }
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
tableData,
|
|
146
|
-
currentRow: null,
|
|
147
|
-
standardValues,
|
|
148
|
-
showFormFields: false,
|
|
149
|
-
isSelectOpinionField: false,
|
|
150
|
-
opinionAutoSetting
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
computed: {
|
|
154
|
-
keys() {
|
|
155
|
-
return Object.keys(this.standardValues)
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
watch: {
|
|
159
|
-
opinionAutoSetting: {
|
|
160
|
-
deep: true,
|
|
161
|
-
handler(val) {
|
|
162
|
-
const setting = { ...val }
|
|
163
|
-
this.$emit('update:opinion-setting', setting)
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
mounted() {
|
|
168
|
-
if (this.tableData && this.tableData.length > 0) {
|
|
169
|
-
this.setCurrentRow(this.tableData[0])
|
|
170
|
-
}
|
|
171
|
-
this.$watch(
|
|
172
|
-
'tableData',
|
|
173
|
-
function () {
|
|
174
|
-
const fields = []
|
|
175
|
-
this.tableData.map((row) => {
|
|
176
|
-
if (row.name !== '' && row.value.length > 0) {
|
|
177
|
-
const field = { ...row }
|
|
178
|
-
field.value = row.value.join('+')
|
|
179
|
-
fields.push(field)
|
|
180
|
-
}
|
|
181
|
-
})
|
|
182
|
-
|
|
183
|
-
this.$emit('update:modelValue', {
|
|
184
|
-
field: fields
|
|
185
|
-
})
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
// deep为true可以监控数组中的元素的某个属性的变化
|
|
189
|
-
deep: true
|
|
190
|
-
}
|
|
191
|
-
)
|
|
192
|
-
},
|
|
193
|
-
created() {},
|
|
194
|
-
methods: {
|
|
195
|
-
add() {
|
|
196
|
-
for (let i = 0; i < this.tableData.length; i++) {
|
|
197
|
-
if (this.tableData[i].name === '' || this.tableData[i].value === '') {
|
|
198
|
-
this.$alert(this.$t('workflowEditorMessage.theFieldNameOrFieldValueInLineCannotBeEmpty', { row: i + 1 }))
|
|
199
|
-
return
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const newRow = {
|
|
203
|
-
name: '',
|
|
204
|
-
value: [],
|
|
205
|
-
separator: '',
|
|
206
|
-
fillType: 'cover',
|
|
207
|
-
fillTime: 'after'
|
|
208
|
-
}
|
|
209
|
-
this.tableData.push(newRow)
|
|
210
|
-
this.setCurrentRow(newRow)
|
|
211
|
-
},
|
|
212
|
-
remove() {
|
|
213
|
-
if (this.currentRow === null) {
|
|
214
|
-
this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
|
|
215
|
-
return
|
|
216
|
-
}
|
|
217
|
-
let index
|
|
218
|
-
for (let i = 0; i < this.tableData.length; i++) {
|
|
219
|
-
if (this.tableData[i].name === this.currentRow.name) {
|
|
220
|
-
index = i
|
|
221
|
-
break
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
this.tableData.splice(index, 1)
|
|
225
|
-
// 当前选中的index如果是最后一行,那么删除后,index会等于length造成下标越界,因此需要让index等于新的最后一行
|
|
226
|
-
index = index <= this.tableData.length - 1 ? index : this.tableData.length - 1
|
|
227
|
-
this.setCurrentRow(this.tableData[index])
|
|
228
|
-
},
|
|
229
|
-
setCurrentRow(row) {
|
|
230
|
-
this.$refs.table.setCurrentRow(row)
|
|
231
|
-
},
|
|
232
|
-
handleCurrentChange(val) {
|
|
233
|
-
this.currentRow = val
|
|
234
|
-
},
|
|
235
|
-
checkName(name) {
|
|
236
|
-
if (!this.showFormFields && name === '') {
|
|
237
|
-
this.$alert(this.$t('workflowEditorMessage.fieldNameCannotBeEmpty'))
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
checkValue(value) {
|
|
241
|
-
if (value.length === 0) {
|
|
242
|
-
this.$alert(this.$t('workflowEditorMessage.fieldValueCannotBeEmpty'))
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
setField(name) {
|
|
246
|
-
if (!this.isSelectOpinionField) {
|
|
247
|
-
if (name !== undefined) {
|
|
248
|
-
this.currentRow.name = name
|
|
249
|
-
}
|
|
250
|
-
} else {
|
|
251
|
-
this.opinionAutoSetting.opinionSourceField = name
|
|
252
|
-
}
|
|
253
|
-
this.showFormFields = false
|
|
254
|
-
this.isSelectOpinionField = false
|
|
255
|
-
},
|
|
256
|
-
getFieldLabel(name) {
|
|
257
|
-
return getFormFieldLabel(name)
|
|
258
|
-
},
|
|
259
|
-
selectOpinionField() {
|
|
260
|
-
this.showFormFields = true
|
|
261
|
-
this.isSelectOpinionField = true
|
|
262
|
-
},
|
|
263
|
-
clearOpinionField() {
|
|
264
|
-
delete this.opinionAutoSetting.opinionSourceField
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
</script>
|