workflow-editor 0.0.81-up → 0.0.81-up-tmp2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.full.min.js +3237 -0
- package/dist/style.css +1 -0
- package/es/_virtual/FileSaver.min.mjs +4 -0
- package/es/_virtual/___vite-browser-external.mjs +6 -0
- package/es/_virtual/__vite-browser-external.mjs +4 -0
- package/es/_virtual/_commonjsHelpers.mjs +30 -0
- package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
- package/es/_virtual/clipboard.mjs +4 -0
- package/es/_virtual/dayjs.min.mjs +4 -0
- package/es/_virtual/index.mjs +4 -0
- package/es/_virtual/nprogress.mjs +4 -0
- package/es/_virtual/prism.mjs +4 -0
- package/es/_virtual/sax.mjs +4 -0
- package/es/_virtual/string_decoder.mjs +4 -0
- package/es/_virtual/tinymce.mjs +4 -0
- package/es/_virtual/weekOfYear.mjs +4 -0
- package/es/index.mjs +20 -0
- package/es/plugins/formValidatorUtil.mjs +391 -0
- package/es/plugins/index.mjs +9 -0
- package/es/style.css +1 -0
- package/es/vite.svg +1 -0
- package/es/workflow-editor/index.mjs +14 -0
- package/lib/_virtual/FileSaver.min.cjs +1 -0
- package/lib/_virtual/___vite-browser-external.cjs +1 -0
- package/lib/_virtual/__vite-browser-external.cjs +1 -0
- package/lib/_virtual/_commonjsHelpers.cjs +1 -0
- package/lib/_virtual/_plugin-vue_export-helper.cjs +1 -0
- package/lib/_virtual/clipboard.cjs +1 -0
- package/lib/_virtual/dayjs.min.cjs +1 -0
- package/lib/_virtual/index.cjs +1 -0
- package/lib/_virtual/nprogress.cjs +1 -0
- package/lib/_virtual/prism.cjs +1 -0
- package/lib/_virtual/sax.cjs +1 -0
- package/lib/_virtual/string_decoder.cjs +1 -0
- package/lib/_virtual/tinymce.cjs +1 -0
- package/lib/_virtual/weekOfYear.cjs +1 -0
- package/lib/index.cjs +1 -0
- package/lib/plugins/formValidatorUtil.cjs +1 -0
- package/lib/plugins/index.cjs +1 -0
- package/lib/style.css +1 -0
- package/lib/workflow-editor/index.cjs +1 -0
- package/package.json +5 -3
- package/vite.config.js +49 -11
- package/lib/401-5a92e011.js +0 -101
- package/lib/404-2e472acc.js +0 -26
- package/lib/authredirect-ae6e75b4.js +0 -10
- package/lib/iframe-page-4e84c0f8.js +0 -33
- package/lib/index-27119bd2.js +0 -31464
- package/lib/index-369eae4a.js +0 -13
- package/lib/tab-content-iframe-index-e9146736.js +0 -33
- package/lib/tab-content-index-bbc6792b.js +0 -1241
- package/lib/tache-subprocess-history-d51d6a50.js +0 -56
- package/lib/workflow-editor.css +0 -1
- package/lib/workflow-editor.js +0 -5
- package/lib/workflow-editor.umd.cjs +0 -85
- package/packages/index.js +0 -34
- package/packages/plugins/formValidatorUtil.js +0 -723
- package/packages/plugins/index.js +0 -8
- package/packages/workflow-editor/index.js +0 -14
- package/packages/workflow-editor/src/api.js +0 -7
- package/packages/workflow-editor/src/assets/tab-select.png +0 -0
- package/packages/workflow-editor/src/assets/tab-selectWhite.png +0 -0
- package/packages/workflow-editor/src/assets/wf-editor-icons.js +0 -2
- package/packages/workflow-editor/src/constant.js +0 -8
- package/packages/workflow-editor/src/json-object-templates/auto-task.js +0 -70
- package/packages/workflow-editor/src/json-object-templates/copy-task.js +0 -72
- package/packages/workflow-editor/src/json-object-templates/decision.js +0 -11
- package/packages/workflow-editor/src/json-object-templates/end.js +0 -14
- package/packages/workflow-editor/src/json-object-templates/fork.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/human-decision.js +0 -9
- package/packages/workflow-editor/src/json-object-templates/human-task.js +0 -208
- package/packages/workflow-editor/src/json-object-templates/join.js +0 -10
- package/packages/workflow-editor/src/json-object-templates/process.js +0 -99
- package/packages/workflow-editor/src/json-object-templates/start.js +0 -13
- package/packages/workflow-editor/src/json-object-templates/subprocess.js +0 -31
- package/packages/workflow-editor/src/json-object-templates/transition.js +0 -26
- package/packages/workflow-editor/src/main/admin-save-dialog.vue +0 -67
- package/packages/workflow-editor/src/main/canvas.vue +0 -493
- package/packages/workflow-editor/src/main/context-menu.vue +0 -147
- package/packages/workflow-editor/src/main/icon-svg.vue +0 -32
- package/packages/workflow-editor/src/main/selection-region.vue +0 -66
- package/packages/workflow-editor/src/main/tache-history-tooltip.vue +0 -38
- package/packages/workflow-editor/src/main/tache-name-input.vue +0 -19
- package/packages/workflow-editor/src/main/tache-subprocess-history-dialog.vue +0 -40
- package/packages/workflow-editor/src/main/toolbox.vue +0 -60
- package/packages/workflow-editor/src/main/wf-history-canvas.vue +0 -309
- package/packages/workflow-editor/src/process-json.js +0 -624
- package/packages/workflow-editor/src/process-service.js +0 -69
- package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/auto-task.vue +0 -74
- package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +0 -568
- package/packages/workflow-editor/src/properties-editors/common/additional-condition.vue +0 -320
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields-utils.js +0 -34
- package/packages/workflow-editor/src/properties-editors/common/auto-filled-fields.vue +0 -268
- package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +0 -81
- package/packages/workflow-editor/src/properties-editors/common/common-user-condition.vue +0 -242
- package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +0 -23
- package/packages/workflow-editor/src/properties-editors/common/form-fields.vue +0 -117
- package/packages/workflow-editor/src/properties-editors/common/i18n-input.vue +0 -88
- package/packages/workflow-editor/src/properties-editors/common/i18n-set-dialog.vue +0 -143
- package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +0 -149
- package/packages/workflow-editor/src/properties-editors/common/notice.vue +0 -108
- package/packages/workflow-editor/src/properties-editors/common/reminder.vue +0 -272
- package/packages/workflow-editor/src/properties-editors/common/select-mail-template.vue +0 -92
- package/packages/workflow-editor/src/properties-editors/common/standard-fields.vue +0 -66
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree-inline.vue +0 -354
- package/packages/workflow-editor/src/properties-editors/common/system-role-tree.vue +0 -68
- package/packages/workflow-editor/src/properties-editors/common/task-title.vue +0 -165
- package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +0 -275
- package/packages/workflow-editor/src/properties-editors/common/user-selection.vue +0 -426
- package/packages/workflow-editor/src/properties-editors/common/value-selection-dialog.vue +0 -272
- package/packages/workflow-editor/src/properties-editors/common/variables.vue +0 -139
- package/packages/workflow-editor/src/properties-editors/copy-task/basic-properties.vue +0 -90
- package/packages/workflow-editor/src/properties-editors/copy-task/permission-settings.vue +0 -155
- package/packages/workflow-editor/src/properties-editors/copy-task.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/decision.vue +0 -95
- package/packages/workflow-editor/src/properties-editors/fork.vue +0 -77
- package/packages/workflow-editor/src/properties-editors/human-decision.vue +0 -49
- package/packages/workflow-editor/src/properties-editors/human-task/additional-condition-dialog.vue +0 -62
- package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +0 -184
- package/packages/workflow-editor/src/properties-editors/human-task/componentsConfigUtil.js +0 -359
- package/packages/workflow-editor/src/properties-editors/human-task/custom-actions.vue +0 -256
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-field-setting.vue +0 -405
- package/packages/workflow-editor/src/properties-editors/human-task/editable-child-fields.vue +0 -257
- package/packages/workflow-editor/src/properties-editors/human-task/editable-field-selection.vue +0 -430
- package/packages/workflow-editor/src/properties-editors/human-task/editable-fields.vue +0 -206
- package/packages/workflow-editor/src/properties-editors/human-task/events.vue +0 -60
- package/packages/workflow-editor/src/properties-editors/human-task/permission-settings.vue +0 -224
- package/packages/workflow-editor/src/properties-editors/human-task/selection-conditions.vue +0 -499
- package/packages/workflow-editor/src/properties-editors/human-task.vue +0 -107
- package/packages/workflow-editor/src/properties-editors/join.vue +0 -49
- package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +0 -336
- package/packages/workflow-editor/src/properties-editors/process/events.vue +0 -79
- package/packages/workflow-editor/src/properties-editors/process/notice-settings.vue +0 -68
- package/packages/workflow-editor/src/properties-editors/process/parameter-settings.vue +0 -106
- package/packages/workflow-editor/src/properties-editors/process/permission-settings.vue +0 -28
- package/packages/workflow-editor/src/properties-editors/process/selectPage.vue +0 -88
- package/packages/workflow-editor/src/properties-editors/process.vue +0 -115
- package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +0 -201
- package/packages/workflow-editor/src/properties-editors/subprocess/events.vue +0 -26
- package/packages/workflow-editor/src/properties-editors/subprocess/field-mappings.vue +0 -216
- package/packages/workflow-editor/src/properties-editors/subprocess/transactor-settings.vue +0 -66
- package/packages/workflow-editor/src/properties-editors/subprocess.vue +0 -80
- package/packages/workflow-editor/src/properties-editors/transition/basic-properties.vue +0 -53
- package/packages/workflow-editor/src/properties-editors/transition.vue +0 -75
- package/packages/workflow-editor/src/properties-editors/user-condition.js +0 -183
- package/packages/workflow-editor/src/store/getters.js +0 -33
- package/packages/workflow-editor/src/store/workflow-editor.js +0 -153
- package/packages/workflow-editor/src/taches/auto-task.vue +0 -99
- package/packages/workflow-editor/src/taches/common-methods.js +0 -21
- package/packages/workflow-editor/src/taches/copy-task.vue +0 -99
- package/packages/workflow-editor/src/taches/custom-task.vue +0 -88
- package/packages/workflow-editor/src/taches/decision.vue +0 -102
- package/packages/workflow-editor/src/taches/end.vue +0 -76
- package/packages/workflow-editor/src/taches/fork.vue +0 -102
- package/packages/workflow-editor/src/taches/human-decision.vue +0 -102
- package/packages/workflow-editor/src/taches/human-task.vue +0 -113
- package/packages/workflow-editor/src/taches/join.vue +0 -91
- package/packages/workflow-editor/src/taches/joint.vue +0 -177
- package/packages/workflow-editor/src/taches/start.vue +0 -76
- package/packages/workflow-editor/src/taches/subprocess.vue +0 -99
- package/packages/workflow-editor/src/taches/tache-resizer.vue +0 -80
- package/packages/workflow-editor/src/transitions/broken-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/curve-line.vue +0 -91
- package/packages/workflow-editor/src/transitions/straight-line.vue +0 -26
- package/packages/workflow-editor/src/transitions/transition.vue +0 -209
- package/packages/workflow-editor/src/transitions/virtual-transition.vue +0 -43
- package/packages/workflow-editor/src/util.js +0 -499
- package/packages/workflow-editor/src/workflow-editor.vue +0 -852
- package/packages/workflow-editor/src/workflow-history.vue +0 -153
- package/src/i18n/i18n.js +0 -16
- package/src/i18n/langs/cn.js +0 -521
- package/src/i18n/langs/en.js +0 -529
- /package/{public → dist}/vite.svg +0 -0
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-form-item :label="label">
|
|
4
|
-
<el-checkbox-group v-model="tools">
|
|
5
|
-
<el-checkbox label="mail">
|
|
6
|
-
{{ $t('workflowEditorPublicModel.mail') }}
|
|
7
|
-
</el-checkbox>
|
|
8
|
-
<!-- <el-checkbox label="sms">
|
|
9
|
-
{{ $t('workflowEditorPublicModel.message') }}
|
|
10
|
-
</el-checkbox>
|
|
11
|
-
<el-checkbox label="app">
|
|
12
|
-
{{ $t('workflowEditorPublicModel.App') }}
|
|
13
|
-
</el-checkbox>
|
|
14
|
-
<el-checkbox label="dingding">
|
|
15
|
-
{{ $t('workflowEditorPublicModel.dingding') }}
|
|
16
|
-
</el-checkbox> -->
|
|
17
|
-
<el-checkbox label="DINGDING">
|
|
18
|
-
{{ $t('workflowEditorPublicModel.dingding') }}
|
|
19
|
-
</el-checkbox>
|
|
20
|
-
<el-checkbox label="QIWEI">
|
|
21
|
-
{{ $t('workflowEditorPublicModel.qiwei') }}
|
|
22
|
-
</el-checkbox>
|
|
23
|
-
<el-checkbox label="FEISHU">
|
|
24
|
-
{{ $t('workflowEditorPublicModel.feishu') }}
|
|
25
|
-
</el-checkbox>
|
|
26
|
-
<el-checkbox label="custom">
|
|
27
|
-
{{ $t('workflowEditorPublicModel.custom') }}
|
|
28
|
-
</el-checkbox>
|
|
29
|
-
</el-checkbox-group>
|
|
30
|
-
</el-form-item>
|
|
31
|
-
<el-form-item
|
|
32
|
-
label-width="110"
|
|
33
|
-
v-if="tools.indexOf('custom') >= 0"
|
|
34
|
-
:label="$t('workflowEditor.common.customMsg')"
|
|
35
|
-
>
|
|
36
|
-
<el-input v-model="myCustomMsg" />
|
|
37
|
-
</el-form-item>
|
|
38
|
-
</div>
|
|
39
|
-
</template>
|
|
40
|
-
<script>
|
|
41
|
-
export default {
|
|
42
|
-
name: 'CommonNoticeTool',
|
|
43
|
-
props: {
|
|
44
|
-
label: {
|
|
45
|
-
type: String,
|
|
46
|
-
default: null
|
|
47
|
-
},
|
|
48
|
-
modelValue: {
|
|
49
|
-
type: String,
|
|
50
|
-
default: null
|
|
51
|
-
},
|
|
52
|
-
customMsg: {
|
|
53
|
-
type: String,
|
|
54
|
-
default: null
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
data() {
|
|
58
|
-
let tools = []
|
|
59
|
-
if (this.modelValue && this.modelValue !== '' && this.modelValue !== null) {
|
|
60
|
-
tools = this.modelValue.split(',')
|
|
61
|
-
}
|
|
62
|
-
let myCustomMsg = ''
|
|
63
|
-
if (this.customMsg && this.customMsg !== '' && this.customMsg !== null) {
|
|
64
|
-
myCustomMsg = this.customMsg
|
|
65
|
-
}
|
|
66
|
-
return {
|
|
67
|
-
tools,
|
|
68
|
-
myCustomMsg
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
watch: {
|
|
72
|
-
tools(val) {
|
|
73
|
-
// this.$emit('input', this.tools.join(','))
|
|
74
|
-
this.$emit('update:modelValue', this.tools.join(','))
|
|
75
|
-
},
|
|
76
|
-
myCustomMsg(val) {
|
|
77
|
-
this.$emit('input-msg', this.myCustomMsg)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
</script>
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<el-row>
|
|
4
|
-
<el-button type="primary" size="small" plain icon="CirclePlus" @click="add">
|
|
5
|
-
{{ $t('workflowEditorPublicModel.add') }}
|
|
6
|
-
</el-button>
|
|
7
|
-
<el-button type="primary" size="small" plain icon="ArrowRight" @click="insert">
|
|
8
|
-
{{ $t('workflowEditorPublicModel.insert') }}
|
|
9
|
-
</el-button>
|
|
10
|
-
<!-- <el-button type="primary" size="small" plain @click="modify">
|
|
11
|
-
修改
|
|
12
|
-
</el-button> -->
|
|
13
|
-
<el-button type="primary" size="small" plain icon="Delete" @click="remove">
|
|
14
|
-
{{ $t('workflowEditorPublicModel.delete') }}
|
|
15
|
-
</el-button>
|
|
16
|
-
<el-button type="primary" size="small" plain icon="View" @click="view">
|
|
17
|
-
{{ $t('workflowEditorPublicModel.viewConditions') }}
|
|
18
|
-
</el-button>
|
|
19
|
-
</el-row>
|
|
20
|
-
<el-table
|
|
21
|
-
ref="table"
|
|
22
|
-
:data="users"
|
|
23
|
-
row-key="id"
|
|
24
|
-
border
|
|
25
|
-
style="width: 100%;padding-top:10px"
|
|
26
|
-
highlight-current-row
|
|
27
|
-
@current-change="handleCurrentChange"
|
|
28
|
-
>
|
|
29
|
-
<el-table-column prop="leftBracket" label="(" width="90">
|
|
30
|
-
<template v-slot="scope">
|
|
31
|
-
<el-select v-model="scope.row.leftBracket" placeholder="" @focus="selectRow(scope.row)">
|
|
32
|
-
<el-option label="" value="" />
|
|
33
|
-
<el-option label="(" value="(" />
|
|
34
|
-
<el-option label="((" value="((" />
|
|
35
|
-
<el-option label="(((" value="(((" />
|
|
36
|
-
</el-select>
|
|
37
|
-
</template>
|
|
38
|
-
</el-table-column>
|
|
39
|
-
<el-table-column :label="$t('workflowEditor.common.type')" width="110">
|
|
40
|
-
<template v-slot="scope">
|
|
41
|
-
<el-select v-model="scope.row.key" placeholder="" @focus="selectRow(scope.row)" @change="handleKeyChange">
|
|
42
|
-
<el-option :label="$t('workflowEditor.common.user')" value="${user}" />
|
|
43
|
-
<el-option :label="$t('workflowEditor.common.role')" value="${role}" />
|
|
44
|
-
<el-option :label="$t('workflowEditor.common.department')" value="${department}" />
|
|
45
|
-
<el-option :label="$t('workflowEditor.common.workgroup')" value="${workgroup}" />
|
|
46
|
-
</el-select>
|
|
47
|
-
</template>
|
|
48
|
-
</el-table-column>
|
|
49
|
-
<el-table-column :label="$t('workflowEditor.common.operator')" width="110">
|
|
50
|
-
<template v-slot="scope">
|
|
51
|
-
<el-select v-model="scope.row.operator" placeholder="" @focus="selectRow(scope.row)">
|
|
52
|
-
<el-option :label="$t('workflowEditor.process.beEqualTo')" value="operator.text.eq" />
|
|
53
|
-
<el-option :label="$t('workflowEditor.process.notEqualTo')" value="operator.text.neq" />
|
|
54
|
-
</el-select>
|
|
55
|
-
</template>
|
|
56
|
-
</el-table-column>
|
|
57
|
-
<el-table-column :label="$t('workflowEditor.common.value')">
|
|
58
|
-
<template v-slot="scope">
|
|
59
|
-
<el-input :value="format(scope.row.value)" readonly @click="openValueDialog(scope.row)" />
|
|
60
|
-
</template>
|
|
61
|
-
</el-table-column>
|
|
62
|
-
<el-table-column prop="rightBracket" label=")" width="90" @focus="selectRow(scope.row)">
|
|
63
|
-
<template v-slot="scope">
|
|
64
|
-
<el-select v-model="scope.row.rightBracket" placeholder="">
|
|
65
|
-
<el-option label="" value="" />
|
|
66
|
-
<el-option label=")" value=")" />
|
|
67
|
-
<el-option label="))" value="))" />
|
|
68
|
-
<el-option label=")))" value=")))" />
|
|
69
|
-
</el-select>
|
|
70
|
-
</template>
|
|
71
|
-
</el-table-column>
|
|
72
|
-
<el-table-column prop="logicOperator" :label="$t('workflowEditorPublicModel.andOr')" width="110">
|
|
73
|
-
<template v-slot="scope">
|
|
74
|
-
<el-select v-model="scope.row.logicOperator" :placeholder="$t('workflowEditorMessage.pleaseSelect')" @focus="selectRow(scope.row)">
|
|
75
|
-
<el-option :label="$t('workflowEditor.process.perhaps')" value="condition.operator.or" />
|
|
76
|
-
<el-option :label="$t('workflowEditor.process.also')" value="condition.operator.and" />
|
|
77
|
-
</el-select>
|
|
78
|
-
</template>
|
|
79
|
-
</el-table-column>
|
|
80
|
-
</el-table>
|
|
81
|
-
<value-selection-dialog v-if="showValueDialog" :standard-fields="standardFields" :org-type="currentRow.key.substring(currentRow.key.indexOf('{')+1,currentRow.key.lastIndexOf('}'))" @close="closeValueDialog" />
|
|
82
|
-
</div>
|
|
83
|
-
</template>
|
|
84
|
-
<script>
|
|
85
|
-
import ValueSelectionDialog from './value-selection-dialog'
|
|
86
|
-
import { userStandardFieldsForReminder, userStandardFieldsForTransactor, departmentStandardFieldsForReminder, departmentStandardFieldsForTransactor, workgroupStandardFieldsForReminder, workgroupStandardFieldsForTransactor } from '../user-condition'
|
|
87
|
-
import { formatStandardValue, parseCondition, generateUserCondition, displayUserCondition } from '../user-condition'
|
|
88
|
-
import { getFormFieldLabel } from './form-fields-utils.js'
|
|
89
|
-
export default {
|
|
90
|
-
name: 'CommonUserCondition',
|
|
91
|
-
components: {
|
|
92
|
-
ValueSelectionDialog
|
|
93
|
-
},
|
|
94
|
-
props: {
|
|
95
|
-
modelValue: {
|
|
96
|
-
type: String,
|
|
97
|
-
default: null
|
|
98
|
-
},
|
|
99
|
-
usedIn: {
|
|
100
|
-
type: String,
|
|
101
|
-
default: 'reminder'
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
data() {
|
|
105
|
-
const users = []
|
|
106
|
-
let count = 0
|
|
107
|
-
if (this.modelValue && this.modelValue !== '') {
|
|
108
|
-
count = parseCondition(users, this.modelValue)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
return {
|
|
112
|
-
users,
|
|
113
|
-
count: count,
|
|
114
|
-
currentRow: null,
|
|
115
|
-
showValueDialog: false
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
computed: {
|
|
119
|
-
standardFields() {
|
|
120
|
-
let standardFields = this.usedIn === 'reminder' ? userStandardFieldsForReminder : userStandardFieldsForTransactor
|
|
121
|
-
if (this.currentRow.key === '${department}') {
|
|
122
|
-
standardFields = this.usedIn === 'reminder' ? departmentStandardFieldsForReminder : departmentStandardFieldsForTransactor
|
|
123
|
-
} else if (this.currentRow.key === '${workgroup}') {
|
|
124
|
-
standardFields = this.usedIn === 'reminder' ? workgroupStandardFieldsForReminder : workgroupStandardFieldsForTransactor
|
|
125
|
-
} else if (this.currentRow.key === '${role}') {
|
|
126
|
-
standardFields = {}
|
|
127
|
-
}
|
|
128
|
-
return standardFields
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
mounted() {
|
|
132
|
-
if (this.users.length > 0) {
|
|
133
|
-
this.$refs.table.setCurrentRow(this.users[this.users.length - 1])
|
|
134
|
-
}
|
|
135
|
-
this.$watch('users', function(newVal, oldVal) {
|
|
136
|
-
// this.$emit('input', generateUserCondition(this.users))
|
|
137
|
-
this.$emit('update:modelValue', generateUserCondition(this.users))
|
|
138
|
-
}, {
|
|
139
|
-
deep: true
|
|
140
|
-
})
|
|
141
|
-
},
|
|
142
|
-
methods: {
|
|
143
|
-
format(value) {
|
|
144
|
-
if (value.indexOf('${field[') >= 0) {
|
|
145
|
-
return getFormFieldLabel(value)
|
|
146
|
-
} else if (value.indexOf('${') >= 0) {
|
|
147
|
-
return formatStandardValue(value)
|
|
148
|
-
} else {
|
|
149
|
-
// value为管理员[admin]的形式,不应该包括单引号或双引号
|
|
150
|
-
return value.substring(0, value.indexOf('['))
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
selectRow(row) {
|
|
154
|
-
this.$refs.table.setCurrentRow(row)
|
|
155
|
-
},
|
|
156
|
-
openValueDialog(row) {
|
|
157
|
-
this.showValueDialog = true
|
|
158
|
-
this.selectRow(row)
|
|
159
|
-
},
|
|
160
|
-
closeValueDialog(selectedValue) {
|
|
161
|
-
console.log(selectedValue)
|
|
162
|
-
if (selectedValue !== undefined && selectedValue !== '') {
|
|
163
|
-
this.currentRow.value = selectedValue
|
|
164
|
-
}
|
|
165
|
-
this.showValueDialog = false
|
|
166
|
-
},
|
|
167
|
-
getCondition(row) {
|
|
168
|
-
return row.key + ' ' + row.operator + ' ' + row.value
|
|
169
|
-
},
|
|
170
|
-
handleCurrentChange(val) {
|
|
171
|
-
this.currentRow = val
|
|
172
|
-
},
|
|
173
|
-
getRowIndex(row) {
|
|
174
|
-
for (let i = 0; i < this.users.length; i++) {
|
|
175
|
-
if (this.users[i].id === row.id) {
|
|
176
|
-
return i
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
return -1
|
|
180
|
-
},
|
|
181
|
-
add() {
|
|
182
|
-
const newRow = {
|
|
183
|
-
id: this.count,
|
|
184
|
-
leftBracket: '',
|
|
185
|
-
key: '${user}',
|
|
186
|
-
operator: 'operator.text.eq',
|
|
187
|
-
value: '',
|
|
188
|
-
rightBracket: '',
|
|
189
|
-
logicOperator: 'condition.operator.or'
|
|
190
|
-
}
|
|
191
|
-
this.users.push(newRow)
|
|
192
|
-
this.$refs.table.setCurrentRow(newRow)
|
|
193
|
-
this.count++
|
|
194
|
-
},
|
|
195
|
-
insert() {
|
|
196
|
-
if (this.currentRow === null) {
|
|
197
|
-
this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
|
|
198
|
-
return
|
|
199
|
-
}
|
|
200
|
-
const newRow = {
|
|
201
|
-
id: this.count,
|
|
202
|
-
leftBracket: '',
|
|
203
|
-
key: '${user}',
|
|
204
|
-
operator: 'operator.text.eq',
|
|
205
|
-
value: '',
|
|
206
|
-
rightBracket: '',
|
|
207
|
-
logicOperator: 'condition.operator.or'
|
|
208
|
-
}
|
|
209
|
-
this.users.splice(this.getRowIndex(this.currentRow), 0, newRow)
|
|
210
|
-
this.$refs.table.setCurrentRow(newRow)
|
|
211
|
-
this.count++
|
|
212
|
-
},
|
|
213
|
-
remove() {
|
|
214
|
-
if (this.currentRow === null) {
|
|
215
|
-
this.$alert(this.$t('workflowEditorMessage.pleaseSelectARow'))
|
|
216
|
-
return
|
|
217
|
-
}
|
|
218
|
-
let index = this.getRowIndex(this.currentRow)
|
|
219
|
-
this.users.splice(index, 1)
|
|
220
|
-
if (this.users.length > 0) {
|
|
221
|
-
index = (index <= (this.users.length - 1) ? index : (this.users.length - 1))
|
|
222
|
-
this.$refs.table.setCurrentRow(this.users[index])
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
view() {
|
|
226
|
-
let result = displayUserCondition(this.users)
|
|
227
|
-
if (result === '') {
|
|
228
|
-
result = this.$t('workflowEditorMessage.conditionsHaveNotBeenSet')
|
|
229
|
-
}
|
|
230
|
-
this.$confirm(result, this.$t('workflowEditorPublicModel.viewConditions'), {
|
|
231
|
-
showConfirmButton: false,
|
|
232
|
-
showCancelButton: false,
|
|
233
|
-
// 增加这个空的回退函数防止报错
|
|
234
|
-
callback: function() {}
|
|
235
|
-
})
|
|
236
|
-
},
|
|
237
|
-
handleKeyChange(val) {
|
|
238
|
-
this.currentRow.value = ''
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
</script>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export function getFormFieldLabel(name) {
|
|
2
|
-
const field = getFormField(name)
|
|
3
|
-
return field ? field.label : name
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export function getFormField(name) {
|
|
7
|
-
const fields = window.$store.getters['wfEditor/formFields']
|
|
8
|
-
// name可以是code或者${field[code]}两种形式
|
|
9
|
-
if (name && (name.indexOf('${field[') >= 0 || name.indexOf('${deptField[') >= 0)) {
|
|
10
|
-
name = name.substring(name.indexOf('[') + 1, name.lastIndexOf(']'))
|
|
11
|
-
}
|
|
12
|
-
const field = fields.filter(item => {
|
|
13
|
-
return item.name === name
|
|
14
|
-
})
|
|
15
|
-
if (field.length > 0) {
|
|
16
|
-
return field[0]
|
|
17
|
-
} else {
|
|
18
|
-
return null
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export function getFormFields() {
|
|
22
|
-
|
|
23
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
width="60%"
|
|
4
|
-
:title="$t('workflowEditor.common.selectFormField')"
|
|
5
|
-
v-model="dialogVisible"
|
|
6
|
-
center
|
|
7
|
-
top="5vh"
|
|
8
|
-
append-to-body
|
|
9
|
-
class="properties-editor-noTab"
|
|
10
|
-
@close="$emit('close')"
|
|
11
|
-
>
|
|
12
|
-
<div style="padding-bottom:10px">
|
|
13
|
-
<span style="float:left;width:70%">
|
|
14
|
-
<el-input v-model="searchFormCode" :placeholder="$t('workflowEditorMessage.pleaseEnterTheNameOrCode')" />
|
|
15
|
-
</span>
|
|
16
|
-
<span>
|
|
17
|
-
<el-button style="margin-left:10px" type="primary" @click="searchForm">
|
|
18
|
-
{{ $t('workflowEditorPublicModel.search') }}
|
|
19
|
-
</el-button>
|
|
20
|
-
</span>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="item-content">
|
|
23
|
-
<el-radio-group v-model="selectedField" class="group">
|
|
24
|
-
<ul>
|
|
25
|
-
<li v-for="field in showFields" :key="field.name" class="item">
|
|
26
|
-
<el-radio :label="field.name">
|
|
27
|
-
{{ field.label }}
|
|
28
|
-
</el-radio>
|
|
29
|
-
</li>
|
|
30
|
-
</ul>
|
|
31
|
-
</el-radio-group>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<template #footer>
|
|
35
|
-
<el-button type="primary" size="small" @click="setField">
|
|
36
|
-
{{ $t('workflowEditorPublicModel.determine') }}
|
|
37
|
-
</el-button>
|
|
38
|
-
<el-button size="small" @click="$emit('close')">
|
|
39
|
-
{{ $t('workflowEditorPublicModel.cancel') }}
|
|
40
|
-
</el-button>
|
|
41
|
-
</template>
|
|
42
|
-
</el-dialog>
|
|
43
|
-
</template>
|
|
44
|
-
|
|
45
|
-
<script>
|
|
46
|
-
import { mapGetters } from 'vuex'
|
|
47
|
-
export default {
|
|
48
|
-
name: 'FormFields',
|
|
49
|
-
props: {
|
|
50
|
-
fields: {
|
|
51
|
-
type: Array,
|
|
52
|
-
default: null
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
selectedField: null,
|
|
58
|
-
copyShowFields: [],
|
|
59
|
-
showFields: [],
|
|
60
|
-
searchFormCode: '',
|
|
61
|
-
dialogVisible: true
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
computed: {
|
|
65
|
-
...mapGetters('wfEditor', [
|
|
66
|
-
'formFields'
|
|
67
|
-
]),
|
|
68
|
-
allFields() {
|
|
69
|
-
// 显示传递进来的字段或者取vuex中缓存的表单字段
|
|
70
|
-
if (this.fields) {
|
|
71
|
-
return this.fields
|
|
72
|
-
} else {
|
|
73
|
-
return this.formFields
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
mounted() {
|
|
78
|
-
this.copyAllFields = this.allFields
|
|
79
|
-
this.showFields = this.allFields
|
|
80
|
-
},
|
|
81
|
-
methods: {
|
|
82
|
-
setField() {
|
|
83
|
-
this.$emit('close', this.selectedField)
|
|
84
|
-
},
|
|
85
|
-
searchForm() {
|
|
86
|
-
if (this.searchFormCode && this.searchFormCode !== '') {
|
|
87
|
-
this.showFields = this.copyAllFields.filter(item => {
|
|
88
|
-
return item.name.indexOf(this.searchFormCode) > -1 || item.label.indexOf(this.searchFormCode) > -1
|
|
89
|
-
})
|
|
90
|
-
} else {
|
|
91
|
-
this.showFields = this.copyAllFields
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<style lang="scss" scoped>
|
|
99
|
-
.group {
|
|
100
|
-
font-size: 14px;
|
|
101
|
-
width:100%;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.item {
|
|
105
|
-
float: left;
|
|
106
|
-
list-style-type:none;
|
|
107
|
-
width: 33.33%;
|
|
108
|
-
margin-bottom: 18px
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.item-content {
|
|
112
|
-
height: calc(100vh - 300px);;
|
|
113
|
-
padding-left: 20px;
|
|
114
|
-
overflow: auto
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
</style>
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span>
|
|
3
|
-
<div style="float: left;padding-right: 5px;">
|
|
4
|
-
<el-input v-model="zh">
|
|
5
|
-
<template #append>
|
|
6
|
-
<i class="fa fa-cog" @click="i18nSet"></i>
|
|
7
|
-
</template>
|
|
8
|
-
</el-input>
|
|
9
|
-
</div>
|
|
10
|
-
<i18n-set v-if="isShowI18n" :value="{values:{zh_CN: zh}, key: myI18nKey}" @close="closeI18nSet" />
|
|
11
|
-
</span>
|
|
12
|
-
</template>
|
|
13
|
-
<script>
|
|
14
|
-
import I18nSet from './i18n-set-dialog'
|
|
15
|
-
import { mapGetters } from 'vuex'
|
|
16
|
-
export default {
|
|
17
|
-
name: 'I18nInput',
|
|
18
|
-
components: {
|
|
19
|
-
I18nSet
|
|
20
|
-
},
|
|
21
|
-
model: {
|
|
22
|
-
prop: 'value',
|
|
23
|
-
event: 'input'
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
modelValue: {
|
|
27
|
-
type: String,
|
|
28
|
-
default: ''
|
|
29
|
-
},
|
|
30
|
-
// 国际化key应为:'processName(流程名称)' 或 'name.tacheId、name.transitionId(环节名称、流向名称)'
|
|
31
|
-
i18nKey: {
|
|
32
|
-
type: String,
|
|
33
|
-
default: ''
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
data() {
|
|
37
|
-
const zh = this.modelValue
|
|
38
|
-
const myI18nKey = this.i18nKey
|
|
39
|
-
return {
|
|
40
|
-
isShowI18n: false,
|
|
41
|
-
myI18nKey,
|
|
42
|
-
zh,
|
|
43
|
-
isNewI18n: false
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
computed: {
|
|
47
|
-
...mapGetters('wfEditor', [
|
|
48
|
-
'processCode',
|
|
49
|
-
'isHandleCreate'
|
|
50
|
-
])
|
|
51
|
-
},
|
|
52
|
-
mounted() {
|
|
53
|
-
this.$watch('zh', function(newVal) {
|
|
54
|
-
// this.$emit('input', newVal)
|
|
55
|
-
this.$emit('update:modelValue', newVal)
|
|
56
|
-
})
|
|
57
|
-
},
|
|
58
|
-
created() {
|
|
59
|
-
if(this.isHandleCreate && this.isHandleCreate==='true') {
|
|
60
|
-
this.isNewI18n = false
|
|
61
|
-
} else {
|
|
62
|
-
this.isNewI18n = true
|
|
63
|
-
}
|
|
64
|
-
if(this.isNewI18n){
|
|
65
|
-
this.myI18nKey = this.modelValue
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
methods: {
|
|
69
|
-
i18nSet() {
|
|
70
|
-
if (this.myI18nKey) {
|
|
71
|
-
this.isShowI18n = true
|
|
72
|
-
} else {
|
|
73
|
-
this.$message({
|
|
74
|
-
showClose: true,
|
|
75
|
-
type: 'warning',
|
|
76
|
-
message: this.$t('workflowEditorMessage.pleaseInputCode')
|
|
77
|
-
})
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
closeI18nSet(i18nSet) {
|
|
81
|
-
if (i18nSet) {
|
|
82
|
-
this.$emit('setI18n', i18nSet)
|
|
83
|
-
}
|
|
84
|
-
this.isShowI18n = false
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</script>
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<el-dialog
|
|
3
|
-
v-if="isShow"
|
|
4
|
-
:close-on-click-modal="false"
|
|
5
|
-
width="30%"
|
|
6
|
-
:title="$t('workflowEditorPublicModel.i18nSet')"
|
|
7
|
-
append-to-body
|
|
8
|
-
model-value
|
|
9
|
-
top="5vh"
|
|
10
|
-
@open="$emit('open')"
|
|
11
|
-
@opend="$emit('opend')"
|
|
12
|
-
@close="$emit('close')"
|
|
13
|
-
@closed="$emit('closed')"
|
|
14
|
-
>
|
|
15
|
-
<div class="operation-area">
|
|
16
|
-
<el-button type="primary" size="small" @click="saveI18nSet('form')">
|
|
17
|
-
{{ $t('workflowEditorPublicModel.determine') }}
|
|
18
|
-
</el-button>
|
|
19
|
-
<el-button size="small" @click="goBack">
|
|
20
|
-
{{ $t('workflowEditorPublicModel.return') }}
|
|
21
|
-
</el-button>
|
|
22
|
-
</div>
|
|
23
|
-
<el-form ref="form" :model="i18nModel" label-width="100px">
|
|
24
|
-
<el-row>
|
|
25
|
-
<el-col :span="24">
|
|
26
|
-
<el-form-item :label="$t('workflowEditorPublicModel.i18nKey')" prop="key" :rules="[requiredRule]">
|
|
27
|
-
<el-input v-model="i18nModel.key" style="width:80%" />
|
|
28
|
-
</el-form-item>
|
|
29
|
-
</el-col>
|
|
30
|
-
</el-row>
|
|
31
|
-
<el-row v-for="language in Object.keys(languages)" :key="language">
|
|
32
|
-
<el-col :span="24">
|
|
33
|
-
<el-form-item :label="languages[language]" :prop="language">
|
|
34
|
-
<el-input v-model="i18nModel.values[language]" />
|
|
35
|
-
</el-form-item>
|
|
36
|
-
</el-col>
|
|
37
|
-
</el-row>
|
|
38
|
-
</el-form>
|
|
39
|
-
</el-dialog>
|
|
40
|
-
</template>
|
|
41
|
-
<script>
|
|
42
|
-
import { getI18n } from '../../../../workflow-editor/src/util'
|
|
43
|
-
import { mapGetters } from 'vuex'
|
|
44
|
-
export default {
|
|
45
|
-
name: 'I18nSet',
|
|
46
|
-
props: {
|
|
47
|
-
value: {
|
|
48
|
-
type: Object,
|
|
49
|
-
default: null
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
data() {
|
|
53
|
-
let i18nModel = {}
|
|
54
|
-
if (this.value) {
|
|
55
|
-
i18nModel = JSON.parse(JSON.stringify(this.value))
|
|
56
|
-
}
|
|
57
|
-
return {
|
|
58
|
-
requiredRule: {
|
|
59
|
-
required: true,
|
|
60
|
-
message: getI18n().t('workflowEditor.process.cannotBeEmpty'),
|
|
61
|
-
trigger: 'blur'
|
|
62
|
-
},
|
|
63
|
-
i18nModel,
|
|
64
|
-
bundleCode: null,
|
|
65
|
-
isShow: false,
|
|
66
|
-
i18nKey: null,
|
|
67
|
-
languages: {},
|
|
68
|
-
dialogVisible: true,
|
|
69
|
-
isNewI18n: false
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
computed: {
|
|
73
|
-
...mapGetters('wfEditor', [
|
|
74
|
-
'systemCode',
|
|
75
|
-
'processCode',
|
|
76
|
-
'isHandleCreate'
|
|
77
|
-
])
|
|
78
|
-
},
|
|
79
|
-
created() {
|
|
80
|
-
if(this.isHandleCreate && this.isHandleCreate==='true') {
|
|
81
|
-
this.isNewI18n = false
|
|
82
|
-
} else {
|
|
83
|
-
this.isNewI18n = true
|
|
84
|
-
}
|
|
85
|
-
if(!this.isNewI18n){
|
|
86
|
-
// 是原国际化配置
|
|
87
|
-
this.bundleCode = this.systemCode + '.workflow.' + this.processCode
|
|
88
|
-
}
|
|
89
|
-
this.getI18nSet()
|
|
90
|
-
},
|
|
91
|
-
methods: {
|
|
92
|
-
getI18nSet() {
|
|
93
|
-
this.$http.get(this.baseAPI + '/wf-editor/i18n-settings/languages?isNewI18n='+this.isNewI18n).then((languages) => {
|
|
94
|
-
const param = {
|
|
95
|
-
bundleCode: this.bundleCode,
|
|
96
|
-
i18nKey: this.i18nModel.key,
|
|
97
|
-
isNewI18n: this.isNewI18n+'',
|
|
98
|
-
systemCode: this.systemCode
|
|
99
|
-
}
|
|
100
|
-
this.$http.post(this.baseAPI + '/wf-editor/i18n-settings/get-info', param).then((data) => {
|
|
101
|
-
this.languages = languages
|
|
102
|
-
Object.keys(this.languages).forEach(language => {
|
|
103
|
-
console.log('%c描述-162040','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',language);
|
|
104
|
-
console.log('%c描述-162049','color:#2E3435;background:#F8BB07;padding:3px;border-radius:2px',this.i18nModel);
|
|
105
|
-
if (data && data[language]) {
|
|
106
|
-
this.i18nModel.values[language] = data[language]
|
|
107
|
-
// this.$set(this.i18nModel.values, language, data[language])
|
|
108
|
-
} else if (!this.i18nModel.values[language]) {
|
|
109
|
-
this.i18nModel.values[language] = ''
|
|
110
|
-
// this.$set(this.i18nModel.values, language, '')
|
|
111
|
-
}
|
|
112
|
-
})
|
|
113
|
-
this.isShow = true
|
|
114
|
-
})
|
|
115
|
-
})
|
|
116
|
-
},
|
|
117
|
-
saveI18nSet(formName) {
|
|
118
|
-
this.$refs[formName].validate((valid) => {
|
|
119
|
-
if (valid) {
|
|
120
|
-
// alert('submit!')
|
|
121
|
-
// bundleCode:系统编码.workflow.processCode
|
|
122
|
-
this.i18nModel.bundleCode = this.bundleCode
|
|
123
|
-
this.i18nModel.systemCode = this.systemCode,
|
|
124
|
-
this.i18nModel.isNewI18n = this.isNewI18n+''
|
|
125
|
-
// this.i18nModel.key应为:processName 或 name.环节编码
|
|
126
|
-
console.log('this.i18nModel---', this.i18nModel)
|
|
127
|
-
// this.$emit('close', this.i18nModel)
|
|
128
|
-
this.$http.post(this.baseAPI + '/wf-editor/i18n-settings', this.i18nModel).then(() => {
|
|
129
|
-
console.log('更新成功-----')
|
|
130
|
-
this.$emit('close', this.i18nModel.key)
|
|
131
|
-
})
|
|
132
|
-
} else {
|
|
133
|
-
console.log('error submit!!')
|
|
134
|
-
return false
|
|
135
|
-
}
|
|
136
|
-
})
|
|
137
|
-
},
|
|
138
|
-
goBack() {
|
|
139
|
-
this.$emit('close')
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
</script>
|