workflow-editor 0.9.67 → 0.9.68-boe3

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.
Files changed (31) hide show
  1. package/lib/workflow-editor.css +1 -1
  2. package/lib/workflow-editor.umd.min.js +8 -8
  3. package/package.json +2 -2
  4. package/packages/plugins/formValidatorUtil.js +6 -1
  5. package/packages/workflow-editor/src/json-object-templates/auto-task.js +70 -0
  6. package/packages/workflow-editor/src/json-object-templates/copy-task.js +5 -0
  7. package/packages/workflow-editor/src/json-object-templates/subprocess.js +2 -1
  8. package/packages/workflow-editor/src/main/canvas.vue +5 -1
  9. package/packages/workflow-editor/src/main/wf-history-canvas.vue +3 -1
  10. package/packages/workflow-editor/src/process-json.js +2 -1
  11. package/packages/workflow-editor/src/properties-editors/auto-task/basic-properties.vue +81 -0
  12. package/packages/workflow-editor/src/properties-editors/auto-task/permission-settings.vue +155 -0
  13. package/packages/workflow-editor/src/properties-editors/auto-task.vue +73 -0
  14. package/packages/workflow-editor/src/properties-editors/common/additional-condition-utils.js +20 -10
  15. package/packages/workflow-editor/src/properties-editors/common/common-notice-tool.vue +30 -10
  16. package/packages/workflow-editor/src/properties-editors/common/form-fields-utils.js +1 -1
  17. package/packages/workflow-editor/src/properties-editors/common/notice-reminder.vue +72 -0
  18. package/packages/workflow-editor/src/properties-editors/common/notice.vue +4 -1
  19. package/packages/workflow-editor/src/properties-editors/common/reminder.vue +8 -2
  20. package/packages/workflow-editor/src/properties-editors/common/transactor-settings.vue +51 -9
  21. package/packages/workflow-editor/src/properties-editors/copy-task.vue +15 -1
  22. package/packages/workflow-editor/src/properties-editors/human-task/basic-properties.vue +5 -1
  23. package/packages/workflow-editor/src/properties-editors/human-task.vue +11 -5
  24. package/packages/workflow-editor/src/properties-editors/process/basic-properties.vue +2 -2
  25. package/packages/workflow-editor/src/properties-editors/process.vue +10 -4
  26. package/packages/workflow-editor/src/properties-editors/subprocess/basic-properties.vue +18 -6
  27. package/packages/workflow-editor/src/taches/auto-task.vue +99 -0
  28. package/packages/workflow-editor/src/util.js +32 -36
  29. package/packages/workflow-editor/src/workflow-editor.vue +1 -0
  30. package/src/i18n/langs/cn.js +18 -7
  31. package/src/i18n/langs/en.js +18 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workflow-editor",
3
- "version": "0.9.67",
3
+ "version": "0.9.68-boe3",
4
4
  "description": "流程编辑器",
5
5
  "main": "lib/workflow-editor.umd.min.js",
6
6
  "private": false,
@@ -33,7 +33,7 @@
33
33
  "element-ui": "2.15.3",
34
34
  "eslint": "5.16.0",
35
35
  "eslint-plugin-vue": "5.2.2",
36
- "imatrix-ui": "2.8.24",
36
+ "imatrix-ui": "2.9.11-boe9",
37
37
  "node-sass": "4.12.0",
38
38
  "nprogress": "^0.2.0",
39
39
  "sass-loader": "^7.1.0",
@@ -24,6 +24,11 @@ function getLeafPropRule(editField, dataTypeMap) {
24
24
  } else if (dataType === 'BOOLEAN') {
25
25
  rule.message = editField.label + ' ' + getI18n().t('workflowEditorMessage.mustFill')
26
26
  } else {
27
+ // if (entity[editField.name] || entity[editField.name] === 0) {
28
+ // if (typeof entity[editField.name] === 'number' && dataType === 'TEXT') {
29
+ // rule.type = 'number'
30
+ // }
31
+ // }
27
32
  rule.message = editField.label + ' ' + getI18n().t('workflowEditorMessage.mustFill')
28
33
  }
