@steedos/service-plugin-amis 2.3.0-beta.8 → 2.3.0

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.
@@ -0,0 +1,104 @@
1
+ {
2
+ "type": "page",
3
+ "body": [
4
+ {
5
+ "type": "form",
6
+ "mode": "normal",
7
+ "persistData": false,
8
+ "promptPageLeave": true,
9
+ "name": "form_edit_${recordId}",
10
+ "title": "",
11
+ "api": {
12
+ "method": "post",
13
+ "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/generate/tabs",
14
+ "data": {
15
+ "objects": "${objects}",
16
+ "modalName": "${modalName}",
17
+ "objectName": "${objectName}",
18
+ "$": "$$",
19
+ "recordId": "${recordId}"
20
+ },
21
+ "requestAdaptor": "const formData = api.data.$;\napi.data = { objects: formData.objects };\nreturn api;",
22
+ "responseData": null,
23
+ "adaptor": "var modal = SteedosUI.getRef(api.body.modalName);\nmodal && modal.close();\nif (api.body.objectName === \"tabs\") {\n // 在tabs列表操作”对象选项卡“按钮,保存后需要刷新主列表\n refreshGrid && refreshGrid();\n}\nreturn payload;\n ",
24
+ "headers": {
25
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
26
+ }
27
+ },
28
+ "initApi": "",
29
+ "initFetch": true,
30
+ "body": [
31
+ {
32
+ "label": "",
33
+ "type": "transfer",
34
+ "name": "objects",
35
+ "options": [],
36
+ "id": "u:e224b24aa867",
37
+ "searchable": true,
38
+ "source": {
39
+ "method": "get",
40
+ "url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/generate_tabs_options",
41
+ "headers": {
42
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
43
+ }
44
+ },
45
+ "required": true
46
+ }
47
+ ],
48
+ "panelClassName": "m-0",
49
+ "bodyClassName": "p-4",
50
+ "actions": [
51
+ {
52
+ "type": "button",
53
+ "label": "取消",
54
+ "actionType": "",
55
+ "level": "default",
56
+ "block": false,
57
+ "onClick": "SteedosUI.getRef(props.data.__super.modalName).close();",
58
+ "id": "u:bf2587b53d64"
59
+ },
60
+ {
61
+ "type": "button",
62
+ "label": "确定",
63
+ "actionType": "submit",
64
+ "level": "info",
65
+ "id": "u:08afd6e53cab"
66
+ }
67
+ ],
68
+ "actionsClassName": "p-sm b-t b-light text-center",
69
+ "className": "steedos-amis-form -mt-3",
70
+ "checkAll": false,
71
+ "id": "object-layout-form",
72
+ "debug": false,
73
+ "messages": {
74
+ "fetchFailed": "初始化失败",
75
+ "saveFailed": "保存失败",
76
+ "validateFailed": "请先选择需要生成选项卡的对象!"
77
+ },
78
+ "onEvent": {
79
+ "submitSucc": {
80
+ "actions": [
81
+ {
82
+ "actionType": "custom",
83
+ "script": "const result = event.data.result;\nconst doneCount = result.data && result.data.doneCount || 0;\nconst myMsg = '已成功生成' + doneCount.toString() + \"条选项卡!\";\ndoAction({\n actionType: 'toast',\n args: {\n msg: myMsg,\n msgType: \"success\"\n }\n});\nconst errors = result.data && result.data.errors || [];\nif (errors && errors.length) { \n console.warn(\"以下对象未能生成选项卡:\");\n console.warn(JSON.stringify(errors));\n}\nconst superData = event.data.__super;\nif (superData && superData.objectName === \"apps\") { \n // 在应用表单中生成选项卡后需要触发选项卡列表组件reload重新刷新列表\n doAction({\n actionType: 'reload',\n componentId: \"tabs-options-service\"\n });\n}"
84
+ }
85
+ ]
86
+ }
87
+ }
88
+ }
89
+ ],
90
+ "regions": [
91
+ "body"
92
+ ],
93
+ "data": {
94
+ "context": {
95
+ "rootUrl": "http://127.0.0.1:5800"
96
+ }
97
+ },
98
+ "id": "u:3b0de7e88def",
99
+ "bodyClassName": "p-0",
100
+ "name": "page_edit_${recordId}",
101
+ "initApi": null,
102
+ "initFetch": null,
103
+ "className": "page-form-object_layouts"
104
+ }
@@ -0,0 +1,7 @@
1
+ name: generate_object_tabs
2
+ is_active: true
3
+ label: 生成对象选项卡
4
+ pageAssignments: []
5
+ render_engine: amis
6
+ type: app
7
+ widgets: []
@@ -57,7 +57,8 @@
57
57
  "labelClassName": "text-left",
58
58
  "en-US": {
59
59
  "label": "Label"
60
- }
60
+ },
61
+ "id": "u:a45229ed29f8"
61
62
  },
62
63
  {
63
64
  "name": "name",
@@ -70,7 +71,8 @@
70
71
  "en-US": {
71
72
  "label": "API Name",
72
73
  "labelRemark": "Can only contain lowercase letters and numbers, must start with a letter,cannot end with an underscore character or contain two consecutive underscore characters"
73
- }
74
+ },
75
+ "id": "u:ff927884ec36"
74
76
  },
75
77
  {
76
78
  "name": "object_name",
@@ -92,7 +94,8 @@
92
94
  },
