@steedos/standard-object-database 2.3.5 → 2.3.6
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 +0 -16
- package/main/default/objects/object_fields.object.yml +4 -23
- package/main/default/objects/object_layouts/buttons/standard_edit.button.yml +1 -1
- package/main/default/objects/object_layouts.layouts.action.js +5 -2
- package/main/default/objects/object_layouts.object.yml +2 -12
- package/main/default/objects/object_listviews/buttons/amis_buttons.button.yml +2 -11
- package/main/default/objects/object_listviews.action.js +4 -3
- package/main/default/objects/object_listviews.object.yml +14 -16
- package/main/default/objects/object_related_list.object.yml +1 -17
- package/main/default/objects/object_triggers.object.yml +0 -16
- package/main/default/objects/object_validation_rules.action.js +2 -1
- package/main/default/objects/object_validation_rules.object.yml +0 -4
- package/main/default/objects/objects/buttons/delete_object.button.yml +87 -0
- package/main/default/objects/objects/pages/object_detail.page.amis.json +192 -0
- package/main/default/objects/objects/pages/object_detail.page.yml +12 -0
- package/main/default/objects/objects.action.js +71 -64
- package/main/default/objects/objects.object.yml +20 -19
- package/package.json +3 -3
- package/package.service.js +3 -2
|
@@ -13,22 +13,6 @@ 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
|
-
}
|
|
32
16
|
label:
|
|
33
17
|
type: text
|
|
34
18
|
label: Label
|
|
@@ -14,24 +14,7 @@ fields:
|
|
|
14
14
|
reference_to_field: name
|
|
15
15
|
required: true
|
|
16
16
|
write_requires_master_read: true
|
|
17
|
-
|
|
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
|
-
}
|
|
17
|
+
filters: ['name', 'notcontains', ['base','core','space_users_invite','_object_reload_logs']]
|
|
35
18
|
sort_no: 110
|
|
36
19
|
label:
|
|
37
20
|
type: text
|
|
@@ -70,6 +53,8 @@ fields:
|
|
|
70
53
|
value: html
|
|
71
54
|
- label: Code
|
|
72
55
|
value: code
|
|
56
|
+
- label: Markdown
|
|
57
|
+
value: markdown
|
|
73
58
|
- label: Select
|
|
74
59
|
value: select
|
|
75
60
|
- label: Boolean
|
|
@@ -122,10 +107,6 @@ fields:
|
|
|
122
107
|
label: Reference to
|
|
123
108
|
reference_to: objects
|
|
124
109
|
reference_to_field: name
|
|
125
|
-
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
126
|
-
function () {
|
|
127
|
-
return Steedos.getObjectsOptions();
|
|
128
|
-
}
|
|
129
110
|
visible_on: "{{['lookup', 'master_detail'].indexOf(formData.type) > -1 ? true: false}}"
|
|
130
111
|
required: "{{['master_detail'].indexOf(formData.type) > -1 ? true: false}}"
|
|
131
112
|
sort_no: 180
|
|
@@ -167,7 +148,7 @@ fields:
|
|
|
167
148
|
required: "{{['autonumber', 'formula'].indexOf(formData.type) > -1 ? true: false}}"
|
|
168
149
|
sort_no: 210
|
|
169
150
|
data_type:
|
|
170
|
-
type:
|
|
151
|
+
type: lookup
|
|
171
152
|
label: Data Type
|
|
172
153
|
inlineHelpText: This field must be filled when the field type is 'Formula'
|
|
173
154
|
depend_on:
|
|
@@ -13,9 +13,11 @@ module.exports = {
|
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
},
|
|
16
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
17
|
-
|
|
16
|
+
customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
17
|
+
var record = data && data.record;
|
|
18
|
+
return Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
18
19
|
},
|
|
20
|
+
/*
|
|
19
21
|
standard_new: function (object_name, record_id, fields){
|
|
20
22
|
var object = Creator.getObject(object_name);
|
|
21
23
|
var gridName = this.action.gridName;
|
|
@@ -48,6 +50,7 @@ module.exports = {
|
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
52
|
},
|
|
53
|
+
*/
|
|
51
54
|
/*
|
|
52
55
|
standard_edit: function (object_name, record_id, fields){
|
|
53
56
|
var object = Creator.getObject(object_name);
|
|
@@ -22,18 +22,6 @@ 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
|
-
}
|
|
37
25
|
type:
|
|
38
26
|
type: select
|
|
39
27
|
options:
|
|
@@ -51,6 +39,8 @@ fields:
|
|
|
51
39
|
multiple: true
|
|
52
40
|
required: true
|
|
53
41
|
create: false
|
|
42
|
+
reference_to: permission_set
|
|
43
|
+
reference_to_field: name
|
|
54
44
|
optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
55
45
|
function () {
|
|
56
46
|
var profiles = Creator.odata.query('permission_set', {$filter: "(type eq 'profile')"}, true);
|
|
@@ -31,23 +31,14 @@ amis_schema: |-
|
|
|
31
31
|
},
|
|
32
32
|
"tooltip": "重置列表视图Amis Schema",
|
|
33
33
|
"tooltipPlacement": "top",
|
|
34
|
-
"className": "
|
|
34
|
+
"className": ""
|
|
35
35
|
}
|
|
36
36
|
],
|
|
37
37
|
"regions": [
|
|
38
38
|
"body"
|
|
39
39
|
],
|
|
40
40
|
"data": {
|
|
41
|
-
|
|
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": {}
|
|
41
|
+
"context": "${context}"
|
|
51
42
|
},
|
|
52
43
|
"id": "u:9a37e91e4b8d",
|
|
53
44
|
"bodyClassName": "p-0"
|
|
@@ -31,8 +31,9 @@ module.exports = {
|
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
},
|
|
34
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
35
|
-
|
|
34
|
+
customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
35
|
+
var record = data && data.record;
|
|
36
|
+
return Creator.baseObject.actions.standard_new.visible() && record.is_system;
|
|
36
37
|
},
|
|
37
38
|
copy: function(object_name, record_id){
|
|
38
39
|
let newRecord = null; // _.clone(Creator.getListView(Session.get("object_name"), record_id));
|
|
@@ -87,7 +88,7 @@ module.exports = {
|
|
|
87
88
|
}
|
|
88
89
|
Steedos.Page.Form.StandardNew.render(Session.get("app_id"), 'object_listviews', t("creator_list_copy_list_view"), data, {});
|
|
89
90
|
},
|
|
90
|
-
copyVisible: function(object_name, record_id, record_permissions,
|
|
91
|
+
copyVisible: function(object_name, record_id, record_permissions, data){
|
|
91
92
|
return true;
|
|
92
93
|
},
|
|
93
94
|
showDesign: function (object_name, record_id) {
|
|
@@ -22,22 +22,6 @@ 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
|
-
}
|
|
41
25
|
filter_scope:
|
|
42
26
|
label: Filter Scope
|
|
43
27
|
type: select
|
|
@@ -320,6 +304,20 @@ fields:
|
|
|
320
304
|
required: false
|
|
321
305
|
is_wide: true
|
|
322
306
|
# 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: 数据接口
|
|
323
321
|
paging:
|
|
324
322
|
enabled: false
|
|
325
323
|
list_views:
|
|
@@ -9,22 +9,6 @@ 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
|
-
}
|
|
28
12
|
objectName:
|
|
29
13
|
label: Related Object
|
|
30
14
|
type: lookup
|
|
@@ -42,7 +26,7 @@ fields:
|
|
|
42
26
|
_options = [];
|
|
43
27
|
|
|
44
28
|
_.forEach(Creator.objectsByName, function (o, k) {
|
|
45
|
-
if(_.
|
|
29
|
+
if(_.includes(['cms_files', 'instances', 'tasks', 'notes', 'events', 'approvals', 'audit_records'], k)){
|
|
46
30
|
return _options.push({
|
|
47
31
|
label: o.label,
|
|
48
32
|
value: k,
|
|
@@ -18,22 +18,6 @@ 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
|
-
}
|
|
37
21
|
# on:
|
|
38
22
|
# label: 运行于
|
|
39
23
|
# type: lookup
|
|
@@ -24,7 +24,8 @@ module.exports = {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
},
|
|
27
|
-
customizeVisible: function(object_name, record_id, record_permissions,
|
|
27
|
+
customizeVisible: function(object_name, record_id, record_permissions, data){
|
|
28
|
+
var record = data && data.record;
|
|
28
29
|
if(!record){
|
|
29
30
|
record = {}
|
|
30
31
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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
|
|
@@ -0,0 +1,192 @@
|
|
|
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
|
+
}
|
|
@@ -1,6 +1,9 @@
|
|
|
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
|
+
}
|
|
4
7
|
if(!record){
|
|
5
8
|
return toastr.error("未找到记录");
|
|
6
9
|
}
|
|
@@ -19,15 +22,16 @@ module.exports = {
|
|
|
19
22
|
}
|
|
20
23
|
}
|
|
21
24
|
|
|
22
|
-
window.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
window.open(Creator.getRelativeUrl("/app/admin/" + record.name));
|
|
26
|
+
// SteedosUI.Object.getUISchema(record.name).then((res)=>{
|
|
27
|
+
// if(res.idFieldName){
|
|
28
|
+
// window.open(Creator.getRelativeUrl("/app/-/" + record.name));
|
|
29
|
+
// }else{
|
|
30
|
+
// return toastr.error("请配置主键字段");
|
|
31
|
+
// }
|
|
32
|
+
// }).catch(function(err){
|
|
33
|
+
// return window.toastr.error(err.message);
|
|
34
|
+
// })
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
|
|
@@ -38,7 +42,8 @@ module.exports = {
|
|
|
38
42
|
// Steedos.openWindow(Creator.getRelativeUrl("/app/-/" + record.name + "/grid/all"))
|
|
39
43
|
// }
|
|
40
44
|
},
|
|
41
|
-
show_objectVisible: function(object_name, record_id, record_permissions,
|
|
45
|
+
show_objectVisible: function(object_name, record_id, record_permissions, data){
|
|
46
|
+
var record = data && data.record;
|
|
42
47
|
if(!Creator.isSpaceAdmin()){
|
|
43
48
|
return false
|
|
44
49
|
}
|
|
@@ -76,7 +81,8 @@ module.exports = {
|
|
|
76
81
|
return toastr.error('复制失败: 未启用API');
|
|
77
82
|
}
|
|
78
83
|
},
|
|
79
|
-
copy_odataVisible: function(object_name, record_id, record_permissions,
|
|
84
|
+
copy_odataVisible: function(object_name, record_id, record_permissions, data){
|
|
85
|
+
var record = data && data.record;
|
|
80
86
|
if(!Creator.isSpaceAdmin()){
|
|
81
87
|
return false
|
|
82
88
|
}
|
|
@@ -87,60 +93,61 @@ module.exports = {
|
|
|
87
93
|
return true;
|
|
88
94
|
}
|
|
89
95
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
96
|
+
// delete_object: function (object_name, record_id, fields) {
|
|
97
|
+
// var record = Creator.getObjectRecord(object_name, record_id, 'name');
|
|
98
|
+
// SteedosUI.showModal(stores.ComponentRegistry.components.ObjectForm, {
|
|
99
|
+
// name: "remove-object",
|
|
100
|
+
// title: '删除对象',
|
|
101
|
+
// width: '540px',
|
|
102
|
+
// layout: 'horizontal',
|
|
103
|
+
// modalProps: {
|
|
104
|
+
// width: "540px",
|
|
105
|
+
// style: {
|
|
106
|
+
// width: "540px",
|
|
107
|
+
// maxWidth: "540px",
|
|
108
|
+
// minWidth: "480px"
|
|
109
|
+
// }
|
|
110
|
+
// },
|
|
111
|
+
// initialValues:{
|
|
112
|
+
// md: "删除一个自定义对象进行以下操作:\n\n* 删除对象的字段和按钮\n* 删除对象的选项卡和列表视图\n* 删除对象的页面布局\n* 删除对象的权限\n* 删除对象的验证规则\n* 删除对象的限制规则\n* 删除对象的共享规则\n* 删除使用该对象的流程映射\n* 删除使用该对象的开放流程\n* 删除使用该对象的页面。\n\n\\\n"
|
|
113
|
+
// },
|
|
114
|
+
// objectSchema: {
|
|
115
|
+
// fields: {
|
|
116
|
+
// md: {
|
|
117
|
+
// type: 'html',
|
|
118
|
+
// label: ' ',
|
|
119
|
+
// is_wide: true,
|
|
120
|
+
// readonly: true,
|
|
121
|
+
// }
|
|
122
|
+
// }
|
|
123
|
+
// },
|
|
124
|
+
// onFinish: async (values = {}) => {
|
|
125
|
+
// return new Promise((resolve, reject) => {
|
|
126
|
+
// window.$("body").addClass("loading");
|
|
127
|
+
// Creator.odata.delete(object_name, record_id, function() {
|
|
128
|
+
// var info= t('creator_record_remove_swal_suc');
|
|
129
|
+
// window.toastr.success(info);
|
|
130
|
+
// resolve(true)
|
|
131
|
+
// if(FlowRouter.current().route.path.endsWith("/:record_id")){
|
|
132
|
+
// var app_id = Session.get("app_id")
|
|
133
|
+
// var object_name = Session.get("object_name")
|
|
134
|
+
// FlowRouter.go(Creator.getListViewUrl(object_name, app_id, 'all'));
|
|
135
|
+
// }else{
|
|
136
|
+
// FlowRouter.reload();
|
|
137
|
+
// }
|
|
138
|
+
// window.$("body").removeClass("loading");
|
|
133
139
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
delete_objectVisible: function(object_name, record_id, record_permissions,
|
|
140
|
+
// }, function(error) {
|
|
141
|
+
// toastr.error(error.message);
|
|
142
|
+
// window.$("body").removeClass("loading");
|
|
143
|
+
// reject(false);
|
|
144
|
+
// });
|
|
145
|
+
// })
|
|
146
|
+
// }
|
|
147
|
+
// }, null, { iconPath: '/assets/icons' })
|
|
148
|
+
// },
|
|
149
|
+
delete_objectVisible: function(object_name, record_id, record_permissions, data){
|
|
150
|
+
var record = data && data.record;
|
|
144
151
|
if(!Creator.isSpaceAdmin()){
|
|
145
152
|
return false
|
|
146
153
|
}
|
|
@@ -254,6 +254,7 @@ fields:
|
|
|
254
254
|
group: script
|
|
255
255
|
blackbox: true
|
|
256
256
|
is_wide: true
|
|
257
|
+
visible_on: "{{false}}"
|
|
257
258
|
form.onRendered:
|
|
258
259
|
type: code
|
|
259
260
|
language: javascript
|
|
@@ -479,25 +480,25 @@ actions:
|
|
|
479
480
|
# label: Export
|
|
480
481
|
# visible: true
|
|
481
482
|
# on: record
|
|
482
|
-
form:
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
483
|
+
# form:
|
|
484
|
+
# afterInsert: !!js/function |
|
|
485
|
+
# function(){
|
|
486
|
+
# $("body").addClass('loading');
|
|
487
|
+
# setTimeout(function(){
|
|
488
|
+
# window.location.reload();
|
|
489
|
+
# }, 2500);
|
|
490
|
+
# }
|
|
491
|
+
# afterView: !!js/function |
|
|
492
|
+
# function(){
|
|
493
|
+
# $("div", $(".crm-header-title")).css("display", "inline");
|
|
494
|
+
# window.stores.API.client.sobject(this.doc.name).getConfig().then((res)=>{
|
|
495
|
+
# if(!res.idFieldName){
|
|
496
|
+
# 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>')
|
|
497
|
+
# }
|
|
498
|
+
# }).catch(function(err){
|
|
499
|
+
# return console.error(err.message);
|
|
500
|
+
# });
|
|
501
|
+
# }
|
|
501
502
|
permission_set:
|
|
502
503
|
user:
|
|
503
504
|
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.6",
|
|
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.22"
|
|
15
15
|
},
|
|
16
16
|
"repository": {},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "3ef6bf3744c616d6a961b3264e5f204b9697ef6a"
|
|
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-12-09 13:41:16
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
"use strict";
|
|
@@ -22,7 +22,8 @@ module.exports = {
|
|
|
22
22
|
settings: {
|
|
23
23
|
packageInfo: {
|
|
24
24
|
path: __dirname,
|
|
25
|
-
name: packageName
|
|
25
|
+
name: packageName,
|
|
26
|
+
isPackage: false
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
|