@steedos/service-pages 3.0.0-beta.86 → 3.0.0-beta.88
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.
- package/main/default/objectTranslations/pages.en/pages.en.objectTranslation.yml +11 -1
- package/main/default/objectTranslations/pages.zh-CN/pages.zh-CN.objectTranslation.yml +10 -0
- package/main/default/objects/pages/buttons/disable.button.yml +3 -144
- package/main/default/objects/pages/buttons/enable.button.yml +3 -3
- package/main/default/objects/pages/buttons/resetSchema.button.js +7 -7
- package/package.json +2 -2
|
@@ -105,4 +105,14 @@ actions:
|
|
|
105
105
|
showDesign:
|
|
106
106
|
label: Show Design
|
|
107
107
|
viewPage:
|
|
108
|
-
label: View
|
|
108
|
+
label: View
|
|
109
|
+
CustomLabels:
|
|
110
|
+
pages_action_disable_success: The page has been disabled.
|
|
111
|
+
pages_action_disable_failed: Operation failed
|
|
112
|
+
pages_action_enable_success: The page has been enabled.
|
|
113
|
+
pages_action_enable_failed: Operation failed
|
|
114
|
+
pages_action_resetSchema_dialog_title: Reset Page Schema
|
|
115
|
+
pages_action_resetSchema_dialog_content: After resetting the page, a new page version will be generated based on the latest object field configuration.
|
|
116
|
+
pages_action_resetSchema_success_message: Operation successful
|
|
117
|
+
pages_action_resetSchema_success_description: The page has been reset.
|
|
118
|
+
pages_action_resetSchema_failed_message: Operation failed
|
|
@@ -106,3 +106,13 @@ actions:
|
|
|
106
106
|
label: 设计器
|
|
107
107
|
viewPage:
|
|
108
108
|
label: 查看
|
|
109
|
+
CustomLabels:
|
|
110
|
+
pages_action_disable_success: 页面已禁用。
|
|
111
|
+
pages_action_disable_failed: 操作失败
|
|
112
|
+
pages_action_enable_success: 页面已启用。
|
|
113
|
+
pages_action_enable_failed: 操作失败
|
|
114
|
+
pages_action_resetSchema_dialog_title: 重置页面
|
|
115
|
+
pages_action_resetSchema_dialog_content: 重置页面后,会根据最新的对象字段配置生成一个新的页面版本.
|
|
116
|
+
pages_action_resetSchema_success_message: 操作成功
|
|
117
|
+
pages_action_resetSchema_success_description: 页面已重置。
|
|
118
|
+
pages_action_resetSchema_failed_message: 操作失败
|
|
@@ -5,7 +5,7 @@ amis_schema: |-
|
|
|
5
5
|
"body": [
|
|
6
6
|
{
|
|
7
7
|
"type": "button",
|
|
8
|
-
"label": "
|
|
8
|
+
"label": "${'CustomAction.pages.disable' | t}",
|
|
9
9
|
"id": "u:disable",
|
|
10
10
|
"visibleOn": "${is_active && !is_system}",
|
|
11
11
|
"actionType": "ajax",
|
|
@@ -15,8 +15,8 @@ amis_schema: |-
|
|
|
15
15
|
"requestAdaptor": "var recordId = context.recordId;\napi.data = {\n pageId: recordId\n}",
|
|
16
16
|
"adaptor": "",
|
|
17
17
|
"messages": {
|
|
18
|
-
"success": "
|
|
19
|
-
"failed": "
|
|
18
|
+
"success": "${'CustomLabels.pages_action_disable_success' | t}",
|
|
19
|
+
"failed": "${'CustomLabels.pages_action_disable_failed' | t}"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"editorState": "default"
|
|
@@ -40,147 +40,6 @@ amis_schema: |-
|
|
|
40
40
|
"disabled": true
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
amis_schema__: |-
|
|
45
|
-
{
|
|
46
|
-
"type": "service",
|
|
47
|
-
"body": [
|
|
48
|
-
{
|
|
49
|
-
"type": "button",
|
|
50
|
-
"label": "拒绝",
|
|
51
|
-
"id": "u:reject",
|
|
52
|
-
"onEvent": {
|
|
53
|
-
"click": {
|
|
54
|
-
"weight": 0,
|
|
55
|
-
"actions": [
|
|
56
|
-
{
|
|
57
|
-
"actionType": "confirmDialog",
|
|
58
|
-
"dialog": {
|
|
59
|
-
"type": "dialog",
|
|
60
|
-
"title": "拒绝数据",
|
|
61
|
-
"body": [
|
|
62
|
-
{
|
|
63
|
-
"type": "form",
|
|
64
|
-
"title": "拒绝理由",
|
|
65
|
-
"id": "u:reject_form",
|
|
66
|
-
"mode": "normal",
|
|
67
|
-
"body": [
|
|
68
|
-
{
|
|
69
|
-
"type": "textarea",
|
|
70
|
-
"name": "comment",
|
|
71
|
-
"description": "请填写拒绝理由",
|
|
72
|
-
"required": true,
|
|
73
|
-
"id": "u:6669c9012efd"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"type": "tpl",
|
|
77
|
-
"tpl": "确定要拒绝该填写任务中的数据吗?",
|
|
78
|
-
"id": "u:ddf84582ce78"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"actions": [
|
|
82
|
-
{
|
|
83
|
-
"type": "submit",
|
|
84
|
-
"label": "提交",
|
|
85
|
-
"primary": true
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
"feat": "Insert"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"onEvent": {
|
|
92
|
-
"confirm": {
|
|
93
|
-
"actions": [
|
|
94
|
-
{
|
|
95
|
-
"actionType": "validate",
|
|
96
|
-
"componentId": "u:reject_form"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"actionType": "custom",
|
|
100
|
-
"script": "// 之前主动触发表单校验是因为dialog confirm事件执行完成后才会触发,这里判断校验失败就中断后续动作\nevent.data.comment = event.data.comment;\nif (event.data.validateResult && event.data.validateResult.error) { \n event.stopPropagation();\n}\n\n\n",
|
|
101
|
-
"args": {}
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"actionType": "ajax",
|
|
105
|
-
"ignoreError": false,
|
|
106
|
-
"outputVar": "responseResult",
|
|
107
|
-
"options": {},
|
|
108
|
-
"api": {
|
|
109
|
-
"url": "${context.rootUrl}/api/builder6/b6_collect/actions/reject",
|
|
110
|
-
"method": "post",
|
|
111
|
-
"requestAdaptor": "var targets = [{\n id: context._id\n}];\napi.data = {\n targets,\n comment: context.comment\n}",
|
|
112
|
-
"adaptor": "",
|
|
113
|
-
"messages": {
|
|
114
|
-
"success": "已拒绝该填写任务中的数据!",
|
|
115
|
-
"failed": "很抱歉,提交过程中出现问题。请稍后重试或联系技术支持!"
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"actionType": "broadcast",
|
|
121
|
-
"args": {
|
|
122
|
-
"eventName": "@data.changed.b6_collect"
|
|
123
|
-
},
|
|
124
|
-
"data": {
|
|
125
|
-
"objectName": "b6_collect",
|
|
126
|
-
"displayAs": "${displayAs}",
|
|
127
|
-
"recordId": "notEmpty"
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
"actionType": "confirmDialog",
|
|
134
|
-
"actions": [
|
|
135
|
-
{
|
|
136
|
-
"type": "button",
|
|
137
|
-
"actionType": "cancel",
|
|
138
|
-
"label": "取消",
|
|
139
|
-
"id": "u:6d0b193270fb"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"type": "button",
|
|
143
|
-
"actionType": "confirm",
|
|
144
|
-
"label": "确定",
|
|
145
|
-
"primary": true,
|
|
146
|
-
"id": "u:da420989ec0f"
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"showCloseButton": true,
|
|
150
|
-
"closeOnOutside": false,
|
|
151
|
-
"closeOnEsc": false,
|
|
152
|
-
"showErrorMsg": true,
|
|
153
|
-
"showLoading": true,
|
|
154
|
-
"draggable": false,
|
|
155
|
-
"id": "u:e84a743c78f2"
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
},
|
|
161
|
-
"editorState": "default"
|
|
162
|
-
}
|
|
163
|
-
],
|
|
164
|
-
"regions": [
|
|
165
|
-
"body"
|
|
166
|
-
],
|
|
167
|
-
"data": {
|
|
168
|
-
"context": {},
|
|
169
|
-
"dataComponentId": "",
|
|
170
|
-
"record_id": "",
|
|
171
|
-
"record": {},
|
|
172
|
-
"permissions": {}
|
|
173
|
-
},
|
|
174
|
-
"id": "u:627b94b32af8",
|
|
175
|
-
"bodyClassName": "p-0",
|
|
176
|
-
"dsType": "api",
|
|
177
|
-
"asideResizor": false,
|
|
178
|
-
"editorState": "default",
|
|
179
|
-
"pullRefresh": {
|
|
180
|
-
"disabled": true
|
|
181
|
-
},
|
|
182
|
-
"definitions": {}
|
|
183
|
-
}
|
|
184
43
|
is_enable: true
|
|
185
44
|
label: 禁用
|
|
186
45
|
'on': record_only
|
|
@@ -5,7 +5,7 @@ amis_schema: |-
|
|
|
5
5
|
"body": [
|
|
6
6
|
{
|
|
7
7
|
"type": "button",
|
|
8
|
-
"label": "
|
|
8
|
+
"label": "${'CustomAction.pages.enable' | t}",
|
|
9
9
|
"id": "u:enable",
|
|
10
10
|
"visibleOn": "${!is_active && !record.is_system}",
|
|
11
11
|
"actionType": "ajax",
|
|
@@ -15,8 +15,8 @@ amis_schema: |-
|
|
|
15
15
|
"requestAdaptor": "var recordId = context.recordId;\napi.data = {\n pageId: recordId\n}",
|
|
16
16
|
"adaptor": "",
|
|
17
17
|
"messages": {
|
|
18
|
-
"success": "
|
|
19
|
-
"failed": "
|
|
18
|
+
"success": "${'CustomLabels.pages_action_enable_success' | t}",
|
|
19
|
+
"failed": "${'CustomLabels.pages_action_enable_failed' | t}"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"editorState": "default"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author: baozhoutaon@hotoa.com
|
|
3
3
|
* @Date: 2022-03-29 20:33:44
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
+
* @LastEditTime: 2025-08-26 13:58:13
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
9
|
resetSchema: function (object_name, record_id) {
|
|
10
10
|
SteedosUI.Modal.confirm({
|
|
11
|
-
title: "
|
|
12
|
-
content: "
|
|
11
|
+
title: t("CustomLabels.pages_action_resetSchema_dialog_title"),
|
|
12
|
+
content: t("CustomLabels.pages_action_resetSchema_dialog_title"),
|
|
13
13
|
onOk: function(){
|
|
14
14
|
$(document.body).addClass('loading');
|
|
15
15
|
let url = `/service/api/page/resetDefaultSchema`;
|
|
@@ -19,8 +19,8 @@ module.exports = {
|
|
|
19
19
|
data: JSON.stringify({ pageId: record_id }),
|
|
20
20
|
success: function (data) {
|
|
21
21
|
SteedosUI.notification.success({
|
|
22
|
-
message:
|
|
23
|
-
description:
|
|
22
|
+
message: t("CustomLabels.pages_action_resetSchema_success_message"),
|
|
23
|
+
description: t("CustomLabels.pages_action_resetSchema_success_description"),
|
|
24
24
|
});
|
|
25
25
|
SteedosUI.router.go({
|
|
26
26
|
type: 'new',
|
|
@@ -31,7 +31,7 @@ module.exports = {
|
|
|
31
31
|
},
|
|
32
32
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
33
33
|
SteedosUI.notification.error({
|
|
34
|
-
message:
|
|
34
|
+
message: t("CustomLabels.pages_action_resetSchema_failed_message"),
|
|
35
35
|
description: t(XMLHttpRequest.responseJSON.error),
|
|
36
36
|
});
|
|
37
37
|
$(document.body).removeClass('loading');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.88",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "e80097b00cf3ee187205c35f60e488fb54d2ea07",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"clone": "^2.1.2",
|
|
14
14
|
"ejs": "^3.1.8"
|