workflow-editor 0.0.7-up → 0.0.8-up
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/package.json +12 -2
- package/index.html +0 -13
- package/packages/index.js +0 -34
- package/packages/plugins/formValidatorUtil.js +0 -533
- 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/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 -199
- package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/process.js +0 -98
- 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 -66
- package/packages/workflow-editor/src/main/canvas.vue +0 -483
- package/packages/workflow-editor/src/main/context-menu.vue +0 -132
- 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 -35
- package/packages/workflow-editor/src/main/toolbox.vue +0 -60
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -304
- package/packages/workflow-editor/src/process-json.js +0 -623
- package/packages/workflow-editor/src/process-service.js +0 -31
- 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 -73
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -531
- package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -276
- 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 -239
- package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -67
- package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -241
- 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 -116
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -75
- package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -125
- package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -72
- package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -101
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -185
- package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -83
- package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -65
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -347
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -63
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -148
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -233
- package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -386
- package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -209
- package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -135
- 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 -94
- package/packages/workflow-editor/src/properties-editors/decision.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/fork.vue +0 -72
- package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -44
- package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -160
- package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -291
- package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -249
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -392
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -241
- package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -220
- package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -204
- package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -59
- package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -207
- package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -390
- package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -109
- package/packages/workflow-editor/src/properties-editors/join.vue +0 -44
- package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -273
- package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -76
- package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
- package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -199
- package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
- package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -206
- package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -64
- package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -79
- package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
- package/packages/workflow-editor/src/properties-editors/transition.vue +0 -74
- package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -177
- package/packages/workflow-editor/src/store/getters.js +0 -27
- package/packages/workflow-editor/src/store/workflow-editor.js +0 -125
- 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 -212
- package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
- package/packages/workflow-editor/src/util.js +0 -489
- package/packages/workflow-editor/src/workflow-editor.vue +0 -606
- package/packages/workflow-editor/src/workflow-history.vue +0 -153
- package/public/vite.svg +0 -1
- package/src/i18n/i18n.js +0 -16
- package/src/i18n/langs/cn.js +0 -509
- package/src/i18n/langs/en.js +0 -551
- package/vite.config.js +0 -36
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
:title="titleName"
|
|
4
|
-
:visible="true"
|
|
5
|
-
top="10vh"
|
|
6
|
-
append-to-body
|
|
7
|
-
custom-class="properties-editor-valueSelect"
|
|
8
|
-
center
|
|
9
|
-
@close="$emit('close')"
|
|
10
|
-
>
|
|
11
|
-
<el-tabs id="custTabOne" v-model="activeTab" type="border-card">
|
|
12
|
-
<el-tab-pane v-if="options.length>0" :label="$t('workflowEditor.process.standardFields')" name="standardFields">
|
|
13
|
-
<el-row v-for="option in options" :key="option.name">
|
|
14
|
-
<el-radio v-model="selectedValue" :label="option.name" border>
|
|
15
|
-
{{ option.label }}
|
|
16
|
-
</el-radio>
|
|
17
|
-
</el-row>
|
|
18
|
-
</el-tab-pane>
|
|
19
|
-
<el-tab-pane v-if="showOrganization" :label="$t('workflowEditor.common.organizationStructure')" name="organization">
|
|
20
|
-
<inline-department-user-tree v-if="orgType === 'user'" ref="organizationTree" :multiple="false" @result="orgSelect" />
|
|
21
|
-
<inline-department-tree v-if="orgType === 'department'" ref="organizationTree" :multiple="false" @result="orgSelect" />
|
|
22
|
-
<inline-workgroup-tree v-if="orgType === 'workgroup'" ref="organizationTree" :multiple="false" @result="orgSelect" />
|
|
23
|
-
<inline-system-role-tree v-if="orgType === 'role'" ref="organizationTree" :multiple="false" @result="orgSelect" />
|
|
24
|
-
</el-tab-pane>
|
|
25
|
-
<el-tab-pane :label="$t('workflowEditor.common.formField')" name="formFields">
|
|
26
|
-
<el-radio-group v-model="selectedValue" class="group">
|
|
27
|
-
<div v-for="field in formFields" :key="field.name" class="item">
|
|
28
|
-
<el-radio :label="'${field['+field.name+']}'">
|
|
29
|
-
{{ field.label }}
|
|
30
|
-
</el-radio>
|
|
31
|
-
</div>
|
|
32
|
-
</el-radio-group>
|
|
33
|
-
</el-tab-pane>
|
|
34
|
-
</el-tabs>
|
|
35
|
-
<span slot="footer" class="dialog-footer">
|
|
36
|
-
<el-button type="primary" size="small" @click="setValue">
|
|
37
|
-
{{ $t('workflowEditorPublicModel.determine') }}
|
|
38
|
-
</el-button>
|
|
39
|
-
<el-button size="small" @click="$emit('close')">
|
|
40
|
-
{{ $t('workflowEditorPublicModel.cancel') }}
|
|
41
|
-
</el-button>
|
|
42
|
-
</span>
|
|
43
|
-
</el-dialog>
|
|
44
|
-
</template>
|
|
45
|
-
<script>
|
|
46
|
-
import InlineSystemRoleTree from './system-role-tree-inline'
|
|
47
|
-
import { mapGetters } from 'vuex'
|
|
48
|
-
import { getI18n } from '../../../../workflow-editor/src/util'
|
|
49
|
-
export default {
|
|
50
|
-
name: 'ValueSelectionDialog',
|
|
51
|
-
components: {
|
|
52
|
-
InlineSystemRoleTree
|
|
53
|
-
},
|
|
54
|
-
props: {
|
|
55
|
-
standardFields: {
|
|
56
|
-
type: [Object, Array],
|
|
57
|
-
default: null
|
|
58
|
-
},
|
|
59
|
-
title: {
|
|
60
|
-
type: String,
|
|
61
|
-
default: ''
|
|
62
|
-
},
|
|
63
|
-
showOrganization: {
|
|
64
|
-
type: Boolean,
|
|
65
|
-
default: true
|
|
66
|
-
},
|
|
67
|
-
showFormFields: {
|
|
68
|
-
type: Boolean,
|
|
69
|
-
default: true
|
|
70
|
-
},
|
|
71
|
-
orgType: {
|
|
72
|
-
type: String,
|
|
73
|
-
default: ''
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
data() {
|
|
78
|
-
let titleName = this.title
|
|
79
|
-
let activeTab = 'organization'
|
|
80
|
-
if (!this.showOrganization) {
|
|
81
|
-
activeTab = 'standardFields'
|
|
82
|
-
}
|
|
83
|
-
if (!this.title || this.title === '') {
|
|
84
|
-
titleName = getI18n().t('workflowEditorMessage.pleaseSelectAValue')
|
|
85
|
-
}
|
|
86
|
-
return {
|
|
87
|
-
selectedValue: '',
|
|
88
|
-
activeTab,
|
|
89
|
-
titleName: titleName
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
computed: {
|
|
93
|
-
...mapGetters('wfEditor', [
|
|
94
|
-
'formFields'
|
|
95
|
-
]),
|
|
96
|
-
options() {
|
|
97
|
-
if (Array.isArray(this.standardFields)) {
|
|
98
|
-
return this.standardFields
|
|
99
|
-
} else {
|
|
100
|
-
const result = []
|
|
101
|
-
for (const key of Object.keys(this.standardFields)) {
|
|
102
|
-
result.push({
|
|
103
|
-
name: key,
|
|
104
|
-
label: this.standardFields[key]
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
return result
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
watch: {
|
|
112
|
-
activeTab(value) {
|
|
113
|
-
// 切换页签时清空选中的值
|
|
114
|
-
this.selectedValue = ''
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
methods: {
|
|
118
|
-
setValue() {
|
|
119
|
-
// 获得组织结构树的结果
|
|
120
|
-
this.organizationResultValue()
|
|
121
|
-
if (this.selectedValue === '') {
|
|
122
|
-
this.$alert(this.$t('workflowEditorMessage.pleaseSelectAValueInTheCurrentTab'))
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
this.$emit('close', this.selectedValue)
|
|
126
|
-
},
|
|
127
|
-
// 监听组织结构树结果
|
|
128
|
-
orgSelect(selectedInfo) {
|
|
129
|
-
if (selectedInfo) {
|
|
130
|
-
if (this.orgType === 'user') {
|
|
131
|
-
this.getSelectedUser(selectedInfo.user, selectedInfo.containBranch)
|
|
132
|
-
} else if (this.orgType === 'department') {
|
|
133
|
-
this.getSelectedDepartmentOrWorkgroup(selectedInfo.department, selectedInfo.containBranch)
|
|
134
|
-
} else if (this.orgType === 'workgroup') {
|
|
135
|
-
this.getSelectedDepartmentOrWorkgroup(selectedInfo.workgroup, selectedInfo.containBranch)
|
|
136
|
-
} else if (this.orgType === 'role') {
|
|
137
|
-
this.getSelectedRole(selectedInfo.role)
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
// 获得组织结构的结果
|
|
142
|
-
organizationResultValue() {
|
|
143
|
-
if (this.orgType && this.activeTab === 'organization') {
|
|
144
|
-
if (this.orgType === 'user') {
|
|
145
|
-
this.$refs.organizationTree.confirmSelectUser()
|
|
146
|
-
} else if (this.orgType === 'department') {
|
|
147
|
-
this.$refs.organizationTree.selectDepartment()
|
|
148
|
-
} else if (this.orgType === 'workgroup') {
|
|
149
|
-
this.$refs.organizationTree.selectWorkgroup()
|
|
150
|
-
} else if (this.orgType === 'role') {
|
|
151
|
-
this.$refs.organizationTree.selectRole()
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
getSelectedUser(user, containBranch) {
|
|
156
|
-
// 用户登录名和分支编码的分隔符
|
|
157
|
-
const loginNameAndBranchSeparator = '~~'
|
|
158
|
-
// 用户姓名和分支名称的分隔符
|
|
159
|
-
const userNameAndBranchSeparator = '/'
|
|
160
|
-
let loginName = user.loginName
|
|
161
|
-
let userName = user.name
|
|
162
|
-
if (containBranch) {
|
|
163
|
-
if (user.subCompanyId && user.subCompanyId !== null) {
|
|
164
|
-
// 用户属于分支机构,拼接分支机构编码
|
|
165
|
-
const branchCode = user.subCompanyCode
|
|
166
|
-
const branchName = user.subCompanyName
|
|
167
|
-
loginName = loginName + loginNameAndBranchSeparator + branchCode
|
|
168
|
-
userName = userName + userNameAndBranchSeparator + branchName
|
|
169
|
-
} else {
|
|
170
|
-
// 用户属于集团公司,拼接公司编码
|
|
171
|
-
loginName = loginName + loginNameAndBranchSeparator + user.tenantCode
|
|
172
|
-
userName = userName + userNameAndBranchSeparator + user.tenantName
|
|
173
|
-
}
|
|
174
|
-
this.selectedValue = userName + '[' + loginName + ']'
|
|
175
|
-
} else {
|
|
176
|
-
this.selectedValue = user.name + '[' + user.loginName + ']'
|
|
177
|
-
}
|
|
178
|
-
},
|
|
179
|
-
getSelectedDepartmentOrWorkgroup(department, containBranch) {
|
|
180
|
-
this.selectedValue = department.name
|
|
181
|
-
// 用户姓名和分支名称的分隔符
|
|
182
|
-
const userNameAndBranchSeparator = '/'
|
|
183
|
-
let departmentName = department.name
|
|
184
|
-
if (containBranch) {
|
|
185
|
-
if (department.subCompanyId && department.subCompanyId !== null) {
|
|
186
|
-
// 用户属于分支机构,拼接分支机构编码
|
|
187
|
-
const branchName = department.subCompanyName
|
|
188
|
-
departmentName = departmentName + userNameAndBranchSeparator + branchName
|
|
189
|
-
} else {
|
|
190
|
-
// 用户属于集团公司,拼接公司编码
|
|
191
|
-
departmentName = departmentName + userNameAndBranchSeparator + department.tenantName
|
|
192
|
-
}
|
|
193
|
-
this.selectedValue = departmentName + '[' + department.code + ']'
|
|
194
|
-
} else {
|
|
195
|
-
this.selectedValue = department.name + '[' + department.code + ']'
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
getSelectedRole(role) {
|
|
199
|
-
this.selectedValue = role.name + '[' + role.code + ']'
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
</script>
|
|
205
|
-
<style scoped>
|
|
206
|
-
#custTabOne :deep(.el-tabs__content){
|
|
207
|
-
height:500px
|
|
208
|
-
}
|
|
209
|
-
</style>
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-row>
|
|
4
|
-
<el-button type="primary" size="mini" plain icon="el-icon-circle-plus-outline" @click="add">
|
|
5
|
-
{{ $t('workflowEditorPublicModel.add') }}
|
|
6
|
-
</el-button>
|
|
7
|
-
<el-button type="primary" size="mini" plain icon="el-icon-delete" @click="remove">
|
|
8
|
-
{{ $t('workflowEditorPublicModel.delete') }}
|
|
9
|
-
</el-button>
|
|
10
|
-
</el-row>
|
|
11
|
-
<el-table
|
|
12
|
-
ref="table"
|
|
13
|
-
:data="variables"
|
|
14
|
-
border
|
|
15
|
-
highlight-current-row
|
|
16
|
-
style="width: 100%"
|
|
17
|
-
@current-change="handleCurrentChange"
|
|
18
|
-
>
|
|
19
|
-
<el-table-column
|
|
20
|
-
type="index"
|
|
21
|
-
width="50"
|
|
22
|
-
/>
|
|
23
|
-
<el-table-column
|
|
24
|
-
prop="name"
|
|
25
|
-
:label="$t('workflowEditor.common.variableName')"
|
|
26
|
-
>
|
|
27
|
-
<template slot-scope="scope">
|
|
28
|
-
<el-input v-model.trim="scope.row.name" :placeholder="$t('workflowEditorMessage.pleaseEnterContent')" @blur="checkName(scope.row.name)" />
|
|
29
|
-
</template>
|
|
30
|
-
</el-table-column>
|
|
31
|
-
<el-table-column
|
|
32
|
-
prop="value"
|
|
33
|
-
:label="$t('workflowEditor.common.variableValue')"
|
|
34
|
-
>
|
|
35
|
-
<template slot-scope="scope">
|
|
36
|
-
<el-input v-model.trim="scope.row.value" :placeholder="$t('workflowEditorMessage.pleaseEnterContent')" @blur="checkValue(scope.row.value)" />
|
|
37
|
-
</template>
|
|
38
|
-
</el-table-column>
|
|
39
|
-
</el-table>
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
<script>
|
|
43
|
-
export default {
|
|
44
|
-
name: 'Variables',
|
|
45
|
-
props: {
|
|
46
|
-
value: {
|
|
47
|
-
type: Object,
|
|
48
|
-
default: null
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
data() {
|
|
52
|
-
let variables = []
|
|
53
|
-
if (this.value.variable !== undefined) {
|
|
54
|
-
// xml中有多个variable时是数组,只有一个variable时是Object
|
|
55
|
-
if (Array.isArray(this.value.variable)) {
|
|
56
|
-
variables = this.value.variable
|
|
57
|
-
} else {
|
|
58
|
-
variables.push(this.value.variable)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
variables,
|
|
63
|
-
currentRow: null
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
watch: {
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
mounted() {
|
|
70
|
-
if (this.variables.length > 0) {
|
|
71
|
-
this.setCurrentRow(this.variables[0])
|
|
72
|
-
}
|
|
73
|
-
this.$watch('variables', function() {
|
|
74
|
-
const filteredVariables = this.variables.filter(variable => {
|
|
75
|
-
return variable.name !== '' && variable.value !== ''
|
|
76
|
-
})
|
|
77
|
-
this.$emit('input', {
|
|
78
|
-
variable: filteredVariables
|
|
79
|
-
})
|
|
80
|
-
}, {
|
|
81
|
-
// deep为true可以监控数组中的元素的某个属性的变化
|
|
82
|
-
deep: true
|
|
83
|
-
})
|
|
84
|
-
},
|
|
85
|
-
methods: {
|
|
86
|
-
add() {
|
|
87
|
-
for (let i = 0; i < this.variables.length; i++) {
|
|
88
|
-
if (this.variables[i].name === '' || this.variables[i].value === '') {
|
|
89
|
-
this.$alert(this.$t('workflowEditorMessage.variableNameOrValueOnLineCannotBeEmpty', { row: (i + 1) }))
|
|
90
|
-
return
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const newRow = {
|
|
94
|
-
name: '',
|
|
95
|
-
value: ''
|
|
96
|
-
}
|
|
97
|
-
this.variables.push(newRow)
|
|
98
|
-
this.setCurrentRow(newRow)
|
|
99
|
-
},
|
|
100
|
-
remove() {
|
|
101
|
-
if (this.currentRow === null) {
|
|
102
|
-
this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
let index
|
|
106
|
-
for (let i = 0; i < this.variables.length; i++) {
|
|
107
|
-
if (this.variables[i].name === this.currentRow.name) {
|
|
108
|
-
index = i
|
|
109
|
-
break
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
this.variables.splice(index, 1)
|
|
113
|
-
// 当前选中的index如果是最后一行,那么删除后,index会等于length造成下标越界,因此需要让index等于新的最后一行
|
|
114
|
-
index = (index <= (this.variables.length - 1) ? index : (this.variables.length - 1))
|
|
115
|
-
this.setCurrentRow(this.variables[index])
|
|
116
|
-
},
|
|
117
|
-
setCurrentRow(row) {
|
|
118
|
-
this.$refs.table.setCurrentRow(row)
|
|
119
|
-
},
|
|
120
|
-
handleCurrentChange(val) {
|
|
121
|
-
this.currentRow = val
|
|
122
|
-
},
|
|
123
|
-
checkName(name) {
|
|
124
|
-
if (name === '') {
|
|
125
|
-
this.$alert(this.$t('workflowEditorMessage.variableNameCannotBeEmpty'))
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
checkValue(value) {
|
|
129
|
-
if (value === '') {
|
|
130
|
-
this.$alert(this.$t('workflowEditorMessage.variableValueCannotBeEmpty'))
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
</script>
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form :model="formModel" label-width="110px">
|
|
3
|
-
<el-row>
|
|
4
|
-
<el-col :span="12">
|
|
5
|
-
<el-form-item :label="$t('workflowEditor.task.name')">
|
|
6
|
-
<!-- <el-input v-model="formModel.name" /> -->
|
|
7
|
-
<i18n-input v-model="formModel.name" :i18n-key="tache.i18nKey?tache.i18nKey:'name.'+formModel.id" @setI18n="setI18nValue" />
|
|
8
|
-
</el-form-item>
|
|
9
|
-
</el-col>
|
|
10
|
-
<el-col :span="12">
|
|
11
|
-
<el-form-item :label="$t('workflowEditor.task.code')">
|
|
12
|
-
<el-input v-model="formModel.id" @blur="validateId" />
|
|
13
|
-
</el-form-item>
|
|
14
|
-
</el-col>
|
|
15
|
-
</el-row>
|
|
16
|
-
<el-form-item :label="$t('workflowEditor.task.taskTitle')">
|
|
17
|
-
<task-title v-model="tache.taskTitle" />
|
|
18
|
-
</el-form-item>
|
|
19
|
-
<el-form-item :label="$t('workflowEditor.task.emailNotification')">
|
|
20
|
-
<el-switch v-model="tache.mailNotice" />
|
|
21
|
-
</el-form-item>
|
|
22
|
-
<el-form-item :label="$t('workflowEditor.task.handlingPage')">
|
|
23
|
-
<el-input v-model="tache.taskUrl" />
|
|
24
|
-
</el-form-item>
|
|
25
|
-
<el-form-item :label="$t('workflowEditor.task.remarks')">
|
|
26
|
-
<el-input v-model="tache.remark" type="textarea" autosize />
|
|
27
|
-
</el-form-item>
|
|
28
|
-
</el-form>
|
|
29
|
-
</template>
|
|
30
|
-
<script>
|
|
31
|
-
import TaskTitle from '../common/task-title'
|
|
32
|
-
import { validateTacheCode } from '../../util'
|
|
33
|
-
import i18nInput from '../common/i18n-input'
|
|
34
|
-
export default {
|
|
35
|
-
name: 'BasicProperties',
|
|
36
|
-
components: {
|
|
37
|
-
TaskTitle,
|
|
38
|
-
i18nInput
|
|
39
|
-
},
|
|
40
|
-
props: {
|
|
41
|
-
model: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default: null
|
|
44
|
-
},
|
|
45
|
-
id: {
|
|
46
|
-
type: String,
|
|
47
|
-
default: null
|
|
48
|
-
},
|
|
49
|
-
name: {
|
|
50
|
-
type: String,
|
|
51
|
-
default: null
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
data() {
|
|
55
|
-
return {
|
|
56
|
-
formModel: {
|
|
57
|
-
name: this.name,
|
|
58
|
-
id: this.id,
|
|
59
|
-
tache: this.model
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
computed: {
|
|
64
|
-
tache() {
|
|
65
|
-
return this.model
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
mounted() {
|
|
69
|
-
// 支持.snyc修饰符的写法
|
|
70
|
-
this.$watch('formModel.name', function(newVal, oldVal) {
|
|
71
|
-
this.$emit('update:name', newVal)
|
|
72
|
-
})
|
|
73
|
-
},
|
|
74
|
-
methods: {
|
|
75
|
-
validateId() {
|
|
76
|
-
validateTacheCode(this)
|
|
77
|
-
},
|
|
78
|
-
setI18nValue(i18nKey) {
|
|
79
|
-
this.tache.i18nKey = i18nKey
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
</script>
|
|
84
|
-
<style scoped>
|
|
85
|
-
.percent{
|
|
86
|
-
margin-left: 10px;
|
|
87
|
-
color:red;
|
|
88
|
-
font-size:1.2em;
|
|
89
|
-
}
|
|
90
|
-
</style>
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form :model="formModel">
|
|
3
|
-
<el-form-item :label="$t('workflowEditor.task.allowViews')">
|
|
4
|
-
<el-switch v-model="formModel.viewOpinion.permission" />
|
|
5
|
-
<el-checkbox v-if="formModel.viewOpinion.permission" v-model="formModel.viewOpinionCheckbox">
|
|
6
|
-
{{ $t('workflowEditor.task.additionalConditions') }}
|
|
7
|
-
</el-checkbox>
|
|
8
|
-
<additional-condition v-if="formModel.viewOpinion.permission&&formModel.viewOpinionCheckbox" v-model="formModel.viewOpinion.condition" />
|
|
9
|
-
</el-form-item>
|
|
10
|
-
<el-form-item :label="$t('workflowEditor.task.allowToViewCountersignatureResults')">
|
|
11
|
-
<el-switch v-model="formModel.viewMeetingResult.permission" />
|
|
12
|
-
<el-checkbox v-if="formModel.viewMeetingResult.permission" v-model="formModel.viewMeetingResultCheckbox">
|
|
13
|
-
{{ $t('workflowEditor.task.additionalConditions') }}
|
|
14
|
-
</el-checkbox>
|
|
15
|
-
<additional-condition v-if="formModel.viewMeetingResult.permission&&formModel.viewMeetingResultCheckbox" v-model="formModel.viewMeetingResult.condition" />
|
|
16
|
-
</el-form-item>
|
|
17
|
-
<el-form-item :label="$t('workflowEditor.task.allowToViewVotingResults')">
|
|
18
|
-
<el-switch v-model="formModel.viewVoteResult.permission" />
|
|
19
|
-
<el-checkbox v-if="formModel.viewVoteResult.permission" v-model="formModel.viewVoteResultCheckbox">
|
|
20
|
-
{{ $t('workflowEditor.task.additionalConditions') }}
|
|
21
|
-
</el-checkbox>
|
|
22
|
-
<additional-condition v-if="formModel.viewVoteResult.permission&&formModel.viewVoteResultCheckbox" v-model="formModel.viewVoteResult.condition" />
|
|
23
|
-
</el-form-item>
|
|
24
|
-
<el-form-item :label="$t('workflowEditor.task.allowToViewFlowHistory')">
|
|
25
|
-
<el-switch v-model="formModel.viewFlowHistory.permission" />
|
|
26
|
-
<el-checkbox v-if="formModel.viewFlowHistory.permission" v-model="formModel.viewFlowHistoryCheckbox">
|
|
27
|
-
{{ $t('workflowEditor.task.additionalConditions') }}
|
|
28
|
-
</el-checkbox>
|
|
29
|
-
<additional-condition v-if="formModel.viewFlowHistory.permission&&formModel.viewFlowHistoryCheckbox" v-model="formModel.viewFlowHistory.condition" />
|
|
30
|
-
</el-form-item>
|
|
31
|
-
<el-form-item :label="$t('workflowEditor.task.allowFormsToPrint')">
|
|
32
|
-
<el-switch v-model="formModel.printForm.permission" />
|
|
33
|
-
<el-checkbox v-if="formModel.printForm.permission" v-model="formModel.printFormCheckbox">
|
|
34
|
-
{{ $t('workflowEditor.task.additionalConditions') }}
|
|
35
|
-
</el-checkbox>
|
|
36
|
-
<additional-condition v-if="formModel.printForm.permission&&formModel.printFormCheckbox" v-model="formModel.printForm.condition" />
|
|
37
|
-
</el-form-item>
|
|
38
|
-
<el-form-item :label="$t('workflowEditor.task.attachmentAuthority')">
|
|
39
|
-
<el-switch v-model="formModel.attachment.permission" />
|
|
40
|
-
</el-form-item>
|
|
41
|
-
<el-card v-if="formModel.attachment.permission" class="box-card">
|
|
42
|
-
<el-form-item :label="$t('workflowEditor.task.downloadAttachment')">
|
|
43
|
-
<el-switch v-model="formModel.attachment.download.permission" />
|
|
44
|
-
<el-checkbox v-if="formModel.attachment.download.permission" v-model="formModel.attachment.downloadCheckbox">
|
|
45
|
-
{{ $t('workflowEditor.task.additionalConditions') }}
|
|
46
|
-
</el-checkbox>
|
|
47
|
-
<additional-condition v-if="formModel.attachment.download.permission&&formModel.attachment.downloadCheckbox" v-model="formModel.attachment.download.condition" />
|
|
48
|
-
</el-form-item>
|
|
49
|
-
</el-card>
|
|
50
|
-
<el-form-item :label="$t('workflowEditor.task.bodyPermission')">
|
|
51
|
-
<el-switch v-model="formModel.officialText.permission" />
|
|
52
|
-
</el-form-item>
|
|
53
|
-
</el-form>
|
|
54
|
-
</template>
|
|
55
|
-
<script>
|
|
56
|
-
import AdditionalCondition from '../common/additional-condition'
|
|
57
|
-
import { deepCopy } from '../../util'
|
|
58
|
-
export default {
|
|
59
|
-
name: 'PermissionSettings',
|
|
60
|
-
components: {
|
|
61
|
-
AdditionalCondition
|
|
62
|
-
},
|
|
63
|
-
props: {
|
|
64
|
-
value: {
|
|
65
|
-
type: Object,
|
|
66
|
-
default: null
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
data() {
|
|
70
|
-
const formModel = deepCopy(this.value)
|
|
71
|
-
// 控制附加条件的属性名
|
|
72
|
-
const attrNames = [
|
|
73
|
-
'viewOpinion', 'viewMeetingResult', 'viewVoteResult',
|
|
74
|
-
'viewFlowHistory', 'printForm'
|
|
75
|
-
]
|
|
76
|
-
attrNames.forEach(name => {
|
|
77
|
-
// 如果是''或者undefined,那么两次!后就是false
|
|
78
|
-
formModel[name + 'Checkbox'] = !!this.value[name].condition
|
|
79
|
-
})
|
|
80
|
-
// 控制附件各个权限的附加条件的属性名
|
|
81
|
-
const attachmentAttrNames = [
|
|
82
|
-
'download'
|
|
83
|
-
]
|
|
84
|
-
attachmentAttrNames.forEach(item => {
|
|
85
|
-
// 如果是''或者undefined,那么两次!后就是false
|
|
86
|
-
formModel.attachment[name + 'Checkbox'] = !!this.value.attachment[name] && !!this.value.attachment[name].condition
|
|
87
|
-
if (!formModel.attachment.permission) {
|
|
88
|
-
formModel.attachment[name] = {
|
|
89
|
-
permission: false,
|
|
90
|
-
condition: ''
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
return {
|
|
96
|
-
formModel,
|
|
97
|
-
attrNames,
|
|
98
|
-
attachmentAttrNames
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
mounted() {
|
|
102
|
-
this.$watch('formModel', function(formModel) {
|
|
103
|
-
const result = {
|
|
104
|
-
viewOpinion: { },
|
|
105
|
-
viewMeetingResult: { },
|
|
106
|
-
viewVoteResult: { },
|
|
107
|
-
viewFlowHistory: { },
|
|
108
|
-
printForm: { },
|
|
109
|
-
officialText: { },
|
|
110
|
-
attachment: { }
|
|
111
|
-
}
|
|
112
|
-
this.attrNames.map(name => {
|
|
113
|
-
// permission为true且附件条件的checkbox也选中了,condition才有效
|
|
114
|
-
result[name].permission = formModel[name].permission
|
|
115
|
-
if (formModel[name].permission && formModel[name + 'Checkbox']) {
|
|
116
|
-
result[name].condition = formModel[name].condition
|
|
117
|
-
} else {
|
|
118
|
-
result[name].condition = ''
|
|
119
|
-
}
|
|
120
|
-
})
|
|
121
|
-
|
|
122
|
-
result.attachment.permission = formModel.attachment.permission
|
|
123
|
-
// 允许设置附件权限时,add,delete等的权限设置才有效,否则根本不生成add,delete等对应的json
|
|
124
|
-
if (formModel.attachment.permission) {
|
|
125
|
-
this.attachmentAttrNames.map(name => {
|
|
126
|
-
// 需要避免result的add,delete等属性为undefined
|
|
127
|
-
if (!result.attachment[name])result.attachment[name] = {}
|
|
128
|
-
// attachment不是undefined并且对应的add,delete等属性的permission为true
|
|
129
|
-
result.attachment[name].permission = formModel.attachment[name].permission
|
|
130
|
-
// permission为true且附件条件的checkbox也选中了,condition才有效
|
|
131
|
-
if (formModel.attachment[name].permission && formModel.attachment[name + 'Checkbox']) {
|
|
132
|
-
result.attachment[name].condition = formModel.attachment[name].condition
|
|
133
|
-
} else {
|
|
134
|
-
result.attachment[name].condition = ''
|
|
135
|
-
}
|
|
136
|
-
})
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
// 正文权限暂不处理
|
|
140
|
-
|
|
141
|
-
this.$emit('input', result)
|
|
142
|
-
}, {
|
|
143
|
-
deep: true
|
|
144
|
-
})
|
|
145
|
-
},
|
|
146
|
-
methods: {
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
</script>
|
|
151
|
-
<style scoped>
|
|
152
|
-
.el-checkbox{
|
|
153
|
-
margin-left: 20px;
|
|
154
|
-
}
|
|
155
|
-
</style>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
visible
|
|
4
|
-
:title="$t('workflowEditor.task.propertiesOfCCTask')"
|
|
5
|
-
:center="true"
|
|
6
|
-
top="10vh"
|
|
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" used-in="CopyTask" />
|
|
24
|
-
</el-tab-pane>
|
|
25
|
-
<el-tab-pane :label="$t('workflowEditor.task.reminderSettings')" name="reminders">
|
|
26
|
-
<!-- <reminder v-model="model.ref.reminder" /> -->
|
|
27
|
-
<notice-reminder :reminder-value="model.ref.reminder" :task-notice-value="model.ref.taskNotice" />
|
|
28
|
-
</el-tab-pane>
|
|
29
|
-
<el-tab-pane :label="$t('workflowEditor.task.eventProcessing')" name="events">
|
|
30
|
-
<events v-model="model.ref.events" />
|
|
31
|
-
</el-tab-pane>
|
|
32
|
-
<el-tab-pane :label="$t('workflowEditor.task.permissionSettings')" name="permissions">
|
|
33
|
-
<permission-settings v-model="model.ref.permissionSettings" />
|
|
34
|
-
</el-tab-pane>
|
|
35
|
-
</el-tabs>
|
|
36
|
-
</el-dialog>
|
|
37
|
-
</template>
|
|
38
|
-
<script>
|
|
39
|
-
import BasicProperties from './copy-task/basic-properties'
|
|
40
|
-
import PermissionSettings from './copy-task/permission-settings'
|
|
41
|
-
import TransactorSettings from './common/transactor-settings'
|
|
42
|
-
import NoticeReminder from './common/notice-reminder.vue'
|
|
43
|
-
import Events from './human-task/events.vue'
|
|
44
|
-
export default {
|
|
45
|
-
name: 'HumanTaskPropertiesEditor',
|
|
46
|
-
components: {
|
|
47
|
-
BasicProperties,
|
|
48
|
-
TransactorSettings,
|
|
49
|
-
PermissionSettings,
|
|
50
|
-
NoticeReminder,
|
|
51
|
-
Events
|
|
52
|
-
},
|
|
53
|
-
props: {
|
|
54
|
-
model: {
|
|
55
|
-
type: Object,
|
|
56
|
-
default: null
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
data() {
|
|
60
|
-
console.log(this.model)
|
|
61
|
-
if (!this.model.ref.taskNotice) {
|
|
62
|
-
this.model.ref.taskNotice = {}
|
|
63
|
-
}
|
|
64
|
-
return {
|
|
65
|
-
activeTab: 'basicProperties'
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
computed: {
|
|
69
|
-
formModel() {
|
|
70
|
-
return this.model.ref
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
mounted() {
|
|
74
|
-
this.$watch('model.ref.attr.id', function(newVal, oldVal) {
|
|
75
|
-
this.model.id = newVal
|
|
76
|
-
})
|
|
77
|
-
this.$watch('model.ref.attr.name', function(newVal, oldVal) {
|
|
78
|
-
this.model.name = newVal
|
|
79
|
-
})
|
|
80
|
-
},
|
|
81
|
-
methods: {
|
|
82
|
-
handleClick(tab, event) {
|
|
83
|
-
// console.log(tab, event)
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
</script>
|
|
88
|
-
<style scoped>
|
|
89
|
-
/* 使用深度作用选择器(vue-loader的功能)">>>"符号重新定义了.el-dialog__body,不影响其他页面的同名样式*/
|
|
90
|
-
.properties-editor :deep(.el-dialog__body){
|
|
91
|
-
padding-top: 0
|
|
92
|
-
}
|
|
93
|
-
</style>
|
|
94
|
-
|