@steedos/service-plugin-amis 2.3.0-beta.12 → 2.3.0-beta.15

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,102 @@
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": "\nSteedosUI.getRef(api.body.modalName).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": "get:${context.rootUrl}/service/api/amis-metadata-objects/objects/generate_tabs_options",
39
+ "headers": {
40
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
41
+ },
42
+ "validations": {},
43
+ "validationErrors": {},
44
+ "required": true
45
+ }
46
+ ],
47
+ "panelClassName": "m-0",
48
+ "bodyClassName": "p-4",
49
+ "actions": [
50
+ {
51
+ "type": "button",
52
+ "label": "取消",
53
+ "actionType": "",
54
+ "level": "default",
55
+ "block": false,
56
+ "onClick": "SteedosUI.getRef(props.data.__super.modalName).close();",
57
+ "id": "u:bf2587b53d64"
58
+ },
59
+ {
60
+ "type": "button",
61
+ "label": "确定",
62
+ "actionType": "submit",
63
+ "level": "info",
64
+ "id": "u:08afd6e53cab"
65
+ }
66
+ ],
67
+ "actionsClassName": "p-sm b-t b-light text-center",
68
+ "className": "steedos-amis-form -mt-3",
69
+ "checkAll": false,
70
+ "id": "object-layout-form",
71
+ "debug": false,
72
+ "messages": {
73
+ "fetchFailed": "初始化失败",
74
+ "saveFailed": "保存失败"
75
+ },
76
+ "onEvent": {
77
+ "submitSucc": {
78
+ "actions": [
79
+ {
80
+ "actionType": "custom",
81
+ "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}"
82
+ }
83
+ ]
84
+ }
85
+ }
86
+ }
87
+ ],
88
+ "regions": [
89
+ "body"
90
+ ],
91
+ "data": {
92
+ "context": {
93
+ "rootUrl": "http://127.0.0.1:5800"
94
+ }
95
+ },
96
+ "id": "u:3b0de7e88def",
97
+ "bodyClassName": "p-0",
98
+ "name": "page_edit_${recordId}",
99
+ "initApi": null,
100
+ "initFetch": null,
101
+ "className": "page-form-object_layouts"
102
+ }
@@ -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: []