29
34
  if (editField.canEdit) {
@@ -191,7 +196,7 @@ function getValidator(editFieldInfos, entity, isSql, additionalParamMap, taskPar
191
196
  }
192
197
  } else {
193
198
  // 表示是主表的直接属性
194
- rule = getLeafPropRule(editField, dataTypeMap)
199
+ rule = getLeafPropRule(editField, dataTypeMap, entity)
195
200
  rules[prop] = rule
196
201
  }
197
202
  }
@@ -0,0 +1,70 @@
1
+ import i18n from '../../../../src/i18n/i18n'
2
+ export default function newAutoTask() {
3
+ return {
4
+ attr: {
5
+ id: '',
6
+ name: i18n.t('workflowEditor.task.newAutoTask')
7
+ },
8
+ g: {},
9
+ taskNotice: {
10
+
11
+ },
12
+ basicProperties: {
13
+ beanName: ''
14
+ },
15
+ transactorSettings: {
16
+ userCondition: '',
17
+ moreTransactor: false,
18
+ additionalCondition: {
19
+ onlyInCreatorDepartment: false,
20
+ withCreatorDepartment: false,
21
+ selectOneFromMultiple: false
22
+ }
23
+ },
24
+ events: {
25
+ },
26
+ permissionSettings: {
27
+ editForm: {
28
+ permission: false,
29
+ field: []
30
+ },
31
+ viewOpinion: {
32
+ permission: false,
33
+ condition: ''
34
+ },
35
+ editOpinion: {
36
+ permission: false,
37
+ condition: ''
38
+ },
39
+ requireOpinion: {
40
+ permission: false,
41
+ condition: ''
42
+ },
43
+ viewMeetingResult: {
44
+ permission: false,
45
+ condition: ''
46
+ },
47
+ viewVoteResult: {
48
+ permission: false,
49
+ condition: ''
50
+ },
51
+ viewFlowHistory: {
52
+ permission: false,
53
+ condition: ''
54
+ },
55
+ printForm: {
56
+ permission: false,
57
+ condition: ''
58
+ },
59
+ officialText: {
60
+ permission: false // 控制是否设置正文权限,false时就没有后续的create,edit等权限设置了
61
+ },
62
+ attachment: {
63
+ permission: false // 控制是否设置附件权限,false时就没有后面的add,delete等权限设置了
64
+ },
65
+ deleteInstance: {
66
+ userCondition: ''
67
+ }
68
+ }
69
+ }
70
+ }
@@ -6,6 +6,9 @@ export default function newCopyTask() {
6
6
  name: i18n.t('workflowEditor.task.newCc')
7
7
  },
8
8
  g: {},
9
+ taskNotice: {
10
+
11
+ },
9
12
  basicProperties: {
10
13
  taskTitle: '',
11
14
  remark: '',
@@ -20,6 +23,8 @@ export default function newCopyTask() {
20
23
  selectOneFromMultiple: false
21
24
  }
22
25
  },