93
95
  "en-US": {
94
96
  "label": "Object"
95
- }
97
+ },
98
+ "id": "u:1427b8edc8f5"
96
99
  },
97
100
  {
98
101
  "name": "filter_scope",
@@ -110,7 +113,6 @@
110
113
  "en-US": {
111
114
  "label": "Mine"
112
115
  }
113
-
114
116
  },
115
117
  {
116
118
  "label": "工作区",
@@ -125,8 +127,8 @@
125
127
  "labelClassName": "text-left",
126
128
  "en-US": {
127
129
  "label": "Filter Scope"
128
- }
129
-
130
+ },
131
+ "id": "u:5f00b15822d5"
130
132
  },
131
133
  {
132
134
  "name": "shared",
@@ -137,7 +139,8 @@
137
139
  "option": "共享视图到工作区",
138
140
  "en-US": {
139
141
  "option": "Shared to All Users"
140
- }
142
+ },
143
+ "id": "u:3ba5090f7fd0"
141
144
  },
142
145
  {
143
146
  "name": "show_count",
@@ -148,13 +151,15 @@
148
151
  "option": "显示条目数",
149
152
  "en-US": {
150
153
  "option": "Show Record Count"
151
- }
154
+ },
155
+ "id": "u:811f0c5d03ad"
152
156
  },
153
157
  {
154
158
  "label": "显示的列",
155
159
  "type": "transfer",
156
160
  "name": "columns",
157
161
  "options": [],
162
+ "multiple": true,
158
163
  "id": "u:92c0b3cccca0",
159
164
  "required": true,
160
165
  "placeholder": "-",
@@ -186,9 +191,11 @@
186
191
  "labelClassName": "text-left",
187
192
  "en-US": {
188
193
  "label": "Sort NO."
189
- }
194
+ },
195
+ "id": "u:25a6ee957503"
190
196
  }
191
- ]
197
+ ],
198
+ "id": "u:7f7b2d3ea064"
192
199
  },
193
200
  {
194
201
  "type": "fieldSet",
@@ -217,7 +224,8 @@
217
224
  "extractValue": true,
218
225
  "en-US": {
219
226
  "label": "Default Filter Fields"
220
- }
227
+ },
228
+ "multiple": true
221
229
  },
222
230
  {
223
231
  "type": "radios",
@@ -241,7 +249,6 @@
241
249
  "en-US": {
242
250
  "label": "Controller"
243
251
  }
244
-
245
252
  },
246
253
  {
247
254
  "type": "condition-builder",
@@ -276,7 +283,8 @@
276
283
  "collapsed": true,
277
284
  "en-US": {
278
285
  "title": "Filter"
279
- }
286
+ },
287
+ "id": "u:7d4a03469ab2"
280
288
  },
281
289
  {
282
290
  "type": "fieldSet",
@@ -308,15 +316,16 @@
308
316
  "extractValue": true,
309
317
  "en-US": {
310
318
  "label": "Default Sort Order"
311
- }
319
+ },
320
+ "multiple": true
312
321
  }
313
322
  ],
314
323
  "visibleOn": "!!this.object_name",
315
324
  "collapsed": true,
316
325
  "en-US": {
317
326
  "title": "Order"
318
- }
319
-
327
+ },
328
+ "id": "u:82b56e7d9639"
320
329
  },
321
330
  {
322
331
  "type": "fieldSet",
@@ -349,14 +358,16 @@
349
358
  "className": "col-span-2 m-0",
350
359
  "en-US": {
351
360
  "label": "Mobile Columns"
352
- }
361
+ },
362
+ "multiple": true
353
363
  }
354
364
  ],
355
365
  "collapsed": true,
356
366
  "visibleOn": "!!this.object_name",
357
367
  "en-US": {
358
368
  "title": "Mobile"
359
- }
369
+ },
370
+ "id": "u:51174159a42e"
360
371
  }
361
372
  ],
362
373
  "panelClassName": "m-0",
@@ -371,7 +382,8 @@
371
382
  "onClick": "SteedosUI.getRef(props.data.__super.modalName).close();",
372
383
  "en-US": {
373
384
  "label": "Cancel"
374
- }
385
+ },
386
+ "id": "u:2b559c02ad83"
375
387
  },
376
388
  {
377
389
  "type": "button",
@@ -380,12 +392,14 @@
380
392
  "level": "info",
381
393
  "en-US": {
382
394
  "label": "Save"
383
- }
395
+ },
396
+ "id": "u:a48a8052e83a"
384
397
  }
385
398
  ],
386
399
  "actionsClassName": "p-sm b-t b-light text-center",
387
400
  "className": "steedos-amis-form",
388
- "language": "javascript"
401
+ "language": "javascript",
402
+ "id": "u:d951542bb161"
389
403
  }
390
404
  ],
391
405
  "regions": [
@@ -394,11 +408,12 @@
394
408
  "data": {
395
409
  "objectName": "object_listviews",
396
410
  "context": {
397
- "rootUrl": "http://127.0.0.1:5000"
411
+ "rootUrl": "http://127.0.0.1:5800"
398
412
  }
399
413
  },
400
414
  "bodyClassName": "p-0",
401
415
  "name": "page_edit_${recordId}",
402
416
  "initApi": null,
403
- "initFetch": null
417
+ "initFetch": null,
418
+ "id": "u:6ada123f9d4a"
404
419
  }