super-pages 0.0.2-up → 0.0.4-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.
Files changed (50) hide show
  1. package/README.md +7 -7
  2. package/index.html +13 -13
  3. package/lib/super-pages.css +1 -1
  4. package/lib/super-pages.js +2488 -2559
  5. package/lib/super-pages.umd.cjs +14 -14
  6. package/package.json +3 -6
  7. package/packages/index.js +30 -30
  8. package/packages/super-page/index.js +9 -9
  9. package/packages/super-page/src/button-group.vue +294 -294
  10. package/packages/super-page/src/chart-page.vue +215 -215
  11. package/packages/super-page/src/chart-query-page.vue +163 -163
  12. package/packages/super-page/src/export-form-report-dialog.vue +145 -145
  13. package/packages/super-page/src/form-head.vue +74 -74
  14. package/packages/super-page/src/form-page.vue +107 -107
  15. package/packages/super-page/src/group-tag.vue +21 -21
  16. package/packages/super-page/src/list-page.vue +1454 -1454
  17. package/packages/super-page/src/list-toolbar-dynamic-source.vue +89 -89
  18. package/packages/super-page/src/list-toolbar-page.vue +377 -377
  19. package/packages/super-page/src/my-button-base.vue +438 -438
  20. package/packages/super-page/src/my-button.vue +196 -196
  21. package/packages/super-page/src/page-custom-component.vue +56 -56
  22. package/packages/super-page/src/remove-signer-dialog.vue +103 -103
  23. package/packages/super-page/src/sub-tab-page.vue +79 -79
  24. package/packages/super-page/src/super-page-component.vue +86 -86
  25. package/packages/super-page/src/super-page.vue +162 -162
  26. package/packages/super-page/src/tab-page.vue +154 -154
  27. package/packages/super-page/src/task-informition-dialog.vue +82 -82
  28. package/packages/super-page/src/util/ListButtonEvent.js +896 -896
  29. package/packages/super-page/src/util/api.js +37 -37
  30. package/packages/super-page/src/util/callEvents.js +62 -62
  31. package/packages/super-page/src/util/chartButtonEvent.js +60 -60
  32. package/packages/super-page/src/util/common-util.js +102 -102
  33. package/packages/super-page/src/util/commonButtonEvent.js +70 -70
  34. package/packages/super-page/src/util/eventBus.js +2 -2
  35. package/packages/super-page/src/util/formButtonEvent.js +509 -509
  36. package/packages/super-page/src/util/store.js +3 -3
  37. package/packages/super-page/src/util/super-page.js +29 -29
  38. package/packages/super-page/src/util/workflowButtonEvent.js +1729 -1729
  39. package/packages/super-page/src/widget-col-page.vue +339 -339
  40. package/packages/super-page/src/widget-page.vue +703 -703
  41. package/packages/super-page/src/widget-sub-tab-pane-page.vue +115 -115
  42. package/packages/super-page/src/widget-tab-pane-page.vue +135 -135
  43. package/packages/super-page/src/workflow-button-group.vue +561 -561
  44. package/packages/super-page-dialog/index.js +9 -9
  45. package/packages/super-page-dialog/src/super-page-dialog.vue +200 -200
  46. package/packages/utils/gogocodeTransfer.js +59 -59
  47. package/src/i18n/langs/cn.js +65 -65
  48. package/src/i18n/langs/en.js +68 -68
  49. package/src/utils/common-util.js +9 -9
  50. package/vite.config.js +36 -36
