workflow-editor 0.9.67-dw → 0.9.67
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/lib/workflow-editor.css +1 -1
- package/lib/workflow-editor.umd.min.js +10 -10
- package/package.json +2 -2
- package/packages/index.js +34 -0
- package/packages/plugins/formValidatorUtil.js +528 -0
- package/packages/plugins/index.js +8 -0
- package/packages/workflow-editor/index.js +14 -0
- package/packages/workflow-editor/src/api.js +7 -0
- package/packages/workflow-editor/src/assets/wf-editor-icons.js +2 -0
- package/packages/workflow-editor/src/constant.js +8 -0
- package/packages/workflow-editor/src/json-object-templates/copy-task.js +67 -0
- package/packages/workflow-editor/src/json-object-templates/decision.js +11 -0
- package/packages/workflow-editor/src/json-object-templates/end.js +14 -0
- package/packages/workflow-editor/src/json-object-templates/fork.js +10 -0
- package/packages/workflow-editor/src/json-object-templates/human-decision.js +9 -0
- package/packages/workflow-editor/src/json-object-templates/human-task.js +199 -0
- package/packages/workflow-editor/src/json-object-templates/join.js +10 -0
- package/packages/workflow-editor/src/json-object-templates/process.js +98 -0
- package/packages/workflow-editor/src/json-object-templates/start.js +13 -0
- package/packages/workflow-editor/src/json-object-templates/subprocess.js +30 -0
- package/packages/workflow-editor/src/json-object-templates/transition.js +26 -0
- package/packages/workflow-editor/src/main/admin-save-dialog.vue +66 -0
- package/packages/workflow-editor/src/main/canvas.vue +479 -0
- package/packages/workflow-editor/src/main/context-menu.vue +132 -0
- package/packages/workflow-editor/src/main/icon-svg.vue +32 -0
- package/packages/workflow-editor/src/main/selection-region.vue +66 -0
- package/packages/workflow-editor/src/main/tache-history-tooltip.vue +38 -0
- package/packages/workflow-editor/src/main/tache-name-input.vue +19 -0
- package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +35 -0
- package/packages/workflow-editor/src/main/toolbox.vue +60 -0
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +302 -0
- package/packages/workflow-editor/src/process-json.js +622 -0
- package/packages/workflow-editor/src/process-service.js +31 -0
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +531 -0
- package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +276 -0
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +34 -0
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +239 -0
- package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +47 -0
- package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +241 -0
- package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +23 -0
- package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +116 -0
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +75 -0
- package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +125 -0
- package/packages/workflow-editor/src/properties-editors/common/notice.vue +98 -0
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +179 -0
- package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +83 -0
- package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +65 -0
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +355 -0
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +63 -0
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +148 -0
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +233 -0
- package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +386 -0
- package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +209 -0
- package/packages/workflow-editor/src/properties-editors/common/variables.vue +135 -0
- package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +90 -0
- package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +155 -0
- package/packages/workflow-editor/src/properties-editors/copy-task.vue +80 -0
- package/packages/workflow-editor/src/properties-editors/decision.vue +90 -0
- package/packages/workflow-editor/src/properties-editors/fork.vue +72 -0
- package/packages/workflow-editor/src/properties-editors/human-decision.vue +44 -0
- package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +60 -0
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +156 -0
- package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +291 -0
- package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +249 -0
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +392 -0
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +241 -0
- package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +220 -0
- package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +204 -0
- package/packages/workflow-editor/src/properties-editors/human-task/events.vue +59 -0
- package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +207 -0
- package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +390 -0
- package/packages/workflow-editor/src/properties-editors/human-task.vue +103 -0
- package/packages/workflow-editor/src/properties-editors/join.vue +44 -0
- package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +273 -0
- package/packages/workflow-editor/src/properties-editors/process/events.vue +76 -0
- package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +60 -0
- package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +95 -0
- package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +28 -0
- package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +81 -0
- package/packages/workflow-editor/src/properties-editors/process.vue +109 -0
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +187 -0
- package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +26 -0
- package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +206 -0
- package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +64 -0
- package/packages/workflow-editor/src/properties-editors/subprocess.vue +79 -0
- package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +53 -0
- package/packages/workflow-editor/src/properties-editors/transition.vue +74 -0
- package/packages/workflow-editor/src/properties-editors/user-condition.js +177 -0
- package/packages/workflow-editor/src/store/getters.js +27 -0
- package/packages/workflow-editor/src/store/workflow-editor.js +125 -0
- package/packages/workflow-editor/src/taches/common-methods.js +21 -0
- package/packages/workflow-editor/src/taches/copy-task.vue +99 -0
- package/packages/workflow-editor/src/taches/custom-task.vue +88 -0
- package/packages/workflow-editor/src/taches/decision.vue +102 -0
- package/packages/workflow-editor/src/taches/end.vue +76 -0
- package/packages/workflow-editor/src/taches/fork.vue +102 -0
- package/packages/workflow-editor/src/taches/human-decision.vue +102 -0
- package/packages/workflow-editor/src/taches/human-task.vue +113 -0
- package/packages/workflow-editor/src/taches/join.vue +91 -0
- package/packages/workflow-editor/src/taches/joint.vue +177 -0
- package/packages/workflow-editor/src/taches/start.vue +76 -0
- package/packages/workflow-editor/src/taches/subprocess.vue +99 -0
- package/packages/workflow-editor/src/taches/tache-resizer.vue +80 -0
- package/packages/workflow-editor/src/transitions/broken-line.vue +91 -0
- package/packages/workflow-editor/src/transitions/curve-line.vue +91 -0
- package/packages/workflow-editor/src/transitions/straight-line.vue +26 -0
- package/packages/workflow-editor/src/transitions/transition.vue +212 -0
- package/packages/workflow-editor/src/transitions/virtual-transition.vue +43 -0
- package/packages/workflow-editor/src/util.js +493 -0
- package/packages/workflow-editor/src/workflow-editor.vue +605 -0
- package/packages/workflow-editor/src/workflow-history.vue +153 -0
- package/src/i18n/i18n.js +1 -1
- package/src/i18n/langs/cn.js +6 -1
- package/src/i18n/langs/en.js +6 -1
|
@@ -0,0 +1,135 @@
|
|
|
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>
|
|
@@ -0,0 +1,90 @@
|
|
|
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>
|
|
@@ -0,0 +1,155 @@
|
|
|
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>
|
|
@@ -0,0 +1,80 @@
|
|
|
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.permissionSettings')" name="permissions">
|
|
26
|
+
<permission-settings v-model="model.ref.permissionSettings" />
|
|
27
|
+
</el-tab-pane>
|
|
28
|
+
</el-tabs>
|
|
29
|
+
</el-dialog>
|
|
30
|
+
</template>
|
|
31
|
+
<script>
|
|
32
|
+
import BasicProperties from './copy-task/basic-properties'
|
|
33
|
+
import PermissionSettings from './copy-task/permission-settings'
|
|
34
|
+
import TransactorSettings from './common/transactor-settings'
|
|
35
|
+
export default {
|
|
36
|
+
name: 'HumanTaskPropertiesEditor',
|
|
37
|
+
components: {
|
|
38
|
+
BasicProperties,
|
|
39
|
+
TransactorSettings,
|
|
40
|
+
PermissionSettings
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
model: {
|
|
44
|
+
type: Object,
|
|
45
|
+
default: null
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
data() {
|
|
49
|
+
console.log(this.model)
|
|
50
|
+
return {
|
|
51
|
+
activeTab: 'basicProperties'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
computed: {
|
|
55
|
+
formModel() {
|
|
56
|
+
return this.model.ref
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
mounted() {
|
|
60
|
+
this.$watch('model.ref.attr.id', function(newVal, oldVal) {
|
|
61
|
+
this.model.id = newVal
|
|
62
|
+
})
|
|
63
|
+
this.$watch('model.ref.attr.name', function(newVal, oldVal) {
|
|
64
|
+
this.model.name = newVal
|
|
65
|
+
})
|
|
66
|
+
},
|
|
67
|
+
methods: {
|
|
68
|
+
handleClick(tab, event) {
|
|
69
|
+
// console.log(tab, event)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</script>
|
|
74
|
+
<style scoped>
|
|
75
|
+
/* 使用深度作用选择器(vue-loader的功能)">>>"符号重新定义了.el-dialog__body,不影响其他页面的同名样式*/
|
|
76
|
+
.properties-editor >>> .el-dialog__body{
|
|
77
|
+
padding-top: 0
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
80
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
visible
|
|
4
|
+
:title="$t('workflowEditor.task.attributeOfConditionJudgment')"
|
|
5
|
+
:center="true"
|
|
6
|
+
append-to-body
|
|
7
|
+
@open="$emit('open')"
|
|
8
|
+
@opend="$emit('opend')"
|
|
9
|
+
@close="$emit('close')"
|
|
10
|
+
@closed="$emit('closed')"
|
|
11
|
+
>
|
|
12
|
+
<el-form>
|
|
13
|
+
<el-form-item :label="$t('workflowEditor.task.name')" label-width="40px">
|
|
14
|
+
<!-- <el-input v-model="formModel.attr.name" /> -->
|
|
15
|
+
<i18n-input v-model.trim="formModel.attr.name" :i18n-key="(formModel.basicProperties && formModel.basicProperties.i18nKey)?formModel.basicProperties.i18nKey:'name.'+formModel.attr.id" @setI18n="setI18nValue" />
|
|
16
|
+
</el-form-item>
|
|
17
|
+
<el-form-item>
|
|
18
|
+
<span>{{ $t('workflowEditor.task.allBranchFlows') }}</span>
|
|
19
|
+
<el-table
|
|
20
|
+
border
|
|
21
|
+
:data="transitions"
|
|
22
|
+
style="width: 100%"
|
|
23
|
+
>
|
|
24
|
+
<el-table-column
|
|
25
|
+
type="index"
|
|
26
|
+
width="50"
|
|
27
|
+
/>
|
|
28
|
+
<el-table-column
|
|
29
|
+
prop="to"
|
|
30
|
+
:label="$t('workflowEditor.task.targetLink')"
|
|
31
|
+
/>
|
|
32
|
+
<el-table-column
|
|
33
|
+
prop="condition"
|
|
34
|
+
:label="$t('workflowEditor.task.condition')"
|
|
35
|
+
/>
|
|
36
|
+
</el-table>
|
|
37
|
+
</el-form-item>
|
|
38
|
+
</el-form>
|
|
39
|
+
</el-dialog>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import { findOutgoingTransitionsByTacheId } from '../util.js'
|
|
44
|
+
import i18nInput from './common/i18n-input'
|
|
45
|
+
export default {
|
|
46
|
+
name: 'DecisionPropertiesEditor',
|
|
47
|
+
components: {
|
|
48
|
+
i18nInput
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
model: {
|
|
52
|
+
type: Object,
|
|
53
|
+
default: null
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
computed: {
|
|
57
|
+
formModel() {
|
|
58
|
+
return this.model.ref
|
|
59
|
+
},
|
|
60
|
+
transitions() {
|
|
61
|
+
const transitions = findOutgoingTransitionsByTacheId(this.formModel.attr.id)
|
|
62
|
+
const data = []
|
|
63
|
+
transitions.map(transition => {
|
|
64
|
+
data.push({
|
|
65
|
+
to: transition.ref.attr.to,
|
|
66
|
+
condition: transition.ref.basicProperties.condition
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
return data
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
mounted() {
|
|
73
|
+
this.$watch('model.ref.attr.name', function(newVal) {
|
|
74
|
+
this.model.name = newVal
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
methods: {
|
|
78
|
+
setI18nValue(i18nKey) {
|
|
79
|
+
if (this.formModel) {
|
|
80
|
+
this.formModel.basicProperties = {}
|
|
81
|
+
this.formModel.basicProperties.i18nKey = i18nKey
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
</script>
|
|
87
|
+
|
|
88
|
+
<style lang="scss" scoped>
|
|
89
|
+
|
|
90
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
visible
|
|
4
|
+
:title="$t('workflowEditor.task.propertiesOfBranches')"
|
|
5
|
+
:center="true"
|
|
6
|
+
append-to-body
|
|
7
|
+
@open="$emit('open')"
|
|
8
|
+
@opend="$emit('opend')"
|
|
9
|
+
@close="$emit('close')"
|
|
10
|
+
@closed="$emit('closed')"
|
|
11
|
+
>
|
|
12
|
+
<el-form>
|
|
13
|
+
<el-form-item :label="$t('workflowEditor.task.name')" label-width="40px">
|
|
14
|
+
<el-input v-model="formModel.attr.name" />
|
|
15
|
+
</el-form-item>
|
|
16
|
+
<el-form-item>
|
|
17
|
+
<span>{{ $t('workflowEditor.task.allBranchFlows') }}</span>
|
|
18
|
+
<el-table
|
|
19
|
+
border
|
|
20
|
+
:data="transitions"
|
|
21
|
+
style="width: 100%"
|
|
22
|
+
>
|
|
23
|
+
<el-table-column
|
|
24
|
+
type="index"
|
|
25
|
+
width="50"
|
|
26
|
+
/>
|
|
27
|
+
<el-table-column
|
|
28
|
+
prop="to"
|
|
29
|
+
:label="$t('workflowEditor.task.targetLink')"
|
|
30
|
+
/>
|
|
31
|
+
</el-table>
|
|
32
|
+
</el-form-item>
|
|
33
|
+
</el-form>
|
|
34
|
+
</el-dialog>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
import { findOutgoingTransitionsByTacheId } from '../util.js'
|
|
39
|
+
export default {
|
|
40
|
+
name: 'ForkPropertiesEditor',
|
|
41
|
+
props: {
|
|
42
|
+
model: {
|
|
43
|
+
type: Object,
|
|
44
|
+
default: null
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
computed: {
|
|
48
|
+
formModel() {
|
|
49
|
+
return this.model.ref
|
|
50
|
+
},
|
|
51
|
+
transitions() {
|
|
52
|
+
const transitions = findOutgoingTransitionsByTacheId(this.formModel.attr.id)
|
|
53
|
+
const data = []
|
|
54
|
+
transitions.map(transition => {
|
|
55
|
+
data.push({
|
|
56
|
+
to: transition.endJoint.parent.name
|
|
57
|
+
})
|
|
58
|
+
})
|
|
59
|
+
return data
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
mounted() {
|
|
63
|
+
this.$watch('model.ref.attr.name', function(newVal) {
|
|
64
|
+
this.model.name = newVal
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-dialog
|
|
3
|
+
visible
|
|
4
|
+
:title="$t('workflowEditor.task.attributesOfManualJudgment')"
|
|
5
|
+
:center="true"
|
|
6
|
+
append-to-body
|
|
7
|
+
@open="$emit('open')"
|
|
8
|
+
@opend="$emit('opend')"
|
|
9
|
+
@close="$emit('close')"
|
|
10
|
+
@closed="$emit('closed')"
|
|
11
|
+
>
|
|
12
|
+
<el-form>
|
|
13
|
+
<el-form-item :label="$t('workflowEditor.task.name')" label-width="40px">
|
|
14
|
+
<el-input v-model="formModel.attr.name" />
|
|
15
|
+
</el-form-item>
|
|
16
|
+
</el-form>
|
|
17
|
+
</el-dialog>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
export default {
|
|
22
|
+
name: 'HumanDecisionPropertiesEditor',
|
|
23
|
+
props: {
|
|
24
|
+
model: {
|
|
25
|
+
type: Object,
|
|
26
|
+
default: null
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
formModel() {
|
|
31
|
+
return this.model.ref
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
mounted() {
|
|
35
|
+
this.$watch('model.ref.attr.name', function(newVal) {
|
|
36
|
+
this.model.name = newVal
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss" scoped>
|
|
43
|
+
|
|
44
|
+
</style>
|