@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,389 +1,389 @@
1
- <script>
2
- import ComponentVue from './Component.vue'
3
- export default {
4
- name: 'epx-visual-create-page',
5
- extends: ComponentVue,
6
- data () {
7
- return {
8
- FunctionOption: []
9
- }
10
- },
11
- watch: {
12
- allConfigs: {
13
- handler (v) {
14
- this.componentMetaId = v.metaId
15
- },
16
- immediate: true
17
- }
18
- },
19
- methods: {
20
- getOperateOptions () {
21
- this.handlerList = [
22
- { label: '打开指定页面', value: 'goPage' },
23
- { label: '发起通用请求', value: 'commonAction' },
24
- { label: '打开审批页面', value: 'goCheckPage' },
25
- { label: '批量编辑', value: 'editMultiEntity' },
26
- { label: '执行流程审批', value: 'checkEntity' },
27
- { label: '报表打印', value: 'print' },
28
- { label: '返回', value: 'backPage' }
29
- ]
30
- this.operateOptions = [
31
- { key: 'text', label: '按钮名称' },
32
- {
33
- key: 'ui',
34
- label: '按钮样式',
35
- type: 'select',
36
- options: [
37
- { label: '主要按钮', value: 'primary' },
38
- { label: '成功按钮', value: 'success' },
39
- { label: '信息按钮', value: 'info' },
40
- { label: '警告按钮', value: 'warning' },
41
- { label: '危险按钮', value: 'danger' },
42
- { label: '文本按钮', value: 'text' },
43
- { label: '默认按钮', value: 'default' }
44
- ],
45
- defaultValue: 'default'
46
- },
47
- {
48
- key: 'type',
49
- label: '按钮类型',
50
- type: 'radio',
51
- options: [
52
- {
53
- label: '默认',
54
- value: 'default'
55
- },
56
- {
57
- label: '空心按钮',
58
- value: 'plain'
59
- },
60
- {
61
- label: '圆角按钮',
62
- value: 'round'
63
- },
64
- {
65
- label: '圆形按钮',
66
- value: 'circle'
67
- }
68
- ],
69
- defaultValue: 'default'
70
- },
71
- { key: 'icon', label: '按钮图标', type: 'object', object: 'FM_FONT_ICON' },
72
- { key: 'metaId', label: '请求对象', type: 'entity' },
73
- { key: 'action', label: '请求操作', type: 'select', options: this.actionList },
74
- { key: 'num', label: '选中记录', type: 'radio', options: [{ label: '不需要', value: '0' }, { label: '选择1个', value: '1' }, { label: '选择多个', value: 'n' }], defaultValue: '0' },
75
- { key: 'actionOption', label: '显示条件' },
76
- {
77
- key: 'handler',
78
- label: '处理事件',
79
- type: 'select',
80
- options: this.handlerList
81
- },
82
- {
83
- key: 'page',
84
- label: '打开页面',
85
- type: 'page',
86
- showFlag: { handler: 'goPage' }
87
- },
88
- {
89
- key: 'openMode',
90
- label: '页面打开方式',
91
- type: 'radio',
92
- options: [{ label: '直接打开', value: '3' }, { label: '标签页', value: '1' }, { label: '弹窗', value: '2' }],
93
- defaultValue: '3',
94
- showFlag: { handler: 'goPage' }
95
- },
96
- {
97
- key: 'pageType',
98
- label: '页面状态',
99
- type: 'radio',
100
- options: [{ label: '新增', value: 'ADD' }, { label: '编辑', value: 'EDIT' }, { label: '详情', value: 'DETAIL' }],
101
- defaultValue: 'ADD',
102
- showFlag: { handler: 'goPage' }
103
- },
104
- {
105
- key: 'printWay',
106
- label: '打印方式',
107
- type: 'radio',
108
- options: [{ label: '自定义报表打印', value: 'custom' }, { label: '帆软报表打印', value: 'fine' }],
109
- defaultValue: 'custom',
110
- showFlag: { handler: 'print' }
111
- },
112
- {
113
- key: 'printCode',
114
- label: '打印模板',
115
- type: 'object',
116
- object: 'FM_FORM',
117
- dataKey: 'CODE',
118
- showFlag: { handler: 'print', printWay: 'custom' }
119
- },
120
- {
121
- key: 'cptName',
122
- label: '打印模板',
123
- type: 'object',
124
- object: 'FM_REPORT_TEMPLATE',
125
- dataKey: 'CODE',
126
- showFlag: { handler: 'print', printWay: 'fine' }
127
- },
128
- {
129
- key: 'destActivityId',
130
- label: '审核流程',
131
- type: 'process',
132
- processType: 'check',
133
- showFlag: { handler: 'checkEntity' }
134
- },
135
- { key: 'confirmMsg', label: '操作确认信息' },
136
- { key: 'successMsg', label: '操作成功提示' },
137
- { key: 'failMsg', label: '操作失败提示' },
138
- { key: 'actionOptionMsg', label: '禁止操作提示' },
139
- { key: 'mask', label: '操作遮罩', type: 'radio', options: [{ label: '显示', value: true }, { label: '不显示', value: false }], defaultValue: false },
140
- { key: 'params', label: '参数传递', type: 'params' }
141
- ]
142
- },
143
- initDefaultConfigs () {
144
- const { addPage = 'entity-add-page', editPage = 'entity-edit-page', openMode = '3', addPageFlag = 'v_add' } = this.allConfigs
145
- let keywords = []
146
- const { label, keyNames = [] } = this.currentMeta
147
- let metaKey = 'ID'
148
- if (this.currentMeta) {
149
- metaKey = this.currentMeta.getKey()
150
- keywords = [...keyNames]
151
- if (label) {
152
- keywords.push(label)
153
- }
154
- }
155
- // 获取到该组件的默认配置
156
- this.commonOperates = [
157
- {
158
- text: '新增',
159
- handler: 'goPage',
160
- ui: 'primary',
161
- pageFlag: addPageFlag,
162
- num: 0,
163
- component: addPage,
164
- pageType: 'ADD',
165
- openMode
166
- }, {
167
- text: '编辑',
168
- handler: 'goPage',
169
- pageFlag: addPageFlag,
170
- num: 1,
171
- component: addPage,
172
- pageType: 'EDIT',
173
- openMode
174
- }, {
175
- text: '详情',
176
- handler: 'goPage',
177
- pageFlag: addPageFlag,
178
- num: 1,
179
- component: addPage,
180
- pageType: 'DETAIL',
181
- openMode
182
- },
183
- {
184
- text: '删除',
185
- handler: 'commonAction',
186
- action: 'removeMulti',
187
- num: 'n',
188
- confirmMsg: this.$t('Confirm the deletion') + '?',
189
- successMsg: '删除成功',
190
- failMsg: '删除失败',
191
- params: {
192
- ids: `#[${metaKey}]`
193
- }
194
- },
195
- {
196
- text: '导入',
197
- handler: 'goPage',
198
- pageFlag: 'v_import',
199
- component: 'import-page'
200
- },
201
- {
202
- text: '导出',
203
- handler: 'goPage',
204
- pageFlag: 'v_export',
205
- component: 'export-page',
206
- params: {
207
- selects: `#[${metaKey}]`,
208
- total: '$[total]',
209
- params: '$[params]',
210
- fields: '$[listFields]'
211
- }
212
- },
213
- {
214
- text: '打印',
215
- handler: 'print'
216
- },
217
- {
218
- text: '批量编辑',
219
- handler: 'editMultiEntity'
220
- },
221
- {
222
- text: '打开审核页面',
223
- handler: 'goCheckPage'
224
- },
225
- {
226
- text: '流程审批',
227
- handler: 'checkEntity'
228
- },
229
- {
230
- text: '返回',
231
- handler: 'backPage'
232
- },
233
- {
234
- text: '自定义按钮'
235
- }
236
- ]
237
- this.defaultConfigs = {
238
- flex: false,
239
- componentName: this.componentInfo.title,
240
- addPageFlag: 'v_add',
241
- editPageFlag: 'v_add',
242
- detailPageFlag: 'v_add',
243
- metaId: this.pageMetaId,
244
- searchFlag: true,
245
- searchMode: 'keyword',
246
- keywords,
247
- searchFields: [],
248
- listFields: this.currentMeta.getAllFields(),
249
- pageFlag: true,
250
- pageSize: 20,
251
- operateFlag: true,
252
- operateEllipsis: 2,
253
- multiSelectColumnFlag: true, // 是否显示多选框列
254
- serialColumnFlag: true, // 是否显示序号列
255
- operateColumnFlag: true, // 是否显示操作列
256
- totalFlag: true,
257
- operateColumnWidth: 100,
258
- operateColumnEllipsis: 2,
259
- operateColumnPosition: 'start',
260
- span: 24,
261
- operates: [
262
- {
263
- text: '新增',
264
- handler: 'goPage',
265
- ui: 'primary',
266
- num: 0,
267
- openMode,
268
- component: addPage,
269
- params: {}
270
- },
271
- // {
272
- // text: '删除',
273
- // handler: 'commonAction',
274
- // action: 'removeMulti',
275
- // num: 'n',
276
- // confirmMsg: this.$t('Confirm the deletion') + '?',
277
- // successMsg: '删除成功',
278
- // params: {
279
- // ids: `#[${metaKey}]`
280
- // }
281
- // },
282
- {
283
- text: '导入',
284
- handler: 'goPage',
285
- component: 'import-page',
286
- params: {}
287
- },
288
- {
289
- text: '导出',
290
- handler: 'goPage',
291
- component: 'export-page',
292
- params: {
293
- selects: `#[${metaKey}]`,
294
- total: '$[total]',
295
- params: '$[params]',
296
- fields: '$[listFields]'
297
- }
298
- }
299
- ],
300
- columnOperates: [
301
- {
302
- text: '编辑',
303
- handler: 'goPage',
304
- num: 1,
305
- openMode,
306
- component: editPage,
307
- pageType: 'EDIT'
308
- }
309
- // {
310
- // text: '删除',
311
- // handler: 'commonAction',
312
- // action: 'removeMulti',
313
- // num: 'n',
314
- // confirmMsg: this.$t('Confirm the deletion') + '?',
315
- // successMsg: '删除成功',
316
- // params: {
317
- // ids: `#[${this.$metaKey}]`
318
- // }
319
- // }
320
- ]
321
- }
322
- },
323
- initConfigOptions () {
324
- const configOptions = [
325
- { key: 'componentName', label: '组件名称', type: 'input' },
326
- { key: 'metaId', label: '组件对象', type: 'object', object: 'FM_ENTITY' },
327
- { key: 'keywords', label: '关键词字段', type: 'field' },
328
- { key: 'searchFields', label: '筛选字段', type: 'field' },
329
- { key: 'scopeParams', label: '查询范围', type: 'scope' },
330
- { key: 'xsspan', label: '移动端宽度', type: 'select', options: this.spanOptions },
331
- { key: 'height', label: '高度' },
332
- { key: 'flex', label: '占据页面剩余空间', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] }
333
- ]
334
- // if (this.pageGlobalConfigs.layout === 'flex') {
335
- // configOptions.splice(1, 0, { key: 'flex', label: '占据页面剩余空间', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] })
336
- // }
337
- this.configOptions = configOptions
338
- },
339
- initConfig () {
340
- const config = this.$_.cloneDeep(this.compConfig)
341
- if (this.componentInfo.span) {
342
- config.span = this.componentInfo.span
343
- }
344
- this.config = config
345
- for (const key in this.config) {
346
- if (key === 'order_field') {
347
- const orderFields = []
348
- const orderMode = this.config.order_mode || []
349
- this.config[key].forEach((item, index) => {
350
- let field = item
351
- if (typeof item === 'string') {
352
- field = { attriName: item }
353
- }
354
- orderFields.push({ ...field, sort: orderMode[index] || 'asc' })
355
- })
356
- this.config.orderFields = orderFields
357
- }
358
- }
359
- },
360
- getFieldOptions () {
361
- this.getFunctionOption()
362
- this.fieldOptions = [
363
- { key: 'attriName', label: '字段', readonly: true },
364
- { key: 'configWay', label: '配置方式', type: 'radio', options: [{ label: '默认配置', value: 'default' }, { label: '自定义', value: 'custom' }], defaultValue: 'default' },
365
- { key: 'attriLabel', label: '名称', type: 'text' },
366
- { key: 'state', label: '字段状态', type: 'radio', options: [{ label: '显示', value: 'DETAIL' }, { label: '隐藏', value: 'HIDDEN' }], defaultValue: 'DETAIL' },
367
- {
368
- key: 'detailPageId',
369
- label: '字段详情页面',
370
- type: 'object',
371
- object: 'FM_PAGE_CONFIG',
372
- showFlag: {
373
- dataType: ['object', 'multiobject']
374
- }
375
- },
376
- { key: 'width', label: '宽度', type: 'text', defaultValue: '120' },
377
- { key: 'isLabel', label: '外部标签', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
378
- { key: 'function', label: '函数', type: 'function' },
379
- { key: 'locked', label: '是否锁定', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
380
- { key: 'color', label: '字体颜色', type: 'color', defaultValue: '#333' }
381
- ]
382
- }
383
- }
384
- }
385
- </script>
386
-
387
- <style>
388
-
389
- </style>
1
+ <script>
2
+ import ComponentVue from './Component.vue'
3
+ export default {
4
+ name: 'epx-visual-create-page',
5
+ extends: ComponentVue,
6
+ data () {
7
+ return {
8
+ FunctionOption: []
9
+ }
10
+ },
11
+ watch: {
12
+ allConfigs: {
13
+ handler (v) {
14
+ this.componentMetaId = v.metaId
15
+ },
16
+ immediate: true
17
+ }
18
+ },
19
+ methods: {
20
+ getOperateOptions () {
21
+ this.handlerList = [
22
+ { label: '打开指定页面', value: 'goPage' },
23
+ { label: '发起通用请求', value: 'commonAction' },
24
+ { label: '打开审批页面', value: 'goCheckPage' },
25
+ { label: '批量编辑', value: 'editMultiEntity' },
26
+ { label: '执行流程审批', value: 'checkEntity' },
27
+ { label: '报表打印', value: 'print' },
28
+ { label: '返回', value: 'backPage' }
29
+ ]
30
+ this.operateOptions = [
31
+ { key: 'text', label: '按钮名称' },
32
+ {
33
+ key: 'ui',
34
+ label: '按钮样式',
35
+ type: 'select',
36
+ options: [
37
+ { label: '主要按钮', value: 'primary' },
38
+ { label: '成功按钮', value: 'success' },
39
+ { label: '信息按钮', value: 'info' },
40
+ { label: '警告按钮', value: 'warning' },
41
+ { label: '危险按钮', value: 'danger' },
42
+ { label: '文本按钮', value: 'text' },
43
+ { label: '默认按钮', value: 'default' }
44
+ ],
45
+ defaultValue: 'default'
46
+ },
47
+ {
48
+ key: 'type',
49
+ label: '按钮类型',
50
+ type: 'radio',
51
+ options: [
52
+ {
53
+ label: '默认',
54
+ value: 'default'
55
+ },
56
+ {
57
+ label: '空心按钮',
58
+ value: 'plain'
59
+ },
60
+ {
61
+ label: '圆角按钮',
62
+ value: 'round'
63
+ },
64
+ {
65
+ label: '圆形按钮',
66
+ value: 'circle'
67
+ }
68
+ ],
69
+ defaultValue: 'default'
70
+ },
71
+ { key: 'icon', label: '按钮图标', type: 'object', object: 'FM_FONT_ICON' },
72
+ { key: 'metaId', label: '请求对象', type: 'entity' },
73
+ { key: 'action', label: '请求操作', type: 'select', options: this.actionList },
74
+ { key: 'num', label: '选中记录', type: 'radio', options: [{ label: '不需要', value: '0' }, { label: '选择1个', value: '1' }, { label: '选择多个', value: 'n' }], defaultValue: '0' },
75
+ { key: 'actionOption', label: '显示条件' },
76
+ {
77
+ key: 'handler',
78
+ label: '处理事件',
79
+ type: 'select',
80
+ options: this.handlerList
81
+ },
82
+ {
83
+ key: 'page',
84
+ label: '打开页面',
85
+ type: 'page',
86
+ showFlag: { handler: 'goPage' }
87
+ },
88
+ {
89
+ key: 'openMode',
90
+ label: '页面打开方式',
91
+ type: 'radio',
92
+ options: [{ label: '直接打开', value: '3' }, { label: '标签页', value: '1' }, { label: '弹窗', value: '2' }],
93
+ defaultValue: '3',
94
+ showFlag: { handler: 'goPage' }
95
+ },
96
+ {
97
+ key: 'pageType',
98
+ label: '页面状态',
99
+ type: 'radio',
100
+ options: [{ label: '新增', value: 'ADD' }, { label: '编辑', value: 'EDIT' }, { label: '详情', value: 'DETAIL' }],
101
+ defaultValue: 'ADD',
102
+ showFlag: { handler: 'goPage' }
103
+ },
104
+ {
105
+ key: 'printWay',
106
+ label: '打印方式',
107
+ type: 'radio',
108
+ options: [{ label: '自定义报表打印', value: 'custom' }, { label: '帆软报表打印', value: 'fine' }],
109
+ defaultValue: 'custom',
110
+ showFlag: { handler: 'print' }
111
+ },
112
+ {
113
+ key: 'printCode',
114
+ label: '打印模板',
115
+ type: 'object',
116
+ object: 'FM_FORM',
117
+ dataKey: 'CODE',
118
+ showFlag: { handler: 'print', printWay: 'custom' }
119
+ },
120
+ {
121
+ key: 'cptName',
122
+ label: '打印模板',
123
+ type: 'object',
124
+ object: 'FM_REPORT_TEMPLATE',
125
+ dataKey: 'CODE',
126
+ showFlag: { handler: 'print', printWay: 'fine' }
127
+ },
128
+ {
129
+ key: 'destActivityId',
130
+ label: '审核流程',
131
+ type: 'process',
132
+ processType: 'check',
133
+ showFlag: { handler: 'checkEntity' }
134
+ },
135
+ { key: 'confirmMsg', label: '操作确认信息' },
136
+ { key: 'successMsg', label: '操作成功提示' },
137
+ { key: 'failMsg', label: '操作失败提示' },
138
+ { key: 'actionOptionMsg', label: '禁止操作提示' },
139
+ { key: 'mask', label: '操作遮罩', type: 'radio', options: [{ label: '显示', value: true }, { label: '不显示', value: false }], defaultValue: false },
140
+ { key: 'params', label: '参数传递', type: 'params' }
141
+ ]
142
+ },
143
+ initDefaultConfigs () {
144
+ const { addPage = 'entity-add-page', editPage = 'entity-edit-page', openMode = '3', addPageFlag = 'v_add' } = this.allConfigs
145
+ let keywords = []
146
+ const { label, keyNames = [] } = this.currentMeta
147
+ let metaKey = 'ID'
148
+ if (this.currentMeta) {
149
+ metaKey = this.currentMeta.getKey()
150
+ keywords = [...keyNames]
151
+ if (label) {
152
+ keywords.push(label)
153
+ }
154
+ }
155
+ // 获取到该组件的默认配置
156
+ this.commonOperates = [
157
+ {
158
+ text: '新增',
159
+ handler: 'goPage',
160
+ ui: 'primary',
161
+ pageFlag: addPageFlag,
162
+ num: 0,
163
+ component: addPage,
164
+ pageType: 'ADD',
165
+ openMode
166
+ }, {
167
+ text: '编辑',
168
+ handler: 'goPage',
169
+ pageFlag: addPageFlag,
170
+ num: 1,
171
+ component: addPage,
172
+ pageType: 'EDIT',
173
+ openMode
174
+ }, {
175
+ text: '详情',
176
+ handler: 'goPage',
177
+ pageFlag: addPageFlag,
178
+ num: 1,
179
+ component: addPage,
180
+ pageType: 'DETAIL',
181
+ openMode
182
+ },
183
+ {
184
+ text: '删除',
185
+ handler: 'commonAction',
186
+ action: 'removeMulti',
187
+ num: 'n',
188
+ confirmMsg: this.$t('Confirm the deletion') + '?',
189
+ successMsg: '删除成功',
190
+ failMsg: '删除失败',
191
+ params: {
192
+ ids: `#[${metaKey}]`
193
+ }
194
+ },
195
+ {
196
+ text: '导入',
197
+ handler: 'goPage',
198
+ pageFlag: 'v_import',
199
+ component: 'import-page'
200
+ },
201
+ {
202
+ text: '导出',
203
+ handler: 'goPage',
204
+ pageFlag: 'v_export',
205
+ component: 'export-page',
206
+ params: {
207
+ selects: `#[${metaKey}]`,
208
+ total: '$[total]',
209
+ params: '$[params]',
210
+ fields: '$[listFields]'
211
+ }
212
+ },
213
+ {
214
+ text: '打印',
215
+ handler: 'print'
216
+ },
217
+ {
218
+ text: '批量编辑',
219
+ handler: 'editMultiEntity'
220
+ },
221
+ {
222
+ text: '打开审核页面',
223
+ handler: 'goCheckPage'
224
+ },
225
+ {
226
+ text: '流程审批',
227
+ handler: 'checkEntity'
228
+ },
229
+ {
230
+ text: '返回',
231
+ handler: 'backPage'
232
+ },
233
+ {
234
+ text: '自定义按钮'
235
+ }
236
+ ]
237
+ this.defaultConfigs = {
238
+ flex: false,
239
+ componentName: this.componentInfo.title,
240
+ addPageFlag: 'v_add',
241
+ editPageFlag: 'v_add',
242
+ detailPageFlag: 'v_add',
243
+ metaId: this.pageMetaId,
244
+ searchFlag: true,
245
+ searchMode: 'keyword',
246
+ keywords,
247
+ searchFields: [],
248
+ listFields: this.currentMeta.getAllFields(),
249
+ pageFlag: true,
250
+ pageSize: 20,
251
+ operateFlag: true,
252
+ operateEllipsis: 2,
253
+ multiSelectColumnFlag: true, // 是否显示多选框列
254
+ serialColumnFlag: true, // 是否显示序号列
255
+ operateColumnFlag: true, // 是否显示操作列
256
+ totalFlag: true,
257
+ operateColumnWidth: 100,
258
+ operateColumnEllipsis: 2,
259
+ operateColumnPosition: 'start',
260
+ span: 24,
261
+ operates: [
262
+ {
263
+ text: '新增',
264
+ handler: 'goPage',
265
+ ui: 'primary',
266
+ num: 0,
267
+ openMode,
268
+ component: addPage,
269
+ params: {}
270
+ },
271
+ // {
272
+ // text: '删除',
273
+ // handler: 'commonAction',
274
+ // action: 'removeMulti',
275
+ // num: 'n',
276
+ // confirmMsg: this.$t('Confirm the deletion') + '?',
277
+ // successMsg: '删除成功',
278
+ // params: {
279
+ // ids: `#[${metaKey}]`
280
+ // }
281
+ // },
282
+ {
283
+ text: '导入',
284
+ handler: 'goPage',
285
+ component: 'import-page',
286
+ params: {}
287
+ },
288
+ {
289
+ text: '导出',
290
+ handler: 'goPage',
291
+ component: 'export-page',
292
+ params: {
293
+ selects: `#[${metaKey}]`,
294
+ total: '$[total]',
295
+ params: '$[params]',
296
+ fields: '$[listFields]'
297
+ }
298
+ }
299
+ ],
300
+ columnOperates: [
301
+ {
302
+ text: '编辑',
303
+ handler: 'goPage',
304
+ num: 1,
305
+ openMode,
306
+ component: editPage,
307
+ pageType: 'EDIT'
308
+ }
309
+ // {
310
+ // text: '删除',
311
+ // handler: 'commonAction',
312
+ // action: 'removeMulti',
313
+ // num: 'n',
314
+ // confirmMsg: this.$t('Confirm the deletion') + '?',
315
+ // successMsg: '删除成功',
316
+ // params: {
317
+ // ids: `#[${this.$metaKey}]`
318
+ // }
319
+ // }
320
+ ]
321
+ }
322
+ },
323
+ initConfigOptions () {
324
+ const configOptions = [
325
+ { key: 'componentName', label: '组件名称', type: 'input' },
326
+ { key: 'metaId', label: '组件对象', type: 'object', object: 'FM_ENTITY' },
327
+ { key: 'keywords', label: '关键词字段', type: 'field' },
328
+ { key: 'searchFields', label: '筛选字段', type: 'field' },
329
+ { key: 'scopeParams', label: '查询范围', type: 'scope' },
330
+ { key: 'xsspan', label: '移动端宽度', type: 'select', options: this.spanOptions },
331
+ { key: 'height', label: '高度' },
332
+ { key: 'flex', label: '占据页面剩余空间', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] }
333
+ ]
334
+ // if (this.pageGlobalConfigs.layout === 'flex') {
335
+ // configOptions.splice(1, 0, { key: 'flex', label: '占据页面剩余空间', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }] })
336
+ // }
337
+ this.configOptions = configOptions
338
+ },
339
+ initConfig () {
340
+ const config = this.$_.cloneDeep(this.compConfig)
341
+ if (this.componentInfo.span) {
342
+ config.span = this.componentInfo.span
343
+ }
344
+ this.config = config
345
+ for (const key in this.config) {
346
+ if (key === 'order_field') {
347
+ const orderFields = []
348
+ const orderMode = this.config.order_mode || []
349
+ this.config[key].forEach((item, index) => {
350
+ let field = item
351
+ if (typeof item === 'string') {
352
+ field = { attriName: item }
353
+ }
354
+ orderFields.push({ ...field, sort: orderMode[index] || 'asc' })
355
+ })
356
+ this.config.orderFields = orderFields
357
+ }
358
+ }
359
+ },
360
+ getFieldOptions () {
361
+ this.getFunctionOption()
362
+ this.fieldOptions = [
363
+ { key: 'attriName', label: '字段', readonly: true },
364
+ { key: 'configWay', label: '配置方式', type: 'radio', options: [{ label: '默认配置', value: 'default' }, { label: '自定义', value: 'custom' }], defaultValue: 'default' },
365
+ { key: 'attriLabel', label: '名称', type: 'text' },
366
+ { key: 'state', label: '字段状态', type: 'radio', options: [{ label: '显示', value: 'DETAIL' }, { label: '隐藏', value: 'HIDDEN' }], defaultValue: 'DETAIL' },
367
+ {
368
+ key: 'detailPageId',
369
+ label: '字段详情页面',
370
+ type: 'object',
371
+ object: 'FM_PAGE_CONFIG',
372
+ showFlag: {
373
+ dataType: ['object', 'multiobject']
374
+ }
375
+ },
376
+ { key: 'width', label: '宽度', type: 'text', defaultValue: '120' },
377
+ { key: 'isLabel', label: '外部标签', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
378
+ { key: 'function', label: '函数', type: 'function' },
379
+ { key: 'locked', label: '是否锁定', type: 'radio', options: [{ label: '是', value: true }, { label: '否', value: false }], defaultValue: false },
380
+ { key: 'color', label: '字体颜色', type: 'color', defaultValue: '#333' }
381
+ ]
382
+ }
383
+ }
384
+ }
385
+ </script>
386
+
387
+ <style>
388
+
389
+ </style>