26
+ events: {
27
+ },
23
28
  permissionSettings: {
24
29
  editForm: {
25
30
  permission: false,
@@ -3,7 +3,8 @@ export default function newSubprocess() {
3
3
  return {
4
4
  attr: {
5
5
  id: '',
6
- name: i18n.t('workflowEditor.task.subprocess')
6
+ name: i18n.t('workflowEditor.task.subprocess'),
7
+ taskTitle: ''
7
8
  },
8
9
  g: {},
9
10
  processCode: '',
@@ -53,6 +53,7 @@ import Fork from '../taches/fork'
53
53
  import Join from '../taches/join'
54
54
  import HumanDecision from '../taches/human-decision'
55
55
  import CopyTask from '../taches/copy-task'
56
+ import AutoTask from '../taches/auto-task'
56
57
  import Transition from '../transitions/transition'
57
58
  import VirtualTransition from '../transitions/virtual-transition'
58
59
  import SelectionRegion from './selection-region'
@@ -64,6 +65,7 @@ import ForkPropertiesEditor from '../properties-editors/fork'
64
65
  import JoinPropertiesEditor from '../properties-editors/join'
65
66
  import HumanDecisionPropertiesEditor from '../properties-editors/human-decision'
66
67
  import CopyTaskPropertiesEditor from '../properties-editors/copy-task'
68
+ import AutoTaskPropertiesEditor from '../properties-editors/auto-task'
67
69
  import SubprocessPropertiesEditor from '../properties-editors/subprocess'
68
70
  import TacheHistoryTooltip from './tache-history-tooltip'
69
71
  import { mapGetters, mapMutations } from 'vuex'
@@ -94,7 +96,9 @@ export default {
94
96
  HumanDecisionPropertiesEditor,
95
97
  CopyTaskPropertiesEditor,
96
98
  SubprocessPropertiesEditor,
97
- TacheHistoryTooltip
99
+ TacheHistoryTooltip,
100
+ AutoTask,
101
+ AutoTaskPropertiesEditor
98
102
  },
99
103
  props: {
100
104
  process: {
@@ -48,6 +48,7 @@ import Fork from '../taches/fork'
48
48
  import Join from '../taches/join'
49
49
  import HumanDecision from '../taches/human-decision'
50
50
  import CopyTask from '../taches/copy-task'
51
+ import AutoTask from '../taches/auto-task'
51
52
  import Transition from '../transitions/transition'
52
53
  import TacheHistoryTooltip from './tache-history-tooltip'
53
54
  import { mapGetters } from 'vuex'
@@ -71,7 +72,8 @@ export default {
71
72
  CopyTask,
72
73
  Transition,
73
74
  TacheHistoryTooltip,
74
- TacheSubprocessHistoryDialog
75
+ TacheSubprocessHistoryDialog,
76
+ AutoTask
75
77
  },
76
78
  props: {
77
79
  process: {
@@ -292,7 +292,8 @@ const process = {
292
292
  subprocess: {
293
293
  attr: {
294
294
  id: 't2',
295
- name: '子流程'
295
+ name: '子流程',
296
+ taskTitle: ''
296
297
  },
297
298
  g: {
298
299
  x: 250,
@@ -0,0 +1,81 @@
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.custombeanName')">
17
+ <el-input v-model="tache.beanName" />
18
+ </el-form-item>
19
+ </el-form>
20
+ </template>
21
+ <script>
22
+ import TaskTitle from '../common/task-title'
23
+ import { validateTacheCode } from '../../util'
24
+ import i18nInput from '../common/i18n-input'
25
+ export default {
26
+ name: 'BasicProperties',
27
+ components: {
28
+ TaskTitle,
29
+ i18nInput
30
+ },
31
+ props: {
32
+ model: {
33
+ type: Object,
34
+ default: null
35
+ },
36
+ id: {
37
+ type: String,
38
+ default: null
39
+ },
40
+ name: {
41
+ type: String,
42
+ default: null
43
+ }
44
+ },
45
+ data() {
46
+ return {
47
+ formModel: {
48
+ name: this.name,
49
+ id: this.id,
50
+ tache: this.model
51
+ }
52
+ }
53
+ },
54
+ computed: {
55
+ tache() {
56
+ return this.model
57
+ }
58
+ },
59
+ mounted() {
60
+ // 支持.snyc修饰符的写法
61
+ this.$watch('formModel.name', function(newVal, oldVal) {
62
+ this.$emit('update:name', newVal)
63
+ })
64
+ },
65
+ methods: {
66
+ validateId() {
67
+ validateTacheCode(this)
68
+ },
69
+ setI18nValue(i18nKey) {
70
+ this.tache.i18nKey = i18nKey
71
+ }
72
+ }
73
+ }
74
+ </script>
75
+ <style scoped>
76
+ .percent{
77
+ margin-left: 10px;
78
+ color:red;
79
+ font-size:1.2em;
80
+ }
81
+ </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,73 @@
1
+ <template>
2
+ <el-dialog
3
+ visible
4
+ :title="$t('workflowEditor.task.propertiesOfAutoTask')"
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-tabs>
23
+ </el-dialog>
24
+ </template>
25
+ <script>
26
+ import BasicProperties from './auto-task/basic-properties'
27
+ export default {
28
+ name: 'HumanTaskPropertiesEditor',
29
+ components: {
30
+ BasicProperties
31
+ },
32
+ props: {
33
+ model: {
34
+ type: Object,
35
+ default: null
36
+ }
37
+ },
38
+ data() {
39
+ console.log(this.model)
40
+ if (!this.model.ref.taskNotice) {
41
+ this.model.ref.taskNotice = {}
42
+ }
43
+ return {
44
+ activeTab: 'basicProperties'
45
+ }
46
+ },
47
+ computed: {
48
+ formModel() {
49
+ return this.model.ref
50
+ }
51
+ },
52
+ mounted() {
53
+ this.$watch('model.ref.attr.id', function(newVal, oldVal) {
54
+ this.model.id = newVal
55
+ })
56
+ this.$watch('model.ref.attr.name', function(newVal, oldVal) {
57
+ this.model.name = newVal
58
+ })
59
+ },
60
+ methods: {
61
+ handleClick(tab, event) {
62
+ // console.log(tab, event)
63
+ }
64
+ }
65
+ }
66
+ </script>
67
+ <style scoped>
68
+ /* 使用深度作用选择器(vue-loader的功能)">>>"符号重新定义了.el-dialog__body,不影响其他页面的同名样式*/
69
+ .properties-editor >>> .el-dialog__body{
70
+ padding-top: 0
71
+ }
72
+ </style>
73
+
@@ -124,52 +124,62 @@ export const standardFields = [
124
124
  {
125
125
  name: '${countersignatureDisagreeCount}',
126
126
  label: getI18n().t('workflowEditor.process.totalNnumberOfPersonsWhoDisagreeWithTheCountersignature'),
127
- orgType: 'other'
127
+ orgType: 'other',
128
+ dataType: 'INTEGER'
128
129
  },
129
130
  {
130
131
  name: '${countersignatureAgreeCount}',
131
132
  label: getI18n().t('workflowEditor.process.totalNumberOfCountersignedAndAgreedPersonnel'),
132
- orgType: 'other'
133
+ orgType: 'other',
134
+ dataType: 'INTEGER'
133
135
  },
134
136
  {
135
137
  name: '${countersignatureDisagreePercentage}',
136
138
  label: getI18n().t('workflowEditor.process.percentageOfPersonsWhoDisagreeWithTheCountersignature'),
137
- orgType: 'other'
139
+ orgType: 'other',
140
+ dataType: 'INTEGER'
138
141
  },
139
142
  {
140
143
  name: '${countersignatureAgreePercentage}',
141
144
  label: getI18n().t('workflowEditor.process.percentageOfCountersignedAndAgreedPersonnel'),
142
- orgType: 'other'
145
+ orgType: 'other',
146
+ dataType: 'INTEGER'
143
147
  },
144
148
  {
145
149
  name: '${abstentionPercentage}',
146
150
  label: getI18n().t('workflowEditor.process.percentageOfAbstentions'),
147
- orgType: 'other'
151
+ orgType: 'other',
152
+ dataType: 'INTEGER'
148
153
  },
149
154
  {
150
155
  name: '${againstPercentage}',
151
156
  label: getI18n().t('workflowEditor.process.percentageOfVotesAgainst'),
152
- orgType: 'other'
157
+ orgType: 'other',
158
+ dataType: 'INTEGER'
153
159
  },
154
160
  {
155
161
  name: '${favorPercentage}',
156
162
  label: getI18n().t('workflowEditor.process.percentageOfAffirmativeVotes'),
157
- orgType: 'other'
163
+ orgType: 'other',
164
+ dataType: 'INTEGER'
158
165
  },
159
166
  {
160
167
  name: '${abstentionCount}',
161
168
  label: getI18n().t('workflowEditor.process.totalNumberOfAbstentions'),
162
- orgType: 'other'
169
+ orgType: 'other',
170
+ dataType: 'INTEGER'
163
171
  },
164
172
  {
165
173
  name: '${againstCount}',
166
174
  label: getI18n().t('workflowEditor.process.totalVotesAgainst'),
167
- orgType: 'other'
175
+ orgType: 'other',
176
+ dataType: 'INTEGER'
168
177
  },
169
178
  {
170
179
  name: '${favorCount}',
171
180
  label: getI18n().t('workflowEditor.process.totalNumberOfAffirmativeVotes'),
172
- orgType: 'other'
181
+ orgType: 'other',
182
+ dataType: 'INTEGER'
173
183
  }
174
184
 
175
185
  ]
@@ -1,10 +1,11 @@
1
1
  <template>
2
- <el-form-item :label="label">
3
- <el-checkbox-group v-model="tools">
4
- <el-checkbox label="mail">
5
- {{ $t('workflowEditorPublicModel.mail') }}
6
- </el-checkbox>
7
- <el-checkbox label="sms">
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">
8
9
  {{ $t('workflowEditorPublicModel.message') }}
9
10
  </el-checkbox>
10
11
  <el-checkbox label="app">
@@ -12,9 +13,16 @@
12
13
  </el-checkbox>
13
14
  <el-checkbox label="dingding">
14
15
  {{ $t('workflowEditorPublicModel.dingding') }}
15
- </el-checkbox>
16
- </el-checkbox-group>
17
- </el-form-item>
16
+ </el-checkbox> -->
17
+ <el-checkbox label="custom">
18
+ {{ $t('workflowEditorPublicModel.custom') }}
19
+ </el-checkbox>
20
+ </el-checkbox-group>
21
+ </el-form-item>
22
+ <el-form-item v-if="tools.indexOf('custom')>=0" :label="$t('workflowEditor.common.customMsg')">
23
+ <el-input v-model="myCustomMsg" />
24
+ </el-form-item>
25
+ </div>
18
26
  </template>
19
27
  <script>
20
28
  export default {
@@ -27,6 +35,10 @@ export default {
27
35
  value: {
28
36
  type: String,
29
37
  default: null
38
+ },
39
+ customMsg: {
40
+ type: String,
41
+ default: null
30
42
  }
31
43
  },
32
44
  data() {
@@ -34,13 +46,21 @@ export default {
34
46
  if (this.value && this.value !== '' && this.value !== null) {
35
47
  tools = this.value.split(',')
36
48
  }
49
+ let myCustomMsg = ''
50
+ if (this.customMsg && this.customMsg !== '' && this.customMsg !== null) {
51
+ myCustomMsg = this.customMsg
52
+ }
37
53
  return {
38
- tools
54
+ tools,
55
+ myCustomMsg
39
56
  }
40
57
  },
41
58
  watch: {
42
59
  tools(val) {
43
60
  this.$emit('input', this.tools.join(','))
61
+ },
62
+ myCustomMsg(val) {
63
+ this.$emit('input-msg', this.myCustomMsg)
44
64
  }
45
65
  }
46
66
  }
@@ -6,7 +6,7 @@ export function getFormFieldLabel(name) {
6
6
  export function getFormField(name) {
7
7
  const fields = window.$store.getters['wfEditor/formFields']
8
8
  // name可以是code或者${field[code]}两种形式
9
- if (name && name.indexOf('${field[') >= 0) {
9
+ if (name && (name.indexOf('${field[') >= 0 || name.indexOf('${deptField[') >= 0)) {
10
10
  name = name.substring(name.indexOf('[') + 1, name.lastIndexOf(']'))
11
11
  }
12
12
  const field = fields.filter(item => {