@epxing/designer 5.3.0-beta.2 → 5.3.0-beta.3

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 (33) hide show
  1. package/API.md +1 -1
  2. package/README.md +46 -46
  3. package/dist/src/page-designer/PageDesigner.js +11 -0
  4. package/dist/src/page-designer/designer.js +21 -0
  5. package/dist/src/page-designer/previews/add-form/Preview.js +1 -1
  6. package/dist/src/page-designer/previews/add-form/Preview.vue.js +19 -8
  7. package/dist/src/page-designer/setting-panel/Setting.js +46 -10
  8. package/dist/src/visual/config-page/ComponentLibraryDialog.js +8 -2
  9. package/dist/src/visual/config-page/DashboardMobile.js +1 -1
  10. package/dist/style.css +116 -112
  11. package/package.json +8 -8
  12. package/src/index.js +27 -27
  13. package/src/page-designer/PageDesigner.vue +11 -0
  14. package/src/page-designer/designer.js +1322 -1299
  15. package/src/page-designer/previews/add-form/Preview.vue +43 -44
  16. package/src/page-designer/setting-panel/Setting.vue +24 -2
  17. package/src/page-designer/widget-preview/Mixin.js +285 -285
  18. package/src/page-designer/widget-preview/Preview.vue +322 -322
  19. package/src/page-designer/widget-preview/WidgetWrapper.vue +197 -197
  20. package/src/page-designer/widget-preview/directive.js +258 -258
  21. package/src/visual/CategoryList.vue +563 -563
  22. package/src/visual/ComponentList.vue +280 -280
  23. package/src/visual/CreatePage.vue +389 -389
  24. package/src/visual/EntityCardList.vue +449 -449
  25. package/src/visual/EntityList.vue +838 -838
  26. package/src/visual/config-page/ComponentLibraryDialog.vue +7 -1
  27. package/src/visual/config-page/DashboardMobile.vue +934 -934
  28. package/src/visual/widgets/ProcessFormItemVisual.vue +58 -58
  29. package/types/index.d.ts +22 -22
  30. package/types/page-designer.d.ts +3 -3
  31. package/types/visual-component.d.ts +1 -1
  32. package/types/visual-entity-list.d.ts +1 -1
  33. package/types/visual-entity-sub-list.d.ts +1 -1