@@ -1,294 +1,294 @@
1
- <template>
2
- <div style="width: 100%">
3
- <div v-if="myButtonGroups" :class="getFormButtonPosition()">
4
- <span style="white-space: nowrap">
5
- <template v-for="(button, buttonIndex) in myButtonGroups">
6
- <el-dropdown
7
- v-if="button.isGroup"
8
- style="margin-right: 10px"
9
- split-button
10
- :size="
11
- button.buttons && button.buttons.length > 0
12
- ? button.buttons[0].size
13
- : 'small'
14
- "
15
- @command="handleCommand"
16
- >
17
- {{ button.label }}
18
- <template v-slot:dropdown>
19
- <el-dropdown-menu>
20
- <span
21
- v-for="(buttonChild, index) in button.buttons"
22
- :key="buttonChild.code + index"
23
- >
24
- <el-dropdown-item
25
- v-permission="
26
- permissionPrefix && permissionPrefix !== ''
27
- ? permissionPrefix + buttonChild.code
28
- : ''
29
- "
30
- :command="buttonChild.code"
31
- :disabled="preventReclick"
32
- >
33
- {{
34
- buttonChild.label
35
- ? buttonChild.label
36
- : buttonChild.code === 'search'
37
- ? $t('superPageMessage.searchButtonLabel')
38
- : ''
39
- }}
40
- </el-dropdown-item>
41
- </span>
42
- </el-dropdown-menu>
43
- </template>
44
- </el-dropdown>
45
- <!--图表页面按钮区不显示统计和重置;列表页面时不显示查询按钮;-->
46
- <my-button
47
- v-else-if="
48
- !position ||
49
- (position === 'list' && button.code !== 'search') ||
50
- (position === 'chart' &&
51
- button.code !== 'reset' &&
52
- button.code !== 'statistics') ||
53
- (position !== 'chart' && position !== 'list')
54
- "
55
- :search-form-info="searchFormInfo"
56
- :button="button"
57
- :permission-prefix="permissionPrefix"
58
- :workflow-button-component="workflowButtonComponent"
59
- :position="position"
60
- :is-task-input="isTaskInput"
61
- :table-name="tableName"
62
- :page-code="pageCode"
63
- :work-name-color="workNameColor"
64
- :button-groups="
65
- button.code === 'workflowButton' ? buttonGroups : []
66
- "
67
- :get-form-data="getFormData"
68
- :selections="selections"
69
- :form-data-fun="formDataFun"
70
- :get-system-ref="getSystemRef"
71
- :form-button-position="formButtonPosition"
72
- :disabled="disabled"
73
- @refresh="refreshEmit"
74
- @click="commonButtonClick"
75
- @workflowClick="workflowButtonClick"
76
- @prohibi-edit="fnProhibitToEdit"
77
- @refreshFrom="refreshFrom"
78
- />
79
- </template>
80
- </span>
81
- <list-toolbar-page
82
- v-if="listToolbarList"
83
- :list-toolbar-list="listToolbarList"
84
- :page-code="pageCode"
85
- class="list_toolbar_page_style"
86
- @searchGridData="searchGridData"
87
- />
88
- <page-custom-component
89
- v-if="buttonAreaCustomComponentArr"
90
- :button-area-custom-component-arr="buttonAreaCustomComponentArr"
91
- :page-code="pageCode"
92
- @getSystemRef="getSystemRef"
93
- />
94
- </div>
95
- </div>
96
- </template>
97
-
98
- <script>
99
- import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
100
- import Util from './util/util'
101
- import MyButton from './my-button'
102
- import listToolbarPage from './list-toolbar-page'
103
- import pageCustomComponent from './page-custom-component'
104
- import { mapGetters } from 'vuex'
105
- export default {
106
- name: 'ButtonGroup',
107
- components: {
108
- MyButton,
109
- listToolbarPage,
110
- pageCustomComponent,
111
- },
112
- props: {
113
- // 元素设置
114
- buttonGroups: {
115
- type: Array,
116
- default: null,
117
- },
118
- // 按钮的资源编码前缀,例如:系统编码.页面编码.列表组件编码 或 系统编码.页面编码.表单组件编码
119
- permissionPrefix: {
120
- type: String,
121
- default: null,
122
- },
123
- // 流程按钮组需要的信息
124
- workflowButtonComponent: {
125
- type: Object,
126
- default: null,
127
- },
128
- // 按钮组所在位置,list列表或form表单内或chart
129
- position: {
130
- type: String,
131
- default: null,
132
- },
133
- // 是否在任务办理页面(待办事宜中打开的),控制返回、关闭按钮
134
- isTaskInput: {
135
- type: Boolean,
136
- default: false,
137
- },
138
- // 数据表名称
139
- tableName: {
140
- type: String,
141
- default: null,
142
- },
143
- // 列表工具栏
144
- listToolbarList: {
145
- type: Array,
146
- default: null,
147
- },
148
- // 按钮区自定义组件
149
- buttonAreaCustomComponentArr: {
150
- type: Array,
151
- default: null,
152
- },
153
- // 页面编码
154
- pageCode: {
155
- type: String,
156
- default: null,
157
- },
158
- // 保存页面数据的方法
159
- getFormData: {
160
- type: Function,
161
- default: function () {},
162
- },
163
- // 列表选中的记录集合
164
- selections: {
165
- type: Array,
166
- default: null,
167
- },
168
- // 表单对象方法
169
- formDataFun: {
170
- type: Function,
171
- default: function () {},
172
- },
173
- searchFormInfo: {
174
- type: Object,
175
- default: () => {
176
- return { data: {} }
177
- },
178
- },
179
- formButtonPosition: {
180
- type: String,
181
- default: null,
182
- },
183
- // 是否是图表页面按钮
184
- isChartView: {
185
- type: Boolean,
186
- default: false,
187
- },
188
- disabled: {
189
- type: Boolean,
190
- default: false,
191
- },
192
- // 工具栏是否靠右显示
193
- toolbarRightShow: {
194
- type: Boolean,
195
- },
196
- workNameColor: {
197
- type: String,
198
- },
199
- },
200
- data() {
201
- return {
202
- myButtonGroups: null,
203
- }
204
- },
205
- computed: {
206
- ...mapGetters(['preventReclick']),
207
- },
208
- created() {
209
- if (this.position === 'workflowForm') {
210
- for (let i = 0; i < this.buttonGroups.length; i++) {
211
- const button = this.buttonGroups[i]
212
- if (button.code === 'workflowButton') {
213
- this.myButtonGroups = []
214
- this.myButtonGroups[0] = button
215
- break
216
- }
217
- }
218
- } else {
219
- if (this.buttonGroups && this.buttonGroups.length > 0) {
220
- this.myButtonGroups = []
221
- const groupButtonMap = {}
222
- this.buttonGroups.forEach((button) => {
223
- if (!button.groupName || button.groupName === '') {
224
- // 未分组
225
- this.myButtonGroups.push(button)
226
- } else {
227
- // 已分组
228
- const groupNmae = button.groupName
229
- if (groupButtonMap[groupNmae]) {
230
- const groupButtons = groupButtonMap[groupNmae]
231
- groupButtons.push(button)
232
- } else {
233
- const groupButtons = []
234
- groupButtons.push(button)
235
- groupButtonMap[groupNmae] = groupButtons
236
- }
237
- }
238
- })
239
- for (let key in groupButtonMap) {
240
- const buttonGroup = {}
241
- buttonGroup.isGroup = true
242
- buttonGroup.label = key
243
- buttonGroup.buttons = groupButtonMap[key]
244
- this.myButtonGroups.push(buttonGroup)
245
- }
246
- }
247
- }
248
- },
249
- methods: {
250
- ...Util,
251
- searchGridData(data, dataTypes, dataTypeObj, currentControlType) {
252
- $emit(
253
- this,
254
- 'searchGridData',
255
- data,
256
- dataTypes,
257
- dataTypeObj,
258
- currentControlType
259
- )
260
- },
261
- getSystemRef(refKey, operation) {
262
- $emit(this, 'getSystemRef', refKey, operation)
263
- },
264
- handleCommand(buttonCode) {
265
- if (buttonCode && buttonCode !== '') {
266
- let index = this.buttonGroups.findIndex(function (item) {
267
- return buttonCode === item.code
268
- })
269
- if (index != null && index !== undefined && index !== -1) {
270
- this.commonButtonClick(this.buttonGroups[index])
271
- }
272
- }
273
- },
274
- fnProhibitToEdit(data) {
275
- $emit(this, 'prohibi-edit', data)
276
- },
277
- getFormButtonPosition() {
278
- if (this.position === 'chart') {
279
- return 'operation-area-chart'
280
- }
281
- if (this.position === 'list' && this.toolbarRightShow) {
282
- return 'operation-area toolbar_flex'
283
- }
284
- if (this.position === 'list') {
285
- return 'operation-area'
286
- }
287
- return this.formButtonPosition === 'topLeft'
288
- ? 'form-top-button'
289
- : 'form-bottom-button'
290
- },
291
- },
292
- emits: ['searchGridData', 'getSystemRef', 'prohibi-edit'],
293
- }
294
- </script>
1
+ <template>
2
+ <div style="width: 100%">
3
+ <div v-if="myButtonGroups" :class="getFormButtonPosition()">
4
+ <span style="white-space: nowrap">
5
+ <template v-for="(button, buttonIndex) in myButtonGroups">
6
+ <el-dropdown
7
+ v-if="button.isGroup"
8
+ style="margin-right: 10px"
9
+ split-button
10
+ :size="
11
+ button.buttons && button.buttons.length > 0
12
+ ? button.buttons[0].size
13
+ : 'small'
14
+ "
15
+ @command="handleCommand"
16
+ >
17
+ {{ button.label }}
18
+ <template v-slot:dropdown>
19
+ <el-dropdown-menu>
20
+ <span
21
+ v-for="(buttonChild, index) in button.buttons"
22
+ :key="buttonChild.code + index"
23
+ >
24
+ <el-dropdown-item
25
+ v-permission="
26
+ permissionPrefix && permissionPrefix !== ''
27
+ ? permissionPrefix + buttonChild.code
28
+ : ''
29
+ "
30
+ :command="buttonChild.code"
31
+ :disabled="preventReclick"
32
+ >
33
+ {{
34
+ buttonChild.label
35
+ ? buttonChild.label
36
+ : buttonChild.code === 'search'
37
+ ? $t('superPageMessage.searchButtonLabel')
38
+ : ''
39
+ }}
40
+ </el-dropdown-item>
41
+ </span>
42
+ </el-dropdown-menu>
43
+ </template>
44
+ </el-dropdown>
45
+ <!--图表页面按钮区不显示统计和重置;列表页面时不显示查询按钮;-->
46
+ <my-button
47
+ v-else-if="
48
+ !position ||
49
+ (position === 'list' && button.code !== 'search') ||
50
+ (position === 'chart' &&
51
+ button.code !== 'reset' &&
52
+ button.code !== 'statistics') ||
53
+ (position !== 'chart' && position !== 'list')
54
+ "
55
+ :search-form-info="searchFormInfo"
56
+ :button="button"
57
+ :permission-prefix="permissionPrefix"
58
+ :workflow-button-component="workflowButtonComponent"
59
+ :position="position"
60
+ :is-task-input="isTaskInput"
61
+ :table-name="tableName"
62
+ :page-code="pageCode"
63
+ :work-name-color="workNameColor"
64
+ :button-groups="
65
+ button.code === 'workflowButton' ? buttonGroups : []
66
+ "
67
+ :get-form-data="getFormData"
68
+ :selections="selections"
69
+ :form-data-fun="formDataFun"
70
+ :get-system-ref="getSystemRef"
71
+ :form-button-position="formButtonPosition"
72
+ :disabled="disabled"
73
+ @refresh="refreshEmit"
74
+ @click="commonButtonClick"
75
+ @workflowClick="workflowButtonClick"
76
+ @prohibi-edit="fnProhibitToEdit"
77
+ @refreshFrom="refreshFrom"
78
+ />
79
+ </template>
80
+ </span>
81
+ <list-toolbar-page
82
+ v-if="listToolbarList"
83
+ :list-toolbar-list="listToolbarList"
84
+ :page-code="pageCode"
85
+ class="list_toolbar_page_style"
86
+ @searchGridData="searchGridData"
87
+ />
88
+ <page-custom-component
89
+ v-if="buttonAreaCustomComponentArr"
90
+ :button-area-custom-component-arr="buttonAreaCustomComponentArr"
91
+ :page-code="pageCode"
92
+ @getSystemRef="getSystemRef"
93
+ />
94
+ </div>
95
+ </div>
96
+ </template>
97
+
98
+ <script>
99
+ import { $on, $off, $once, $emit } from '../../utils/gogocodeTransfer'
100
+ import Util from './util/util'
101
+ import MyButton from './my-button'
102
+ import listToolbarPage from './list-toolbar-page'
103
+ import pageCustomComponent from './page-custom-component'
104
+ import { mapGetters } from 'vuex'
105
+ export default {
106
+ name: 'ButtonGroup',
107
+ components: {
108
+ MyButton,
109
+ listToolbarPage,
110
+ pageCustomComponent,
111
+ },
112
+ props: {
113
+ // 元素设置
114
+ buttonGroups: {
115
+ type: Array,
116
+ default: null,
117
+ },
118
+ // 按钮的资源编码前缀,例如:系统编码.页面编码.列表组件编码 或 系统编码.页面编码.表单组件编码
119
+ permissionPrefix: {
120
+ type: String,
121
+ default: null,
122
+ },
123
+ // 流程按钮组需要的信息
124
+ workflowButtonComponent: {
125
+ type: Object,
126
+ default: null,
127
+ },
128
+ // 按钮组所在位置,list列表或form表单内或chart
129
+ position: {
130
+ type: String,
131
+ default: null,
132
+ },
133
+ // 是否在任务办理页面(待办事宜中打开的),控制返回、关闭按钮
134
+ isTaskInput: {
135
+ type: Boolean,
136
+ default: false,
137
+ },
138
+ // 数据表名称
139
+ tableName: {
140
+ type: String,
141
+ default: null,
142
+ },
143
+ // 列表工具栏
144
+ listToolbarList: {
145
+ type: Array,
146
+ default: null,
147
+ },
148
+ // 按钮区自定义组件
149
+ buttonAreaCustomComponentArr: {
150
+ type: Array,
151
+ default: null,
152
+ },
153
+ // 页面编码
154
+ pageCode: {
155
+ type: String,
156
+ default: null,
157
+ },
158
+ // 保存页面数据的方法
159
+ getFormData: {
160
+ type: Function,
161
+ default: function () {},
162
+ },
163
+ // 列表选中的记录集合
164
+ selections: {
165
+ type: Array,
166
+ default: null,
167
+ },
168
+ // 表单对象方法
169
+ formDataFun: {
170
+ type: Function,
171
+ default: function () {},
172
+ },
173
+ searchFormInfo: {
174
+ type: Object,
175
+ default: () => {
176
+ return { data: {} }
177
+ },
178
+ },
179
+ formButtonPosition: {
180
+ type: String,
181
+ default: null,
182
+ },
183
+ // 是否是图表页面按钮
184
+ isChartView: {
185
+ type: Boolean,
186
+ default: false,
187
+ },
188
+ disabled: {
189
+ type: Boolean,
190
+ default: false,
191
+ },
192
+ // 工具栏是否靠右显示
193
+ toolbarRightShow: {
194
+ type: Boolean,
195
+ },
196
+ workNameColor: {
197
+ type: String,
198
+ },
199
+ },
200
+ data() {
201
+ return {
202
+ myButtonGroups: null,
203
+ }
204
+ },
205
+ computed: {
206
+ ...mapGetters(['preventReclick']),
207
+ },
208
+ created() {
209
+ if (this.position === 'workflowForm') {
210
+ for (let i = 0; i < this.buttonGroups.length; i++) {
211
+ const button = this.buttonGroups[i]
212
+ if (button.code === 'workflowButton') {
213
+ this.myButtonGroups = []
214
+ this.myButtonGroups[0] = button
215
+ break
216
+ }
217
+ }
218
+ } else {
219
+ if (this.buttonGroups && this.buttonGroups.length > 0) {
220
+ this.myButtonGroups = []
221
+ const groupButtonMap = {}
222
+ this.buttonGroups.forEach((button) => {
223
+ if (!button.groupName || button.groupName === '') {
224
+ // 未分组
225
+ this.myButtonGroups.push(button)
226
+ } else {
227
+ // 已分组
228
+ const groupNmae = button.groupName
229
+ if (groupButtonMap[groupNmae]) {
230
+ const groupButtons = groupButtonMap[groupNmae]
231
+ groupButtons.push(button)
232
+ } else {
233
+ const groupButtons = []
234
+ groupButtons.push(button)
235
+ groupButtonMap[groupNmae] = groupButtons
236
+ }
237
+ }
238
+ })
239
+ for (let key in groupButtonMap) {
240
+ const buttonGroup = {}
241
+ buttonGroup.isGroup = true
242
+ buttonGroup.label = key
243
+ buttonGroup.buttons = groupButtonMap[key]
244
+ this.myButtonGroups.push(buttonGroup)
245
+ }
246
+ }
247
+ }
248
+ },
249
+ methods: {
250
+ ...Util,
251
+ searchGridData(data, dataTypes, dataTypeObj, currentControlType) {
252
+ $emit(
253
+ this,
254
+ 'searchGridData',
255
+ data,
256
+ dataTypes,
257
+ dataTypeObj,
258
+ currentControlType
259
+ )
260
+ },
261
+ getSystemRef(refKey, operation) {
262
+ $emit(this, 'getSystemRef', refKey, operation)
263
+ },
264
+ handleCommand(buttonCode) {
265
+ if (buttonCode && buttonCode !== '') {
266
+ let index = this.buttonGroups.findIndex(function (item) {
267
+ return buttonCode === item.code
268
+ })
269
+ if (index != null && index !== undefined && index !== -1) {
270
+ this.commonButtonClick(this.buttonGroups[index])
271
+ }
272
+ }
273
+ },
274
+ fnProhibitToEdit(data) {
275
+ $emit(this, 'prohibi-edit', data)
276
+ },
277
+ getFormButtonPosition() {
278
+ if (this.position === 'chart') {
279
+ return 'operation-area-chart'
280
+ }
281
+ if (this.position === 'list' && this.toolbarRightShow) {
282
+ return 'operation-area toolbar_flex'
283
+ }
284
+ if (this.position === 'list') {
285
+ return 'operation-area'
286
+ }
287
+ return this.formButtonPosition === 'topLeft'
288
+ ? 'form-top-button'
289
+ : 'form-bottom-button'
290
+ },
291
+ },
292
+ emits: ['searchGridData', 'getSystemRef', 'prohibi-edit'],
293
+ }
294
+ </script>