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,115 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
visible
|
|
4
|
-
:title="$t('workflowEditor.process.processProperties')"
|
|
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.process.basicProperties')" name="basicProperties">
|
|
16
|
-
<basic-properties
|
|
17
|
-
:name.sync="model.attr.name"
|
|
18
|
-
:code.sync="model.attr.code"
|
|
19
|
-
:model="model.properties.basicProperties"
|
|
20
|
-
/>
|
|
21
|
-
</el-tab-pane>
|
|
22
|
-
<el-tab-pane :label="$t('workflowEditor.process.permissionSettings')" name="permissions">
|
|
23
|
-
<permission-settings :model="model.properties.permissionSettings" />
|
|
24
|
-
</el-tab-pane>
|
|
25
|
-
<el-tab-pane :label="$t('workflowEditor.process.notificationSettings')" name="inform">
|
|
26
|
-
<notice-settings v-model="model.properties.inform" />
|
|
27
|
-
</el-tab-pane>
|
|
28
|
-
<el-tab-pane :label="$t('workflowEditor.process.reminderSettings')" name="reminders">
|
|
29
|
-
<!-- <reminder v-model="model.properties.reminder" /> -->
|
|
30
|
-
<notice-reminder :reminder-value="model.properties.reminder" :task-notice-value="model.properties.taskNotice" />
|
|
31
|
-
</el-tab-pane>
|
|
32
|
-
<el-tab-pane :label="$t('workflowEditor.process.parameterSsetting')" name="parameterSettings">
|
|
33
|
-
<parameter-settings :model="model.properties.parameterSettings" />
|
|
34
|
-
</el-tab-pane>
|
|
35
|
-
<el-tab-pane :label="$t('workflowEditor.process.event')" name="events">
|
|
36
|
-
<events v-model="model.properties.events" />
|
|
37
|
-
</el-tab-pane>
|
|
38
|
-
<el-tab-pane :label="$t('workflowEditor.process.processVariables')" name="variables">
|
|
39
|
-
<variables v-model="model.properties.variables" />
|
|
40
|
-
</el-tab-pane>
|
|
41
|
-
</el-tabs>
|
|
42
|
-
</el-dialog>
|
|
43
|
-
</template>
|
|
44
|
-
<script>
|
|
45
|
-
import convert from 'xml-js'
|
|
46
|
-
import BasicProperties from './process/basic-properties'
|
|
47
|
-
import PermissionSettings from './process/permission-settings'
|
|
48
|
-
// import Reminder from './common/reminder'
|
|
49
|
-
import ParameterSettings from './process/parameter-settings'
|
|
50
|
-
import Events from './process/events'
|
|
51
|
-
import Variables from './common/variables'
|
|
52
|
-
import NoticeSettings from './process/notice-settings.vue'
|
|
53
|
-
import NoticeReminder from './common/notice-reminder.vue'
|
|
54
|
-
export default {
|
|
55
|
-
name: 'ProcessPropertiesEditor',
|
|
56
|
-
components: {
|
|
57
|
-
BasicProperties,
|
|
58
|
-
PermissionSettings,
|
|
59
|
-
// Reminder,
|
|
60
|
-
ParameterSettings,
|
|
61
|
-
Events,
|
|
62
|
-
Variables,
|
|
63
|
-
NoticeSettings,
|
|
64
|
-
NoticeReminder
|
|
65
|
-
},
|
|
66
|
-
props: {
|
|
67
|
-
model: {
|
|
68
|
-
type: Object,
|
|
69
|
-
default: null
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
data() {
|
|
73
|
-
// if (this.model.properties.inform === undefined) {
|
|
74
|
-
// this.model.properties.inform = {}
|
|
75
|
-
// }
|
|
76
|
-
if (this.model.properties.taskNotice === undefined) {
|
|
77
|
-
this.model.properties.taskNotice = {}
|
|
78
|
-
}
|
|
79
|
-
return {
|
|
80
|
-
activeTab: 'basicProperties'
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
computed: {
|
|
84
|
-
// 定义这些计算属性只是为了减少模板中的代码量
|
|
85
|
-
basicProperties() {
|
|
86
|
-
return this.model.properties.basicProperties
|
|
87
|
-
},
|
|
88
|
-
accessRight() {
|
|
89
|
-
return this.model.properties.accessRight
|
|
90
|
-
},
|
|
91
|
-
reminder() {
|
|
92
|
-
return this.model.properties.reminder
|
|
93
|
-
},
|
|
94
|
-
parameterSettings() {
|
|
95
|
-
return this.model.properties.parameterSettings
|
|
96
|
-
},
|
|
97
|
-
events() {
|
|
98
|
-
return this.model.properties.events
|
|
99
|
-
},
|
|
100
|
-
variables() {
|
|
101
|
-
return this.model.properties.variables
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
methods: {
|
|
105
|
-
toXml() {
|
|
106
|
-
const options = { compact: true, ignoreComment: true, spaces: 4 }
|
|
107
|
-
console.log(convert.js2xml({ basicProperties: this.basicProperties }, options))
|
|
108
|
-
},
|
|
109
|
-
handleClick(tab, event) {
|
|
110
|
-
// console.log(tab, event)
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
</script>
|
|
115
|
-
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form :model="formModel">
|
|
3
|
-
<el-row>
|
|
4
|
-
<el-col :span="12">
|
|
5
|
-
<el-form-item :label="$t('workflowEditor.process.name')" label-width="50px">
|
|
6
|
-
<!-- <el-input v-model="formModel.name" /> -->
|
|
7
|
-
<i18n-input
|
|
8
|
-
v-model="formModel.name"
|
|
9
|
-
:i18n-key="formModel.tache.i18nKey?formModel.tache.i18nKey:'name.'+formModel.id"
|
|
10
|
-
@setI18n="setI18nValue"
|
|
11
|
-
/>
|
|
12
|
-
</el-form-item>
|
|
13
|
-
</el-col>
|
|
14
|
-
<el-col :span="12">
|
|
15
|
-
<el-form-item :label="$t('workflowEditor.process.code')" label-width="50px">
|
|
16
|
-
<el-input v-model="formModel.id" @blur="validateId" />
|
|
17
|
-
</el-form-item>
|
|
18
|
-
</el-col>
|
|
19
|
-
</el-row>
|
|
20
|
-
<el-form-item :label="$t('workflowEditor.task.taskTitle')">
|
|
21
|
-
<task-title v-model="tache.taskTitle" />
|
|
22
|
-
</el-form-item>
|
|
23
|
-
<el-form-item :label="$t('workflowEditor.process.subprocess')" label-width="60px">
|
|
24
|
-
<el-cascader
|
|
25
|
-
v-model="selectedProcess"
|
|
26
|
-
:show-all-levels="false"
|
|
27
|
-
:options="processes"
|
|
28
|
-
@change="handleChange"
|
|
29
|
-
/>
|
|
30
|
-
</el-form-item>
|
|
31
|
-
<el-form-item :label="$t('workflowEditor.process.subprocessIsSharedForm')" label-width="60px">
|
|
32
|
-
<el-switch v-model="formModel.tache.isSharedForm" />
|
|
33
|
-
</el-form-item>
|
|
34
|
-
<el-radio-group v-model="formModel.tache.moreTransactor">
|
|
35
|
-
<el-radio :label="false">
|
|
36
|
-
{{ $t('workflowEditor.task.anyOneCanHandleIt') }}
|
|
37
|
-
</el-radio>
|
|
38
|
-
<el-radio :label="true">
|
|
39
|
-
{{ $t('workflowEditor.task.forAll') }}
|
|
40
|
-
</el-radio>
|
|
41
|
-
</el-radio-group>
|
|
42
|
-
<el-form-item :label="$t('workflowEditor.process.transferValueFromMainFormToSubForm')">
|
|
43
|
-
<field-mappings
|
|
44
|
-
v-model="formModel.tache.parameters"
|
|
45
|
-
:src-label="$t('workflowEditor.process.fieldsOfTheMainForm')"
|
|
46
|
-
:target-label="$t('workflowEditor.process.fieldsOfSubform')"
|
|
47
|
-
:target-fields="subprocessFormFields"
|
|
48
|
-
/>
|
|
49
|
-
</el-form-item>
|
|
50
|
-
<el-form-item :label="$t('workflowEditor.process.subformReturnsResultsToMainForm')">
|
|
51
|
-
<field-mappings
|
|
52
|
-
v-model="formModel.tache.result"
|
|
53
|
-
:src-label="$t('workflowEditor.process.fieldsOfSubform')"
|
|
54
|
-
:target-label="$t('workflowEditor.process.fieldsOfTheMainForm')"
|
|
55
|
-
:src-fields="subprocessFormFields"
|
|
56
|
-
/>
|
|
57
|
-
</el-form-item>
|
|
58
|
-
</el-form>
|
|
59
|
-
</template>
|
|
60
|
-
|
|
61
|
-
<script>
|
|
62
|
-
import FieldMappings from './field-mappings'
|
|
63
|
-
import processService from '../../process-service.js'
|
|
64
|
-
import { validateTacheCode } from '../../util'
|
|
65
|
-
import i18nInput from '../common/i18n-input'
|
|
66
|
-
import TaskTitle from '../common/task-title'
|
|
67
|
-
export default {
|
|
68
|
-
name: 'BasicProperties',
|
|
69
|
-
components: {
|
|
70
|
-
FieldMappings,
|
|
71
|
-
i18nInput,
|
|
72
|
-
TaskTitle
|
|
73
|
-
},
|
|
74
|
-
props: {
|
|
75
|
-
model: {
|
|
76
|
-
type: Object,
|
|
77
|
-
default: null
|
|
78
|
-
},
|
|
79
|
-
id: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: null
|
|
82
|
-
},
|
|
83
|
-
name: {
|
|
84
|
-
type: String,
|
|
85
|
-
default: null
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
data() {
|
|
89
|
-
return {
|
|
90
|
-
selectedProcess: [],
|
|
91
|
-
processes: [],
|
|
92
|
-
subprocessFormFields: [],
|
|
93
|
-
formModel: {
|
|
94
|
-
name: this.name,
|
|
95
|
-
id: this.id,
|
|
96
|
-
tache: this.model
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
computed: {
|
|
101
|
-
tache() {
|
|
102
|
-
return this.model
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
created() {
|
|
106
|
-
this.listAllProcesses().then(() => {
|
|
107
|
-
this.fetchSubprocessFormFields()
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
if (this.formModel.tache.parameters === '') {
|
|
111
|
-
this.formModel.tache.parameters = {}
|
|
112
|
-
}
|
|
113
|
-
if (this.formModel.tache.result === '') {
|
|
114
|
-
this.formModel.tache.result = {}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
mounted() {
|
|
118
|
-
// 支持.snyc修饰符的写法
|
|
119
|
-
this.$watch('formModel.name', function(newVal, oldVal) {
|
|
120
|
-
this.$emit('update:name', newVal)
|
|
121
|
-
})
|
|
122
|
-
},
|
|
123
|
-
methods: {
|
|
124
|
-
fetchSubprocessFormFields() {
|
|
125
|
-
if (this.model.processCode) {
|
|
126
|
-
// 获得子流程对应表单字段集合
|
|
127
|
-
processService.fetchSubprocessFormFields(this.model.processCode, this.model.processVersion).then(formFields => {
|
|
128
|
-
this.subprocessFormFields = formFields
|
|
129
|
-
})
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
handleChange(values) {
|
|
133
|
-
console.log('handleChange=', values)
|
|
134
|
-
const processInfo = values[1]
|
|
135
|
-
this.model.processCode = processInfo.substring(processInfo.indexOf('/') + 1, processInfo.lastIndexOf('/'))
|
|
136
|
-
this.model.processVersion = processInfo.substring(processInfo.lastIndexOf('/') + 1)
|
|
137
|
-
this.fetchSubprocessFormFields()
|
|
138
|
-
},
|
|
139
|
-
// 获得对应表单列表
|
|
140
|
-
listAllProcesses() {
|
|
141
|
-
return new Promise((resolve, reject) => {
|
|
142
|
-
this.$http.get(this.baseAPI + '/wf-editor/workflow-editors/all-active-definitions').then(activeDefinitions => {
|
|
143
|
-
if (activeDefinitions.length > 0) {
|
|
144
|
-
// 设置表单信息
|
|
145
|
-
const selectedProcessInfo = this.model.processCode + '/' + this.model.processVersion
|
|
146
|
-
// 修改时,获得默认选中的表单项
|
|
147
|
-
this.setDefaultSelectedProcessWhenUpdate(activeDefinitions, selectedProcessInfo)
|
|
148
|
-
this.processes = activeDefinitions
|
|
149
|
-
resolve()
|
|
150
|
-
}
|
|
151
|
-
}).catch(error => {
|
|
152
|
-
reject(error)
|
|
153
|
-
})
|
|
154
|
-
})
|
|
155
|
-
},
|
|
156
|
-
// 修改时,获得默认选中的流程项
|
|
157
|
-
setDefaultSelectedProcessWhenUpdate(activeDefinitions, selectedProcessInfo) {
|
|
158
|
-
let selectedProcess
|
|
159
|
-
let selectedSystemCode
|
|
160
|
-
for (var i = 0; i < activeDefinitions.length; i++) {
|
|
161
|
-
const systemCode = activeDefinitions[i].value
|
|
162
|
-
const definitions = activeDefinitions[i].children
|
|
163
|
-
const selectedProcesses = definitions.filter(this.filterProcess(selectedProcessInfo))
|
|
164
|
-
if (selectedProcesses.length > 0) {
|
|
165
|
-
selectedSystemCode = systemCode
|
|
166
|
-
selectedProcess = selectedProcesses[0]
|
|
167
|
-
break
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
if (selectedProcess) {
|
|
171
|
-
const result = []
|
|
172
|
-
result.push(selectedSystemCode)
|
|
173
|
-
result.push(selectedProcess.value)
|
|
174
|
-
this.selectedProcess = result
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
// 过滤流程
|
|
178
|
-
filterProcess(selectedProcessInfo) {
|
|
179
|
-
return (process) => {
|
|
180
|
-
// systemAndProcessInfo/流程编号/流程版本”
|
|
181
|
-
const systemAndProcessInfo = process.value
|
|
182
|
-
// 获得“流程编号/流程版本”
|
|
183
|
-
const processInfo = systemAndProcessInfo.substring(systemAndProcessInfo.indexOf('/') + 1)
|
|
184
|
-
return (selectedProcessInfo === processInfo)
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
validateId() {
|
|
188
|
-
validateTacheCode(this)
|
|
189
|
-
},
|
|
190
|
-
setI18nValue(i18nKey) {
|
|
191
|
-
this.formModel.tache.i18nKey = i18nKey
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
</script>
|
|
196
|
-
|
|
197
|
-
<style lang="scss" scoped>
|
|
198
|
-
|
|
199
|
-
</style>
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-form>
|
|
3
|
-
<el-form-item :label="$t('workflowEditor.process.eventsTriggeredBeforeStartingASubprocess')" label-width="150px">
|
|
4
|
-
<el-switch v-model="model.beforeStart" />
|
|
5
|
-
</el-form-item>
|
|
6
|
-
<el-form-item :label="$t('workflowEditor.process.triggerSubprocessEndEvent')">
|
|
7
|
-
<el-switch v-model="model.end" />
|
|
8
|
-
</el-form-item>
|
|
9
|
-
</el-form>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
export default {
|
|
14
|
-
name: 'Events',
|
|
15
|
-
props: {
|
|
16
|
-
model: {
|
|
17
|
-
type: Object,
|
|
18
|
-
default: null
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<style lang="scss" scoped>
|
|
25
|
-
|
|
26
|
-
</style>
|
|
@@ -1,206 +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="tableData"
|
|
14
|
-
border
|
|
15
|
-
highlight-current-row
|
|
16
|
-
style="width: 100%"
|
|
17
|
-
@current-change="handleCurrentChange"
|
|
18
|
-
>
|
|
19
|
-
<el-table-column
|
|
20
|
-
type="index"
|
|
21
|
-
width="50"
|
|
22
|
-
/>
|
|
23
|
-
<el-table-column
|
|
24
|
-
prop="source"
|
|
25
|
-
:label="srcLabel"
|
|
26
|
-
>
|
|
27
|
-
<template slot-scope="scope">
|
|
28
|
-
<el-input :value="showSourceFieldLabel(scope.row.source)" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @focus="showSourceFields = true" />
|
|
29
|
-
</template>
|
|
30
|
-
</el-table-column>
|
|
31
|
-
<el-table-column
|
|
32
|
-
prop="target"
|
|
33
|
-
:label="targetLabel"
|
|
34
|
-
>
|
|
35
|
-
<template slot-scope="scope">
|
|
36
|
-
<el-input :value="showTargetFieldLabel(scope.row.target)" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @focus="showTargetFields=true" />
|
|
37
|
-
</template>
|
|
38
|
-
</el-table-column>
|
|
39
|
-
</el-table>
|
|
40
|
-
<form-fields v-if="showSourceFields||showTargetFields" :fields="formFields" @close="selectField" />
|
|
41
|
-
</div>
|
|
42
|
-
</template>
|
|
43
|
-
<script>
|
|
44
|
-
import FormFields from '../common/form-fields'
|
|
45
|
-
import { getFormFieldLabel } from '../common/form-fields-utils.js'
|
|
46
|
-
export default {
|
|
47
|
-
name: 'FieldMappings',
|
|
48
|
-
components: {
|
|
49
|
-
FormFields
|
|
50
|
-
},
|
|
51
|
-
props: {
|
|
52
|
-
value: {
|
|
53
|
-
type: Object,
|
|
54
|
-
default: null
|
|
55
|
-
},
|
|
56
|
-
srcLabel: {
|
|
57
|
-
type: String,
|
|
58
|
-
default: null
|
|
59
|
-
},
|
|
60
|
-
targetLabel: {
|
|
61
|
-
type: String,
|
|
62
|
-
default: null
|
|
63
|
-
},
|
|
64
|
-
srcFields: {
|
|
65
|
-
type: Array,
|
|
66
|
-
default: null
|
|
67
|
-
},
|
|
68
|
-
targetFields: {
|
|
69
|
-
type: Array,
|
|
70
|
-
default: null
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
data() {
|
|
74
|
-
let tableData = []
|
|
75
|
-
if (this.value.field !== undefined) {
|
|
76
|
-
// xml中有多个field时是数组,只有一个field时是Object
|
|
77
|
-
if (Array.isArray(this.value.field)) {
|
|
78
|
-
tableData = this.value.field
|
|
79
|
-
} else {
|
|
80
|
-
tableData.push(this.value.field)
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
tableData,
|
|
85
|
-
currentRow: null,
|
|
86
|
-
showSourceFields: false,
|
|
87
|
-
showTargetFields: false
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
computed: {
|
|
91
|
-
formFields() {
|
|
92
|
-
if (this.showSourceFields) {
|
|
93
|
-
return this.srcFields
|
|
94
|
-
} else if (this.showTargetFields) {
|
|
95
|
-
return this.targetFields
|
|
96
|
-
} else {
|
|
97
|
-
return []
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
watch: {
|
|
102
|
-
|
|
103
|
-
},
|
|
104
|
-
mounted() {
|
|
105
|
-
if (this.tableData.length > 0) {
|
|
106
|
-
this.setCurrentRow(this.tableData[0])
|
|
107
|
-
}
|
|
108
|
-
this.$watch('tableData', function() {
|
|
109
|
-
const filteredData = this.tableData.filter(field => {
|
|
110
|
-
return field.source !== '' && field.target !== ''
|
|
111
|
-
})
|
|
112
|
-
this.$emit('input', {
|
|
113
|
-
field: filteredData
|
|
114
|
-
})
|
|
115
|
-
}, {
|
|
116
|
-
// deep为true可以监控数组中的元素的某个属性的变化
|
|
117
|
-
deep: true
|
|
118
|
-
})
|
|
119
|
-
},
|
|
120
|
-
methods: {
|
|
121
|
-
getSubFormFieldLabel(name) {
|
|
122
|
-
const fields = this.srcFields || this.targetFields
|
|
123
|
-
const field = fields.filter(item => {
|
|
124
|
-
return item.name === name
|
|
125
|
-
})
|
|
126
|
-
if (field.length > 0) {
|
|
127
|
-
return field[0].label
|
|
128
|
-
} else {
|
|
129
|
-
return name
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
showSourceFieldLabel(value) {
|
|
133
|
-
if (this.srcFields) {
|
|
134
|
-
return this.getSubFormFieldLabel(value)
|
|
135
|
-
} else {
|
|
136
|
-
return getFormFieldLabel(value)
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
showTargetFieldLabel(value) {
|
|
140
|
-
if (this.targetFields) {
|
|
141
|
-
return this.getSubFormFieldLabel(value)
|
|
142
|
-
} else {
|
|
143
|
-
return getFormFieldLabel(value)
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
add() {
|
|
147
|
-
for (let i = 0; i < this.tableData.length; i++) {
|
|
148
|
-
if (this.tableData[i].source === '' || this.tableData[i].target === '') {
|
|
149
|
-
this.$alert(this.$t('workflowEditorMessage.dataInLineCannotBeEmpty', { row: (i + 1), data1: this.srcLabel, data2: this.targetLabel }))
|
|
150
|
-
return
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
const newRow = {
|
|
154
|
-
source: '',
|
|
155
|
-
target: ''
|
|
156
|
-
}
|
|
157
|
-
this.tableData.push(newRow)
|
|
158
|
-
this.setCurrentRow(newRow)
|
|
159
|
-
},
|
|
160
|
-
remove() {
|
|
161
|
-
if (this.currentRow === null) {
|
|
162
|
-
this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
|
|
163
|
-
return
|
|
164
|
-
}
|
|
165
|
-
let index
|
|
166
|
-
for (let i = 0; i < this.tableData.length; i++) {
|
|
167
|
-
if (this.tableData[i].source === this.currentRow.source) {
|
|
168
|
-
index = i
|
|
169
|
-
break
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
this.tableData.splice(index, 1)
|
|
173
|
-
// 当前选中的index如果是最后一行,那么删除后,index会等于length造成下标越界,因此需要让index等于新的最后一行
|
|
174
|
-
index = (index <= (this.tableData.length - 1) ? index : (this.tableData.length - 1))
|
|
175
|
-
this.setCurrentRow(this.tableData[index])
|
|
176
|
-
},
|
|
177
|
-
setCurrentRow(row) {
|
|
178
|
-
this.$refs.table.setCurrentRow(row)
|
|
179
|
-
},
|
|
180
|
-
handleCurrentChange(val) {
|
|
181
|
-
this.currentRow = val
|
|
182
|
-
},
|
|
183
|
-
checkSource(name) {
|
|
184
|
-
if (name === '') {
|
|
185
|
-
this.$alert(this.$t('workflowEditorMessage.dataCannotBeEmpty', { data: this.srcLabel }))
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
checkTarget(value) {
|
|
189
|
-
if (value === '') {
|
|
190
|
-
this.$alert(this.$t('workflowEditorMessage.dataCannotBeEmpty', { data: this.targetLabel }))
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
selectField(field) {
|
|
194
|
-
if (this.showSourceFields) {
|
|
195
|
-
this.$set(this.currentRow, 'source', field)
|
|
196
|
-
this.showSourceFields = false
|
|
197
|
-
}
|
|
198
|
-
if (this.showTargetFields) {
|
|
199
|
-
this.$set(this.currentRow, 'target', field)
|
|
200
|
-
this.showTargetFields = false
|
|
201
|
-
}
|
|
202
|
-
console.log('this.tableData===', this.tableData, 'this.srcFields===', this.srcFields, 'this.targetFields===', this.targetFields)
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
</script>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-row>
|
|
4
|
-
{{ $t('workflowEditor.process.setTheHandlerOfTheFirstPhaseOfTheSubProcess') }}<el-switch v-model="model.showTransactorSettings" />
|
|
5
|
-
</el-row>
|
|
6
|
-
|
|
7
|
-
<transactor-settings v-if="model.showTransactorSettings" :is-subprocess="true" :model="model.transactorSettings" />
|
|
8
|
-
</div>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script>
|
|
12
|
-
import TransactorSettings from '../common/transactor-settings'
|
|
13
|
-
import { deepCopy } from '../../util.js'
|
|
14
|
-
export default {
|
|
15
|
-
name: 'SubprocessTransactorSettings',
|
|
16
|
-
components: {
|
|
17
|
-
TransactorSettings
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
value: {
|
|
21
|
-
type: Object,
|
|
22
|
-
default: null
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
data() {
|
|
26
|
-
let showTransactorSettings = false
|
|
27
|
-
if (this.value.userCondition) {
|
|
28
|
-
showTransactorSettings = true
|
|
29
|
-
}
|
|
30
|
-
let transactorSettings = deepCopy(this.value)
|
|
31
|
-
if (!transactorSettings.userCondition) {
|
|
32
|
-
transactorSettings = {
|
|
33
|
-
userCondition: '${instanceCreator}',
|
|
34
|
-
additionalCondition: {
|
|
35
|
-
onlyInCreatorDepartment: false,
|
|
36
|
-
withCreatorDepartment: false,
|
|
37
|
-
selectOneFromMultiple: false
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
model: {
|
|
43
|
-
showTransactorSettings,
|
|
44
|
-
transactorSettings
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
mounted() {
|
|
49
|
-
this.$watch('model', function(model) {
|
|
50
|
-
if (model.showTransactorSettings) {
|
|
51
|
-
this.$emit('input', model.transactorSettings)
|
|
52
|
-
} else {
|
|
53
|
-
this.$emit('input', {})
|
|
54
|
-
}
|
|
55
|
-
}, {
|
|
56
|
-
deep: true
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
</script>
|
|
61
|
-
|
|
62
|
-
<style lang="scss" scoped>
|
|
63
|
-
|
|
64
|
-
</style>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
visible
|
|
4
|
-
:title="$t('workflowEditor.process.propertiesOfSubprocesses')"
|
|
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.process.basicProperties')" name="basicProperties">
|
|
16
|
-
<basic-properties
|
|
17
|
-
:id.sync="model.ref.attr.id"
|
|
18
|
-
:name.sync="model.ref.attr.name"
|
|
19
|
-
:model="model.ref"
|
|
20
|
-
/>
|
|
21
|
-
</el-tab-pane>
|
|
22
|
-
<el-tab-pane :label="$t('workflowEditor.process.settingOfHandler')" name="transactors">
|
|
23
|
-
<subprocess-transactor-settings v-model="model.ref.transactorSettings" />
|
|
24
|
-
</el-tab-pane>
|
|
25
|
-
<el-tab-pane :label="$t('workflowEditor.process.eventProcessing')" name="events">
|
|
26
|
-
<events :model="model.ref.events" />
|
|
27
|
-
</el-tab-pane>
|
|
28
|
-
</el-tabs>
|
|
29
|
-
</el-dialog>
|
|
30
|
-
</template>
|
|
31
|
-
<script>
|
|
32
|
-
import BasicProperties from './subprocess/basic-properties'
|
|
33
|
-
import Events from './subprocess/events'
|
|
34
|
-
import SubprocessTransactorSettings from './subprocess/transactor-settings'
|
|
35
|
-
export default {
|
|
36
|
-
name: 'SubprocessPropertiesEditor',
|
|
37
|
-
components: {
|
|
38
|
-
BasicProperties,
|
|
39
|
-
SubprocessTransactorSettings,
|
|
40
|
-
Events
|
|
41
|
-
},
|
|
42
|
-
props: {
|
|
43
|
-
model: {
|
|
44
|
-
type: Object,
|
|
45
|
-
default: null
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
data() {
|
|
49
|
-
return {
|
|
50
|
-
activeTab: 'basicProperties'
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
computed: {
|
|
54
|
-
formModel() {
|
|
55
|
-
return this.model.ref
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
mounted() {
|
|
59
|
-
this.$watch('model.ref.attr.id', function(newVal, oldVal) {
|
|
60
|
-
this.model.id = newVal
|
|
61
|
-
})
|
|
62
|
-
this.$watch('model.ref.attr.name', function(newVal, oldVal) {
|
|
63
|
-
this.model.name = newVal
|
|
64
|
-
})
|
|
65
|
-
},
|
|
66
|
-
methods: {
|
|
67
|
-
handleClick(tab, event) {
|
|
68
|
-
// console.log('this.model=', this.model)
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
|
-
<style scoped>
|
|
74
|
-
/* 使用深度作用选择器(vue-loader的功能)">>>"符号重新定义了.el-dialog__body,不影响其他页面的同名样式*/
|
|
75
|
-
.properties-editor :deep(.el-dialog__body){
|
|
76
|
-
padding-top: 0
|
|
77
|
-
}
|
|
78
|
-
</style>
|
|
79
|
-
|