@steedos/standard-object-database 2.4.0-beta.3 → 2.4.0-beta.31
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/14.object_fields.observe.object.js +26 -15
- package/main/default/objects/15.permission_objects.observe.object.js +24 -15
- 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.layouts.action.js +5 -2
- package/main/default/objects/object_layouts.object.yml +2 -12
- 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/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 +19 -12
- package/main/default/objects/objects.object.yml +2 -0
- package/package.json +3 -3
|
@@ -1,24 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-02-22 10:23:14
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require("@steedos/objectql");
|
|
2
9
|
const objectName = "object_fields";
|
|
3
10
|
Meteor.startup(function () {
|
|
4
11
|
var _change, _remove, inited = false;
|
|
5
12
|
_change = function (document) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
// 重置字段权限延迟10秒,防止对象服务未上线
|
|
14
|
+
setTimeout(()=>{
|
|
15
|
+
try {
|
|
16
|
+
console.log("====resetAllPermissionSetFieldPermissions====")
|
|
17
|
+
objectql.getSteedosSchema().broker.call(`permission_fields.resetAllPermissionSetFieldPermissions`, {
|
|
18
|
+
objectName: document.object
|
|
19
|
+
}, {
|
|
20
|
+
meta: {
|
|
21
|
+
user: {
|
|
22
|
+
userId: document.owner,
|
|
23
|
+
spaceId: document.space,
|
|
24
|
+
company_id: document.company_id,
|
|
25
|
+
company_ids: document.company_ids,
|
|
26
|
+
}
|
|
16
27
|
}
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
28
|
+
});
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error(`resetAllPermissionSetFieldPermissions`, error)
|
|
31
|
+
}
|
|
32
|
+
}, 1000 * 10)
|
|
22
33
|
};
|
|
23
34
|
Creator.getCollection(objectName).find({}, {
|
|
24
35
|
fields: {
|
|
@@ -1,24 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: baozhoutao@steedos.com
|
|
3
|
+
* @Date: 2022-08-05 14:17:44
|
|
4
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
+
* @LastEditTime: 2023-02-22 10:32:01
|
|
6
|
+
* @Description:
|
|
7
|
+
*/
|
|
1
8
|
const objectql = require("@steedos/objectql");
|
|
2
9
|
const objectName = "permission_objects";
|
|
3
10
|
Meteor.startup(function () {
|
|
4
11
|
var _change, _remove, inited = false;
|
|
5
12
|
_change = function (document) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
setTimeout(()=>{
|
|
14
|
+
try {
|
|
15
|
+
objectql.getSteedosSchema().broker.call(`permission_fields.resetFieldPermissions`, {
|
|
16
|
+
permissionObjectId: document._id
|
|
17
|
+
}, {
|
|
18
|
+
meta: {
|
|
19
|
+
user: {
|
|
20
|
+
userId: document.owner,
|
|
21
|
+
spaceId: document.space,
|
|
22
|
+
company_id: document.company_id,
|
|
23
|
+
company_ids: document.company_ids,
|
|
24
|
+
}
|
|
16
25
|
}
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
26
|
+
});
|
|
27
|
+
} catch (error) {
|
|
28
|
+
console.error(`resetFieldPermissions`, error)
|
|
29
|
+
}
|
|
30
|
+
}, 1000 * 10)
|
|
22
31
|
};
|
|
23
32
|
Creator.getCollection(objectName).find({}, {
|
|
24
33
|
fields: {
|
|
@@ -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,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,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
|
}
|
|
@@ -140,7 +146,8 @@ module.exports = {
|
|
|
140
146
|
// }
|
|
141
147
|
// }, null, { iconPath: '/assets/icons' })
|
|
142
148
|
// },
|
|
143
|
-
delete_objectVisible: function(object_name, record_id, record_permissions,
|
|
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
|
}
|
|
@@ -242,6 +242,7 @@ fields:
|
|
|
242
242
|
omit: true
|
|
243
243
|
disabled: false
|
|
244
244
|
readonly: false
|
|
245
|
+
visible_on: "{{global.mode ==='read' ? true : false}}"
|
|
245
246
|
reload_time:
|
|
246
247
|
type: datetime
|
|
247
248
|
hidden: true
|
|
@@ -254,6 +255,7 @@ fields:
|
|
|
254
255
|
group: script
|
|
255
256
|
blackbox: true
|
|
256
257
|
is_wide: true
|
|
258
|
+
visible_on: "{{false}}"
|
|
257
259
|
form.onRendered:
|
|
258
260
|
type: code
|
|
259
261
|
language: javascript
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-object-database",
|
|
3
|
-
"version": "2.4.0-beta.
|
|
3
|
+
"version": "2.4.0-beta.31",
|
|
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": "a774174cebbb39c961ad03e20e990781082c8c04"
|
|
19
19
|
}
|