@steedos/standard-object-database 2.3.6 → 2.3.8
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/objects/object_actions.object.yml +16 -0
- package/main/default/objects/object_fields.object.yml +23 -4
- package/main/default/objects/object_layouts/buttons/standard_edit.button.yml +1 -1
- package/main/default/objects/object_layouts.layouts.action.js +2 -5
- package/main/default/objects/object_layouts.object.yml +12 -2
- package/main/default/objects/object_listviews/buttons/amis_buttons.button.yml +11 -2
- package/main/default/objects/object_listviews.action.js +3 -4
- package/main/default/objects/object_listviews.object.yml +16 -14
- package/main/default/objects/object_related_list.object.yml +17 -1
- package/main/default/objects/object_triggers.object.yml +16 -0
- package/main/default/objects/object_validation_rules.action.js +1 -2
- package/main/default/objects/object_validation_rules.object.yml +4 -0
- package/main/default/objects/objects.action.js +64 -71
- package/main/default/objects/objects.object.yml +19 -20
- package/package.json +3 -3
- package/package.service.js +2 -3
- package/main/default/objects/objects/buttons/delete_object.button.yml +0 -87
- package/main/default/objects/objects/pages/object_detail.page.amis.json +0 -192
- package/main/default/objects/objects/pages/object_detail.page.yml +0 -12
|
@@ -13,6 +13,22 @@ fields:
|
|
|
13
13
|
label: Object
|
|
14
14
|
create: false
|
|
15
15
|
sort_no: 110
|
|
16
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
17
|
+
function () {
|
|
18
|
+
var _options;
|
|
19
|
+
|
|
20
|
+
_options = [];
|
|
21
|
+
|
|
22
|
+
_.forEach(Creator.objectsByName, function (o, k) {
|
|
23
|
+
return _options.push({
|
|
24
|
+
label: o.label,
|
|
25
|
+
value: k,
|
|
26
|
+
icon: o.icon
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
return _options;
|
|
31
|
+
}
|
|
16
32
|
label:
|
|
17
33
|
type: text
|
|
18
34
|
label: Label
|
|
@@ -14,7 +14,24 @@ fields:
|
|
|
14
14
|
reference_to_field: name
|
|
15
15
|
required: true
|
|
16
16
|
write_requires_master_read: true
|
|
17
|
-
|
|
17
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
18
|
+
function () {
|
|
19
|
+
var _options;
|
|
20
|
+
|
|
21
|
+
_options = [];
|
|
22
|
+
|
|
23
|
+
_.forEach(Creator.objectsByName, function (o, k) {
|
|
24
|
+
if(!['base','core','space_users_invite','_object_reload_logs'].includes(k)){
|
|
25
|
+
return _options.push({
|
|
26
|
+
label: o.label,
|
|
27
|
+
value: k,
|
|
28
|
+
icon: o.icon
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
return _options;
|
|
34
|
+
}
|
|
18
35
|
sort_no: 110
|
|
19
36
|
label:
|
|
20
37
|
type: text
|
|
@@ -53,8 +70,6 @@ fields:
|
|
|
53
70
|
value: html
|
|
54
71
|
- label: Code
|
|
55
72
|
value: code
|
|
56
|
-
- label: Markdown
|
|
57
|
-
value: markdown
|
|
58
73
|
- label: Select
|
|
59
74
|
value: select
|
|
60
75
|
- label: Boolean
|
|
@@ -107,6 +122,10 @@ fields:
|
|
|
107
122
|
label: Reference to
|
|
108
123
|
reference_to: objects
|
|
109
124
|
reference_to_field: name
|
|
125
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
126
|
+
function () {
|
|
127
|
+
return Steedos.getObjectsOptions();
|
|
128
|
+
}
|
|
110
129
|
visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
|
|
111
130
|
required: "{{['master_detail'].indexOf(formData.type) > -1 ? true: false}}"
|
|
112
131
|
sort_no: 180
|
|
@@ -148,7 +167,7 @@ fields:
|
|
|
148
167
|
required: "{{['autonumber', 'formula'].indexOf(formData.type) > -1 ? true: false}}"
|
|
149
168
|
sort_no: 210
|
|
150
169
|
data_type:
|
|
151
|
-
type:
|
|
170
|
+
type: select
|
|
152
171
|
label: Data Type
|
|
153
172
|
inlineHelpText: This field must be filled when the field type is 'Formula'
|
|
154
173
|
depend_on:
|
|
@@ -13,11 +13,9 @@ module.exports = {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
},
|
|
16
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
17
|
-
|
|
18
|
-
return Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
16
|
+
customizeVisible: function(object_name, record_id, record_permissions, record){
|
|
17
|
+
return Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
19
18
|
},
|
|
20
|
-
/*
|
|
21
19
|
standard_new: function (object_name, record_id, fields){
|
|
22
20
|
var object = Creator.getObject(object_name);
|
|
23
21
|
var gridName = this.action.gridName;
|
|
@@ -50,7 +48,6 @@ module.exports = {
|
|
|
50
48
|
});
|
|
51
49
|
}
|
|
52
50
|
},
|
|
53
|
-
*/
|
|
54
51
|
/*
|
|
55
52
|
standard_edit: function (object_name, record_id, fields){
|
|
56
53
|
var object = Creator.getObject(object_name);
|
|
@@ -22,6 +22,18 @@ fields:
|
|
|
22
22
|
reference_to: objects
|
|
23
23
|
reference_to_field: name
|
|
24
24
|
write_requires_master_read: true
|
|
25
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
26
|
+
function () {
|
|
27
|
+
var _options = [];
|
|
28
|
+
_.forEach(Creator.objectsByName, function (o, k) {
|
|
29
|
+
return _options.push({
|
|
30
|
+
label: o.label,
|
|
31
|
+
value: k,
|
|
32
|
+
icon: o.icon
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
return _options;
|
|
36
|
+
}
|
|
25
37
|
type:
|
|
26
38
|
type: select
|
|
27
39
|
options:
|
|
@@ -39,8 +51,6 @@ fields:
|
|
|
39
51
|
multiple: true
|
|
40
52
|
required: true
|
|
41
53
|
create: false
|
|
42
|
-
reference_to: permission_set
|
|
43
|
-
reference_to_field: name
|
|
44
54
|
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
45
55
|
function () {
|
|
46
56
|
var profiles = Creator.odata.query('permission_set', {$filter: "(type eq 'profile')"}, true);
|
|
@@ -31,14 +31,23 @@ amis_schema: |-
|
|
|
31
31
|
},
|
|
32
32
|
"tooltip": "重置列表视图Amis Schema",
|
|
33
33
|
"tooltipPlacement": "top",
|
|
34
|
-
"className": ""
|
|
34
|
+
"className": "slds-button slds-button--neutral p-0"
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
37
|
"regions": [
|
|
38
38
|
"body"
|
|
39
39
|
],
|
|
40
40
|
"data": {
|
|
41
|
-
|
|
41
|
+
"context": {
|
|
42
|
+
"rootUrl": "https://5000-steedos-steedosplatform-uwiv6wkdp2o.ws-us77.gitpod.io"
|
|
43
|
+
},
|
|
44
|
+
"app_id": "",
|
|
45
|
+
"tab_id": "",
|
|
46
|
+
"object_name": "",
|
|
47
|
+
"dataComponentId": "",
|
|
48
|
+
"record_id": "",
|
|
49
|
+
"record": {},
|
|
50
|
+
"permissions": {}
|
|
42
51
|
},
|
|
43
52
|
"id": "u:9a37e91e4b8d",
|
|
44
53
|
"bodyClassName": "p-0"
|
|
@@ -31,9 +31,8 @@ module.exports = {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
},
|
|
34
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
35
|
-
|
|
36
|
-
return Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
34
|
+
customizeVisible: function(object_name, record_id, record_permissions, record){
|
|
35
|
+
return Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
37
36
|
},
|
|
38
37
|
copy: function(object_name, record_id){
|
|
39
38
|
let newRecord = null; // _.clone(Creator.getListView(Session.get("object_name"), record_id));
|
|
@@ -88,7 +87,7 @@ module.exports = {
|
|
|
88
87
|
}
|
|
89
88
|
Steedos.Page.Form.StandardNew.render(Session.get("app_id"), 'object_listviews', t("creator_list_copy_list_view"), data, {});
|
|
90
89
|
},
|
|
91
|
-
copyVisible: function(object_name, record_id, record_permissions,
|
|
90
|
+
copyVisible: function(object_name, record_id, record_permissions, record){
|
|
92
91
|
return true;
|
|
93
92
|
},
|
|
94
93
|
showDesign: function (object_name, record_id) {
|
|
@@ -22,6 +22,22 @@ fields:
|
|
|
22
22
|
required: true
|
|
23
23
|
reference_to: objects
|
|
24
24
|
reference_to_field: name
|
|
25
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
26
|
+
function () {
|
|
27
|
+
var _options;
|
|
28
|
+
|
|
29
|
+
_options = [];
|
|
30
|
+
|
|
31
|
+
_.forEach(Creator.objectsByName, function (o, k) {
|
|
32
|
+
return _options.push({
|
|
33
|
+
label: o.label,
|
|
34
|
+
value: k,
|
|
35
|
+
icon: o.icon
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
return _options;
|
|
40
|
+
}
|
|
25
41
|
filter_scope:
|
|
26
42
|
label: Filter Scope
|
|
27
43
|
type: select
|
|
@@ -304,20 +320,6 @@ fields:
|
|
|
304
320
|
required: false
|
|
305
321
|
is_wide: true
|
|
306
322
|
# visible_on: "{{formData.enable_amis_schema}}"
|
|
307
|
-
requestAdaptor:
|
|
308
|
-
label: 发送适配器
|
|
309
|
-
type: code
|
|
310
|
-
language: "javascript"
|
|
311
|
-
is_wide: true
|
|
312
|
-
inlineHelpText: "函数签名:(api) => api, 数据在 api.data 中,修改后返回 api 对象。"
|
|
313
|
-
group: 数据接口
|
|
314
|
-
adaptor:
|
|
315
|
-
label: 接收适配器
|
|
316
|
-
type: code
|
|
317
|
-
language: "javascript"
|
|
318
|
-
is_wide: true
|
|
319
|
-
inlineHelpText: "函数签名: (payload, response, api) => payload"
|
|
320
|
-
group: 数据接口
|
|
321
323
|
paging:
|
|
322
324
|
enabled: false
|
|
323
325
|
list_views:
|
|
@@ -9,6 +9,22 @@ fields:
|
|
|
9
9
|
required: true
|
|
10
10
|
reference_to: objects
|
|
11
11
|
reference_to_field: name
|
|
12
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
13
|
+
function () {
|
|
14
|
+
var _options;
|
|
15
|
+
|
|
16
|
+
_options = [];
|
|
17
|
+
|
|
18
|
+
_.forEach(Creator.objectsByName, function (o, k) {
|
|
19
|
+
return _options.push({
|
|
20
|
+
label: o.label,
|
|
21
|
+
value: k,
|
|
22
|
+
icon: o.icon
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return _options;
|
|
27
|
+
}
|
|
12
28
|
objectName:
|
|
13
29
|
label: Related Object
|
|
14
30
|
type: lookup
|
|
@@ -26,7 +42,7 @@ fields:
|
|
|
26
42
|
_options = [];
|
|
27
43
|
|
|
28
44
|
_.forEach(Creator.objectsByName, function (o, k) {
|
|
29
|
-
if(_.
|
|
45
|
+
if(_.include(['cms_files', 'instances', 'tasks', 'notes', 'events', 'approvals', 'audit_records'], k)){
|
|
30
46
|
return _options.push({
|
|
31
47
|
label: o.label,
|
|
32
48
|
value: k,
|
|
@@ -18,6 +18,22 @@ fields:
|
|
|
18
18
|
reference_to: objects
|
|
19
19
|
reference_to_field: name
|
|
20
20
|
required: true
|
|
21
|
+
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
22
|
+
function () {
|
|
23
|
+
var _options;
|
|
24
|
+
|
|
25
|
+
_options = [];
|
|
26
|
+
|
|
27
|
+
_.forEach(Creator.objectsByName, function (o, k) {
|
|
28
|
+
return _options.push({
|
|
29
|
+
label: o.label,
|
|
30
|
+
value: k,
|
|
31
|
+
icon: o.icon
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return _options;
|
|
36
|
+
}
|
|
21
37
|
# on:
|
|
22
38
|
# label: 运行于
|
|
23
39
|
# type: lookup
|
|
@@ -24,8 +24,7 @@ module.exports = {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
},
|
|
27
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
28
|
-
var record = data && data.record;
|
|
27
|
+
customizeVisible: function(object_name, record_id, record_permissions, record){
|
|
29
28
|
if(!record){
|
|
30
29
|
record = {}
|
|
31
30
|
}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
show_object: function (object_name, record_id, item_element) {
|
|
3
3
|
var record = this.record || Creator.getObjectById(record_id);
|
|
4
|
-
if(record && record.record){
|
|
5
|
-
record = record.record;
|
|
6
|
-
}
|
|
7
4
|
if(!record){
|
|
8
5
|
return toastr.error("未找到记录");
|
|
9
6
|
}
|
|
@@ -22,16 +19,15 @@ module.exports = {
|
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
|
|
25
|
-
window.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// })
|
|
22
|
+
window.stores.API.client.sobject(record.name).getConfig().then((res)=>{
|
|
23
|
+
if(res.idFieldName){
|
|
24
|
+
window.open(Creator.getRelativeUrl("/app/-/" + record.name));
|
|
25
|
+
}else{
|
|
26
|
+
return toastr.error("请配置主键字段");
|
|
27
|
+
}
|
|
28
|
+
}).catch(function(err){
|
|
29
|
+
return window.toastr.error(err.message);
|
|
30
|
+
})
|
|
35
31
|
|
|
36
32
|
|
|
37
33
|
|
|
@@ -42,8 +38,7 @@ module.exports = {
|
|
|
42
38
|
// Steedos.openWindow(Creator.getRelativeUrl("/app/-/" + record.name + "/grid/all"))
|
|
43
39
|
// }
|
|
44
40
|
},
|
|
45
|
-
show_objectVisible: function(object_name, record_id, record_permissions,
|
|
46
|
-
var record = data && data.record;
|
|
41
|
+
show_objectVisible: function(object_name, record_id, record_permissions, record){
|
|
47
42
|
if(!Creator.isSpaceAdmin()){
|
|
48
43
|
return false
|
|
49
44
|
}
|
|
@@ -81,8 +76,7 @@ module.exports = {
|
|
|
81
76
|
return toastr.error('复制失败: 未启用API');
|
|
82
77
|
}
|
|
83
78
|
},
|
|
84
|
-
copy_odataVisible: function(object_name, record_id, record_permissions,
|
|
85
|
-
var record = data && data.record;
|
|
79
|
+
copy_odataVisible: function(object_name, record_id, record_permissions, record){
|
|
86
80
|
if(!Creator.isSpaceAdmin()){
|
|
87
81
|
return false
|
|
88
82
|
}
|
|
@@ -93,61 +87,60 @@ module.exports = {
|
|
|
93
87
|
return true;
|
|
94
88
|
}
|
|
95
89
|
},
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
90
|
+
delete_object: function (object_name, record_id, fields) {
|
|
91
|
+
var record = Creator.getObjectRecord(object_name, record_id, 'name');
|
|
92
|
+
SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
|
|
93
|
+
name: "remove-object",
|
|
94
|
+
title: '删除对象',
|
|
95
|
+
width: '540px',
|
|
96
|
+
layout: 'horizontal',
|
|
97
|
+
modalProps: {
|
|
98
|
+
width: "540px",
|
|
99
|
+
style: {
|
|
100
|
+
width: "540px",
|
|
101
|
+
maxWidth: "540px",
|
|
102
|
+
minWidth: "480px"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
initialValues:{
|
|
106
|
+
md: "删除一个自定义对象进行以下操作:\n\n* 删除对象的字段和按钮\n* 删除对象的选项卡和列表视图\n* 删除对象的页面布局\n* 删除对象的权限\n* 删除对象的验证规则\n* 删除对象的限制规则\n* 删除对象的共享规则\n* 删除使用该对象的流程映射\n* 删除使用该对象的开放流程\n* 删除使用该对象的页面。\n\n\\\n"
|
|
107
|
+
},
|
|
108
|
+
objectSchema: {
|
|
109
|
+
fields: {
|
|
110
|
+
md: {
|
|
111
|
+
type: 'html',
|
|
112
|
+
label: ' ',
|
|
113
|
+
is_wide: true,
|
|
114
|
+
readonly: true,
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
onFinish: async (values = {}) => {
|
|
119
|
+
return new Promise((resolve, reject) => {
|
|
120
|
+
window.$("body").addClass("loading");
|
|
121
|
+
Creator.odata.delete(object_name, record_id, function() {
|
|
122
|
+
var info= t('creator_record_remove_swal_suc');
|
|
123
|
+
window.toastr.success(info);
|
|
124
|
+
resolve(true)
|
|
125
|
+
if(FlowRouter.current().route.path.endsWith("/:record_id")){
|
|
126
|
+
var app_id = Session.get("app_id")
|
|
127
|
+
var object_name = Session.get("object_name")
|
|
128
|
+
FlowRouter.go(Creator.getListViewUrl(object_name, app_id, 'all'));
|
|
129
|
+
}else{
|
|
130
|
+
FlowRouter.reload();
|
|
131
|
+
}
|
|
132
|
+
window.$("body").removeClass("loading");
|
|
139
133
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
delete_objectVisible: function(object_name, record_id, record_permissions,
|
|
150
|
-
var record = data && data.record;
|
|
134
|
+
}, function(error) {
|
|
135
|
+
toastr.error(error.message);
|
|
136
|
+
window.$("body").removeClass("loading");
|
|
137
|
+
reject(false);
|
|
138
|
+
});
|
|
139
|
+
})
|
|
140
|
+
}
|
|
141
|
+
}, null, { iconPath: '/assets/icons' })
|
|
142
|
+
},
|
|
143
|
+
delete_objectVisible: function(object_name, record_id, record_permissions, record){
|
|
151
144
|
if(!Creator.isSpaceAdmin()){
|
|
152
145
|
return false
|
|
153
146
|
}
|
|
@@ -254,7 +254,6 @@ fields:
|
|
|
254
254
|
group: script
|
|
255
255
|
blackbox: true
|
|
256
256
|
is_wide: true
|
|
257
|
-
visible_on: "{{false}}"
|
|
258
257
|
form.onRendered:
|
|
259
258
|
type: code
|
|
260
259
|
language: javascript
|
|
@@ -480,25 +479,25 @@ actions:
|
|
|
480
479
|
# label: Export
|
|
481
480
|
# visible: true
|
|
482
481
|
# on: record
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
482
|
+
form:
|
|
483
|
+
afterInsert: !!js/function |
|
|
484
|
+
function(){
|
|
485
|
+
$("body").addClass('loading');
|
|
486
|
+
setTimeout(function(){
|
|
487
|
+
window.location.reload();
|
|
488
|
+
}, 2500);
|
|
489
|
+
}
|
|
490
|
+
afterView: !!js/function |
|
|
491
|
+
function(){
|
|
492
|
+
$("div", $(".crm-header-title")).css("display", "inline");
|
|
493
|
+
window.stores.API.client.sobject(this.doc.name).getConfig().then((res)=>{
|
|
494
|
+
if(!res.idFieldName){
|
|
495
|
+
return $(".crm-header-title").append('<span class="text-xs inline-block py-1 px-2.5 leading-none text-center whitespace-nowrap align-baseline font-bold bg-red-600 text-white rounded">'+TAPi18n.__("请配置主键字段")+'</span>')
|
|
496
|
+
}
|
|
497
|
+
}).catch(function(err){
|
|
498
|
+
return console.error(err.message);
|
|
499
|
+
});
|
|
500
|
+
}
|
|
502
501
|
permission_set:
|
|
503
502
|
user:
|
|
504
503
|
allowCreate: false
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-object-database",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
],
|
|
12
12
|
"description": "steedos package",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@steedos-widgets/amis-lib": "^1.0.
|
|
14
|
+
"@steedos-widgets/amis-lib": "^1.0.10"
|
|
15
15
|
},
|
|
16
16
|
"repository": {},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "b2393877080bbb08d758ce883522d37bc0a12ba2"
|
|
19
19
|
}
|
package/package.service.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 1985-10-26 16:15:00
|
|
4
4
|
* @LastEditors: sunhaolin@hotoa.com
|
|
5
|
-
* @LastEditTime: 2022-
|
|
5
|
+
* @LastEditTime: 2022-07-29 13:29:26
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
"use strict";
|
|
@@ -22,8 +22,7 @@ module.exports = {
|
|
|
22
22
|
settings: {
|
|
23
23
|
packageInfo: {
|
|
24
24
|
path: __dirname,
|
|
25
|
-
name: packageName
|
|
26
|
-
isPackage: false
|
|
25
|
+
name: packageName
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
28
|
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
name: delete_object
|
|
2
|
-
amis_schema: |-
|
|
3
|
-
{
|
|
4
|
-
"type": "service",
|
|
5
|
-
"body": [
|
|
6
|
-
{
|
|
7
|
-
"type": "button",
|
|
8
|
-
"label": "删除",
|
|
9
|
-
"id": "u:delete_object",
|
|
10
|
-
"onEvent": {
|
|
11
|
-
"click": {
|
|
12
|
-
"actions": [
|
|
13
|
-
{
|
|
14
|
-
"actionType": "dialog",
|
|
15
|
-
"dialog": {
|
|
16
|
-
"type": "dialog",
|
|
17
|
-
"title": "删除对象: ${record.label}",
|
|
18
|
-
"body": [
|
|
19
|
-
{
|
|
20
|
-
"type": "tpl",
|
|
21
|
-
"tpl": "<div>\n<div style=\"text-align: left;\">删除一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除对象的字段和按钮</li>\n<li style=\"text-align: left;\">删除对象的选项卡和列表视图删除对象的页面布局</li>\n<li style=\"text-align: left;\">删除对象的权限</li>\n<li style=\"text-align: left;\">删除对象的验证规则</li>\n<li style=\"text-align: left;\">删除对象的限制规则</li>\n<li style=\"text-align: left;\">删除对象的共享规则</li>\n<li style=\"text-align: left;\">删除使用该对象的流程映射</li>\n<li style=\"text-align: left;\">删除使用该对象的开放流程</li>\n<li style=\"text-align: left;\">删除使用该对象的页面</li>\n</ul>\n</div>",
|
|
22
|
-
"inline": true,
|
|
23
|
-
"id": "u:6d0819fc0bda"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"id": "u:b5c0f98dc113",
|
|
27
|
-
"closeOnEsc": false,
|
|
28
|
-
"closeOnOutside": false,
|
|
29
|
-
"showCloseButton": true,
|
|
30
|
-
"data": {
|
|
31
|
-
"&": "$$",
|
|
32
|
-
"record": "${record}"
|
|
33
|
-
},
|
|
34
|
-
"onEvent": {
|
|
35
|
-
"confirm": {
|
|
36
|
-
"weight": 0,
|
|
37
|
-
"actions": [
|
|
38
|
-
{
|
|
39
|
-
"componentId": "",
|
|
40
|
-
"args": {
|
|
41
|
-
"api": {
|
|
42
|
-
"url": "${context.rootUrl}/graphql",
|
|
43
|
-
"method": "post",
|
|
44
|
-
"data": {
|
|
45
|
-
"&": "$$",
|
|
46
|
-
"record": "${record}"
|
|
47
|
-
},
|
|
48
|
-
"requestAdaptor": "console.log(`api`, api);const record = api.body.record; \napi.data = {\n query: `\n mutation{\n objects__delete(id: \"${record._id}\")\n }\n `\n}",
|
|
49
|
-
"headers": {
|
|
50
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"messages": {}
|
|
54
|
-
},
|
|
55
|
-
"actionType": "ajax"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"componentId": "",
|
|
59
|
-
"args": {
|
|
60
|
-
"url": "/app/admin/objects/grid/all"
|
|
61
|
-
},
|
|
62
|
-
"actionType": "link"
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"weight": 0
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
],
|
|
75
|
-
"regions": [
|
|
76
|
-
"body"
|
|
77
|
-
],
|
|
78
|
-
"data": {
|
|
79
|
-
},
|
|
80
|
-
"bodyClassName": "p-0",
|
|
81
|
-
"id": "u:46d1821365fc"
|
|
82
|
-
}
|
|
83
|
-
is_enable: true
|
|
84
|
-
label: 删除
|
|
85
|
-
'on': record_only_more
|
|
86
|
-
type: amis_button
|
|
87
|
-
visible: true
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "page",
|
|
3
|
-
"body": [
|
|
4
|
-
{
|
|
5
|
-
"type": "steedos-record-detail-header",
|
|
6
|
-
"label": "标题面板",
|
|
7
|
-
"objectApiName": "${objectName}",
|
|
8
|
-
"recordId": "${recordId}",
|
|
9
|
-
"onEvent": {
|
|
10
|
-
"recordLoaded": {
|
|
11
|
-
"actions": [
|
|
12
|
-
{
|
|
13
|
-
"actionType": "setValue",
|
|
14
|
-
"args": {
|
|
15
|
-
"value": {
|
|
16
|
-
"recordLoaded": true
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"actionType": "reload",
|
|
22
|
-
"data": {
|
|
23
|
-
"name": "${record.label}",
|
|
24
|
-
"record": "${record}",
|
|
25
|
-
"recordLoaded": true
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"id": "u:bc56cf9d43bc"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"type": "tabs",
|
|
35
|
-
"tabs": [
|
|
36
|
-
{
|
|
37
|
-
"title": "详情",
|
|
38
|
-
"body": [
|
|
39
|
-
{
|
|
40
|
-
"type": "steedos-object-form",
|
|
41
|
-
"label": "对象表单",
|
|
42
|
-
"mode": "read",
|
|
43
|
-
"objectApiName": "${objectName}",
|
|
44
|
-
"recordId": "${recordId}",
|
|
45
|
-
"labelAlign": "left",
|
|
46
|
-
"id": "u:4eb5fa6f6fad"
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"id": "u:b2fbc13aabb8"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"title": "对象字段",
|
|
53
|
-
"body": [
|
|
54
|
-
{
|
|
55
|
-
"type": "steedos-object-related-listview",
|
|
56
|
-
"objectApiName": "objects",
|
|
57
|
-
"recordId": "${recordId}",
|
|
58
|
-
"relatedObjectApiName": "object_fields",
|
|
59
|
-
"id": "u:6bef459155bd",
|
|
60
|
-
"top": 2000
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
"id": "u:f1a52545b642"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"title": "列表视图",
|
|
67
|
-
"body": [
|
|
68
|
-
{
|
|
69
|
-
"type": "steedos-object-related-listview",
|
|
70
|
-
"objectApiName": "objects",
|
|
71
|
-
"recordId": "${recordId}",
|
|
72
|
-
"relatedObjectApiName": "object_listviews",
|
|
73
|
-
"id": "u:c415f75c5557",
|
|
74
|
-
"perPage": 20
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
"id": "u:df900c5f2119"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"title": "操作按钮",
|
|
81
|
-
"body": [
|
|
82
|
-
{
|
|
83
|
-
"type": "steedos-object-related-listview",
|
|
84
|
-
"objectApiName": "objects",
|
|
85
|
-
"recordId": "${recordId}",
|
|
86
|
-
"relatedObjectApiName": "object_actions",
|
|
87
|
-
"perPage": 20,
|
|
88
|
-
"id": "u:e1a8b77a140c"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"id": "u:d75b105f6d02"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"title": "页面布局",
|
|
95
|
-
"body": [
|
|
96
|
-
{
|
|
97
|
-
"type": "steedos-object-related-listview",
|
|
98
|
-
"objectApiName": "objects",
|
|
99
|
-
"recordId": "${recordId}",
|
|
100
|
-
"relatedObjectApiName": "object_layouts",
|
|
101
|
-
"id": "u:ed9559f8aa86",
|
|
102
|
-
"perPage": 20
|
|
103
|
-
}
|
|
104
|
-
],
|
|
105
|
-
"id": "u:ee4ab13a92e6"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"title": "对象权限",
|
|
109
|
-
"body": [
|
|
110
|
-
{
|
|
111
|
-
"type": "steedos-object-related-listview",
|
|
112
|
-
"objectApiName": "objects",
|
|
113
|
-
"recordId": "${recordId}",
|
|
114
|
-
"relatedObjectApiName": "permission_objects",
|
|
115
|
-
"perPage": 20
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"title": "流程映射",
|
|
121
|
-
"body": [
|
|
122
|
-
{
|
|
123
|
-
"type": "steedos-object-related-listview",
|
|
124
|
-
"objectApiName": "objects",
|
|
125
|
-
"recordId": "${recordId}",
|
|
126
|
-
"relatedObjectApiName": "object_workflows",
|
|
127
|
-
"perPage": 20,
|
|
128
|
-
"id": "u:e14df76cfa51"
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"id": "u:cbc13e1a7033"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"title": "验证规则",
|
|
135
|
-
"body": [
|
|
136
|
-
{
|
|
137
|
-
"type": "steedos-object-related-listview",
|
|
138
|
-
"objectApiName": "objects",
|
|
139
|
-
"recordId": "${recordId}",
|
|
140
|
-
"relatedObjectApiName": "object_validation_rules",
|
|
141
|
-
"perPage": 20
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"title": "限制规则",
|
|
147
|
-
"body": [
|
|
148
|
-
{
|
|
149
|
-
"type": "steedos-object-related-listview",
|
|
150
|
-
"objectApiName": "objects",
|
|
151
|
-
"recordId": "${recordId}",
|
|
152
|
-
"relatedObjectApiName": "restriction_rules",
|
|
153
|
-
"perPage": 20
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"title": "共享规则",
|
|
159
|
-
"body": [
|
|
160
|
-
{
|
|
161
|
-
"type": "steedos-object-related-listview",
|
|
162
|
-
"objectApiName": "objects",
|
|
163
|
-
"recordId": "${recordId}",
|
|
164
|
-
"relatedObjectApiName": "share_rules",
|
|
165
|
-
"perPage": 20
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
],
|
|
170
|
-
"id": "u:6a3b45d7adcf",
|
|
171
|
-
"tabsMode": "vertical",
|
|
172
|
-
"className": "object-detail-tabs mt-3 bg-white border-b sm:shadow sm:rounded sm:border border-slate-300",
|
|
173
|
-
"toolbarClassName": "",
|
|
174
|
-
"linksClassName": "",
|
|
175
|
-
"contentClassName": "bg-white"
|
|
176
|
-
}
|
|
177
|
-
],
|
|
178
|
-
"regions": [
|
|
179
|
-
"body"
|
|
180
|
-
],
|
|
181
|
-
"data": {
|
|
182
|
-
"objectName": "objects",
|
|
183
|
-
"recordId": "contract_bidding_information",
|
|
184
|
-
"context": {
|
|
185
|
-
"rootUrl": "http://127.0.0.1:5200"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"id": "page_objects_record_detail",
|
|
189
|
-
"name": "page_objects_record_detail",
|
|
190
|
-
"bodyClassName": "",
|
|
191
|
-
"className": "object-detail-page"
|
|
192
|
-
}
|