@steedos/service-core-objects 3.0.0-beta.9 → 3.0.0-beta.90
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/client/{topic.client.js → css.client.js} +2 -1
- package/main/default/client/socket.client.js +118 -0
- package/main/default/objectTranslations/base.en/base.en.objectTranslation.yml +2 -0
- package/main/default/objectTranslations/base.zh-CN/base.zh-CN.objectTranslation.yml +2 -0
- package/main/default/objectTranslations/datasources.zh-CN/datasources.zh-CN.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/instances.en/instances.en.objectTranslation.yml +45 -0
- package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +42 -0
- package/main/default/objectTranslations/license.en/license.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/object_actions.zh-CN/object_actions.zh-CN.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml +1 -5
- package/main/default/objectTranslations/object_fields.zh-CN/object_fields.zh-CN.objectTranslation.yml +3 -3
- package/main/default/objectTranslations/object_functions.zh-CN/object_functions.zh-CN.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/object_layouts.zh-CN/object_layouts.zh-CN.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/object_listviews.en/object_listviews.en.objectTranslation.yml +3 -1
- package/main/default/objectTranslations/object_listviews.zh-CN/object_listviews.zh-CN.objectTranslation.yml +5 -3
- package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +23 -18
- package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +39 -25
- package/main/default/objectTranslations/operation_logs.en/operation_logs.en.objectTranslation.yml +66 -0
- package/main/default/objectTranslations/operation_logs.zh-CN/operation_logs.zh-CN.objectTranslation.yml +66 -0
- package/main/default/objects/_base/base.client.js +11 -10
- package/main/default/objects/_base/base.object.js +279 -105
- package/main/default/objects/_base/base.object.yml +8 -0
- package/main/default/objects/announcements.object.yml +68 -0
- package/main/default/objects/apps/apps.object.yml +25 -69
- package/main/default/objects/apps/buttons/disable.button.js +3 -1
- package/main/default/objects/apps/buttons/enable.button.js +3 -1
- package/main/default/objects/audit_records.object.yml +1 -1
- package/main/default/objects/cms_files/cms_files.object.yml +2 -1
- package/main/default/objects/favorites.object.yml +65 -0
- package/main/default/objects/keyvalue/keyvalue.object.yml +1 -0
- package/main/default/objects/logs/logs.object.yml +1 -0
- package/main/default/objects/object_fields/buttons/recomputeFormulaValues.button.js +6 -2
- package/main/default/objects/object_fields/buttons/recomputeSummaryValues.button.js +6 -2
- package/main/default/objects/object_fields/buttons/standard_new.button.js +1 -1
- package/main/default/objects/object_fields/fields/_name.field.yml +1 -0
- package/main/default/objects/object_fields/fields/auto_fill_mapping.$.to.field.yml +28 -13
- package/main/default/objects/object_fields/fields/name.field.yml +1 -0
- package/main/default/objects/object_fields/fields/options.field.yml +1 -0
- package/main/default/objects/object_fields/fields/summary_filters.$.field.field.yml +16 -9
- package/main/default/objects/object_fields/fields/summary_filters.$.operation.field.yml +26 -29
- package/main/default/objects/object_fields/listviews/all.listview.yml +3 -1
- package/main/default/objects/object_fields/listviews/customize.listview.yml +3 -1
- package/main/default/objects/object_functions/fields/script.field.yml +1 -1
- package/main/default/objects/object_listviews/buttons/customize.button.js +36 -30
- package/main/default/objects/object_listviews/buttons/showDesign.button.js +6 -6
- package/main/default/objects/object_listviews/fields/adaptor.field.yml +2 -2
- package/main/default/objects/object_listviews/fields/crudDataFilter.field.yml +10 -0
- package/main/default/objects/object_listviews/fields/enable_amis_schema.field.yml +1 -0
- package/main/default/objects/object_listviews/fields/extra_columns.field.yml +18 -0
- package/main/default/objects/object_listviews/fields/requestAdaptor.field.yml +2 -2
- package/main/default/objects/object_listviews/object_listviews.object.yml +1 -1
- package/main/default/objects/object_triggers/fields/handler.field.yml +1 -1
- package/main/default/objects/object_webhooks/fields/fields.field.yml +1 -1
- package/main/default/objects/object_webhooks/object_webhooks.object.yml +1 -0
- package/main/default/objects/objects/buttons/custom.button.js +6 -35
- package/main/default/objects/objects/buttons/custom.button.yml +85 -1
- package/main/default/objects/objects/buttons/delete_object.button.yml +5 -4
- package/main/default/objects/objects/buttons/design_fields_layout.button.yml +1 -1
- package/main/default/objects/objects/buttons/reset.button.yml +6 -5
- package/main/default/objects/objects/buttons/show_object.button.js +2 -29
- package/main/default/objects/objects/fields/compactLayouts.field.yml +2 -2
- package/main/default/objects/objects/fields/enable_audit.field.yml +5 -0
- package/main/default/objects/objects/fields/enable_chatter.field.yml +5 -4
- package/main/default/objects/objects/fields/enable_dataloader.field.yml +0 -1
- package/main/default/objects/objects/fields/enable_enhanced_lookup.field.yml +0 -4
- package/main/default/objects/objects/fields/enable_events.field.yml +2 -2
- package/main/default/objects/objects/fields/enable_files.field.yml +1 -1
- package/main/default/objects/objects/fields/enable_form_tabs.field.yml +1 -2
- package/main/default/objects/objects/fields/enable_inline_edit.field.yml +1 -1
- package/main/default/objects/objects/fields/enable_instances.field.yml +2 -2
- package/main/default/objects/objects/fields/enable_lock_detail.field.yml +0 -1
- package/main/default/objects/objects/fields/enable_notes.field.yml +2 -2
- package/main/default/objects/objects/fields/enable_tasks.field.yml +1 -1
- package/main/default/objects/objects/fields/enable_tree.field.yml +0 -1
- package/main/default/objects/objects/fields/field_groups.field.yml +1 -1
- package/main/default/objects/objects/fields/in_development.field.yml +0 -1
- package/main/default/objects/objects/fields/is_deleted.field.yml +1 -0
- package/main/default/objects/objects/fields/name.field.yml +1 -4
- package/main/default/objects/objects/fields/table_name.field.yml +0 -1
- package/main/default/objects/objects/listviews/all.listview.yml +4 -1
- package/main/default/objects/objects/listviews/customize.listview.yml +3 -1
- package/main/default/objects/objects/listviews/deleted.listview.yml +3 -1
- package/main/default/objects/objects/listviews/metadata.listview.yml +3 -1
- package/main/default/objects/objects/listviews/system.listview.yml +3 -1
- package/main/default/objects/objects/objects.object.yml +1 -1
- package/main/default/objects/permission_set.object.yml +0 -4
- package/main/default/objects/queue_import.object.yml +16 -1
- package/main/default/objects/roles.object.yml +1 -5
- package/main/default/objects/space_users/buttons/standard_edit.button.js +0 -1
- package/main/default/objects/space_users/fields/locale.field.yml +2 -1
- package/main/default/pages/cms_files_preview.page.amis.json +20 -1
- package/main/default/pages/object_detail.page.amis.json +17 -11
- package/main/default/pages/object_fields_form.page.amis.json +0 -11
- package/main/default/pages/object_validation_rules_form.page.amis.json +38 -0
- package/main/default/pages/object_validation_rules_form.page.yml +13 -0
- package/main/default/pages/object_webhooks_form.page.amis.json +1 -1
- package/main/default/pages/space_users_list.page.amis.json +2 -2
- package/main/default/routes/importRecords.router.js +87 -0
- package/main/default/routes/notifications.router.js +113 -0
- package/main/default/routes/object_fields_design.ejs +19 -8
- package/main/default/services/app-design.service.js +2 -1
- package/main/default/services/notifications.service.js +190 -0
- package/main/default/services/users.service.js +1 -1
- package/main/default/tabs/{admin_process_delegation_rules.tab.yml → admin_bull_dashboard.tab.yml} +9 -12
- package/main/default/translations/en.translation.yml +3 -2
- package/main/default/translations/zh-CN.translation.yml +3 -2
- package/main/default/triggers/objects_set_default_object_properties_trigger.trigger.yml +9 -6
- package/main/default/triggers/queue_import.trigger.js +16 -0
- package/package.json +4 -3
- package/package.service.js +3 -2
- package/public/platform.css +62 -0
- package/public/topic.css +17 -37
- package/main/default/objectTranslations/flow_positions.en/flow_positions.en.objectTranslation.yml +0 -19
- package/main/default/objectTranslations/flow_positions.zh-CN/flow_positions.zh-CN.objectTranslation.yml +0 -19
- package/main/default/objectTranslations/flow_roles.en/flow_roles.en.objectTranslation.yml +0 -11
- package/main/default/objectTranslations/flow_roles.zh-CN/flow_roles.zh-CN.objectTranslation.yml +0 -14
- package/main/default/objectTranslations/flows.en/flows.en.objectTranslation.yml +0 -317
- package/main/default/objectTranslations/flows.zh-CN/flows.zh-CN.objectTranslation.yml +0 -314
- package/main/default/objects/apps/buttons/amis_edit.button.yml +0 -39
- package/main/default/objects/apps/buttons/amis_new.button.yml +0 -43
- package/main/default/objects/flows/flows.object.yml +0 -1089
- package/main/default/objects/object_actions/buttons/customize.button.js +0 -33
- package/main/default/objects/object_actions/buttons/customize.button.yml +0 -3
- package/main/default/objects/object_listviews/buttons/copy.button.js +0 -58
- package/main/default/objects/object_listviews/buttons/copy.button.yml +0 -3
- package/main/default/objects/object_listviews/buttons/customize.button.yml +0 -3
- package/main/default/objects/objects/buttons/design_field_layout.button.js +0 -28
- package/main/default/objects/objects/buttons/design_field_layout.button.yml +0 -5
- package/main/default/objects/process_definition.object.yml +0 -323
- package/main/default/objects/space_users/fields/zoom.field.yml +0 -16
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: operation_logs
|
|
2
|
+
label: 安全日志
|
|
3
|
+
description:
|
|
4
|
+
fields:
|
|
5
|
+
data:
|
|
6
|
+
label: 数据
|
|
7
|
+
help:
|
|
8
|
+
description:
|
|
9
|
+
http_user_agent:
|
|
10
|
+
label: User Agent
|
|
11
|
+
help:
|
|
12
|
+
description:
|
|
13
|
+
is_mobile:
|
|
14
|
+
label: 手机
|
|
15
|
+
help:
|
|
16
|
+
description:
|
|
17
|
+
is_tablet:
|
|
18
|
+
label: 平板电脑
|
|
19
|
+
help:
|
|
20
|
+
description:
|
|
21
|
+
message:
|
|
22
|
+
label: 消息
|
|
23
|
+
help:
|
|
24
|
+
description:
|
|
25
|
+
name:
|
|
26
|
+
label: 名称
|
|
27
|
+
help:
|
|
28
|
+
description:
|
|
29
|
+
object:
|
|
30
|
+
label: 对象
|
|
31
|
+
help:
|
|
32
|
+
description:
|
|
33
|
+
related_to:
|
|
34
|
+
label: 相关项
|
|
35
|
+
help:
|
|
36
|
+
description:
|
|
37
|
+
remote_addr:
|
|
38
|
+
label: IP 地址
|
|
39
|
+
help:
|
|
40
|
+
description:
|
|
41
|
+
remote_user:
|
|
42
|
+
label: 操作人
|
|
43
|
+
help:
|
|
44
|
+
description:
|
|
45
|
+
status:
|
|
46
|
+
label: 状态
|
|
47
|
+
help:
|
|
48
|
+
options:
|
|
49
|
+
- label: 成功
|
|
50
|
+
value: success
|
|
51
|
+
color: 008000
|
|
52
|
+
- label: 失败
|
|
53
|
+
value: fail
|
|
54
|
+
color: ff0000
|
|
55
|
+
description:
|
|
56
|
+
type:
|
|
57
|
+
label: 类型
|
|
58
|
+
help:
|
|
59
|
+
description:
|
|
60
|
+
listviews:
|
|
61
|
+
all:
|
|
62
|
+
label: 所有
|
|
63
|
+
change_password:
|
|
64
|
+
label: 修改密码
|
|
65
|
+
login:
|
|
66
|
+
label: 登录日志
|
|
@@ -41,7 +41,7 @@ Steedos.StandardObjects = {
|
|
|
41
41
|
if (permissions) {
|
|
42
42
|
return permissions["allowDelete"];
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return false;
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
standard_delete_many:{
|
|
@@ -166,14 +166,14 @@ Steedos.StandardObjects = {
|
|
|
166
166
|
// });
|
|
167
167
|
// }
|
|
168
168
|
// },
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
169
|
+
standard_submit_for_approval:{
|
|
170
|
+
visible: function (object_name, record_id) {
|
|
171
|
+
return Steedos.ProcessManager.allowSubmit(object_name, record_id);
|
|
172
|
+
},
|
|
173
|
+
// todo: function (object_name, record_id) {
|
|
174
|
+
// Steedos.ProcessManager.submit(object_name, record_id);
|
|
175
|
+
// }
|
|
176
|
+
},
|
|
177
177
|
standard_import_data:{
|
|
178
178
|
visible: function(objectName){
|
|
179
179
|
var allowCreate = Steedos.Object.base.actions.standard_new.visible.apply(this, arguments);
|
|
@@ -202,7 +202,8 @@ Steedos.StandardObjects = {
|
|
|
202
202
|
}
|
|
203
203
|
window._hasImportTemplates[objectName] = false;
|
|
204
204
|
return false;
|
|
205
|
-
}
|
|
205
|
+
},
|
|
206
|
+
todo: function(object_name){}
|
|
206
207
|
},
|
|
207
208
|
standard_export_excel:{
|
|
208
209
|
visible: function(objectName, record_id, record_permissions, props){
|
|
@@ -1,3 +1,60 @@
|
|
|
1
|
+
var standardCustomizeSaveRequestAdaptor = `
|
|
2
|
+
var uiSchema = context.uiSchema;
|
|
3
|
+
var objectFields = uiSchema.fields;
|
|
4
|
+
var objectName = context.objectName;
|
|
5
|
+
var doc = context.docForStandardCustomize;
|
|
6
|
+
var newDoc = {}
|
|
7
|
+
if(objectName === "apps"){
|
|
8
|
+
newDoc = doc;//应用中有隐藏字段,uiSchema中没有这些字段,比如字段tab_items
|
|
9
|
+
newDoc.from_code_id = doc._id;
|
|
10
|
+
delete newDoc._id;
|
|
11
|
+
delete newDoc.record_permissions;
|
|
12
|
+
delete newDoc.__filename;
|
|
13
|
+
delete newDoc.responseData;
|
|
14
|
+
delete newDoc.responseStatus;
|
|
15
|
+
}
|
|
16
|
+
else if(objectName === "permission_set"){
|
|
17
|
+
objectFields = ['name', 'label', 'type', 'license', 'lockout_interval', 'max_login_attempts', 'password_history', 'default_standard_buttons'];
|
|
18
|
+
_.each(objectFields, function(v, k){
|
|
19
|
+
if(_.has(doc, v)){
|
|
20
|
+
newDoc[v] = doc[v];
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else if(objectName === "object_listviews"){
|
|
25
|
+
_.each(objectFields, function(v, k){
|
|
26
|
+
if(_.has(doc, k)){
|
|
27
|
+
newDoc[k] = doc[k];
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
if(!newDoc.columns || !newDoc.columns.length){
|
|
32
|
+
newDoc.columns = [];
|
|
33
|
+
}
|
|
34
|
+
newDoc.columns = newDoc.columns.map((item)=>{
|
|
35
|
+
if(typeof item === 'string'){
|
|
36
|
+
return { field: item }
|
|
37
|
+
}
|
|
38
|
+
return item;
|
|
39
|
+
});
|
|
40
|
+
newDoc.from_code_id = doc._id;
|
|
41
|
+
}
|
|
42
|
+
else{
|
|
43
|
+
_.each(objectFields, function(v, k){
|
|
44
|
+
if(_.has(doc, k)){
|
|
45
|
+
newDoc[k] = doc[k];
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
delete newDoc.is_system;
|
|
50
|
+
return {
|
|
51
|
+
...api,
|
|
52
|
+
data: {
|
|
53
|
+
doc: newDoc
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
`;
|
|
57
|
+
|
|
1
58
|
module.exports = {
|
|
2
59
|
extend: 'base',
|
|
3
60
|
actions: {
|
|
@@ -266,111 +323,114 @@ module.exports = {
|
|
|
266
323
|
// return Steedos.StandardObjects.Base.Actions.standard_view_instance.todo.apply(this, arguments)
|
|
267
324
|
// }
|
|
268
325
|
// },
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
326
|
+
standard_submit_for_approval: {
|
|
327
|
+
visible: function (object_name, record_id, record_permissions, data) {
|
|
328
|
+
if (data && data.uiSchema && data.uiSchema.enable_process){
|
|
329
|
+
return Steedos.StandardObjects.Base.Actions.standard_submit_for_approval.visible.apply(this, arguments)
|
|
330
|
+
}
|
|
331
|
+
return false;
|
|
332
|
+
},
|
|
333
|
+
on: "record_only",
|
|
334
|
+
type: 'amis_button',
|
|
335
|
+
amis_schema: {
|
|
336
|
+
"type": "service",
|
|
337
|
+
"body": [
|
|
338
|
+
{
|
|
339
|
+
"type": "button",
|
|
340
|
+
"label": "提请审批",
|
|
341
|
+
"id": "u:standard_submit_for_approval",
|
|
342
|
+
"onEvent": {
|
|
343
|
+
"click": {
|
|
344
|
+
"actions": [
|
|
345
|
+
{
|
|
346
|
+
"actionType": "dialog",
|
|
347
|
+
"dialog": {
|
|
348
|
+
"type": "dialog",
|
|
349
|
+
"title": "提交待审核",
|
|
350
|
+
"body": [
|
|
351
|
+
{
|
|
352
|
+
"type": "form",
|
|
353
|
+
"id": "u:1eb06e6962d8",
|
|
354
|
+
"title": "表单",
|
|
355
|
+
"body": [
|
|
356
|
+
{
|
|
357
|
+
"type": "steedos-field",
|
|
358
|
+
"id": "u:9f4486c22f52",
|
|
359
|
+
"field": "{\n \"label\": \"意见\",\n \"name\": \"comment\",\n \"type\": \"textarea\",\n \"rows\": 3,\n \"is_wide\": true\n}",
|
|
360
|
+
"name": "comment"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"type": "steedos-field",
|
|
364
|
+
"id": "u:9f4486c22f52",
|
|
365
|
+
"field": "{\n \"label\": \"选择下一位批准人\",\n \"name\": \"approver\",\n \"type\": \"lookup\",\n \"reference_to\": \"space_users\",\n \"reference_to_field\": \"user\",\n \"required\": true,\n \"is_wide\": true\n}",
|
|
366
|
+
"name": "approver",
|
|
367
|
+
"placeholder": "",
|
|
368
|
+
"visibleOn": "${showApprover === true}"
|
|
369
|
+
}
|
|
370
|
+
],
|
|
371
|
+
"wrapWithPanel": false,
|
|
372
|
+
"mode": "normal",
|
|
373
|
+
"api": {
|
|
374
|
+
"method": "post",
|
|
375
|
+
"url": "${context.rootUrl}/api/v4/process/submit/${objectName}/${recordId}",
|
|
376
|
+
"data": {
|
|
377
|
+
"&": "$$"
|
|
378
|
+
},
|
|
379
|
+
"requestAdaptor": "\napi.data = {\n comment: api.body.comment\n};\n\nif (api.body.approver) {\n api.data.approver = api.body.approver;\n}\n\nreturn api;",
|
|
380
|
+
"adaptor": "\npayload.data = {};\npayload.data.showApprover = payload.error === 'process_approval_error_needToChooseApprover'\n\nif (payload.state === 'FAILURE') {\n if (payload.data.showApprover) {\n payload.msg = \"请选择下一位批准人\";\n } else { \n payload.msg = window.t(payload.error)\n }\n}\n\n\nreturn payload;",
|
|
381
|
+
"responseData": {
|
|
382
|
+
"&": "$$"
|
|
383
|
+
},
|
|
384
|
+
"headers": {
|
|
385
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
386
|
+
}
|
|
387
|
+
},
|
|
388
|
+
"debug": false,
|
|
389
|
+
"onEvent": {
|
|
390
|
+
"submitSucc": {
|
|
391
|
+
"weight": 0,
|
|
392
|
+
"actions": [
|
|
393
|
+
{
|
|
394
|
+
"actionType": "custom",
|
|
395
|
+
"script": `
|
|
396
|
+
doAction({
|
|
397
|
+
"actionType": "broadcast",
|
|
398
|
+
"args": {
|
|
399
|
+
"eventName": \`@data.changed.\${event.data.objectName}\`
|
|
400
|
+
},
|
|
401
|
+
"data": {
|
|
402
|
+
"objectName": \`\${event.data.objectName}\`
|
|
403
|
+
}
|
|
404
|
+
});
|
|
405
|
+
`
|
|
406
|
+
}
|
|
407
|
+
]
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
],
|
|
412
|
+
"id": "u:7a3f92e56805",
|
|
413
|
+
"closeOnEsc": false,
|
|
414
|
+
"closeOnOutside": false,
|
|
415
|
+
"showCloseButton": true,
|
|
416
|
+
"size": "md"
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"weight": 0
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"regions": [
|
|
426
|
+
"body"
|
|
427
|
+
],
|
|
428
|
+
"data": {
|
|
429
|
+
},
|
|
430
|
+
"bodyClassName": "p-0",
|
|
431
|
+
"id": "u:50444554a302"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
374
434
|
standard_export_excel: {
|
|
375
435
|
label: "Export Excel",
|
|
376
436
|
visible: function (object_name, record_id, record_permissions) {
|
|
@@ -443,5 +503,119 @@ module.exports = {
|
|
|
443
503
|
"bodyClassName": "p-0"
|
|
444
504
|
}
|
|
445
505
|
},
|
|
506
|
+
standard_customize: {
|
|
507
|
+
label: "Customize",
|
|
508
|
+
visible: function (object_name, record_id, record_permissions, data) {
|
|
509
|
+
if(object_name == "objects" || object_name == "object_fields"){
|
|
510
|
+
return false;
|
|
511
|
+
}
|
|
512
|
+
var record = data && data.record;
|
|
513
|
+
if(!record){
|
|
514
|
+
record = {}
|
|
515
|
+
}
|
|
516
|
+
var isVisible = Steedos.Object.base.actions.standard_new.visible() && record.is_system && data.uiSchema.isMetadata;
|
|
517
|
+
if (isVisible){
|
|
518
|
+
if(object_name == "apps"){
|
|
519
|
+
if(record_id === 'admin'){return false;}
|
|
520
|
+
isVisible = !record.from_code_id;
|
|
521
|
+
}
|
|
522
|
+
else if (object_name == "object_actions"){
|
|
523
|
+
isVisible = record.type == 'amis_button';
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
return isVisible;
|
|
527
|
+
},
|
|
528
|
+
on: "record_only",
|
|
529
|
+
type: 'amis_button',
|
|
530
|
+
amis_schema: {
|
|
531
|
+
"type": "service",
|
|
532
|
+
"body": [
|
|
533
|
+
{
|
|
534
|
+
"type": "button",
|
|
535
|
+
"label": "${'CustomAction.base.standard_customize' | t}",
|
|
536
|
+
"id": "u:standard_customize",
|
|
537
|
+
"onEvent": {
|
|
538
|
+
"click": {
|
|
539
|
+
"weight": 0,
|
|
540
|
+
"actions": [
|
|
541
|
+
{
|
|
542
|
+
"ignoreError": false,
|
|
543
|
+
"actionType": "ajax",
|
|
544
|
+
"outputVar": "docForStandardCustomize",
|
|
545
|
+
"options": {},
|
|
546
|
+
"api": {
|
|
547
|
+
"url": "${context.rootUrl}/api/v1/${objectName}/${recordId}",
|
|
548
|
+
"method": "get",
|
|
549
|
+
"adaptor": "",
|
|
550
|
+
"messages": {}
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"ignoreError": false,
|
|
555
|
+
"actionType": "ajax",
|
|
556
|
+
"outputVar": "standardCustomizeResponseResult",
|
|
557
|
+
"options": {},
|
|
558
|
+
"api": {
|
|
559
|
+
"url": "${context.rootUrl}/api/v1/${objectName}",
|
|
560
|
+
"method": "post",
|
|
561
|
+
"sendOn": "docForStandardCustomize",
|
|
562
|
+
"requestAdaptor": standardCustomizeSaveRequestAdaptor,
|
|
563
|
+
"adaptor": "",
|
|
564
|
+
"messages": {}
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"actionType": "link",
|
|
569
|
+
"args": {
|
|
570
|
+
"link": "/app/${appId}/${objectName}/view/${standardCustomizeResponseResult._id}"
|
|
571
|
+
},
|
|
572
|
+
"expression": "${_inDrawer != true}"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"actionType": "url",
|
|
576
|
+
"args": {
|
|
577
|
+
"link": "${context.rootUrl}/app/${appId}/${objectName}/view/${standardCustomizeResponseResult._id}",
|
|
578
|
+
"blank": true
|
|
579
|
+
},
|
|
580
|
+
"expression": "${_inDrawer == true}"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"actionType": "closeDrawer",
|
|
584
|
+
"expression": "${_inDrawer == true}"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"actionType": "broadcast",
|
|
588
|
+
"args": {
|
|
589
|
+
"eventName": "@data.changed.${objectName}"
|
|
590
|
+
},
|
|
591
|
+
"data": {
|
|
592
|
+
"objectName": "${objectName}"
|
|
593
|
+
},
|
|
594
|
+
"expression": "${_inDrawer == true}"
|
|
595
|
+
}
|
|
596
|
+
]
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
],
|
|
601
|
+
"regions": [
|
|
602
|
+
"body"
|
|
603
|
+
],
|
|
604
|
+
"data": {
|
|
605
|
+
"context": {},
|
|
606
|
+
"dataComponentId": "",
|
|
607
|
+
"record_id": "",
|
|
608
|
+
"record": {},
|
|
609
|
+
"permissions": {}
|
|
610
|
+
},
|
|
611
|
+
"bodyClassName": "p-0",
|
|
612
|
+
"dsType": "api",
|
|
613
|
+
"asideResizor": false,
|
|
614
|
+
"editorState": "default",
|
|
615
|
+
"pullRefresh": {
|
|
616
|
+
"disabled": true
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
},
|
|
446
620
|
}
|
|
447
621
|
};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
name: base
|
|
2
2
|
hidden: true
|
|
3
3
|
fields:
|
|
4
|
+
external_id:
|
|
5
|
+
type: text
|
|
6
|
+
label: 外部ID
|
|
7
|
+
visible_on: "{{false}}"
|
|
8
|
+
sort_no: 1000
|
|
4
9
|
owner:
|
|
5
10
|
label: Owner
|
|
6
11
|
type: lookup
|
|
@@ -273,6 +278,9 @@ actions:
|
|
|
273
278
|
on: list
|
|
274
279
|
standard_print:
|
|
275
280
|
label: Print
|
|
281
|
+
standard_customize:
|
|
282
|
+
label: Customize
|
|
283
|
+
on: record_only
|
|
276
284
|
permission_set:
|
|
277
285
|
none:
|
|
278
286
|
allowCreate: false
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: announcements
|
|
2
|
+
icon: announcement
|
|
3
|
+
label: Announcement
|
|
4
|
+
hidden: false
|
|
5
|
+
enable_files: true
|
|
6
|
+
enable_chatter: true
|
|
7
|
+
version: 2
|
|
8
|
+
fields:
|
|
9
|
+
name:
|
|
10
|
+
label: Title
|
|
11
|
+
type: text
|
|
12
|
+
defaultValue: ''
|
|
13
|
+
description: ''
|
|
14
|
+
inlineHelpText: ''
|
|
15
|
+
required: true
|
|
16
|
+
searchable: true
|
|
17
|
+
is_wide: true
|
|
18
|
+
body:
|
|
19
|
+
type: html
|
|
20
|
+
label: Main Body
|
|
21
|
+
rows: 5
|
|
22
|
+
required: true
|
|
23
|
+
is_wide: true
|
|
24
|
+
members:
|
|
25
|
+
type: lookup
|
|
26
|
+
label: User Members
|
|
27
|
+
reference_to: users
|
|
28
|
+
group: Members
|
|
29
|
+
multiple: true
|
|
30
|
+
filterable: true
|
|
31
|
+
is_wide: true
|
|
32
|
+
organizations:
|
|
33
|
+
type: lookup
|
|
34
|
+
label: Organization Members
|
|
35
|
+
reference_to: organizations
|
|
36
|
+
group: Members
|
|
37
|
+
multiple: true
|
|
38
|
+
filterable: true
|
|
39
|
+
is_wide: true
|
|
40
|
+
created:
|
|
41
|
+
label: Creation Time
|
|
42
|
+
created_by:
|
|
43
|
+
label: Created by
|
|
44
|
+
modified_by:
|
|
45
|
+
label: Modified by
|
|
46
|
+
list_views:
|
|
47
|
+
all:
|
|
48
|
+
label: All Announcements
|
|
49
|
+
filter_scope: space
|
|
50
|
+
columns:
|
|
51
|
+
- name
|
|
52
|
+
- created
|
|
53
|
+
- created_by
|
|
54
|
+
permission_set:
|
|
55
|
+
user:
|
|
56
|
+
allowCreate: true
|
|
57
|
+
allowDelete: true
|
|
58
|
+
allowEdit: true
|
|
59
|
+
allowRead: true
|
|
60
|
+
modifyAllRecords: false
|
|
61
|
+
viewAllRecords: true
|
|
62
|
+
admin:
|
|
63
|
+
allowCreate: true
|
|
64
|
+
allowDelete: true
|
|
65
|
+
allowEdit: true
|
|
66
|
+
allowRead: true
|
|
67
|
+
modifyAllRecords: true
|
|
68
|
+
viewAllRecords: true
|