@@ -1,449 +1,449 @@
1
- <script>
2
- import ComponentVue from './Component.vue'
3
- export default {
4
- name: 'epx-visual-entity-card-list',
5
- extends: ComponentVue,
6
- data () {
7
- return {
8
- FunctionOption: [],
9
- operateConfigs: {}
10
- }
11
- },
12
- watch: {
13
- allConfigs: {
14
- handler (v) {
15
- this.componentMetaId = v.metaId
16
- },
17
- immediate: true
18
- }
19
- },
20
- methods: {
21
- getOperateOptions () {
22
- this.handlerList = [
23
- { label: '打开指定页面', value: 'goPage' },
24
- { label: '查看详情页面', value: 'viewEntity' },
25
- { label: '发起通用请求', value: 'commonAction' },
26
- { label: '发起业务规则', value: 'commonRuleAction' },
27
- { label: '打开审批页面', value: 'goCheckPage' },
28
- { label: '批量编辑', value: 'editMultiEntity' },
29
- { label: '发起流程', value: 'applyEntity' },
30
- { label: '执行流程审批', value: 'checkEntity' },
31
- { label: '批量审核', value: 'batchCheck' },
32
- { label: '报表打印', value: 'print' },
33
- { label: '返回', value: 'backPage' },
34
- { label: '自定义JS', value: 'customJs' }
35
- ]
36
- this.operateConfigs = [
37
- {
38
- key: 'base',
39
- title: '基本',
40
- options: ['text', 'ui', 'type', 'icon', 'preview']
41
- },
42
- {
43
- key: 'event',
44
- title: '事件',
45
- options: ['beforeTrigger', 'handler', 'metaId', 'action', 'rule', 'openMode', 'page', 'pageType', 'menuId', 'printWay', 'printCode', 'cptName', 'destActivityId', 'processNode', 'function', 'params', 'afterTrigger', 'afterTriggerPage', 'afterTriggerPageOpenMode', 'afterTriggerParams']
46
-
47
- },
48
- {
49
- key: 'advance',
50
- title: '高级',
51
- options: ['showCondition', 'num', 'confirm', 'confirmMsg', 'successMsg', 'failMsg', 'mask']
52
- }
53
- ]
54
- },
55
- initDefaultConfigs () {
56
- const { addPage = 'entity-add-page', editPage = 'entity-edit-page', openMode = '3', addPageFlag = 'v_add' } = this.allConfigs
57
- let keywords = []
58
- const { label, keyNames = [] } = this.currentMeta
59
- let metaKey = 'ID'
60
- if (this.currentMeta) {
61
- metaKey = this.currentMeta.getKey()
62
- keywords = [...keyNames]
63
- if (label) {
64
- keywords.push(label)
65
- }
66
- }
67
- // 获取到该组件的默认配置
68
- this.commonOperates = [
69
- {
70
- text: '新增',
71
- handler: 'addEntity',
72
- ui: 'primary',
73
- pageFlag: addPageFlag,
74
- num: 0,
75
- component: addPage,
76
- pageType: 'ADD',
77
- openMode
78
- }, {
79
- text: '编辑',
80
- handler: 'editEntity',
81
- pageFlag: addPageFlag,
82
- ui: 'primary',
83
- num: 1,
84
- component: addPage,
85
- pageType: 'EDIT',
86
- openMode
87
- }, {
88
- text: '详情',
89
- handler: 'viewEntity',
90
- pageFlag: addPageFlag,
91
- num: 1,
92
- component: addPage,
93
- pageType: 'DETAIL',
94
- openMode
95
- },
96
- {
97
- text: '删除',
98
- handler: 'commonAction',
99
- action: 'removeMulti',
100
- num: 'n',
101
- confirmMsg: this.$t('Confirm the deletion') + '?',
102
- successMsg: '删除成功',
103
- failMsg: '删除失败',
104
- params: {
105
- ids: `#[${metaKey}]`
106
- }
107
- },
108
- {
109
- text: '导入',
110
- handler: 'goPage',
111
- pageFlag: 'v_import',
112
- component: 'import-page'
113
- },
114
- {
115
- text: '导出',
116
- handler: 'goPage',
117
- pageFlag: 'v_export',
118
- component: 'export-page',
119
- params: {
120
- selects: `#[${metaKey}]`,
121
- total: '$[total]',
122
- params: '$[params]',
123
- scopeParams: '$[scopeParams]',
124
- fields: '$[listFields]'
125
- }
126
- },
127
- {
128
- text: '打印',
129
- handler: 'print'
130
- },
131
- {
132
- text: '批量编辑',
133
- handler: 'editMultiEntity'
134
- },
135
- {
136
- text: '打开审核页面',
137
- handler: 'goCheckPage'
138
- },
139
- {
140
- text: '流程审批',
141
- handler: 'checkEntity'
142
- },
143
- {
144
- text: '批量审核',
145
- handler: 'batchCheck',
146
- num: 'n'
147
- },
148
- {
149
- text: '发起申请',
150
- handler: 'applyEntity'
151
- },
152
- {
153
- text: '返回',
154
- handler: 'backPage'
155
- },
156
- {
157
- text: '自定义按钮'
158
- }
159
- ]
160
- this.defaultConfigs = {
161
- flex: false,
162
- componentName: this.componentInfo.title,
163
- addPageFlag: 'v_add',
164
- editPageFlag: 'v_add',
165
- detailPageFlag: 'v_add',
166
- detailFlag: true,
167
- componentType: '',
168
- metaId: this.pageMetaId,
169
- action: 'list',
170
- searchFlag: true,
171
- searchMode: 'keyword',
172
- showSearchLabel: false,
173
- border: false,
174
- keywords,
175
- searchFields: [],
176
- listFields: this.currentMeta.getAllFields(),
177
- pageFlag: true,
178
- pageSize: 20,
179
- operateFlag: true,
180
- operateEllipsis: 2,
181
- multiSelectColumnFlag: false, // 是否显示多选框列
182
- serialColumnFlag: true, // 是否显示序号列
183
- operateColumnFlag: true, // 是否显示操作列
184
- totalFlag: true,
185
- operateColumnWidth: 100,
186
- operateColumnEllipsis: 2,
187
- operateColumnPosition: 'start',
188
- span: 24,
189
- operates: [
190
- {
191
- text: '新增',
192
- handler: 'addEntity',
193
- ui: 'primary',
194
- num: 0,
195
- openMode,
196
- component: addPage,
197
- params: {}
198
- },
199
- {
200
- text: '删除',
201
- handler: 'commonAction',
202
- action: 'removeMulti',
203
- num: 'n',
204
- confirmMsg: this.$t('Confirm the deletion') + '?',
205
- successMsg: '删除成功',
206
- params: {
207
- ids: `#[${metaKey}]`
208
- }
209
- },
210
- {
211
- text: '导入',
212
- handler: 'goPage',
213
- component: 'import-page',
214
- params: {}
215
- },
216
- {
217
- text: '导出',
218
- handler: 'goPage',
219
- component: 'export-page',
220
- params: {
221
- selects: `#[${metaKey}]`,
222
- total: '$[total]',
223
- params: '$[params]',
224
- fields: '$[listFields]',
225
- scopeParams: '$[scopeParams]'
226
- }
227
- }
228
- ],
229
- columnOperates: [
230
- {
231
- text: '编辑',
232
- handler: 'editEntity',
233
- num: 1,
234
- openMode,
235
- component: editPage,
236
- pageType: 'EDIT'
237
- }
238
- // {
239
- // text: '删除',
240
- // handler: 'commonAction',
241
- // action: 'removeMulti',
242
- // num: 'n',
243
- // confirmMsg: this.$t('Confirm the deletion') + '?',
244
- // successMsg: '删除成功',
245
- // params: {
246
- // ids: `#[${this.$metaKey}]`
247
- // }
248
- // }
249
- ]
250
- }
251
- },
252
- initConfigOptions () {
253
- const configOptions = [
254
- {
255
- key: 'global',
256
- label: '全局设置',
257
- children: [
258
- { key: 'componentName', label: '组件名称', type: 'input' },
259
- { key: 'componentType', label: '组件状态', type: 'radio', options: [{ label: '根据页面状态', value: '' }, { label: '详情', value: 'DETAIL' }, { label: '只读', value: 'READONLY' }] },
260
- { key: 'metaId', label: '组件对象', type: 'object', object: 'FM_ENTITY', scopeParams: [{ field: 'SYSTEM', values: this.SYSTEM }] },
261
- { key: 'metaViewId', label: '对象视图', type: 'object', object: 'FM_ENTITY_VIEW' },
262
- { key: 'detailFlag', label: '点击进入详情', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] },
263
- { key: 'detailPageId', label: '详情页面', type: 'object', object: 'FM_PAGE_CONFIG', scopeParams: [{ field: 'SYSTEM', values: this.SYSTEM }] },
264
- { key: 'editable', label: '列表可编辑', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] },
265
- { key: 'action', label: '请求操作', type: 'select', options: this.actionList }
266
- ]
267
- },
268
- {
269
- key: 'list',
270
- label: '列表内容',
271
- children: [
272
- { key: 'iconFlag', label: '是否显示图标', type: 'switch' },
273
- { key: 'iconField', label: '图标字段', type: 'field', showFlag: { iconFlag: true } },
274
- { key: 'iconColor', label: '图标颜色', type: 'color', showFlag: { iconFlag: true } },
275
- { key: 'iconBgColor', label: '图标背景色', type: 'color', showFlag: { iconFlag: true } },
276
- { key: 'listFields', label: '列表字段', type: 'row' },
277
- { key: 'orderFields', label: '排序字段', type: 'order-field' },
278
- { key: 'showLabelField', label: '显示标签字段', type: 'switch' },
279
- { key: 'labelField', label: '标签字段', type: 'field', showFlag: { showLabelField: true } },
280
- { key: 'scopeParams', label: '查询范围', type: 'scope' },
281
- { key: 'pageFlag', label: '是否分页', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
282
- { key: 'pageSize', label: '每页记录数', type: 'select', options: [{ label: '5', value: 5 }, { label: '10', value: 10 }, { label: '15', value: 15 }, { label: '20', value: 20 }, { label: '30', value: 30 }, { label: '50', value: 50 }, { label: '100', value: 100 }, { label: '200', value: 200 }] },
283
- { key: 'limit', label: '显示数量', type: 'num' },
284
- { key: 'serialColumnFlag', label: '是否需要序号', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
285
- { key: 'multiSelectColumnFlag', label: '是否需要选择框', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
286
- { key: 'totalFlag', label: '是否显示总数量', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] }
287
- ]
288
- },
289
- {
290
- key: 'style',
291
- label: '展示样式',
292
- children: [
293
- { key: 'cardDirection', label: '排列方式', type: 'radio', options: [{ label: '水平', value: 'horizontal' }, { label: '垂直', value: 'vertical' }], defaultValue: 'vertical' },
294
- { key: 'column', label: '列数', type: 'num', defaultValue: 3 },
295
- { key: 'border', label: '显示边框', type: 'switch', defaultValue: false },
296
- { key: 'backgroundColor', label: '背景色', type: 'color', defaultValue: '#fff' }
297
- ]
298
- },
299
- {
300
- key: 'search',
301
- label: '查询区域',
302
- children: [
303
- { key: 'searchFlag', label: '是否显示查询', type: 'radio', options: [{ label: '显示', value: true }, { label: '不显示', value: false }] },
304
- { key: 'searchMode', label: '查询方式', type: 'radio', options: [{ label: '字段组合', value: 'field' }, { label: '筛选项', value: 'filter' }, { label: '关键词', value: 'keyword' }] },
305
- { key: 'keywords', label: '关键词字段', type: 'field' },
306
- { key: 'searchFields', label: '查询字段', type: 'field', showFlag: { searchMode: ['field', 'filter'] } },
307
- { key: 'filterFields', label: '筛选字段', type: 'field' },
308
- { key: 'showSearchLabel', label: '展示字段名', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], showFlag: { searchMode: 'field' } }
309
- ]
310
- },
311
- {
312
- key: 'operate',
313
- label: '操作按钮',
314
- children: [
315
- { key: 'operateFlag', label: '是否需要按钮', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
316
- { key: 'operates', label: '操作按钮', type: 'operates' },
317
- { key: 'operateEllipsis', label: '按钮显示数量', type: 'num' },
318
- { key: 'operateColumnFlag', label: '是否需要操作列', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
319
- { key: 'operateColumnShowType', label: '操作列显示方式', type: 'radio', options: [{ label: '一直显示', value: 'always' }, { label: '鼠标移上', value: 'hover' }], defaultValue: 'always' },
320
- { key: 'columnOperates', label: '操作列', type: 'operates' },
321
- { key: 'columnOperateType', label: '操作列按钮类型', type: 'radio', options: [{ label: '文字按钮', value: 'text' }, { label: '实体按钮', value: 'button' }], defaultValue: 'text', showFlag: { operateColumnFlag: true } },
322
- { key: 'operateColumnWidth', label: '操作列宽度', type: 'num' },
323
- { key: 'operateColumnEllipsis', label: '操作列显示数量', type: 'num' },
324
- { key: 'operateColumnPosition', label: '操作列位置', type: 'radio', options: [{ label: '开始', value: 'start' }, { label: '结束', value: 'end' }] }
325
- ]
326
- },
327
- {
328
- key: 'advance',
329
- label: '高级设置',
330
- children: [
331
- { key: 'componentEvents', label: '组件事件', type: 'event' },
332
- { key: 'span', label: '宽度', type: 'select', options: this.spanOptions },
333
- { key: 'xsspan', label: '移动端宽度', type: 'select', options: this.spanOptions },
334
- { key: 'height', label: '高度' },
335
- { key: 'flex', label: '占据页面剩余空间', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] }
336
- ]
337
- }
338
- ]
339
- this.configOptions = configOptions
340
- },
341
- initConfig () {
342
- const config = this.$_.cloneDeep(this.compConfig)
343
- if (this.componentInfo.span) {
344
- config.span = this.componentInfo.span
345
- }
346
- this.config = config
347
- },
348
- getFieldOptions () {
349
- this.getFunctionOption()
350
- this.fieldOptions = [
351
- { key: 'attriName', label: '字段', readonly: true },
352
- { key: 'configWay', label: '配置方式', type: 'radio', options: [{ label: '默认配置', value: 'default' }, { label: '自定义', value: 'custom' }], defaultValue: 'default' },
353
- { key: 'attriLabel', label: '名称', type: 'text' },
354
- { key: 'placeholder', label: '输入框提示', type: 'text' },
355
- { key: 'showLabel', label: '显示标题', type: 'radio', options: [{ label: '显示', value: true }, { label: '不显示', value: false }], defaultValue: false },
356
- { key: 'split', label: '分隔符', type: 'radio', options: [{ label: '竖号', value: ' | ' }, { label: '斜杠', value: ' / ' }, { label: '空格', value: ' ' }], defaultValue: ' | ' },
357
- { key: 'state', label: '字段状态', type: 'radio', options: [{ label: '显示', value: 'DETAIL' }, { label: '隐藏', value: 'HIDDEN' }], defaultValue: 'DETAIL' },
358
- {
359
- key: 'detailPageId',
360
- label: '字段详情页面',
361
- type: 'object',
362
- object: 'FM_PAGE_CONFIG',
363
- scopeParams: [{ field: 'SYSTEM', values: this.SYSTEM }],
364
- showFlag: {
365
- dataType: ['object', 'multiobject']
366
- }
367
- },
368
- { key: 'width', label: '宽度', type: 'text', defaultValue: '120' },
369
- { key: 'isLabel', label: '外部标签', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
370
- { key: 'function', label: '函数', type: 'function' },
371
- { key: 'locked', label: '是否锁定', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
372
- { key: 'color', label: '字体颜色', type: 'color', defaultValue: '#333' },
373
- { key: 'fontWeight', label: this.$t('whether the bold'), type: 'radio', options: [{ label: this.$t('yes'), value: 'bold' }, { label: this.$t('no'), value: 'normal' }] },
374
- { key: 'fontSize', label: this.$t('font size'), type: 'num', defaultValue: 14 },
375
- {
376
- key: 'showWay',
377
- label: '展示方式',
378
- type: 'radio',
379
- options: [{ label: '字段值', value: 'value' }, { label: '统计值', value: 'statistics' }],
380
- defaultValue: 'value',
381
- showFlag: {
382
- type: 'meta'
383
- }
384
- },
385
- {
386
- key: 'fields',
387
- label: '展示字段',
388
- type: 'field',
389
- showFlag: {
390
- type: 'meta'
391
- }
392
- },
393
- {
394
- key: 'separator',
395
- label: '字段分隔符',
396
- type: 'radio',
397
- options: [{ label: '、', value: '、' }, { label: '/', value: '/' }],
398
- defaultValue: '、',
399
- showFlag: {
400
- type: 'meta'
401
- }
402
- },
403
- {
404
- key: 'showFieldName',
405
- label: '是否展示字段名',
406
- type: 'radio',
407
- options: [{ label: '是', value: '1' }, { label: '否', value: '0' }],
408
- defaultValue: '0',
409
- showFlag: {
410
- type: 'meta'
411
- }
412
- },
413
- {
414
- key: 'orderFields',
415
- label: '排序字段',
416
- type: 'order-field',
417
- showFlag: {
418
- type: 'meta'
419
- }
420
- },
421
- {
422
- key: 'scopeParams',
423
- label: '查询范围',
424
- type: 'scope',
425
- showFlag: {
426
- type: 'meta'
427
- }
428
- },
429
- {
430
- key: 'orderFields',
431
- label: '排序字段',
432
- type: 'child-order-field',
433
- showFlag: {
434
- relationSort: '1'
435
- }
436
- },
437
- {
438
- key: 'scopeParams',
439
- label: '查询范围',
440
- type: 'child-scope',
441
- showFlag: {
442
- relationSort: '1'
443
- }
444
- }
445
- ]
446
- }
447
- }
448
- }
449
- </script>
1
+ <script>
2
+ import ComponentVue from './Component.vue'
3
+ export default {
4
+ name: 'epx-visual-entity-card-list',
5
+ extends: ComponentVue,
6
+ data () {
7
+ return {
8
+ FunctionOption: [],
9
+ operateConfigs: {}
10
+ }
11
+ },
12
+ watch: {
13
+ allConfigs: {
14
+ handler (v) {
15
+ this.componentMetaId = v.metaId
16
+ },
17
+ immediate: true
18
+ }
19
+ },
20
+ methods: {
21
+ getOperateOptions () {
22
+ this.handlerList = [
23
+ { label: '打开指定页面', value: 'goPage' },
24
+ { label: '查看详情页面', value: 'viewEntity' },
25
+ { label: '发起通用请求', value: 'commonAction' },
26
+ { label: '发起业务规则', value: 'commonRuleAction' },
27
+ { label: '打开审批页面', value: 'goCheckPage' },
28
+ { label: '批量编辑', value: 'editMultiEntity' },
29
+ { label: '发起流程', value: 'applyEntity' },
30
+ { label: '执行流程审批', value: 'checkEntity' },
31
+ { label: '批量审核', value: 'batchCheck' },
32
+ { label: '报表打印', value: 'print' },
33
+ { label: '返回', value: 'backPage' },
34
+ { label: '自定义JS', value: 'customJs' }
35
+ ]
36
+ this.operateConfigs = [
37
+ {
38
+ key: 'base',
39
+ title: '基本',
40
+ options: ['text', 'ui', 'type', 'icon', 'preview']
41
+ },
42
+ {
43
+ key: 'event',
44
+ title: '事件',
45
+ options: ['beforeTrigger', 'handler', 'metaId', 'action', 'rule', 'openMode', 'page', 'pageType', 'menuId', 'printWay', 'printCode', 'cptName', 'destActivityId', 'processNode', 'function', 'params', 'afterTrigger', 'afterTriggerPage', 'afterTriggerPageOpenMode', 'afterTriggerParams']
46
+
47
+ },
48
+ {
49
+ key: 'advance',
50
+ title: '高级',
51
+ options: ['showCondition', 'num', 'confirm', 'confirmMsg', 'successMsg', 'failMsg', 'mask']
52
+ }
53
+ ]
54
+ },
55
+ initDefaultConfigs () {
56
+ const { addPage = 'entity-add-page', editPage = 'entity-edit-page', openMode = '3', addPageFlag = 'v_add' } = this.allConfigs
57
+ let keywords = []
58
+ const { label, keyNames = [] } = this.currentMeta
59
+ let metaKey = 'ID'
60
+ if (this.currentMeta) {
61
+ metaKey = this.currentMeta.getKey()
62
+ keywords = [...keyNames]
63
+ if (label) {
64
+ keywords.push(label)
65
+ }
66
+ }
67
+ // 获取到该组件的默认配置
68
+ this.commonOperates = [
69
+ {
70
+ text: '新增',
71
+ handler: 'addEntity',
72
+ ui: 'primary',
73
+ pageFlag: addPageFlag,
74
+ num: 0,
75
+ component: addPage,
76
+ pageType: 'ADD',
77
+ openMode
78
+ }, {
79
+ text: '编辑',
80
+ handler: 'editEntity',
81
+ pageFlag: addPageFlag,
82
+ ui: 'primary',
83
+ num: 1,
84
+ component: addPage,
85
+ pageType: 'EDIT',
86
+ openMode
87
+ }, {
88
+ text: '详情',
89
+ handler: 'viewEntity',
90
+ pageFlag: addPageFlag,
91
+ num: 1,
92
+ component: addPage,
93
+ pageType: 'DETAIL',
94
+ openMode
95
+ },
96
+ {
97
+ text: '删除',
98
+ handler: 'commonAction',
99
+ action: 'removeMulti',
100
+ num: 'n',
101
+ confirmMsg: this.$t('Confirm the deletion') + '?',
102
+ successMsg: '删除成功',
103
+ failMsg: '删除失败',
104
+ params: {
105
+ ids: `#[${metaKey}]`
106
+ }
107
+ },
108
+ {
109
+ text: '导入',
110
+ handler: 'goPage',
111
+ pageFlag: 'v_import',
112
+ component: 'import-page'
113
+ },
114
+ {
115
+ text: '导出',
116
+ handler: 'goPage',
117
+ pageFlag: 'v_export',
118
+ component: 'export-page',
119
+ params: {
120
+ selects: `#[${metaKey}]`,
121
+ total: '$[total]',
122
+ params: '$[params]',
123
+ scopeParams: '$[scopeParams]',
124
+ fields: '$[listFields]'
125
+ }
126
+ },
127
+ {
128
+ text: '打印',
129
+ handler: 'print'
130
+ },
131
+ {
132
+ text: '批量编辑',
133
+ handler: 'editMultiEntity'
134
+ },
135
+ {
136
+ text: '打开审核页面',
137
+ handler: 'goCheckPage'
138
+ },
139
+ {
140
+ text: '流程审批',
141
+ handler: 'checkEntity'
142
+ },
143
+ {
144
+ text: '批量审核',
145
+ handler: 'batchCheck',
146
+ num: 'n'
147
+ },
148
+ {
149
+ text: '发起申请',
150
+ handler: 'applyEntity'
151
+ },
152
+ {
153
+ text: '返回',
154
+ handler: 'backPage'
155
+ },
156
+ {
157
+ text: '自定义按钮'
158
+ }
159
+ ]
160
+ this.defaultConfigs = {
161
+ flex: false,
162
+ componentName: this.componentInfo.title,
163
+ addPageFlag: 'v_add',
164
+ editPageFlag: 'v_add',
165
+ detailPageFlag: 'v_add',
166
+ detailFlag: true,
167
+ componentType: '',
168
+ metaId: this.pageMetaId,
169
+ action: 'list',
170
+ searchFlag: true,
171
+ searchMode: 'keyword',
172
+ showSearchLabel: false,
173
+ border: false,
174
+ keywords,
175
+ searchFields: [],
176
+ listFields: this.currentMeta.getAllFields(),
177
+ pageFlag: true,
178
+ pageSize: 20,
179
+ operateFlag: true,
180
+ operateEllipsis: 2,
181
+ multiSelectColumnFlag: false, // 是否显示多选框列
182
+ serialColumnFlag: true, // 是否显示序号列
183
+ operateColumnFlag: true, // 是否显示操作列
184
+ totalFlag: true,
185
+ operateColumnWidth: 100,
186
+ operateColumnEllipsis: 2,
187
+ operateColumnPosition: 'start',
188
+ span: 24,
189
+ operates: [
190
+ {
191
+ text: '新增',
192
+ handler: 'addEntity',
193
+ ui: 'primary',
194
+ num: 0,
195
+ openMode,
196
+ component: addPage,
197
+ params: {}
198
+ },
199
+ {
200
+ text: '删除',
201
+ handler: 'commonAction',
202
+ action: 'removeMulti',
203
+ num: 'n',
204
+ confirmMsg: this.$t('Confirm the deletion') + '?',
205
+ successMsg: '删除成功',
206
+ params: {
207
+ ids: `#[${metaKey}]`
208
+ }
209
+ },
210
+ {
211
+ text: '导入',
212
+ handler: 'goPage',
213
+ component: 'import-page',
214
+ params: {}
215
+ },
216
+ {
217
+ text: '导出',
218
+ handler: 'goPage',
219
+ component: 'export-page',
220
+ params: {
221
+ selects: `#[${metaKey}]`,
222
+ total: '$[total]',
223
+ params: '$[params]',
224
+ fields: '$[listFields]',
225
+ scopeParams: '$[scopeParams]'
226
+ }
227
+ }
228
+ ],
229
+ columnOperates: [
230
+ {
231
+ text: '编辑',
232
+ handler: 'editEntity',
233
+ num: 1,
234
+ openMode,
235
+ component: editPage,
236
+ pageType: 'EDIT'
237
+ }
238
+ // {
239
+ // text: '删除',
240
+ // handler: 'commonAction',
241
+ // action: 'removeMulti',
242
+ // num: 'n',
243
+ // confirmMsg: this.$t('Confirm the deletion') + '?',
244
+ // successMsg: '删除成功',
245
+ // params: {
246
+ // ids: `#[${this.$metaKey}]`
247
+ // }
248
+ // }
249
+ ]
250
+ }
251
+ },
252
+ initConfigOptions () {
253
+ const configOptions = [
254
+ {
255
+ key: 'global',
256
+ label: '全局设置',
257
+ children: [
258
+ { key: 'componentName', label: '组件名称', type: 'input' },
259
+ { key: 'componentType', label: '组件状态', type: 'radio', options: [{ label: '根据页面状态', value: '' }, { label: '详情', value: 'DETAIL' }, { label: '只读', value: 'READONLY' }] },
260
+ { key: 'metaId', label: '组件对象', type: 'object', object: 'FM_ENTITY', scopeParams: [{ field: 'SYSTEM', values: this.SYSTEM }] },
261
+ { key: 'metaViewId', label: '对象视图', type: 'object', object: 'FM_ENTITY_VIEW' },
262
+ { key: 'detailFlag', label: '点击进入详情', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] },
263
+ { key: 'detailPageId', label: '详情页面', type: 'object', object: 'FM_PAGE_CONFIG', scopeParams: [{ field: 'SYSTEM', values: this.SYSTEM }] },
264
+ { key: 'editable', label: '列表可编辑', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] },
265
+ { key: 'action', label: '请求操作', type: 'select', options: this.actionList }
266
+ ]
267
+ },
268
+ {
269
+ key: 'list',
270
+ label: '列表内容',
271
+ children: [
272
+ { key: 'iconFlag', label: '是否显示图标', type: 'switch' },
273
+ { key: 'iconField', label: '图标字段', type: 'field', showFlag: { iconFlag: true } },
274
+ { key: 'iconColor', label: '图标颜色', type: 'color', showFlag: { iconFlag: true } },
275
+ { key: 'iconBgColor', label: '图标背景色', type: 'color', showFlag: { iconFlag: true } },
276
+ { key: 'listFields', label: '列表字段', type: 'row' },
277
+ { key: 'orderFields', label: '排序字段', type: 'order-field' },
278
+ { key: 'showLabelField', label: '显示标签字段', type: 'switch' },
279
+ { key: 'labelField', label: '标签字段', type: 'field', showFlag: { showLabelField: true } },
280
+ { key: 'scopeParams', label: '查询范围', type: 'scope' },
281
+ { key: 'pageFlag', label: '是否分页', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
282
+ { key: 'pageSize', label: '每页记录数', type: 'select', options: [{ label: '5', value: 5 }, { label: '10', value: 10 }, { label: '15', value: 15 }, { label: '20', value: 20 }, { label: '30', value: 30 }, { label: '50', value: 50 }, { label: '100', value: 100 }, { label: '200', value: 200 }] },
283
+ { key: 'limit', label: '显示数量', type: 'num' },
284
+ { key: 'serialColumnFlag', label: '是否需要序号', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
285
+ { key: 'multiSelectColumnFlag', label: '是否需要选择框', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
286
+ { key: 'totalFlag', label: '是否显示总数量', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] }
287
+ ]
288
+ },
289
+ {
290
+ key: 'style',
291
+ label: '展示样式',
292
+ children: [
293
+ { key: 'cardDirection', label: '排列方式', type: 'radio', options: [{ label: '水平', value: 'horizontal' }, { label: '垂直', value: 'vertical' }], defaultValue: 'vertical' },
294
+ { key: 'column', label: '列数', type: 'num', defaultValue: 3 },
295
+ { key: 'border', label: '显示边框', type: 'switch', defaultValue: false },
296
+ { key: 'backgroundColor', label: '背景色', type: 'color', defaultValue: '#fff' }
297
+ ]
298
+ },
299
+ {
300
+ key: 'search',
301
+ label: '查询区域',
302
+ children: [
303
+ { key: 'searchFlag', label: '是否显示查询', type: 'radio', options: [{ label: '显示', value: true }, { label: '不显示', value: false }] },
304
+ { key: 'searchMode', label: '查询方式', type: 'radio', options: [{ label: '字段组合', value: 'field' }, { label: '筛选项', value: 'filter' }, { label: '关键词', value: 'keyword' }] },
305
+ { key: 'keywords', label: '关键词字段', type: 'field' },
306
+ { key: 'searchFields', label: '查询字段', type: 'field', showFlag: { searchMode: ['field', 'filter'] } },
307
+ { key: 'filterFields', label: '筛选字段', type: 'field' },
308
+ { key: 'showSearchLabel', label: '展示字段名', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], showFlag: { searchMode: 'field' } }
309
+ ]
310
+ },
311
+ {
312
+ key: 'operate',
313
+ label: '操作按钮',
314
+ children: [
315
+ { key: 'operateFlag', label: '是否需要按钮', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
316
+ { key: 'operates', label: '操作按钮', type: 'operates' },
317
+ { key: 'operateEllipsis', label: '按钮显示数量', type: 'num' },
318
+ { key: 'operateColumnFlag', label: '是否需要操作列', type: 'radio', options: [{ label: '需要', value: true }, { label: '不需要', value: false }] },
319
+ { key: 'operateColumnShowType', label: '操作列显示方式', type: 'radio', options: [{ label: '一直显示', value: 'always' }, { label: '鼠标移上', value: 'hover' }], defaultValue: 'always' },
320
+ { key: 'columnOperates', label: '操作列', type: 'operates' },
321
+ { key: 'columnOperateType', label: '操作列按钮类型', type: 'radio', options: [{ label: '文字按钮', value: 'text' }, { label: '实体按钮', value: 'button' }], defaultValue: 'text', showFlag: { operateColumnFlag: true } },
322
+ { key: 'operateColumnWidth', label: '操作列宽度', type: 'num' },
323
+ { key: 'operateColumnEllipsis', label: '操作列显示数量', type: 'num' },
324
+ { key: 'operateColumnPosition', label: '操作列位置', type: 'radio', options: [{ label: '开始', value: 'start' }, { label: '结束', value: 'end' }] }
325
+ ]
326
+ },
327
+ {
328
+ key: 'advance',
329
+ label: '高级设置',
330
+ children: [
331
+ { key: 'componentEvents', label: '组件事件', type: 'event' },
332
+ { key: 'span', label: '宽度', type: 'select', options: this.spanOptions },
333
+ { key: 'xsspan', label: '移动端宽度', type: 'select', options: this.spanOptions },
334
+ { key: 'height', label: '高度' },
335
+ { key: 'flex', label: '占据页面剩余空间', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] }
336
+ ]
337
+ }
338
+ ]
339
+ this.configOptions = configOptions
340
+ },
341
+ initConfig () {
342
+ const config = this.$_.cloneDeep(this.compConfig)
343
+ if (this.componentInfo.span) {
344
+ config.span = this.componentInfo.span
345
+ }
346
+ this.config = config
347
+ },
348
+ getFieldOptions () {
349
+ this.getFunctionOption()
350
+ this.fieldOptions = [
351
+ { key: 'attriName', label: '字段', readonly: true },
352
+ { key: 'configWay', label: '配置方式', type: 'radio', options: [{ label: '默认配置', value: 'default' }, { label: '自定义', value: 'custom' }], defaultValue: 'default' },
353
+ { key: 'attriLabel', label: '名称', type: 'text' },
354
+ { key: 'placeholder', label: '输入框提示', type: 'text' },
355
+ { key: 'showLabel', label: '显示标题', type: 'radio', options: [{ label: '显示', value: true }, { label: '不显示', value: false }], defaultValue: false },
356
+ { key: 'split', label: '分隔符', type: 'radio', options: [{ label: '竖号', value: ' | ' }, { label: '斜杠', value: ' / ' }, { label: '空格', value: ' ' }], defaultValue: ' | ' },
357
+ { key: 'state', label: '字段状态', type: 'radio', options: [{ label: '显示', value: 'DETAIL' }, { label: '隐藏', value: 'HIDDEN' }], defaultValue: 'DETAIL' },
358
+ {
359
+ key: 'detailPageId',
360
+ label: '字段详情页面',
361
+ type: 'object',
362
+ object: 'FM_PAGE_CONFIG',
363
+ scopeParams: [{ field: 'SYSTEM', values: this.SYSTEM }],
364
+ showFlag: {
365
+ dataType: ['object', 'multiobject']
366
+ }
367
+ },
368
+ { key: 'width', label: '宽度', type: 'text', defaultValue: '120' },
369
+ { key: 'isLabel', label: '外部标签', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
370
+ { key: 'function', label: '函数', type: 'function' },
371
+ { key: 'locked', label: '是否锁定', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
372
+ { key: 'color', label: '字体颜色', type: 'color', defaultValue: '#333' },
373
+ { key: 'fontWeight', label: this.$t('whether the bold'), type: 'radio', options: [{ label: this.$t('yes'), value: 'bold' }, { label: this.$t('no'), value: 'normal' }] },
374
+ { key: 'fontSize', label: this.$t('font size'), type: 'num', defaultValue: 14 },
375
+ {
376
+ key: 'showWay',
377
+ label: '展示方式',
378
+ type: 'radio',
379
+ options: [{ label: '字段值', value: 'value' }, { label: '统计值', value: 'statistics' }],
380
+ defaultValue: 'value',
381
+ showFlag: {
382
+ type: 'meta'
383
+ }
384
+ },
385
+ {
386
+ key: 'fields',
387
+ label: '展示字段',
388
+ type: 'field',
389
+ showFlag: {
390
+ type: 'meta'
391
+ }
392
+ },
393
+ {
394
+ key: 'separator',
395
+ label: '字段分隔符',
396
+ type: 'radio',
397
+ options: [{ label: '、', value: '、' }, { label: '/', value: '/' }],
398
+ defaultValue: '、',
399
+ showFlag: {
400
+ type: 'meta'
401
+ }
402
+ },
403
+ {
404
+ key: 'showFieldName',
405
+ label: '是否展示字段名',
406
+ type: 'radio',
407
+ options: [{ label: '是', value: '1' }, { label: '否', value: '0' }],
408
+ defaultValue: '0',
409
+ showFlag: {
410
+ type: 'meta'
411
+ }
412
+ },
413
+ {
414
+ key: 'orderFields',
415
+ label: '排序字段',
416
+ type: 'order-field',
417
+ showFlag: {
418
+ type: 'meta'
419
+ }
420
+ },
421
+ {
422
+ key: 'scopeParams',
423
+ label: '查询范围',
424
+ type: 'scope',
425
+ showFlag: {
426
+ type: 'meta'
427
+ }
428
+ },
429
+ {
430
+ key: 'orderFields',
431
+ label: '排序字段',
432
+ type: 'child-order-field',
433
+ showFlag: {
434
+ relationSort: '1'
435
+ }
436
+ },
437
+ {
438
+ key: 'scopeParams',
439
+ label: '查询范围',
440
+ type: 'child-scope',
441
+ showFlag: {
442
+ relationSort: '1'
443
+ }
444
+ }
445
+ ]
446
+ }
447
+ }
448
+ }
449
+ </script>