workflow-editor 0.9.84-dw-tmp8 → 0.9.84-dw-tmp9
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 +1 -1
- package/packages/index.js +0 -34
- package/packages/plugins/formValidatorUtil.js +0 -528
- 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/copy-task.js +0 -67
- 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 -30
- 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 -479
- 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 -302
- package/packages/workflow-editor/src/process-json.js +0 -622
- package/packages/workflow-editor/src/process-service.js +0 -31
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -522
- 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 -47
- 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.vue +0 -98
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -179
- 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 -355
- 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 -220
- 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 -80
- 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 -156
- 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 -103
- 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 -109
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -176
- 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/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 -493
- package/packages/workflow-editor/src/workflow-editor.vue +0 -605
- package/packages/workflow-editor/src/workflow-history.vue +0 -153
package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
width="50%"
|
|
4
|
-
:title="$t('workflowEditor.task.setConditions')"
|
|
5
|
-
:visible="true"
|
|
6
|
-
top="10vh"
|
|
7
|
-
append-to-body
|
|
8
|
-
custom-class="properties-editor-noTab"
|
|
9
|
-
center
|
|
10
|
-
@close="$emit('close')"
|
|
11
|
-
>
|
|
12
|
-
<el-form-item>
|
|
13
|
-
<additional-condition v-model="condition" />
|
|
14
|
-
</el-form-item>
|
|
15
|
-
<span slot="footer" class="dialog-footer">
|
|
16
|
-
<el-button type="primary" size="small" @click="setConditions">
|
|
17
|
-
{{ $t('workflowEditorPublicModel.determine') }}
|
|
18
|
-
</el-button>
|
|
19
|
-
<el-button size="small" @click="$emit('close')">
|
|
20
|
-
{{ $t('workflowEditorPublicModel.cancel') }}
|
|
21
|
-
</el-button>
|
|
22
|
-
</span>
|
|
23
|
-
</el-dialog>
|
|
24
|
-
</template>
|
|
25
|
-
|
|
26
|
-
<script>
|
|
27
|
-
import AdditionalCondition from '../common/additional-condition'
|
|
28
|
-
export default {
|
|
29
|
-
name: 'AdditionalConditionDialog',
|
|
30
|
-
components: {
|
|
31
|
-
AdditionalCondition
|
|
32
|
-
},
|
|
33
|
-
props: {
|
|
34
|
-
value: {
|
|
35
|
-
type: String,
|
|
36
|
-
default: ''
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
data() {
|
|
40
|
-
return {
|
|
41
|
-
condition: this.value
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
watch: {
|
|
45
|
-
value(val) {
|
|
46
|
-
this.condition = val
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
methods: {
|
|
50
|
-
setConditions() {
|
|
51
|
-
this.$emit('input', this.condition)
|
|
52
|
-
this.$emit('close')
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
<style lang="scss" scoped>
|
|
59
|
-
|
|
60
|
-
</style>
|
|
@@ -1,156 +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.canItBeRejected')">
|
|
20
|
-
<el-switch v-model="tache.rebuttable" />
|
|
21
|
-
</el-form-item>
|
|
22
|
-
<el-form-item :label="$t('workflowEditor.task.emailNotification')">
|
|
23
|
-
<el-switch v-model="tache.mailNotice" />
|
|
24
|
-
</el-form-item>
|
|
25
|
-
<el-form-item v-if="tache.mailNotice" :label="$t('workflowEditor.task.selectMailTemplate')">
|
|
26
|
-
<select-mail-templates v-model="tache.mailTemplateCode" @set-value="setMailTemplateCode" />
|
|
27
|
-
</el-form-item>
|
|
28
|
-
<el-form-item :label="$t('workflowEditor.task.HandlingMethod')">
|
|
29
|
-
<el-radio-group v-model="tache.processingMode.type">
|
|
30
|
-
<el-radio label="EDIT">
|
|
31
|
-
{{ $t('workflowEditor.task.editorial') }}
|
|
32
|
-
</el-radio>
|
|
33
|
-
<el-radio label="APPROVE">
|
|
34
|
-
{{ $t('workflowEditor.task.approvalType') }}
|
|
35
|
-
</el-radio>
|
|
36
|
-
<el-radio label="COUNTERSIGN">
|
|
37
|
-
{{ $t('workflowEditor.task.countersign') }}
|
|
38
|
-
</el-radio>
|
|
39
|
-
<el-radio label="VOTE">
|
|
40
|
-
{{ $t('workflowEditor.task.voting') }}
|
|
41
|
-
</el-radio>
|
|
42
|
-
</el-radio-group>
|
|
43
|
-
</el-form-item>
|
|
44
|
-
<el-form-item v-if="tache.processingMode.type==='EDIT'||tache.processingMode.type==='APPROVE'" :label="$t('workflowEditorMessage.whenThereAreMultipleManagers')">
|
|
45
|
-
<el-radio-group v-model="tache.processingMode.moreTransactor">
|
|
46
|
-
<el-radio :label="false">
|
|
47
|
-
{{ $t('workflowEditor.task.anyOneCanHandleIt') }}
|
|
48
|
-
</el-radio>
|
|
49
|
-
<el-radio :label="true">
|
|
50
|
-
{{ $t('workflowEditor.task.forAll') }}
|
|
51
|
-
</el-radio>
|
|
52
|
-
</el-radio-group>
|
|
53
|
-
</el-form-item>
|
|
54
|
-
<el-form-item v-if="tache.processingMode.type==='COUNTERSIGN'||tache.processingMode.type==='VOTE'" :label="$t('workflowEditor.task.passRate')">
|
|
55
|
-
<el-input-number v-model="tache.processingMode.passRate" :step="10" size="small" :min="0" :max="100" />
|
|
56
|
-
<span class="percent">
|
|
57
|
-
%
|
|
58
|
-
</span>
|
|
59
|
-
</el-form-item>
|
|
60
|
-
<el-form-item :label="$t('workflowEditor.task.modifyOperationName')">
|
|
61
|
-
<el-switch v-model="showActions" />
|
|
62
|
-
<custom-actions v-if="showActions" v-model="tache.processingMode.actions" />
|
|
63
|
-
</el-form-item>
|
|
64
|
-
<el-form-item :label="$t('workflowEditor.task.handlingPage')">
|
|
65
|
-
<el-input v-model="tache.taskUrl" />
|
|
66
|
-
</el-form-item>
|
|
67
|
-
<el-form-item :label="$t('workflowEditor.task.remarks')">
|
|
68
|
-
<el-input v-model="tache.remark" type="textarea" autosize />
|
|
69
|
-
</el-form-item>
|
|
70
|
-
</el-form>
|
|
71
|
-
</template>
|
|
72
|
-
<script>
|
|
73
|
-
import TaskTitle from '../common/task-title'
|
|
74
|
-
import CustomActions from './custom-actions'
|
|
75
|
-
import { validateTacheCode } from '../../util'
|
|
76
|
-
import i18nInput from '../common/i18n-input'
|
|
77
|
-
import SelectMailTemplates from '../common/select-mail-template.vue'
|
|
78
|
-
export default {
|
|
79
|
-
name: 'BasicProperties',
|
|
80
|
-
components: {
|
|
81
|
-
TaskTitle,
|
|
82
|
-
CustomActions,
|
|
83
|
-
i18nInput,
|
|
84
|
-
SelectMailTemplates
|
|
85
|
-
},
|
|
86
|
-
props: {
|
|
87
|
-
model: {
|
|
88
|
-
type: Object,
|
|
89
|
-
default: null
|
|
90
|
-
},
|
|
91
|
-
id: {
|
|
92
|
-
type: String,
|
|
93
|
-
default: null
|
|
94
|
-
},
|
|
95
|
-
name: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: null
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
data() {
|
|
101
|
-
let showActions = false
|
|
102
|
-
const actions = this.model.processingMode.actions.action
|
|
103
|
-
if (actions) {
|
|
104
|
-
if (Array.isArray(actions) && actions.length === 0) {
|
|
105
|
-
showActions = false
|
|
106
|
-
} else {
|
|
107
|
-
showActions = true
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
return {
|
|
111
|
-
showActions,
|
|
112
|
-
formModel: {
|
|
113
|
-
name: this.name,
|
|
114
|
-
id: this.id,
|
|
115
|
-
tache: this.model
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
computed: {
|
|
120
|
-
tache() {
|
|
121
|
-
return this.model
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
created() {
|
|
125
|
-
if (!this.tache.processingMode.actions) {
|
|
126
|
-
this.$set(this.tache.processingMode, 'actions', {})
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
mounted() {
|
|
130
|
-
// 支持.snyc修饰符的写法
|
|
131
|
-
this.$watch('formModel.name', function(newVal, oldVal) {
|
|
132
|
-
this.$emit('update:name', newVal)
|
|
133
|
-
})
|
|
134
|
-
},
|
|
135
|
-
methods: {
|
|
136
|
-
// 原来使用$watch来监听id的更改是不行的:input框每输入一个字符都会导致$watch的触发,输入过程中不应该触发(这时候没有输入完成,做的id重复判断是无效的),而是等blur后触发才能保证正确性
|
|
137
|
-
validateId() {
|
|
138
|
-
validateTacheCode(this)
|
|
139
|
-
},
|
|
140
|
-
// 关闭选择邮件模板弹框
|
|
141
|
-
setMailTemplateCode(mailTemplateCode) {
|
|
142
|
-
this.tache.mailTemplateCode = mailTemplateCode
|
|
143
|
-
},
|
|
144
|
-
setI18nValue(i18nKey) {
|
|
145
|
-
this.tache.i18nKey = i18nKey
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
</script>
|
|
150
|
-
<style scoped>
|
|
151
|
-
.percent{
|
|
152
|
-
margin-left: 10px;
|
|
153
|
-
color:red;
|
|
154
|
-
font-size:1.2em;
|
|
155
|
-
}
|
|
156
|
-
</style>
|
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
// import modulePageService from '@/subsystems/mms/api/module-page'
|
|
2
|
-
import { getI18n } from '../../../../workflow-editor/src/util'
|
|
3
|
-
const utiljs = {
|
|
4
|
-
// 格式化json
|
|
5
|
-
xmlToData(xmlData) {
|
|
6
|
-
const tableData = []
|
|
7
|
-
if (xmlData) {
|
|
8
|
-
const arr = xmlData.split(' ')
|
|
9
|
-
if (arr && arr.length > 0) {
|
|
10
|
-
let num = 1
|
|
11
|
-
let leftBracket = ''
|
|
12
|
-
let propName = ''
|
|
13
|
-
let operator = ''
|
|
14
|
-
let propValue = ''
|
|
15
|
-
let rightBracket = ''
|
|
16
|
-
let logicOperator = ''
|
|
17
|
-
let propValueType = null
|
|
18
|
-
for (var i = 0; i < arr.length; i++) {
|
|
19
|
-
var str = arr[i]
|
|
20
|
-
if (str.indexOf('(') !== -1) {
|
|
21
|
-
if (this.operationArr) {
|
|
22
|
-
this.operationArr.push([])
|
|
23
|
-
}
|
|
24
|
-
leftBracket = ''
|
|
25
|
-
propName = ''
|
|
26
|
-
operator = ''
|
|
27
|
-
propValue = ''
|
|
28
|
-
rightBracket = ''
|
|
29
|
-
logicOperator = ''
|
|
30
|
-
const leftarr = str.split('${field[')
|
|
31
|
-
leftBracket = leftarr[0]
|
|
32
|
-
propName = leftarr[1].replace(']}', '')
|
|
33
|
-
if (this.operationArr) {
|
|
34
|
-
const operatorsArr = this.getOperators(this.fieldMap[propName])
|
|
35
|
-
this.operationArr[num - 1] = operatorsArr
|
|
36
|
-
}
|
|
37
|
-
continue
|
|
38
|
-
}
|
|
39
|
-
if (str.indexOf('(') === -1 && str.indexOf('${field[') !== -1) {
|
|
40
|
-
if (this.operationArr) {
|
|
41
|
-
this.operationArr.push([])
|
|
42
|
-
}
|
|
43
|
-
leftBracket = ''
|
|
44
|
-
propName = ''
|
|
45
|
-
operator = ''
|
|
46
|
-
propValue = ''
|
|
47
|
-
rightBracket = ''
|
|
48
|
-
logicOperator = ''
|
|
49
|
-
propName = str.replace('${field[', '').replace(']}', '')
|
|
50
|
-
if (this.operationArr) {
|
|
51
|
-
const operatorsArr = this.getOperators(this.fieldMap[propName])
|
|
52
|
-
this.operationArr[num - 1] = operatorsArr
|
|
53
|
-
}
|
|
54
|
-
continue
|
|
55
|
-
}
|
|
56
|
-
if (str.indexOf('operator.') !== -1 && str.indexOf('condition.') === -1) {
|
|
57
|
-
operator = str
|
|
58
|
-
continue
|
|
59
|
-
}
|
|
60
|
-
if (operator !== '' && propValue === '') {
|
|
61
|
-
if (str.indexOf(')') !== -1) {
|
|
62
|
-
if (str.indexOf(')))') !== -1) {
|
|
63
|
-
propValue = str.replace(')))', '')
|
|
64
|
-
rightBracket = ')))'
|
|
65
|
-
} else if (str.indexOf('))') !== -1) {
|
|
66
|
-
propValue = str.replace('))', '')
|
|
67
|
-
rightBracket = '))'
|
|
68
|
-
} else if (str.indexOf(')') !== -1) {
|
|
69
|
-
propValue = str.replace(')', '')
|
|
70
|
-
rightBracket = ')'
|
|
71
|
-
}
|
|
72
|
-
} else {
|
|
73
|
-
propValue = str
|
|
74
|
-
}
|
|
75
|
-
if (propValue && propValue !== '') {
|
|
76
|
-
if (propValue.indexOf('${task.') !== -1) {
|
|
77
|
-
propValueType = 'task'
|
|
78
|
-
} else if (propValue.indexOf('${context.') !== -1) {
|
|
79
|
-
propValueType = 'context'
|
|
80
|
-
} else if (propValue.indexOf('${obj.') !== -1) {
|
|
81
|
-
propValueType = 'obj'
|
|
82
|
-
} else if (propValue.indexOf('${subObj.') !== -1) {
|
|
83
|
-
propValueType = 'subObj'
|
|
84
|
-
} else if (propValue.indexOf('${request.') !== -1) {
|
|
85
|
-
propValueType = 'request'
|
|
86
|
-
} else if (propValue.indexOf('${input.') !== -1) {
|
|
87
|
-
propValueType = 'input'
|
|
88
|
-
} else if (propValue.indexOf('${custom.') !== -1) {
|
|
89
|
-
propValueType = 'custom'
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
continue
|
|
93
|
-
}
|
|
94
|
-
if (str.indexOf('condition.') !== -1) {
|
|
95
|
-
logicOperator = str
|
|
96
|
-
tableData.push({
|
|
97
|
-
id: num,
|
|
98
|
-
leftBracket: leftBracket,
|
|
99
|
-
propName: propName,
|
|
100
|
-
operator: operator,
|
|
101
|
-
propValue: propValue,
|
|
102
|
-
rightBracket: rightBracket,
|
|
103
|
-
logicOperator: logicOperator,
|
|
104
|
-
propValueType: propValueType
|
|
105
|
-
})
|
|
106
|
-
num += 1
|
|
107
|
-
} else if (propValue && propValue !== '') {
|
|
108
|
-
if (!logicOperator || logicOperator === '') {
|
|
109
|
-
logicOperator = 'condition.operator.or'
|
|
110
|
-
tableData.push({
|
|
111
|
-
id: num,
|
|
112
|
-
leftBracket: leftBracket,
|
|
113
|
-
propName: propName,
|
|
114
|
-
operator: operator,
|
|
115
|
-
propValue: propValue,
|
|
116
|
-
rightBracket: rightBracket,
|
|
117
|
-
logicOperator: logicOperator,
|
|
118
|
-
propValueType: propValueType
|
|
119
|
-
})
|
|
120
|
-
num += 1
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return tableData
|
|
127
|
-
},
|
|
128
|
-
getOperatorsArr(conditionList) {
|
|
129
|
-
if (conditionList && conditionList.length > 0) {
|
|
130
|
-
for (var i = 0; i < conditionList.length; i++) {
|
|
131
|
-
this.operationArr.push([])
|
|
132
|
-
const item = conditionList[i]
|
|
133
|
-
const operatorsArr = this.getOperators(this.fieldMap[item.propName])
|
|
134
|
-
this.operationArr[i] = operatorsArr
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
getRetunrOperatorsArr(conditionList, fieldMap) {
|
|
139
|
-
const operationArr = []
|
|
140
|
-
if (conditionList && conditionList.length > 0) {
|
|
141
|
-
for (var i = 0; i < conditionList.length; i++) {
|
|
142
|
-
operationArr.push([])
|
|
143
|
-
const item = conditionList[i]
|
|
144
|
-
const operatorsArr = this.getOperators(fieldMap[item.propName])
|
|
145
|
-
operationArr[i] = operatorsArr
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return operationArr
|
|
149
|
-
},
|
|
150
|
-
dataToXml(tableData) {
|
|
151
|
-
let stringData = ''
|
|
152
|
-
if (tableData && tableData.length > 0) {
|
|
153
|
-
for (var i = 0; i < tableData.length; i++) {
|
|
154
|
-
var item = tableData[i]
|
|
155
|
-
let logicOperator = logicOperator = item.logicOperator
|
|
156
|
-
if (i === tableData.length - 1) {
|
|
157
|
-
logicOperator = ''
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
stringData = stringData + item.leftBracket + '${field[' + item.propName + ']} ' + item.operator + ' ' + item.propValue + item.rightBracket + ' ' + logicOperator + ' '
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return stringData
|
|
164
|
-
},
|
|
165
|
-
formatConditionList(conditionList) {
|
|
166
|
-
let returnStr = ''
|
|
167
|
-
if (conditionList) {
|
|
168
|
-
if (typeof (conditionList) === 'string') {
|
|
169
|
-
// 先进行转换再解析
|
|
170
|
-
const dataList = this.xmlToData(conditionList)
|
|
171
|
-
returnStr = this.formatConditionListTwo(dataList)
|
|
172
|
-
} else {
|
|
173
|
-
returnStr = this.formatConditionListTwo(conditionList)
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
if (returnStr && returnStr !== '') {
|
|
177
|
-
const endStr = returnStr.substring(returnStr.length - 1)
|
|
178
|
-
if (endStr === '者' || endStr === '且') {
|
|
179
|
-
returnStr = returnStr.substring(0, returnStr.length - 2)
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
return returnStr
|
|
183
|
-
},
|
|
184
|
-
formatConditionListTwo(conditionList) {
|
|
185
|
-
let returnStr = ''
|
|
186
|
-
if (conditionList && conditionList.length > 0) {
|
|
187
|
-
for (var i = 0; i < conditionList.length; i++) {
|
|
188
|
-
const item = conditionList[i]
|
|
189
|
-
if (item && item.propName) {
|
|
190
|
-
const operatorsArr = this.getOperators(this.fieldMap[item.propName])
|
|
191
|
-
if (operatorsArr && operatorsArr.length > 0) {
|
|
192
|
-
const operator = operatorsArr.filter(operItem => {
|
|
193
|
-
return operItem.name === item.operator
|
|
194
|
-
})
|
|
195
|
-
returnStr += item.leftBracket
|
|
196
|
-
if (this.fieldMap[item.propName] && this.fieldMap[item.propName].label) {
|
|
197
|
-
returnStr += this.fieldMap[item.propName].label + ' '
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (operator && operator.length > 0) {
|
|
201
|
-
returnStr += operator[0].label + ' '
|
|
202
|
-
}
|
|
203
|
-
returnStr += item.propValue + item.rightBracket + ' '
|
|
204
|
-
if (item.logicOperator) {
|
|
205
|
-
if (item.logicOperator === 'or') {
|
|
206
|
-
returnStr += '或者'
|
|
207
|
-
} else {
|
|
208
|
-
returnStr += '并且'
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
return returnStr
|
|
216
|
-
},
|
|
217
|
-
// 实时根据类型改变连接符
|
|
218
|
-
getOperators(item) {
|
|
219
|
-
if (item) {
|
|
220
|
-
if (item.type === 'INTEGER' || item.type === 'LONG' || item.type === 'DOUBLE' || item.type === 'FLOAT') {
|
|
221
|
-
return [{
|
|
222
|
-
name: 'operator.number.gt',
|
|
223
|
-
label: getI18n().t('workflowEditor.process.greaterThan')
|
|
224
|
-
}, {
|
|
225
|
-
name: 'operator.number.lt',
|
|
226
|
-
label: getI18n().t('workflowEditor.process.lessThan')
|
|
227
|
-
}, {
|
|
228
|
-
name: 'operator.number.eq',
|
|
229
|
-
label: getI18n().t('workflowEditor.process.beEqualTo')
|
|
230
|
-
}, {
|
|
231
|
-
name: 'operator.number.le',
|
|
232
|
-
label: getI18n().t('workflowEditor.process.notGreaterThan')
|
|
233
|
-
}, {
|
|
234
|
-
name: 'operator.number.ge',
|
|
235
|
-
label: getI18n().t('workflowEditor.process.notLessThan')
|
|
236
|
-
}, {
|
|
237
|
-
name: 'operator.number.ne',
|
|
238
|
-
label: getI18n().t('workflowEditor.process.notEqualTo')
|
|
239
|
-
}]
|
|
240
|
-
} else if (item.type === 'DATE' || item.type === 'TIME') {
|
|
241
|
-
return [{
|
|
242
|
-
name: 'operator.date.gt',
|
|
243
|
-
label: getI18n().t('workflowEditor.process.laterThan')
|
|
244
|
-
}, {
|
|
245
|
-
name: 'operator.date.lt',
|
|
246
|
-
label: getI18n().t('workflowEditor.process.earlierThan')
|
|
247
|
-
}, {
|
|
248
|
-
name: 'operator.date.eq',
|
|
249
|
-
label: getI18n().t('workflowEditor.process.beEqualTo')
|
|
250
|
-
}, {
|
|
251
|
-
name: 'operator.date.le',
|
|
252
|
-
label: getI18n().t('workflowEditor.process.noLaterThan')
|
|
253
|
-
}, {
|
|
254
|
-
name: 'operator.date.ge',
|
|
255
|
-
label: getI18n().t('workflowEditor.process.noEarlierThan')
|
|
256
|
-
}]
|
|
257
|
-
} else if (item.type === 'TEXT') {
|
|
258
|
-
return [{
|
|
259
|
-
name: 'operator.text.eq',
|
|
260
|
-
label: getI18n().t('workflowEditor.process.beEqualTo')
|
|
261
|
-
}, {
|
|
262
|
-
name: 'operator.text.neq',
|
|
263
|
-
label: getI18n().t('workflowEditor.process.notEqualTo')
|
|
264
|
-
}, {
|
|
265
|
-
name: 'operator.text.contain',
|
|
266
|
-
label: getI18n().t('workflowEditor.process.contain')
|
|
267
|
-
}, {
|
|
268
|
-
name: 'operator.text.contain.not',
|
|
269
|
-
label: getI18n().t('workflowEditor.process.notIncluded')
|
|
270
|
-
}]
|
|
271
|
-
} else {
|
|
272
|
-
return [{
|
|
273
|
-
name: 'operator.text.eq',
|
|
274
|
-
label: getI18n().t('workflowEditor.process.beEqualTo')
|
|
275
|
-
}, {
|
|
276
|
-
name: 'operator.text.neq',
|
|
277
|
-
label: getI18n().t('workflowEditor.process.notEqualTo')
|
|
278
|
-
}]
|
|
279
|
-
}
|
|
280
|
-
} else {
|
|
281
|
-
return [{
|
|
282
|
-
name: 'operator.text.eq',
|
|
283
|
-
label: getI18n().t('workflowEditor.process.beEqualTo')
|
|
284
|
-
}, {
|
|
285
|
-
name: 'operator.text.neq',
|
|
286
|
-
label: getI18n().t('workflowEditor.process.notEqualTo')
|
|
287
|
-
}]
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
export default utiljs
|