imatrix-ui 0.2.6-up → 0.2.7-up
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/index.html +13 -13
- package/lib/super-ui.css +1 -1
- package/lib/super-ui.js +2724 -1932
- package/lib/super-ui.umd.cjs +24 -24
- package/package.json +1 -1
- package/packages/IntervalSelection/index.js +6 -6
- package/packages/IntervalSelection/src/quarterScope.vue +405 -405
- package/packages/IntervalSelection/src/sectionDate.vue +475 -475
- package/packages/breadcrumb/index.js +6 -6
- package/packages/breadcrumb/src/breadcrumb.vue +81 -81
- package/packages/department-tree/index.js +6 -6
- package/packages/department-tree/src/department-tree.vue +113 -113
- package/packages/department-tree-inline/index.js +6 -6
- package/packages/department-tree-inline/src/department-multi-tree-inline.vue +472 -472
- package/packages/department-tree-inline/src/department-single-tree-inline.vue +340 -340
- package/packages/department-tree-inline/src/department-tree-inline.vue +86 -86
- package/packages/department-tree-inline/src/department-tree-service.js +344 -344
- package/packages/department-tree-inline/src/search-result.vue +235 -235
- package/packages/department-user-tree/index.js +6 -6
- package/packages/department-user-tree/src/department-user-multiple-tree.vue +129 -129
- package/packages/department-user-tree/src/department-user-single-tree.vue +94 -94
- package/packages/department-user-tree/src/department-user-tree.vue +114 -114
- package/packages/department-user-tree-inline/index.js +9 -9
- package/packages/department-user-tree-inline/src/department-user-multiple-tree-inline.vue +731 -731
- package/packages/department-user-tree-inline/src/department-user-single-tree-inline.vue +334 -334
- package/packages/department-user-tree-inline/src/department-user-tree-inline.vue +87 -87
- package/packages/department-user-tree-inline/src/department-user-tree-multi-service.js +309 -309
- package/packages/department-user-tree-inline/src/department-user-tree-single-service.js +179 -179
- package/packages/department-user-tree-inline/src/search-result.vue +273 -273
- package/packages/directives/prevent-reclick.js +22 -22
- package/packages/dynamic-source-select/index.js +6 -6
- package/packages/dynamic-source-select/src/dynamic-source-select-service.js +106 -106
- package/packages/dynamic-source-select/src/dynamic-source-select.vue +675 -675
- package/packages/dynamic-source-select/src/events.js +78 -78
- package/packages/fs-preview/index.js +6 -6
- package/packages/fs-preview/src/fs-preview.vue +287 -287
- package/packages/fs-upload/index.js +6 -6
- package/packages/fs-upload/src/fs-upload-multi.vue +443 -443
- package/packages/fs-upload/src/fs-upload-single.vue +353 -353
- package/packages/fs-upload/src/fs-upload.vue +191 -191
- package/packages/fs-upload/src/see-big-picture.vue +67 -67
- package/packages/fs-upload-list/index.js +6 -6
- package/packages/fs-upload-list/src/fs-upload-list.vue +372 -372
- package/packages/hamburger/index.js +6 -6
- package/packages/hamburger/src/hamburger.vue +40 -40
- package/packages/index.js +123 -123
- package/packages/multipart-upload/index.js +6 -6
- package/packages/multipart-upload/src/index.vue +66 -66
- package/packages/multipart-upload/src/multipart-upload-form.vue +377 -377
- package/packages/multipart-upload/src/multipart-upload-list.vue +517 -517
- package/packages/organization-input/index.js +6 -6
- package/packages/organization-input/src/organization-input.vue +583 -583
- package/packages/plugins/export-data-new.js +623 -623
- package/packages/plugins/export-data.js +431 -431
- package/packages/plugins/index.js +15 -15
- package/packages/plugins/public-method.js +47 -47
- package/packages/remove-department/index.js +6 -6
- package/packages/remove-department/src/remove-department.vue +200 -200
- package/packages/remove-department/src/remove-dept-service.js +31 -31
- package/packages/remove-user/index.js +6 -6
- package/packages/remove-user/src/remove-user-service.js +31 -31
- package/packages/remove-user/src/remove-user.vue +226 -226
- package/packages/remove-workgroup/index.js +6 -6
- package/packages/remove-workgroup/src/remove-workgroup-service.js +31 -31
- package/packages/remove-workgroup/src/remove-workgroup.vue +183 -183
- package/packages/rich-editor/index.js +7 -7
- package/packages/rich-editor/index.vue +297 -297
- package/packages/rich-editor/langs/zh-Hans.js +438 -438
- package/packages/rich-editor/viewer.vue +105 -105
- package/packages/scan-code-input/index.js +6 -6
- package/packages/scan-code-input/src/events.js +34 -34
- package/packages/scan-code-input/src/scan-code-input-colse.vue +140 -140
- package/packages/scan-code-input/src/scan-code-input.vue +132 -132
- package/packages/secret-info/index.js +7 -7
- package/packages/secret-info/index.vue +100 -100
- package/packages/super-grid/index.js +7 -7
- package/packages/super-grid/src/apis.js +1092 -1092
- package/packages/super-grid/src/columns-config.vue +427 -427
- package/packages/super-grid/src/custom-formatter.js +394 -394
- package/packages/super-grid/src/eventBus.js +2 -2
- package/packages/super-grid/src/events.js +56 -56
- package/packages/super-grid/src/formValidatorUtil.js +300 -300
- package/packages/super-grid/src/formatter.js +196 -196
- package/packages/super-grid/src/group-column.vue +99 -99
- package/packages/super-grid/src/header-context-menu.vue +82 -82
- package/packages/super-grid/src/index-column.vue +69 -69
- package/packages/super-grid/src/public-methods.js +30 -30
- package/packages/super-grid/src/row-operation.vue +193 -193
- package/packages/super-grid/src/search-button.vue +74 -74
- package/packages/super-grid/src/search-condition-input.vue +73 -73
- package/packages/super-grid/src/search-condition-list.vue +68 -68
- package/packages/super-grid/src/search-form-advancedQuery.vue +819 -819
- package/packages/super-grid/src/search-form-dialog.vue +77 -77
- package/packages/super-grid/src/search-form-item.vue +495 -495
- package/packages/super-grid/src/search-form-number.vue +111 -111
- package/packages/super-grid/src/search-form-ordinarySearch.vue +239 -239
- package/packages/super-grid/src/search-form.vue +762 -762
- package/packages/super-grid/src/search-methods.js +592 -592
- package/packages/super-grid/src/selection-column.vue +46 -46
- package/packages/super-grid/src/store.js +3 -3
- package/packages/super-grid/src/super-grid-service.js +728 -728
- package/packages/super-grid/src/super-grid.vue +3011 -3011
- package/packages/super-grid/src/utils.js +880 -880
- package/packages/super-grid/src/view-image-dialog.vue +176 -176
- package/packages/super-nine-grid/index.js +7 -7
- package/packages/super-nine-grid/src/apis.js +108 -108
- package/packages/super-nine-grid/src/custom-formatter.js +73 -73
- package/packages/super-nine-grid/src/formatter.js +134 -134
- package/packages/super-nine-grid/src/search-form-number.vue +35 -35
- package/packages/super-nine-grid/src/search-form.vue +700 -700
- package/packages/super-nine-grid/src/search-methods.js +151 -151
- package/packages/super-nine-grid/src/store.js +3 -3
- package/packages/super-nine-grid/src/super-grid-service.js +107 -107
- package/packages/svg-icon/index.js +6 -6
- package/packages/svg-icon/src/svg-icon.vue +43 -43
- package/packages/utils/date-util.js +292 -292
- package/packages/utils/dom.js +227 -227
- package/packages/utils/gogocodeTransfer.js +59 -59
- package/packages/utils/memory-cache-utils.js +117 -117
- package/packages/utils/utils.js +180 -180
- package/packages/utils/value-set.js +97 -97
- package/packages/valid-code/index.js +7 -7
- package/packages/valid-code/src/valid-code.vue +104 -104
- package/packages/workflow-button/index.js +6 -6
- package/packages/workflow-button/src/workflow-button.vue +550 -550
- package/packages/workflow-history-list/index.js +6 -6
- package/packages/workflow-history-list/src/api.js +7 -7
- package/packages/workflow-history-list/src/workflow-history-list.vue +291 -291
- package/packages/workgroup-tree/index.js +6 -6
- package/packages/workgroup-tree/src/workgroup-tree.vue +86 -86
- package/packages/workgroup-tree-inline/index.js +6 -6
- package/packages/workgroup-tree-inline/src/search-result.vue +222 -222
- package/packages/workgroup-tree-inline/src/workgroup-tree-inline.vue +516 -516
- package/packages/workgroup-tree-inline/src/workgroup-tree-service.js +93 -93
- package/packages/workgroup-user-tree/index.js +6 -6
- package/packages/workgroup-user-tree/src/workgroup-user-tree.vue +103 -103
- package/packages/workgroup-user-tree-inline/index.js +9 -9
- package/packages/workgroup-user-tree-inline/src/search-result.vue +266 -266
- package/packages/workgroup-user-tree-inline/src/workgroup-tree-inline-service.js +239 -239
- package/packages/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue +657 -657
- package/packages/year-range-picker/index.js +6 -6
- package/packages/year-range-picker/src/year-range-picker.vue +53 -53
- package/src/api/sso-service.js +172 -172
- package/src/api/tab.js +36 -36
- package/src/api/user-service.js +11 -11
- package/src/directives/permission/index.js +13 -13
- package/src/directives/permission/permission.js +20 -20
- package/src/i18n/langs/cn.js +259 -259
- package/src/i18n/langs/en.js +269 -269
- package/src/index.js +93 -93
- package/src/plugins.js +18 -18
- package/src/router/index.js +8 -26
- package/src/store/getters.js +15 -15
- package/src/store/index.js +19 -19
- package/src/store/modules/app.js +54 -54
- package/src/store/modules/tab-content.js +36 -36
- package/src/store/modules/user.js +285 -285
- package/src/utils/auth.js +61 -61
- package/src/utils/calculator/calculator-factory-wf.js +558 -558
- package/src/utils/calculator/calculator-factory.js +145 -145
- package/src/utils/calculator/calculator-util.js +166 -166
- package/src/utils/eventBus.js +2 -2
- package/src/utils/iconUtils.js +28 -28
- package/src/utils/index.js +102 -102
- package/src/utils/jump-page-utils.js +824 -824
- package/src/utils/menu.js +19 -19
- package/src/utils/permission.js +31 -31
- package/src/utils/permissionAuth.js +96 -96
- package/src/utils/range-selector.js +188 -188
- package/src/utils/request.js +269 -269
- package/src/utils/restful-interface-utils.js +57 -57
- package/src/utils/util.js +703 -703
- package/src/utils/validate.js +34 -34
- package/src/utils/watermark.js +108 -108
- package/src/utils/workflow-util.js +93 -93
- package/src/views/404.vue +248 -248
- package/src/views/dsc-component/Sidebar/Item.vue +84 -84
- package/src/views/dsc-component/Sidebar/Link.vue +38 -38
- package/src/views/dsc-component/Sidebar/SidebarItem.vue +198 -198
- package/src/views/dsc-component/Sidebar/index.vue +229 -229
- package/src/views/dsc-component/tabs/tab-content.vue +203 -203
- package/src/views/error-page/401.vue +106 -106
- package/src/views/error-page/404.vue +248 -248
- package/src/views/layout/EmptyLayout.vue +3 -3
- package/src/views/layout/Layout.vue +81 -81
- package/src/views/layout/NewLayout.vue +18 -18
- package/src/views/layout/components/AppMain.vue +39 -39
- package/src/views/layout/components/Breadcrumb/index.vue +158 -158
- package/src/views/layout/components/Menubar/Item.vue +79 -79
- package/src/views/layout/components/Menubar/Link.vue +38 -38
- package/src/views/layout/components/Menubar/index.vue +210 -210
- package/src/views/layout/components/Sidebar/Item.vue +53 -53
- package/src/views/layout/components/Sidebar/Link.vue +38 -38
- package/src/views/layout/components/Sidebar/index.vue +141 -141
- package/src/views/layout/components/iframe-page.vue +38 -38
- package/src/views/layout/components/index.js +4 -4
- package/src/views/layout/components/tabs/tab-content.vue +207 -207
- package/src/views/layout/mixin/ResizeHandler.js +41 -41
- package/src/views/layout/tab-content-iframe-index.vue +38 -38
- package/src/views/layout/tab-content-index.vue +93 -93
- package/src/views/login/authredirect.vue +10 -10
- package/src/views/login/index.vue +296 -296
- package/src/views/login/update-password.vue +243 -243
- package/src/views/redirect/index.vue +14 -14
- package/src/views/wf-history/tache-subprocess-history.vue +45 -45
|
@@ -1,550 +1,550 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span>
|
|
3
|
-
<span
|
|
4
|
-
v-if="
|
|
5
|
-
typeof buttonInfo['theTransactor'] !== 'undefined' &&
|
|
6
|
-
buttonInfo['theTransactor'] === false
|
|
7
|
-
"
|
|
8
|
-
class="operation-area"
|
|
9
|
-
>
|
|
10
|
-
<slot :name="slotBefore" />
|
|
11
|
-
<slot name="errorArea" />
|
|
12
|
-
<slot :name="slotAfter" />
|
|
13
|
-
</span>
|
|
14
|
-
<span v-else class="operation-area">
|
|
15
|
-
<slot :name="slotBefore" />
|
|
16
|
-
<el-button
|
|
17
|
-
v-for="(button, buttonIndex) in buttons"
|
|
18
|
-
:key="buttonIndex"
|
|
19
|
-
v-permission="button.permission"
|
|
20
|
-
:disabled="preventReclick"
|
|
21
|
-
:type="button.type"
|
|
22
|
-
size="small"
|
|
23
|
-
:class="button.code ? button.code : ''"
|
|
24
|
-
@click="button.clickFun"
|
|
25
|
-
>
|
|
26
|
-
{{ button.i18nButtonName }}
|
|
27
|
-
</el-button>
|
|
28
|
-
<slot :name="slotAfter" />
|
|
29
|
-
</span>
|
|
30
|
-
</span>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script>
|
|
34
|
-
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
35
|
-
import { mapGetters } from 'vuex'
|
|
36
|
-
export default {
|
|
37
|
-
name: 'WorkflowButton',
|
|
38
|
-
props: {
|
|
39
|
-
// 控制按钮的相关信息
|
|
40
|
-
buttonInfo: {
|
|
41
|
-
type: Object,
|
|
42
|
-
default: null,
|
|
43
|
-
},
|
|
44
|
-
// 隐藏的按钮编码集合
|
|
45
|
-
// 值可以为['selectTransactor','selectTache','readButton','retrieveButton','copyButton','assignButton'],
|
|
46
|
-
// 分别表示['当任务是"待选择办理人"状态时,表单页面显示的提交按钮',
|
|
47
|
-
// '当任务是"待选择环节"状态时,表单页面显示的提交按钮',
|
|
48
|
-
// '已阅按钮','取回按钮','抄送按钮','指派按钮']
|
|
49
|
-
hiddenBtns: {
|
|
50
|
-
type: Array,
|
|
51
|
-
default: null,
|
|
52
|
-
},
|
|
53
|
-
// 资源编码前缀,例如:系统编码.实体类名 或 系统编码.页面编码,用于控制按钮权限
|
|
54
|
-
permissionPrefix: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: null,
|
|
57
|
-
},
|
|
58
|
-
formButtonPosition: {
|
|
59
|
-
type: String,
|
|
60
|
-
default: null,
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
data() {
|
|
64
|
-
const buttonsPermission = this.getButtonsPermission()
|
|
65
|
-
return {
|
|
66
|
-
slotBefore: 'before',
|
|
67
|
-
slotAfter: 'after',
|
|
68
|
-
buttons: [],
|
|
69
|
-
buttonsPermission, // 各按钮资源编码
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
computed: {
|
|
73
|
-
...mapGetters(['preventReclick']),
|
|
74
|
-
},
|
|
75
|
-
provide() {
|
|
76
|
-
return {}
|
|
77
|
-
},
|
|
78
|
-
created() {
|
|
79
|
-
// console.log('this.buttonInfo', this.buttonInfo)
|
|
80
|
-
// console.log('this.buttonsPermission', this.buttonsPermission)
|
|
81
|
-
const tempButtons = []
|
|
82
|
-
const _that = this
|
|
83
|
-
if (
|
|
84
|
-
typeof this.buttonInfo['processState'] === 'undefined' ||
|
|
85
|
-
this.buttonInfo['processState'] === null ||
|
|
86
|
-
(this.buttonInfo['processState'] === 'UNSUBMIT' &&
|
|
87
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT')
|
|
88
|
-
) {
|
|
89
|
-
if (
|
|
90
|
-
typeof this.buttonInfo['processState'] === 'undefined' ||
|
|
91
|
-
this.buttonInfo['showButtonSave'] === true
|
|
92
|
-
) {
|
|
93
|
-
tempButtons.push({
|
|
94
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['saveButton']),
|
|
95
|
-
permission: this.buttonsPermission['save'],
|
|
96
|
-
type: 'primary',
|
|
97
|
-
clickFun: function () {
|
|
98
|
-
$emit(_that, 'save')
|
|
99
|
-
},
|
|
100
|
-
code: 'saveButton',
|
|
101
|
-
})
|
|
102
|
-
}
|
|
103
|
-
tempButtons.push({
|
|
104
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['submitButton']),
|
|
105
|
-
permission: this.buttonsPermission['submitProcess'],
|
|
106
|
-
type: 'primary',
|
|
107
|
-
clickFun: function () {
|
|
108
|
-
$emit(_that, 'submitProcess')
|
|
109
|
-
},
|
|
110
|
-
code: 'submitButton',
|
|
111
|
-
})
|
|
112
|
-
}
|
|
113
|
-
if (this.buttonInfo['processState']) {
|
|
114
|
-
if (
|
|
115
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
116
|
-
this.buttonInfo['processingMode'] === 'TYPE_READ'
|
|
117
|
-
) {
|
|
118
|
-
if (
|
|
119
|
-
!this.hiddenBtns ||
|
|
120
|
-
(this.hiddenBtns && this.hiddenBtns.indexOf('readButton') === -1)
|
|
121
|
-
) {
|
|
122
|
-
tempButtons.push({
|
|
123
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['readButton']),
|
|
124
|
-
permission: this.buttonsPermission['completeTask'],
|
|
125
|
-
type: 'primary',
|
|
126
|
-
clickFun: function () {
|
|
127
|
-
_that.completeTask('READED')
|
|
128
|
-
},
|
|
129
|
-
code: 'readButton',
|
|
130
|
-
})
|
|
131
|
-
}
|
|
132
|
-
} else if (this.buttonInfo['processState'] === 'SUBMIT') {
|
|
133
|
-
if (
|
|
134
|
-
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
135
|
-
this.buttonInfo['showButtonSave'] &&
|
|
136
|
-
(this.buttonInfo['active'] === 'WAIT_TRANSACT' ||
|
|
137
|
-
this.buttonInfo['active'] === 'WAIT_DESIGNATE_TRANSACTOR' ||
|
|
138
|
-
this.buttonInfo['active'] === 'WAIT_CHOICE_TACHE' ||
|
|
139
|
-
this.buttonInfo['active'] === 'DRAW_WAIT')
|
|
140
|
-
) {
|
|
141
|
-
tempButtons.push({
|
|
142
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['saveButton']),
|
|
143
|
-
permission: this.buttonsPermission['update'],
|
|
144
|
-
type: 'primary',
|
|
145
|
-
clickFun: function () {
|
|
146
|
-
$emit(_that, 'update')
|
|
147
|
-
},
|
|
148
|
-
code: 'saveButton',
|
|
149
|
-
})
|
|
150
|
-
}
|
|
151
|
-
if (
|
|
152
|
-
this.buttonInfo['active'] &&
|
|
153
|
-
this.buttonInfo['active'] === 'WAIT_DESIGNATE_TRANSACTOR' &&
|
|
154
|
-
(!this.hiddenBtns ||
|
|
155
|
-
(this.hiddenBtns &&
|
|
156
|
-
this.hiddenBtns.indexOf('selectTransactor') === -1))
|
|
157
|
-
) {
|
|
158
|
-
tempButtons.push({
|
|
159
|
-
i18nButtonName: this.i18nButtonName(
|
|
160
|
-
this.buttonInfo['submitButton']
|
|
161
|
-
),
|
|
162
|
-
permission: this.buttonsPermission['selectTransactor'],
|
|
163
|
-
type: 'primary',
|
|
164
|
-
clickFun: function () {
|
|
165
|
-
$emit(_that, 'selectTransactors')
|
|
166
|
-
},
|
|
167
|
-
code: 'submitButton',
|
|
168
|
-
})
|
|
169
|
-
}
|
|
170
|
-
if (
|
|
171
|
-
this.buttonInfo['active'] &&
|
|
172
|
-
this.buttonInfo['active'] === 'WAIT_CHOICE_TACHE' &&
|
|
173
|
-
(!this.hiddenBtns ||
|
|
174
|
-
(this.hiddenBtns && this.hiddenBtns.indexOf('selectTache') === -1))
|
|
175
|
-
) {
|
|
176
|
-
tempButtons.push({
|
|
177
|
-
i18nButtonName: this.i18nButtonName(
|
|
178
|
-
this.buttonInfo['submitButton']
|
|
179
|
-
),
|
|
180
|
-
permission: this.buttonsPermission['selectTache'],
|
|
181
|
-
type: 'primary',
|
|
182
|
-
clickFun: function () {
|
|
183
|
-
$emit(_that, 'selectTaches')
|
|
184
|
-
},
|
|
185
|
-
code: 'submitButton',
|
|
186
|
-
})
|
|
187
|
-
const index = tempButtons.findIndex(
|
|
188
|
-
(button) => button.code === 'saveButton'
|
|
189
|
-
)
|
|
190
|
-
if (index !== -1) {
|
|
191
|
-
tempButtons.splice(index, 1)
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
if (
|
|
195
|
-
this.buttonInfo['active'] &&
|
|
196
|
-
(this.buttonInfo['active'] === 'DRAW_WAIT' ||
|
|
197
|
-
this.buttonInfo['active'] === 'DEPT_DRAW_WAIT') &&
|
|
198
|
-
this.buttonInfo['showButtonDraw']
|
|
199
|
-
) {
|
|
200
|
-
tempButtons.push({
|
|
201
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['drawButton']),
|
|
202
|
-
permission: this.buttonsPermission['drawTask'],
|
|
203
|
-
type: 'primary',
|
|
204
|
-
clickFun: function () {
|
|
205
|
-
$emit(_that, 'drawTask')
|
|
206
|
-
},
|
|
207
|
-
code: 'drawButton',
|
|
208
|
-
})
|
|
209
|
-
}
|
|
210
|
-
if (
|
|
211
|
-
((this.buttonInfo['drawTask'] &&
|
|
212
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT') ||
|
|
213
|
-
(this.buttonInfo['canAbandonDeptTask'] &&
|
|
214
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT')) &&
|
|
215
|
-
this.buttonInfo['showButtonAbandon']
|
|
216
|
-
) {
|
|
217
|
-
tempButtons.push({
|
|
218
|
-
i18nButtonName: this.i18nButtonName(
|
|
219
|
-
this.buttonInfo['abandonButton']
|
|
220
|
-
),
|
|
221
|
-
permission: this.buttonsPermission['abandonReceive'],
|
|
222
|
-
type: 'primary',
|
|
223
|
-
clickFun: function () {
|
|
224
|
-
$emit(_that, 'abandonDraw')
|
|
225
|
-
},
|
|
226
|
-
code: 'abandonButton',
|
|
227
|
-
})
|
|
228
|
-
}
|
|
229
|
-
if (
|
|
230
|
-
this.buttonInfo['active'] === 'COMPLETED' &&
|
|
231
|
-
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
232
|
-
(!this.hiddenBtns ||
|
|
233
|
-
(this.hiddenBtns &&
|
|
234
|
-
this.hiddenBtns.indexOf('retrieveButton') === -1)) &&
|
|
235
|
-
this.buttonInfo['showButtonGetBack']
|
|
236
|
-
) {
|
|
237
|
-
tempButtons.push({
|
|
238
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['backButton']),
|
|
239
|
-
permission: this.buttonsPermission['retrieve'],
|
|
240
|
-
type: 'primary',
|
|
241
|
-
clickFun: function () {
|
|
242
|
-
$emit(_that, 'retrieveTask')
|
|
243
|
-
},
|
|
244
|
-
code: 'backButton',
|
|
245
|
-
})
|
|
246
|
-
}
|
|
247
|
-
if (
|
|
248
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
249
|
-
this.buttonInfo['processingMode'] === 'EDIT'
|
|
250
|
-
) {
|
|
251
|
-
tempButtons.push({
|
|
252
|
-
i18nButtonName: this.i18nButtonName(
|
|
253
|
-
this.buttonInfo['submitButton']
|
|
254
|
-
),
|
|
255
|
-
permission: this.buttonsPermission['submitTask'],
|
|
256
|
-
type: 'primary',
|
|
257
|
-
clickFun: function () {
|
|
258
|
-
_that.completeTask('SUBMIT')
|
|
259
|
-
},
|
|
260
|
-
code: 'submitButton',
|
|
261
|
-
})
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
if (
|
|
265
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
266
|
-
(this.buttonInfo['processingMode'] === 'APPROVE' ||
|
|
267
|
-
this.buttonInfo['processingMode'] === 'COUNTERSIGN')
|
|
268
|
-
) {
|
|
269
|
-
tempButtons.push({
|
|
270
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['agreeButton']),
|
|
271
|
-
permission: this.buttonsPermission['approve'],
|
|
272
|
-
type: 'primary',
|
|
273
|
-
clickFun: function () {
|
|
274
|
-
_that.completeTask('APPROVE')
|
|
275
|
-
},
|
|
276
|
-
code: 'agreeButton',
|
|
277
|
-
})
|
|
278
|
-
tempButtons.push({
|
|
279
|
-
i18nButtonName: this.i18nButtonName(
|
|
280
|
-
this.buttonInfo['disagreeButton']
|
|
281
|
-
),
|
|
282
|
-
permission: this.buttonsPermission['refuse'],
|
|
283
|
-
type: 'primary',
|
|
284
|
-
clickFun: function () {
|
|
285
|
-
_that.completeTask('REFUSE')
|
|
286
|
-
},
|
|
287
|
-
code: 'disagreeButton',
|
|
288
|
-
})
|
|
289
|
-
if (
|
|
290
|
-
this.buttonInfo['processingMode'] === 'COUNTERSIGN' &&
|
|
291
|
-
this.buttonInfo['showButtonAddCounter']
|
|
292
|
-
) {
|
|
293
|
-
tempButtons.push({
|
|
294
|
-
i18nButtonName: this.i18nButtonName(
|
|
295
|
-
this.buttonInfo['addSignerButton']
|
|
296
|
-
),
|
|
297
|
-
permission: this.buttonsPermission['addSigner'],
|
|
298
|
-
type: 'primary',
|
|
299
|
-
clickFun: function () {
|
|
300
|
-
$emit(_that, 'addSigner')
|
|
301
|
-
},
|
|
302
|
-
code: 'addSignerButton',
|
|
303
|
-
})
|
|
304
|
-
}
|
|
305
|
-
if (
|
|
306
|
-
this.buttonInfo['processingMode'] === 'COUNTERSIGN' &&
|
|
307
|
-
this.buttonInfo['showButtonDelCounter']
|
|
308
|
-
) {
|
|
309
|
-
tempButtons.push({
|
|
310
|
-
i18nButtonName: this.i18nButtonName(
|
|
311
|
-
this.buttonInfo['removeSignerButton']
|
|
312
|
-
),
|
|
313
|
-
permission: this.buttonsPermission['removeSigner'],
|
|
314
|
-
type: 'primary',
|
|
315
|
-
clickFun: function () {
|
|
316
|
-
$emit(_that, 'removeSigner')
|
|
317
|
-
},
|
|
318
|
-
code: 'removeSignerButton',
|
|
319
|
-
})
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
if (
|
|
323
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
324
|
-
this.buttonInfo['processingMode'] === 'VOTE'
|
|
325
|
-
) {
|
|
326
|
-
tempButtons.push({
|
|
327
|
-
i18nButtonName: this.i18nButtonName(
|
|
328
|
-
this.buttonInfo['approveButton']
|
|
329
|
-
),
|
|
330
|
-
permission: this.buttonsPermission['agreement'],
|
|
331
|
-
type: 'primary',
|
|
332
|
-
clickFun: function () {
|
|
333
|
-
_that.completeTask('AGREEMENT')
|
|
334
|
-
},
|
|
335
|
-
code: 'approveButton',
|
|
336
|
-
})
|
|
337
|
-
tempButtons.push({
|
|
338
|
-
i18nButtonName: this.i18nButtonName(
|
|
339
|
-
this.buttonInfo['opposeButton']
|
|
340
|
-
),
|
|
341
|
-
permission: this.buttonsPermission['oppose'],
|
|
342
|
-
type: 'primary',
|
|
343
|
-
clickFun: function () {
|
|
344
|
-
_that.completeTask('OPPOSE')
|
|
345
|
-
},
|
|
346
|
-
code: 'opposeButton',
|
|
347
|
-
})
|
|
348
|
-
if (this.buttonInfo['showButtonKiken']) {
|
|
349
|
-
tempButtons.push({
|
|
350
|
-
i18nButtonName: this.i18nButtonName(
|
|
351
|
-
this.buttonInfo['abstainButton']
|
|
352
|
-
),
|
|
353
|
-
permission: this.buttonsPermission['kiken'],
|
|
354
|
-
type: 'primary',
|
|
355
|
-
clickFun: function () {
|
|
356
|
-
_that.completeTask('KIKEN')
|
|
357
|
-
},
|
|
358
|
-
code: 'abstainButton',
|
|
359
|
-
})
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
if (
|
|
363
|
-
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
364
|
-
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
365
|
-
this.buttonInfo['showButtonCopy'] &&
|
|
366
|
-
(!this.hiddenBtns ||
|
|
367
|
-
(this.hiddenBtns &&
|
|
368
|
-
this.hiddenBtns.indexOf('copyButton') === -1)) &&
|
|
369
|
-
this.buttonInfo['showButtonCopy']
|
|
370
|
-
) {
|
|
371
|
-
tempButtons.push({
|
|
372
|
-
i18nButtonName: this.i18nButtonName(this.buttonInfo['copyButton']),
|
|
373
|
-
permission: this.buttonsPermission['copyTask'],
|
|
374
|
-
type: '',
|
|
375
|
-
clickFun: function () {
|
|
376
|
-
$emit(_that, 'createCopyTask')
|
|
377
|
-
},
|
|
378
|
-
code: 'copyButton',
|
|
379
|
-
})
|
|
380
|
-
}
|
|
381
|
-
if (
|
|
382
|
-
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
383
|
-
(this.buttonInfo['active'] === 'WAIT_TRANSACT' ||
|
|
384
|
-
this.buttonInfo['active'] === 'DRAW_WAIT') &&
|
|
385
|
-
(!this.hiddenBtns ||
|
|
386
|
-
(this.hiddenBtns &&
|
|
387
|
-
this.hiddenBtns.indexOf('assignButton') === -1)) &&
|
|
388
|
-
this.buttonInfo['showButtonAppoint']
|
|
389
|
-
) {
|
|
390
|
-
tempButtons.push({
|
|
391
|
-
i18nButtonName: this.i18nButtonName(
|
|
392
|
-
this.buttonInfo['appointButton']
|
|
393
|
-
),
|
|
394
|
-
permission: this.buttonsPermission['assign'],
|
|
395
|
-
type: '',
|
|
396
|
-
clickFun: function () {
|
|
397
|
-
$emit(_that, 'assignTask')
|
|
398
|
-
},
|
|
399
|
-
code: 'appointButton',
|
|
400
|
-
})
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
if (this.formButtonPosition === 'bottomRight') {
|
|
405
|
-
this.buttons = tempButtons.slice().reverse()
|
|
406
|
-
this.slotBefore = 'after'
|
|
407
|
-
this.slotAfter = 'before'
|
|
408
|
-
} else {
|
|
409
|
-
this.buttons = tempButtons
|
|
410
|
-
}
|
|
411
|
-
},
|
|
412
|
-
mounted() {},
|
|
413
|
-
methods: {
|
|
414
|
-
exportReportButt() {
|
|
415
|
-
// console.log('this.$emit(exportReport)')
|
|
416
|
-
$emit(this, 'exportReport')
|
|
417
|
-
},
|
|
418
|
-
completeTask(operationResult) {
|
|
419
|
-
$emit(this, 'completeTask', operationResult)
|
|
420
|
-
},
|
|
421
|
-
// 国际化显示按钮名称
|
|
422
|
-
i18nButtonName(buttonName) {
|
|
423
|
-
const defaultButtonPrefix = 'initVal:'
|
|
424
|
-
if (buttonName.indexOf(defaultButtonPrefix) >= 0) {
|
|
425
|
-
// 表示使用默认的按钮名称
|
|
426
|
-
const defaultButtonName = buttonName.substring(
|
|
427
|
-
buttonName.indexOf(defaultButtonPrefix) + defaultButtonPrefix.length
|
|
428
|
-
)
|
|
429
|
-
return this.$t('workflowButton.' + defaultButtonName)
|
|
430
|
-
} else {
|
|
431
|
-
return buttonName
|
|
432
|
-
}
|
|
433
|
-
},
|
|
434
|
-
getButtonsPermission() {
|
|
435
|
-
const defaultPermission = 'true'
|
|
436
|
-
const completeTaskPermission = this.permissionPrefix
|
|
437
|
-
? this.permissionPrefix + '.completeTask'
|
|
438
|
-
: defaultPermission
|
|
439
|
-
return {
|
|
440
|
-
// 第一环节保存,同“更新”
|
|
441
|
-
save: this.permissionPrefix
|
|
442
|
-
? this.permissionPrefix + '.save'
|
|
443
|
-
: defaultPermission,
|
|
444
|
-
// 第一环节提交
|
|
445
|
-
submitProcess: this.permissionPrefix
|
|
446
|
-
? this.permissionPrefix + '.submitProcess'
|
|
447
|
-
: defaultPermission,
|
|
448
|
-
// 同意(办理任务)
|
|
449
|
-
approve: this.permissionPrefix
|
|
450
|
-
? this.permissionPrefix + '.approve'
|
|
451
|
-
: completeTaskPermission,
|
|
452
|
-
// 不同意(办理任务)
|
|
453
|
-
refuse: this.permissionPrefix
|
|
454
|
-
? this.permissionPrefix + '.refuse'
|
|
455
|
-
: completeTaskPermission,
|
|
456
|
-
// 提交(办理任务)
|
|
457
|
-
submitTask: this.permissionPrefix
|
|
458
|
-
? this.permissionPrefix + '.submit'
|
|
459
|
-
: completeTaskPermission,
|
|
460
|
-
// 赞成(办理任务)
|
|
461
|
-
agreement: this.permissionPrefix
|
|
462
|
-
? this.permissionPrefix + '.agreement'
|
|
463
|
-
: completeTaskPermission,
|
|
464
|
-
// 反对(办理任务)
|
|
465
|
-
oppose: this.permissionPrefix
|
|
466
|
-
? this.permissionPrefix + '.oppose'
|
|
467
|
-
: completeTaskPermission,
|
|
468
|
-
// 弃权(办理任务)
|
|
469
|
-
kiken: this.permissionPrefix
|
|
470
|
-
? this.permissionPrefix + '.kiken'
|
|
471
|
-
: completeTaskPermission,
|
|
472
|
-
// 阅(办理任务)
|
|
473
|
-
readed: this.permissionPrefix
|
|
474
|
-
? this.permissionPrefix + '.readed'
|
|
475
|
-
: completeTaskPermission,
|
|
476
|
-
// 领取任务
|
|
477
|
-
drawTask: this.permissionPrefix
|
|
478
|
-
? this.permissionPrefix + '.drawTask'
|
|
479
|
-
: defaultPermission,
|
|
480
|
-
// 放弃领取
|
|
481
|
-
abandonReceive: this.permissionPrefix
|
|
482
|
-
? this.permissionPrefix + '.abandonReceive'
|
|
483
|
-
: defaultPermission,
|
|
484
|
-
// 取回
|
|
485
|
-
retrieve: this.permissionPrefix
|
|
486
|
-
? this.permissionPrefix + '.retrieve'
|
|
487
|
-
: defaultPermission,
|
|
488
|
-
// 更新
|
|
489
|
-
update: this.permissionPrefix
|
|
490
|
-
? this.permissionPrefix + '.update'
|
|
491
|
-
: defaultPermission,
|
|
492
|
-
// 指派
|
|
493
|
-
assign: this.permissionPrefix
|
|
494
|
-
? this.permissionPrefix + '.assign'
|
|
495
|
-
: defaultPermission,
|
|
496
|
-
// 选择办理人
|
|
497
|
-
selectTransactor: this.permissionPrefix
|
|
498
|
-
? this.permissionPrefix + '.selectTransactor'
|
|
499
|
-
: defaultPermission,
|
|
500
|
-
// 选择环节
|
|
501
|
-
selectTache: this.permissionPrefix
|
|
502
|
-
? this.permissionPrefix + '.selectTache'
|
|
503
|
-
: defaultPermission,
|
|
504
|
-
// 抄送
|
|
505
|
-
copyTask: this.permissionPrefix
|
|
506
|
-
? this.permissionPrefix + '.copyTask'
|
|
507
|
-
: defaultPermission,
|
|
508
|
-
// 加签
|
|
509
|
-
addSigner: this.permissionPrefix
|
|
510
|
-
? this.permissionPrefix + '.addSigner'
|
|
511
|
-
: defaultPermission,
|
|
512
|
-
// 减签
|
|
513
|
-
removeSigner: this.permissionPrefix
|
|
514
|
-
? this.permissionPrefix + '.removeSigner'
|
|
515
|
-
: defaultPermission,
|
|
516
|
-
// 导出报告
|
|
517
|
-
exportReport: this.permissionPrefix
|
|
518
|
-
? this.permissionPrefix + '.exportReport'
|
|
519
|
-
: defaultPermission,
|
|
520
|
-
// 领取部门任务
|
|
521
|
-
drawDeptTask: this.permissionPrefix
|
|
522
|
-
? this.permissionPrefix + '.drawDeptTask'
|
|
523
|
-
: defaultPermission,
|
|
524
|
-
// 放弃领取部门任务
|
|
525
|
-
abandonDrawDeptTask: this.permissionPrefix
|
|
526
|
-
? this.permissionPrefix + '.abandonDrawDeptTask'
|
|
527
|
-
: defaultPermission,
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
isDeptTask() {},
|
|
531
|
-
},
|
|
532
|
-
emits: [
|
|
533
|
-
'completeTask',
|
|
534
|
-
'save',
|
|
535
|
-
'submitProcess',
|
|
536
|
-
'update',
|
|
537
|
-
'selectTransactors',
|
|
538
|
-
'selectTaches',
|
|
539
|
-
'drawTask',
|
|
540
|
-
'abandonDraw',
|
|
541
|
-
'retrieveTask',
|
|
542
|
-
'addSigner',
|
|
543
|
-
'removeSigner',
|
|
544
|
-
'createCopyTask',
|
|
545
|
-
'assignTask',
|
|
546
|
-
'exportReport',
|
|
547
|
-
,
|
|
548
|
-
],
|
|
549
|
-
}
|
|
550
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<span>
|
|
3
|
+
<span
|
|
4
|
+
v-if="
|
|
5
|
+
typeof buttonInfo['theTransactor'] !== 'undefined' &&
|
|
6
|
+
buttonInfo['theTransactor'] === false
|
|
7
|
+
"
|
|
8
|
+
class="operation-area"
|
|
9
|
+
>
|
|
10
|
+
<slot :name="slotBefore" />
|
|
11
|
+
<slot name="errorArea" />
|
|
12
|
+
<slot :name="slotAfter" />
|
|
13
|
+
</span>
|
|
14
|
+
<span v-else class="operation-area">
|
|
15
|
+
<slot :name="slotBefore" />
|
|
16
|
+
<el-button
|
|
17
|
+
v-for="(button, buttonIndex) in buttons"
|
|
18
|
+
:key="buttonIndex"
|
|
19
|
+
v-permission="button.permission"
|
|
20
|
+
:disabled="preventReclick"
|
|
21
|
+
:type="button.type"
|
|
22
|
+
size="small"
|
|
23
|
+
:class="button.code ? button.code : ''"
|
|
24
|
+
@click="button.clickFun"
|
|
25
|
+
>
|
|
26
|
+
{{ button.i18nButtonName }}
|
|
27
|
+
</el-button>
|
|
28
|
+
<slot :name="slotAfter" />
|
|
29
|
+
</span>
|
|
30
|
+
</span>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
|
|
35
|
+
import { mapGetters } from 'vuex'
|
|
36
|
+
export default {
|
|
37
|
+
name: 'WorkflowButton',
|
|
38
|
+
props: {
|
|
39
|
+
// 控制按钮的相关信息
|
|
40
|
+
buttonInfo: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: null,
|
|
43
|
+
},
|
|
44
|
+
// 隐藏的按钮编码集合
|
|
45
|
+
// 值可以为['selectTransactor','selectTache','readButton','retrieveButton','copyButton','assignButton'],
|
|
46
|
+
// 分别表示['当任务是"待选择办理人"状态时,表单页面显示的提交按钮',
|
|
47
|
+
// '当任务是"待选择环节"状态时,表单页面显示的提交按钮',
|
|
48
|
+
// '已阅按钮','取回按钮','抄送按钮','指派按钮']
|
|
49
|
+
hiddenBtns: {
|
|
50
|
+
type: Array,
|
|
51
|
+
default: null,
|
|
52
|
+
},
|
|
53
|
+
// 资源编码前缀,例如:系统编码.实体类名 或 系统编码.页面编码,用于控制按钮权限
|
|
54
|
+
permissionPrefix: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: null,
|
|
57
|
+
},
|
|
58
|
+
formButtonPosition: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
const buttonsPermission = this.getButtonsPermission()
|
|
65
|
+
return {
|
|
66
|
+
slotBefore: 'before',
|
|
67
|
+
slotAfter: 'after',
|
|
68
|
+
buttons: [],
|
|
69
|
+
buttonsPermission, // 各按钮资源编码
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
computed: {
|
|
73
|
+
...mapGetters(['preventReclick']),
|
|
74
|
+
},
|
|
75
|
+
provide() {
|
|
76
|
+
return {}
|
|
77
|
+
},
|
|
78
|
+
created() {
|
|
79
|
+
// console.log('this.buttonInfo', this.buttonInfo)
|
|
80
|
+
// console.log('this.buttonsPermission', this.buttonsPermission)
|
|
81
|
+
const tempButtons = []
|
|
82
|
+
const _that = this
|
|
83
|
+
if (
|
|
84
|
+
typeof this.buttonInfo['processState'] === 'undefined' ||
|
|
85
|
+
this.buttonInfo['processState'] === null ||
|
|
86
|
+
(this.buttonInfo['processState'] === 'UNSUBMIT' &&
|
|
87
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT')
|
|
88
|
+
) {
|
|
89
|
+
if (
|
|
90
|
+
typeof this.buttonInfo['processState'] === 'undefined' ||
|
|
91
|
+
this.buttonInfo['showButtonSave'] === true
|
|
92
|
+
) {
|
|
93
|
+
tempButtons.push({
|
|
94
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['saveButton']),
|
|
95
|
+
permission: this.buttonsPermission['save'],
|
|
96
|
+
type: 'primary',
|
|
97
|
+
clickFun: function () {
|
|
98
|
+
$emit(_that, 'save')
|
|
99
|
+
},
|
|
100
|
+
code: 'saveButton',
|
|
101
|
+
})
|
|
102
|
+
}
|
|
103
|
+
tempButtons.push({
|
|
104
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['submitButton']),
|
|
105
|
+
permission: this.buttonsPermission['submitProcess'],
|
|
106
|
+
type: 'primary',
|
|
107
|
+
clickFun: function () {
|
|
108
|
+
$emit(_that, 'submitProcess')
|
|
109
|
+
},
|
|
110
|
+
code: 'submitButton',
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
if (this.buttonInfo['processState']) {
|
|
114
|
+
if (
|
|
115
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
116
|
+
this.buttonInfo['processingMode'] === 'TYPE_READ'
|
|
117
|
+
) {
|
|
118
|
+
if (
|
|
119
|
+
!this.hiddenBtns ||
|
|
120
|
+
(this.hiddenBtns && this.hiddenBtns.indexOf('readButton') === -1)
|
|
121
|
+
) {
|
|
122
|
+
tempButtons.push({
|
|
123
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['readButton']),
|
|
124
|
+
permission: this.buttonsPermission['completeTask'],
|
|
125
|
+
type: 'primary',
|
|
126
|
+
clickFun: function () {
|
|
127
|
+
_that.completeTask('READED')
|
|
128
|
+
},
|
|
129
|
+
code: 'readButton',
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
} else if (this.buttonInfo['processState'] === 'SUBMIT') {
|
|
133
|
+
if (
|
|
134
|
+
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
135
|
+
this.buttonInfo['showButtonSave'] &&
|
|
136
|
+
(this.buttonInfo['active'] === 'WAIT_TRANSACT' ||
|
|
137
|
+
this.buttonInfo['active'] === 'WAIT_DESIGNATE_TRANSACTOR' ||
|
|
138
|
+
this.buttonInfo['active'] === 'WAIT_CHOICE_TACHE' ||
|
|
139
|
+
this.buttonInfo['active'] === 'DRAW_WAIT')
|
|
140
|
+
) {
|
|
141
|
+
tempButtons.push({
|
|
142
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['saveButton']),
|
|
143
|
+
permission: this.buttonsPermission['update'],
|
|
144
|
+
type: 'primary',
|
|
145
|
+
clickFun: function () {
|
|
146
|
+
$emit(_that, 'update')
|
|
147
|
+
},
|
|
148
|
+
code: 'saveButton',
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
if (
|
|
152
|
+
this.buttonInfo['active'] &&
|
|
153
|
+
this.buttonInfo['active'] === 'WAIT_DESIGNATE_TRANSACTOR' &&
|
|
154
|
+
(!this.hiddenBtns ||
|
|
155
|
+
(this.hiddenBtns &&
|
|
156
|
+
this.hiddenBtns.indexOf('selectTransactor') === -1))
|
|
157
|
+
) {
|
|
158
|
+
tempButtons.push({
|
|
159
|
+
i18nButtonName: this.i18nButtonName(
|
|
160
|
+
this.buttonInfo['submitButton']
|
|
161
|
+
),
|
|
162
|
+
permission: this.buttonsPermission['selectTransactor'],
|
|
163
|
+
type: 'primary',
|
|
164
|
+
clickFun: function () {
|
|
165
|
+
$emit(_that, 'selectTransactors')
|
|
166
|
+
},
|
|
167
|
+
code: 'submitButton',
|
|
168
|
+
})
|
|
169
|
+
}
|
|
170
|
+
if (
|
|
171
|
+
this.buttonInfo['active'] &&
|
|
172
|
+
this.buttonInfo['active'] === 'WAIT_CHOICE_TACHE' &&
|
|
173
|
+
(!this.hiddenBtns ||
|
|
174
|
+
(this.hiddenBtns && this.hiddenBtns.indexOf('selectTache') === -1))
|
|
175
|
+
) {
|
|
176
|
+
tempButtons.push({
|
|
177
|
+
i18nButtonName: this.i18nButtonName(
|
|
178
|
+
this.buttonInfo['submitButton']
|
|
179
|
+
),
|
|
180
|
+
permission: this.buttonsPermission['selectTache'],
|
|
181
|
+
type: 'primary',
|
|
182
|
+
clickFun: function () {
|
|
183
|
+
$emit(_that, 'selectTaches')
|
|
184
|
+
},
|
|
185
|
+
code: 'submitButton',
|
|
186
|
+
})
|
|
187
|
+
const index = tempButtons.findIndex(
|
|
188
|
+
(button) => button.code === 'saveButton'
|
|
189
|
+
)
|
|
190
|
+
if (index !== -1) {
|
|
191
|
+
tempButtons.splice(index, 1)
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (
|
|
195
|
+
this.buttonInfo['active'] &&
|
|
196
|
+
(this.buttonInfo['active'] === 'DRAW_WAIT' ||
|
|
197
|
+
this.buttonInfo['active'] === 'DEPT_DRAW_WAIT') &&
|
|
198
|
+
this.buttonInfo['showButtonDraw']
|
|
199
|
+
) {
|
|
200
|
+
tempButtons.push({
|
|
201
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['drawButton']),
|
|
202
|
+
permission: this.buttonsPermission['drawTask'],
|
|
203
|
+
type: 'primary',
|
|
204
|
+
clickFun: function () {
|
|
205
|
+
$emit(_that, 'drawTask')
|
|
206
|
+
},
|
|
207
|
+
code: 'drawButton',
|
|
208
|
+
})
|
|
209
|
+
}
|
|
210
|
+
if (
|
|
211
|
+
((this.buttonInfo['drawTask'] &&
|
|
212
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT') ||
|
|
213
|
+
(this.buttonInfo['canAbandonDeptTask'] &&
|
|
214
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT')) &&
|
|
215
|
+
this.buttonInfo['showButtonAbandon']
|
|
216
|
+
) {
|
|
217
|
+
tempButtons.push({
|
|
218
|
+
i18nButtonName: this.i18nButtonName(
|
|
219
|
+
this.buttonInfo['abandonButton']
|
|
220
|
+
),
|
|
221
|
+
permission: this.buttonsPermission['abandonReceive'],
|
|
222
|
+
type: 'primary',
|
|
223
|
+
clickFun: function () {
|
|
224
|
+
$emit(_that, 'abandonDraw')
|
|
225
|
+
},
|
|
226
|
+
code: 'abandonButton',
|
|
227
|
+
})
|
|
228
|
+
}
|
|
229
|
+
if (
|
|
230
|
+
this.buttonInfo['active'] === 'COMPLETED' &&
|
|
231
|
+
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
232
|
+
(!this.hiddenBtns ||
|
|
233
|
+
(this.hiddenBtns &&
|
|
234
|
+
this.hiddenBtns.indexOf('retrieveButton') === -1)) &&
|
|
235
|
+
this.buttonInfo['showButtonGetBack']
|
|
236
|
+
) {
|
|
237
|
+
tempButtons.push({
|
|
238
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['backButton']),
|
|
239
|
+
permission: this.buttonsPermission['retrieve'],
|
|
240
|
+
type: 'primary',
|
|
241
|
+
clickFun: function () {
|
|
242
|
+
$emit(_that, 'retrieveTask')
|
|
243
|
+
},
|
|
244
|
+
code: 'backButton',
|
|
245
|
+
})
|
|
246
|
+
}
|
|
247
|
+
if (
|
|
248
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
249
|
+
this.buttonInfo['processingMode'] === 'EDIT'
|
|
250
|
+
) {
|
|
251
|
+
tempButtons.push({
|
|
252
|
+
i18nButtonName: this.i18nButtonName(
|
|
253
|
+
this.buttonInfo['submitButton']
|
|
254
|
+
),
|
|
255
|
+
permission: this.buttonsPermission['submitTask'],
|
|
256
|
+
type: 'primary',
|
|
257
|
+
clickFun: function () {
|
|
258
|
+
_that.completeTask('SUBMIT')
|
|
259
|
+
},
|
|
260
|
+
code: 'submitButton',
|
|
261
|
+
})
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (
|
|
265
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
266
|
+
(this.buttonInfo['processingMode'] === 'APPROVE' ||
|
|
267
|
+
this.buttonInfo['processingMode'] === 'COUNTERSIGN')
|
|
268
|
+
) {
|
|
269
|
+
tempButtons.push({
|
|
270
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['agreeButton']),
|
|
271
|
+
permission: this.buttonsPermission['approve'],
|
|
272
|
+
type: 'primary',
|
|
273
|
+
clickFun: function () {
|
|
274
|
+
_that.completeTask('APPROVE')
|
|
275
|
+
},
|
|
276
|
+
code: 'agreeButton',
|
|
277
|
+
})
|
|
278
|
+
tempButtons.push({
|
|
279
|
+
i18nButtonName: this.i18nButtonName(
|
|
280
|
+
this.buttonInfo['disagreeButton']
|
|
281
|
+
),
|
|
282
|
+
permission: this.buttonsPermission['refuse'],
|
|
283
|
+
type: 'primary',
|
|
284
|
+
clickFun: function () {
|
|
285
|
+
_that.completeTask('REFUSE')
|
|
286
|
+
},
|
|
287
|
+
code: 'disagreeButton',
|
|
288
|
+
})
|
|
289
|
+
if (
|
|
290
|
+
this.buttonInfo['processingMode'] === 'COUNTERSIGN' &&
|
|
291
|
+
this.buttonInfo['showButtonAddCounter']
|
|
292
|
+
) {
|
|
293
|
+
tempButtons.push({
|
|
294
|
+
i18nButtonName: this.i18nButtonName(
|
|
295
|
+
this.buttonInfo['addSignerButton']
|
|
296
|
+
),
|
|
297
|
+
permission: this.buttonsPermission['addSigner'],
|
|
298
|
+
type: 'primary',
|
|
299
|
+
clickFun: function () {
|
|
300
|
+
$emit(_that, 'addSigner')
|
|
301
|
+
},
|
|
302
|
+
code: 'addSignerButton',
|
|
303
|
+
})
|
|
304
|
+
}
|
|
305
|
+
if (
|
|
306
|
+
this.buttonInfo['processingMode'] === 'COUNTERSIGN' &&
|
|
307
|
+
this.buttonInfo['showButtonDelCounter']
|
|
308
|
+
) {
|
|
309
|
+
tempButtons.push({
|
|
310
|
+
i18nButtonName: this.i18nButtonName(
|
|
311
|
+
this.buttonInfo['removeSignerButton']
|
|
312
|
+
),
|
|
313
|
+
permission: this.buttonsPermission['removeSigner'],
|
|
314
|
+
type: 'primary',
|
|
315
|
+
clickFun: function () {
|
|
316
|
+
$emit(_that, 'removeSigner')
|
|
317
|
+
},
|
|
318
|
+
code: 'removeSignerButton',
|
|
319
|
+
})
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
if (
|
|
323
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
324
|
+
this.buttonInfo['processingMode'] === 'VOTE'
|
|
325
|
+
) {
|
|
326
|
+
tempButtons.push({
|
|
327
|
+
i18nButtonName: this.i18nButtonName(
|
|
328
|
+
this.buttonInfo['approveButton']
|
|
329
|
+
),
|
|
330
|
+
permission: this.buttonsPermission['agreement'],
|
|
331
|
+
type: 'primary',
|
|
332
|
+
clickFun: function () {
|
|
333
|
+
_that.completeTask('AGREEMENT')
|
|
334
|
+
},
|
|
335
|
+
code: 'approveButton',
|
|
336
|
+
})
|
|
337
|
+
tempButtons.push({
|
|
338
|
+
i18nButtonName: this.i18nButtonName(
|
|
339
|
+
this.buttonInfo['opposeButton']
|
|
340
|
+
),
|
|
341
|
+
permission: this.buttonsPermission['oppose'],
|
|
342
|
+
type: 'primary',
|
|
343
|
+
clickFun: function () {
|
|
344
|
+
_that.completeTask('OPPOSE')
|
|
345
|
+
},
|
|
346
|
+
code: 'opposeButton',
|
|
347
|
+
})
|
|
348
|
+
if (this.buttonInfo['showButtonKiken']) {
|
|
349
|
+
tempButtons.push({
|
|
350
|
+
i18nButtonName: this.i18nButtonName(
|
|
351
|
+
this.buttonInfo['abstainButton']
|
|
352
|
+
),
|
|
353
|
+
permission: this.buttonsPermission['kiken'],
|
|
354
|
+
type: 'primary',
|
|
355
|
+
clickFun: function () {
|
|
356
|
+
_that.completeTask('KIKEN')
|
|
357
|
+
},
|
|
358
|
+
code: 'abstainButton',
|
|
359
|
+
})
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
if (
|
|
363
|
+
this.buttonInfo['active'] === 'WAIT_TRANSACT' &&
|
|
364
|
+
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
365
|
+
this.buttonInfo['showButtonCopy'] &&
|
|
366
|
+
(!this.hiddenBtns ||
|
|
367
|
+
(this.hiddenBtns &&
|
|
368
|
+
this.hiddenBtns.indexOf('copyButton') === -1)) &&
|
|
369
|
+
this.buttonInfo['showButtonCopy']
|
|
370
|
+
) {
|
|
371
|
+
tempButtons.push({
|
|
372
|
+
i18nButtonName: this.i18nButtonName(this.buttonInfo['copyButton']),
|
|
373
|
+
permission: this.buttonsPermission['copyTask'],
|
|
374
|
+
type: '',
|
|
375
|
+
clickFun: function () {
|
|
376
|
+
$emit(_that, 'createCopyTask')
|
|
377
|
+
},
|
|
378
|
+
code: 'copyButton',
|
|
379
|
+
})
|
|
380
|
+
}
|
|
381
|
+
if (
|
|
382
|
+
this.buttonInfo['processingMode'] !== 'TYPE_READ' &&
|
|
383
|
+
(this.buttonInfo['active'] === 'WAIT_TRANSACT' ||
|
|
384
|
+
this.buttonInfo['active'] === 'DRAW_WAIT') &&
|
|
385
|
+
(!this.hiddenBtns ||
|
|
386
|
+
(this.hiddenBtns &&
|
|
387
|
+
this.hiddenBtns.indexOf('assignButton') === -1)) &&
|
|
388
|
+
this.buttonInfo['showButtonAppoint']
|
|
389
|
+
) {
|
|
390
|
+
tempButtons.push({
|
|
391
|
+
i18nButtonName: this.i18nButtonName(
|
|
392
|
+
this.buttonInfo['appointButton']
|
|
393
|
+
),
|
|
394
|
+
permission: this.buttonsPermission['assign'],
|
|
395
|
+
type: '',
|
|
396
|
+
clickFun: function () {
|
|
397
|
+
$emit(_that, 'assignTask')
|
|
398
|
+
},
|
|
399
|
+
code: 'appointButton',
|
|
400
|
+
})
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
if (this.formButtonPosition === 'bottomRight') {
|
|
405
|
+
this.buttons = tempButtons.slice().reverse()
|
|
406
|
+
this.slotBefore = 'after'
|
|
407
|
+
this.slotAfter = 'before'
|
|
408
|
+
} else {
|
|
409
|
+
this.buttons = tempButtons
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
mounted() {},
|
|
413
|
+
methods: {
|
|
414
|
+
exportReportButt() {
|
|
415
|
+
// console.log('this.$emit(exportReport)')
|
|
416
|
+
$emit(this, 'exportReport')
|
|
417
|
+
},
|
|
418
|
+
completeTask(operationResult) {
|
|
419
|
+
$emit(this, 'completeTask', operationResult)
|
|
420
|
+
},
|
|
421
|
+
// 国际化显示按钮名称
|
|
422
|
+
i18nButtonName(buttonName) {
|
|
423
|
+
const defaultButtonPrefix = 'initVal:'
|
|
424
|
+
if (buttonName.indexOf(defaultButtonPrefix) >= 0) {
|
|
425
|
+
// 表示使用默认的按钮名称
|
|
426
|
+
const defaultButtonName = buttonName.substring(
|
|
427
|
+
buttonName.indexOf(defaultButtonPrefix) + defaultButtonPrefix.length
|
|
428
|
+
)
|
|
429
|
+
return this.$t('workflowButton.' + defaultButtonName)
|
|
430
|
+
} else {
|
|
431
|
+
return buttonName
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
getButtonsPermission() {
|
|
435
|
+
const defaultPermission = 'true'
|
|
436
|
+
const completeTaskPermission = this.permissionPrefix
|
|
437
|
+
? this.permissionPrefix + '.completeTask'
|
|
438
|
+
: defaultPermission
|
|
439
|
+
return {
|
|
440
|
+
// 第一环节保存,同“更新”
|
|
441
|
+
save: this.permissionPrefix
|
|
442
|
+
? this.permissionPrefix + '.save'
|
|
443
|
+
: defaultPermission,
|
|
444
|
+
// 第一环节提交
|
|
445
|
+
submitProcess: this.permissionPrefix
|
|
446
|
+
? this.permissionPrefix + '.submitProcess'
|
|
447
|
+
: defaultPermission,
|
|
448
|
+
// 同意(办理任务)
|
|
449
|
+
approve: this.permissionPrefix
|
|
450
|
+
? this.permissionPrefix + '.approve'
|
|
451
|
+
: completeTaskPermission,
|
|
452
|
+
// 不同意(办理任务)
|
|
453
|
+
refuse: this.permissionPrefix
|
|
454
|
+
? this.permissionPrefix + '.refuse'
|
|
455
|
+
: completeTaskPermission,
|
|
456
|
+
// 提交(办理任务)
|
|
457
|
+
submitTask: this.permissionPrefix
|
|
458
|
+
? this.permissionPrefix + '.submit'
|
|
459
|
+
: completeTaskPermission,
|
|
460
|
+
// 赞成(办理任务)
|
|
461
|
+
agreement: this.permissionPrefix
|
|
462
|
+
? this.permissionPrefix + '.agreement'
|
|
463
|
+
: completeTaskPermission,
|
|
464
|
+
// 反对(办理任务)
|
|
465
|
+
oppose: this.permissionPrefix
|
|
466
|
+
? this.permissionPrefix + '.oppose'
|
|
467
|
+
: completeTaskPermission,
|
|
468
|
+
// 弃权(办理任务)
|
|
469
|
+
kiken: this.permissionPrefix
|
|
470
|
+
? this.permissionPrefix + '.kiken'
|
|
471
|
+
: completeTaskPermission,
|
|
472
|
+
// 阅(办理任务)
|
|
473
|
+
readed: this.permissionPrefix
|
|
474
|
+
? this.permissionPrefix + '.readed'
|
|
475
|
+
: completeTaskPermission,
|
|
476
|
+
// 领取任务
|
|
477
|
+
drawTask: this.permissionPrefix
|
|
478
|
+
? this.permissionPrefix + '.drawTask'
|
|
479
|
+
: defaultPermission,
|
|
480
|
+
// 放弃领取
|
|
481
|
+
abandonReceive: this.permissionPrefix
|
|
482
|
+
? this.permissionPrefix + '.abandonReceive'
|
|
483
|
+
: defaultPermission,
|
|
484
|
+
// 取回
|
|
485
|
+
retrieve: this.permissionPrefix
|
|
486
|
+
? this.permissionPrefix + '.retrieve'
|
|
487
|
+
: defaultPermission,
|
|
488
|
+
// 更新
|
|
489
|
+
update: this.permissionPrefix
|
|
490
|
+
? this.permissionPrefix + '.update'
|
|
491
|
+
: defaultPermission,
|
|
492
|
+
// 指派
|
|
493
|
+
assign: this.permissionPrefix
|
|
494
|
+
? this.permissionPrefix + '.assign'
|
|
495
|
+
: defaultPermission,
|
|
496
|
+
// 选择办理人
|
|
497
|
+
selectTransactor: this.permissionPrefix
|
|
498
|
+
? this.permissionPrefix + '.selectTransactor'
|
|
499
|
+
: defaultPermission,
|
|
500
|
+
// 选择环节
|
|
501
|
+
selectTache: this.permissionPrefix
|
|
502
|
+
? this.permissionPrefix + '.selectTache'
|
|
503
|
+
: defaultPermission,
|
|
504
|
+
// 抄送
|
|
505
|
+
copyTask: this.permissionPrefix
|
|
506
|
+
? this.permissionPrefix + '.copyTask'
|
|
507
|
+
: defaultPermission,
|
|
508
|
+
// 加签
|
|
509
|
+
addSigner: this.permissionPrefix
|
|
510
|
+
? this.permissionPrefix + '.addSigner'
|
|
511
|
+
: defaultPermission,
|
|
512
|
+
// 减签
|
|
513
|
+
removeSigner: this.permissionPrefix
|
|
514
|
+
? this.permissionPrefix + '.removeSigner'
|
|
515
|
+
: defaultPermission,
|
|
516
|
+
// 导出报告
|
|
517
|
+
exportReport: this.permissionPrefix
|
|
518
|
+
? this.permissionPrefix + '.exportReport'
|
|
519
|
+
: defaultPermission,
|
|
520
|
+
// 领取部门任务
|
|
521
|
+
drawDeptTask: this.permissionPrefix
|
|
522
|
+
? this.permissionPrefix + '.drawDeptTask'
|
|
523
|
+
: defaultPermission,
|
|
524
|
+
// 放弃领取部门任务
|
|
525
|
+
abandonDrawDeptTask: this.permissionPrefix
|
|
526
|
+
? this.permissionPrefix + '.abandonDrawDeptTask'
|
|
527
|
+
: defaultPermission,
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
isDeptTask() {},
|
|
531
|
+
},
|
|
532
|
+
emits: [
|
|
533
|
+
'completeTask',
|
|
534
|
+
'save',
|
|
535
|
+
'submitProcess',
|
|
536
|
+
'update',
|
|
537
|
+
'selectTransactors',
|
|
538
|
+
'selectTaches',
|
|
539
|
+
'drawTask',
|
|
540
|
+
'abandonDraw',
|
|
541
|
+
'retrieveTask',
|
|
542
|
+
'addSigner',
|
|
543
|
+
'removeSigner',
|
|
544
|
+
'createCopyTask',
|
|
545
|
+
'assignTask',
|
|
546
|
+
'exportReport',
|
|
547
|
+
,
|
|
548
|
+
],
|
|
549
|
+
}
|
|
550
|
+
</script>
|