@steedos/service-core-objects 3.0.0-beta.105 → 3.0.0-beta.107
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/announcements.en/announcements.en.objectTranslation.yml +37 -0
- package/main/default/objectTranslations/announcements.zh-CN/announcements.zh-CN.objectTranslation.yml +37 -0
- package/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml +3 -3
- package/main/default/objectTranslations/object_fields.zh-CN/object_fields.zh-CN.objectTranslation.yml +1 -1
- package/main/default/objects/_base/base.client.js +113 -114
- package/main/default/objects/_base/base.object.js +217 -215
- package/main/default/objects/object_fields/fields/description.field.yml +11 -2
- package/main/default/objects/object_fields/fields/required.field.yml +1 -1
- package/main/default/objects/space_users/fields/password_expired.field.yml +1 -1
- package/main/default/pages/apps_form.page.amis.json +1 -0
- package/package.json +3 -3
- package/public/platform.css +5 -0
- package/main/default/objectTranslations/instances.en/instances.en.objectTranslation.yml +0 -211
- package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +0 -208
package/main/default/objectTranslations/announcements.en/announcements.en.objectTranslation.yml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: announcements
|
|
2
|
+
label: Announcement
|
|
3
|
+
description:
|
|
4
|
+
fields:
|
|
5
|
+
name:
|
|
6
|
+
label: Title
|
|
7
|
+
help:
|
|
8
|
+
description:
|
|
9
|
+
body:
|
|
10
|
+
label: Main Body
|
|
11
|
+
help:
|
|
12
|
+
description:
|
|
13
|
+
members:
|
|
14
|
+
label: User Members
|
|
15
|
+
help:
|
|
16
|
+
description:
|
|
17
|
+
organizations:
|
|
18
|
+
label: Organization Members
|
|
19
|
+
help:
|
|
20
|
+
description:
|
|
21
|
+
created:
|
|
22
|
+
label: Creation Time
|
|
23
|
+
help:
|
|
24
|
+
description:
|
|
25
|
+
created_by:
|
|
26
|
+
label: Created by
|
|
27
|
+
help:
|
|
28
|
+
description:
|
|
29
|
+
modified_by:
|
|
30
|
+
label: Modified by
|
|
31
|
+
help:
|
|
32
|
+
description:
|
|
33
|
+
groups:
|
|
34
|
+
members: Members
|
|
35
|
+
listviews:
|
|
36
|
+
all:
|
|
37
|
+
label: All Announcements
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: announcements
|
|
2
|
+
label: 公告
|
|
3
|
+
description:
|
|
4
|
+
fields:
|
|
5
|
+
name:
|
|
6
|
+
label: 标题
|
|
7
|
+
help:
|
|
8
|
+
description:
|
|
9
|
+
body:
|
|
10
|
+
label: 正文
|
|
11
|
+
help:
|
|
12
|
+
description:
|
|
13
|
+
members:
|
|
14
|
+
label: 人员
|
|
15
|
+
help:
|
|
16
|
+
description:
|
|
17
|
+
organizations:
|
|
18
|
+
label: 部门
|
|
19
|
+
help:
|
|
20
|
+
description:
|
|
21
|
+
created:
|
|
22
|
+
label: 发布时间
|
|
23
|
+
help:
|
|
24
|
+
description:
|
|
25
|
+
created_by:
|
|
26
|
+
label: 发布人
|
|
27
|
+
help:
|
|
28
|
+
description:
|
|
29
|
+
modified_by:
|
|
30
|
+
label: 修改人
|
|
31
|
+
help:
|
|
32
|
+
description:
|
|
33
|
+
groups:
|
|
34
|
+
members: 发布对象
|
|
35
|
+
listviews:
|
|
36
|
+
all:
|
|
37
|
+
label: 所有公告
|
package/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml
CHANGED
|
@@ -88,7 +88,7 @@ fields:
|
|
|
88
88
|
description:
|
|
89
89
|
coordinatesType:
|
|
90
90
|
label: Coordinates Type
|
|
91
|
-
help:
|
|
91
|
+
help: "Coordinate system type: The default Baidu coordinate is 'bd09'. When using Autonavi Maps, it should be set to 'gcj02'. Autonavi Maps does not support coordinate conversion"
|
|
92
92
|
description:
|
|
93
93
|
reference_to:
|
|
94
94
|
label: Reference to
|
|
@@ -340,11 +340,11 @@ fields:
|
|
|
340
340
|
help:
|
|
341
341
|
description:
|
|
342
342
|
searchable:
|
|
343
|
-
label: Enable
|
|
343
|
+
label: Enable quick search on the list page
|
|
344
344
|
help:
|
|
345
345
|
description:
|
|
346
346
|
filterable:
|
|
347
|
-
label:
|
|
347
|
+
label: Default Filter Field
|
|
348
348
|
help:
|
|
349
349
|
description:
|
|
350
350
|
show_as_qr:
|
|
@@ -52,120 +52,119 @@ Steedos.StandardObjects = {
|
|
|
52
52
|
return permissions && permissions["allowDelete"];
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
// },
|
|
55
|
+
standard_approve:{
|
|
56
|
+
visible: function (object_name, record_id, record_permissions, props) {
|
|
57
|
+
if (!record_id) {
|
|
58
|
+
/*只在详细界面显示这个action*/
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
var object_workflow, record;
|
|
62
|
+
if (record_permissions && !record_permissions["allowEdit"]) {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
record = props.record;
|
|
66
|
+
// record_permissions = Creator.getRecordPermissions(object_name, record, Meteor.userId());
|
|
67
|
+
// if (record_permissions && !record_permissions["allowEdit"]) {
|
|
68
|
+
// return false;
|
|
69
|
+
// }
|
|
70
|
+
object_workflow = _.find(Steedos.object_workflows, function (ow) {
|
|
71
|
+
return ow.object_name === object_name && (!ow.sync_direction || ow.sync_direction == 'both' || ow.sync_direction == 'obj_to_ins');
|
|
72
|
+
});
|
|
73
|
+
if (!object_workflow) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
if (record && record.instances && record.instances.length > 0) {
|
|
77
|
+
return false;
|
|
78
|
+
}else if(record && !_.has(record,'instances') ){
|
|
79
|
+
// 如果record存在,且record的instances字段不存在,则再查询一次
|
|
80
|
+
var queryResult = Steedos.authRequest("/graphql", {
|
|
81
|
+
type: 'POST',
|
|
82
|
+
async: false,
|
|
83
|
+
data: JSON.stringify({
|
|
84
|
+
query: `{record:${object_name}__findOne(id: "${record_id}"){instances}}`
|
|
85
|
+
}),
|
|
86
|
+
contentType: 'application/json',
|
|
87
|
+
error: function () { }
|
|
88
|
+
});
|
|
89
|
+
var recordDoc = queryResult && queryResult.data && queryResult.data.record;
|
|
90
|
+
if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
|
|
91
|
+
return false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return true;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
standard_view_instance:{
|
|
98
|
+
visible: function (object_name, record_id, record_permissions, props) {
|
|
99
|
+
if (!record_id) {
|
|
100
|
+
/*只在详细界面显示这个action*/
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
var record = props.record;
|
|
104
|
+
if (record && !_.isEmpty(record.instances)) {
|
|
105
|
+
return true;
|
|
106
|
+
}else if(record && !_.has(record,'instances') ){
|
|
107
|
+
// 如果record存在且record的instances字段不存在,则再查询一次
|
|
108
|
+
var queryResult = Steedos.authRequest("/graphql", {
|
|
109
|
+
type: 'POST',
|
|
110
|
+
async: false,
|
|
111
|
+
data: JSON.stringify({
|
|
112
|
+
query: `{record:${object_name}__findOne(id: "${record_id}"){instances}}`
|
|
113
|
+
}),
|
|
114
|
+
contentType: 'application/json',
|
|
115
|
+
error: function () { }
|
|
116
|
+
});
|
|
117
|
+
var recordDoc = queryResult && queryResult.data && queryResult.data.record;
|
|
118
|
+
if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
|
|
119
|
+
return true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return false;
|
|
123
|
+
},
|
|
124
|
+
todo: function () {
|
|
125
|
+
console.log(this)
|
|
126
|
+
var record = this.record.record;
|
|
127
|
+
var data, instanceId, uobj, url;
|
|
128
|
+
if (!record.instances || !record.instances[0]) {
|
|
129
|
+
// 如果record存在且record的instances字段不存在,则再查询一次
|
|
130
|
+
var queryResult = Steedos.authRequest("/graphql", {
|
|
131
|
+
type: 'POST',
|
|
132
|
+
async: false,
|
|
133
|
+
data: JSON.stringify({
|
|
134
|
+
query: `{record:${this.object_name}__findOne(id: "${this.record_id}"){instances}}`
|
|
135
|
+
}),
|
|
136
|
+
contentType: 'application/json',
|
|
137
|
+
error: function () { }
|
|
138
|
+
});
|
|
139
|
+
var recordDoc = queryResult && queryResult.data && queryResult.data.record;
|
|
140
|
+
if (recordDoc && recordDoc.instances && recordDoc.instances.length > 0) {
|
|
141
|
+
instanceId = recordDoc.instances[0]._id;
|
|
142
|
+
}
|
|
143
|
+
} else {
|
|
144
|
+
instanceId = record.instances[0]._id;
|
|
145
|
+
}
|
|
146
|
+
if (!instanceId) {
|
|
147
|
+
console.error('instanceId not exists');
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
Steedos.authRequest(Steedos.absoluteUrl(`api/workflow/instance/check_is_removed/${instanceId}`), {
|
|
151
|
+
type: 'POST',
|
|
152
|
+
async: false,
|
|
153
|
+
data: JSON.stringify({
|
|
154
|
+
objectName: this.object_name,
|
|
155
|
+
recordId: this.record_id
|
|
156
|
+
}),
|
|
157
|
+
contentType: 'application/json',
|
|
158
|
+
success: function (res) {
|
|
159
|
+
Steedos.openWindow(Steedos.absoluteUrl(`api/workflow/instance/${instanceId}`))
|
|
160
|
+
},
|
|
161
|
+
error: function (res) {
|
|
162
|
+
// toastr.error('未找到申请单,可能已被删除,请重新发起审批。');
|
|
163
|
+
FlowRouter.reload();
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
},
|
|
169
168
|
standard_submit_for_approval:{
|
|
170
169
|
visible: function (object_name, record_id) {
|
|
171
170
|
return Steedos.ProcessManager.allowSubmit(object_name, record_id);
|