@steedos/service-core-objects 3.0.0-beta.13 → 3.0.0-beta.131
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/applications/.gitkeep +0 -0
- package/main/default/applications/admin.app.yml +179 -0
- 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/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/audit_records.en/audit_records.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/base.en/base.en.objectTranslation.yml +6 -0
- package/main/default/objectTranslations/base.zh-CN/base.zh-CN.objectTranslation.yml +6 -0
- package/main/default/objectTranslations/cms_files.en/cms_files.en.objectTranslation.yml +7 -1
- package/main/default/objectTranslations/cms_files.zh-CN/cms_files.zh-CN.objectTranslation.yml +7 -1
- package/main/default/objectTranslations/company.en/company.en.objectTranslation.yml +6 -1
- package/main/default/objectTranslations/company.zh-CN/company.zh-CN.objectTranslation.yml +5 -0
- package/main/default/objectTranslations/datasources.zh-CN/datasources.zh-CN.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/license.en/license.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/logs.en/logs.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/object_actions.en/object_actions.en.objectTranslation.yml +5 -0
- package/main/default/objectTranslations/object_actions.zh-CN/object_actions.zh-CN.objectTranslation.yml +6 -1
- package/main/default/objectTranslations/object_fields.en/object_fields.en.objectTranslation.yml +4 -8
- package/main/default/objectTranslations/object_fields.zh-CN/object_fields.zh-CN.objectTranslation.yml +4 -4
- package/main/default/objectTranslations/object_functions.en/object_functions.en.objectTranslation.yml +1 -5
- package/main/default/objectTranslations/object_functions.zh-CN/object_functions.zh-CN.objectTranslation.yml +2 -6
- 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/object_triggers.en/object_triggers.en.objectTranslation.yml +9 -0
- package/main/default/objectTranslations/object_triggers.zh-CN/object_triggers.zh-CN.objectTranslation.yml +9 -0
- package/main/default/objectTranslations/object_validation_rules.en/object_validation_rules.en.objectTranslation.yml +3 -3
- package/main/default/objectTranslations/object_webhooks.en/object_webhooks.en.objectTranslation.yml +12 -6
- package/main/default/objectTranslations/object_webhooks.zh-CN/object_webhooks.zh-CN.objectTranslation.yml +12 -6
- package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +44 -19
- package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +59 -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/objectTranslations/organizations.en/organizations.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/process_delegation_rules.en/process_delegation_rules.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/sessions.en/sessions.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/settings.en/settings.en.objectTranslation.yml +10 -1
- package/main/default/objectTranslations/settings.zh-CN/settings.zh-CN.objectTranslation.yml +9 -0
- package/main/default/objectTranslations/space_users.en/space_users.en.objectTranslation.yml +18 -1
- package/main/default/objectTranslations/space_users.zh-CN/space_users.zh-CN.objectTranslation.yml +17 -1
- package/main/default/objects/_base/base.client.js +124 -124
- package/main/default/objects/_base/base.object.js +502 -320
- package/main/default/objects/_base/base.object.yml +8 -0
- package/main/default/objects/_base/base.recordFieldAudit.trigger.js +3 -0
- package/main/default/objects/announcements.object.yml +68 -0
- package/main/default/objects/api_keys/buttons/copy.button.yml +1 -1
- package/main/default/objects/apps/apps.object.yml +25 -69
- package/main/default/objects/apps/buttons/disable.button.js +9 -7
- package/main/default/objects/apps/buttons/enable.button.js +9 -7
- package/main/default/objects/audit_records.object.yml +2 -2
- package/main/default/objects/cms_files/buttons/download.button.yml +1 -1
- package/main/default/objects/cms_files/cms_files.object.yml +7 -6
- package/main/default/objects/company/buttons/updateOrgs.button.yml +3 -6
- package/main/default/objects/company/company.object.yml +1 -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 +2 -1
- package/main/default/objects/object_actions/buttons/showDesign.button.js +5 -1
- package/main/default/objects/object_actions/fields/is_system.field.yml +1 -1
- 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/description.field.yml +11 -2
- 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/required.field.yml +1 -1
- 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/buttons/open_api.button.yml +1 -3
- package/main/default/objects/object_functions/fields/script.field.yml +3 -2
- package/main/default/objects/object_functions/listviews/all.listview.yml +0 -1
- package/main/default/objects/object_functions/listviews/customize.listview.yml +0 -1
- package/main/default/objects/object_functions/object_functions.object.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 +3 -2
- package/main/default/objects/object_webhooks/fields/fields.field.yml +1 -1
- package/main/default/objects/object_webhooks/object_webhooks.object.yml +2 -1
- package/main/default/objects/objects/buttons/custom.button.js +6 -35
- package/main/default/objects/objects/buttons/custom.button.yml +81 -1
- package/main/default/objects/objects/buttons/delete_object.button.yml +5 -4
- package/main/default/objects/objects/buttons/design_fields_layout.button.js +5 -2
- 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/buttons/copy.button.yml +114 -0
- package/main/default/objects/permission_set/buttons/set_permission_tabs.button.yml +166 -0
- package/main/default/objects/{permission_set.object.yml → permission_set/permission_set.object.yml} +1 -5
- package/main/default/objects/queue_import.object.yml +16 -1
- package/main/default/objects/roles.object.yml +1 -5
- package/main/default/objects/sessions.object.yml +1 -1
- package/main/default/objects/space_users/buttons/clear_login_tokens.button.yml +4 -7
- package/main/default/objects/space_users/buttons/disable.button.yml +3 -7
- package/main/default/objects/space_users/buttons/enable.button.yml +3 -7
- package/main/default/objects/space_users/buttons/lockout.button.yml +3 -7
- package/main/default/objects/space_users/buttons/standard_edit.button.js +0 -1
- package/main/default/objects/space_users/buttons/unlock.button.yml +3 -7
- package/main/default/objects/space_users/fields/locale.field.yml +2 -1
- package/main/default/objects/space_users/fields/password_expired.field.yml +1 -1
- package/main/default/pages/about.page.amis.json +21 -4
- package/main/default/pages/ai_chatbots_detail.page.amis.json +393 -0
- package/main/default/pages/ai_chatbots_detail.page.yml +13 -0
- package/main/default/pages/apps_form.page.amis.json +334 -0
- package/main/default/pages/apps_form.page.yml +12 -0
- package/main/default/pages/cfs_files_record_preview.page.amis.json +4 -4
- package/main/default/pages/cms_files_preview.page.amis.json +25 -6
- package/main/default/pages/object_detail.page.amis.json +17 -11
- package/main/default/pages/object_fields_form.page.amis.json +1 -12
- package/main/default/pages/object_form.page.amis.json +1 -1
- 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/organizations.page.amis.json +0 -4
- package/main/default/pages/space_users_list.page.amis.json +134 -19
- package/main/default/routes/amis_button_design.ejs +4 -1
- package/main/default/routes/amis_button_design.router.js +4 -3
- 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 +23 -9
- package/main/default/routes/object_fields_design.router.js +5 -4
- package/main/default/services/app-design.service.js +2 -1
- package/main/default/services/notifications.service.js +190 -0
- package/main/default/services/spaces.service.js +1 -1
- package/main/default/services/users.service.js +6 -3
- package/main/default/tabs/admin_bull_dashboard.tab.yml +22 -0
- package/main/default/tabs/{admin_process_delegation_rules.tab.yml → admin_object_functions.tab.yml} +5 -8
- package/main/default/tabs/admin_swagger.tab.yml +22 -0
- package/main/default/translations/en.translation.yml +5 -4
- 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/main/default/triggers/space_users.trigger.js +3 -3
- package/package.json +4 -4
- package/package.service.js +3 -2
- package/public/platform.css +67 -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/objectTranslations/forms.en/forms.en.objectTranslation.yml +0 -191
- package/main/default/objectTranslations/forms.zh-CN/forms.zh-CN.objectTranslation.yml +0 -194
- package/main/default/objectTranslations/instances.en/instances.en.objectTranslation.yml +0 -155
- package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +0 -155
- 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_functions/fields/is_rest.field.yml +0 -5
- 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,334 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "page",
|
|
3
|
+
"title": "Welcome to Steedos",
|
|
4
|
+
"body": [
|
|
5
|
+
{
|
|
6
|
+
"type": "steedos-object-form",
|
|
7
|
+
"className": "sm:border sm:rounded sm:border-gray-300 bg-white p-4",
|
|
8
|
+
"label": "对象表单",
|
|
9
|
+
"objectApiName": "apps",
|
|
10
|
+
"recordId": "${recordId}",
|
|
11
|
+
"mode": "edit",
|
|
12
|
+
"fieldsExtend": {
|
|
13
|
+
"tab_items": {
|
|
14
|
+
"amis": {
|
|
15
|
+
"name": "tab_items",
|
|
16
|
+
"type": "steedos-input-table",
|
|
17
|
+
"label": "",
|
|
18
|
+
"showIndex": true,
|
|
19
|
+
"source": "${tab_items}",
|
|
20
|
+
"strictMode": true,
|
|
21
|
+
"affixHeader": false,
|
|
22
|
+
"editable": true,
|
|
23
|
+
"addable": false,
|
|
24
|
+
"removable": true,
|
|
25
|
+
"draggable": false,
|
|
26
|
+
"fields": [
|
|
27
|
+
{
|
|
28
|
+
"label": "${'apps.apps_form.tab' | t}",
|
|
29
|
+
"type": "lookup",
|
|
30
|
+
"multiple": false,
|
|
31
|
+
"is_wide": false,
|
|
32
|
+
"required": true,
|
|
33
|
+
"reference_to": "tabs",
|
|
34
|
+
"reference_to_field": "name",
|
|
35
|
+
"sort_no": 30,
|
|
36
|
+
"name": "tab_name",
|
|
37
|
+
"hidden": false,
|
|
38
|
+
"readonly": false,
|
|
39
|
+
"disabled": false,
|
|
40
|
+
"_prefix": "tab_items."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"label": "${'apps.apps_form.tab_grouping' | t}",
|
|
44
|
+
"name": "group",
|
|
45
|
+
"_prefix": "tab_items.",
|
|
46
|
+
"type": "text",
|
|
47
|
+
"amis": {
|
|
48
|
+
"type": "select",
|
|
49
|
+
"source": "${tab_groups|pick:group_name}",
|
|
50
|
+
"popOverContainerSelector": "body",
|
|
51
|
+
"onEvent": {
|
|
52
|
+
"change": {
|
|
53
|
+
"actions": [
|
|
54
|
+
{
|
|
55
|
+
"actionType": "custom",
|
|
56
|
+
"script": "const tabGroupKey = \"group\";const getTabsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[tabGroupKey] ? 1 : 0; var tempN = !!n[tabGroupKey] ? 1 : 0; if (!m[tabGroupKey] || !n[tabGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[tabGroupKey]) - groupNames.indexOf(n[tabGroupKey]); };};const quickEidtSaveForTab = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super; const tab_name = rowValue.tab_name; rowValue[prop_name] = currentPropValue; delete rowValue.index; let newTabs = formValue.tab_items.map(function (item) { if (item.tab_name == tab_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const tabGroups = input.__super.__super.tab_groups; const groupNames = _.compact(_.map(tabGroups, \"group_name\")); if (groupNames && groupNames.length) { newTabs.sort(getTabsSortFun(groupNames)); } return { tab_items: newTabs }};const eventData = event.data;const newTabTtemsProp = quickEidtSaveForTab(eventData, \"group\");setTimeout(function () { doAction({ actionType: 'setValue', componentId: \"object_form\", args: { value: newTabTtemsProp } });},300);"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"placeholder": "-"
|
|
62
|
+
},
|
|
63
|
+
"className": "m-0",
|
|
64
|
+
"checkAll": false,
|
|
65
|
+
"selectFirst": false,
|
|
66
|
+
"searchable": true,
|
|
67
|
+
"clearable": true,
|
|
68
|
+
"multiple": false,
|
|
69
|
+
"mode": "inline"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"columns": [
|
|
73
|
+
{
|
|
74
|
+
"name": "tab_name",
|
|
75
|
+
"inlineEditMode": false
|
|
76
|
+
},
|
|
77
|
+
"group"
|
|
78
|
+
],
|
|
79
|
+
"headerToolbar": [
|
|
80
|
+
{
|
|
81
|
+
"type": "service",
|
|
82
|
+
"id": "tabs-options-service",
|
|
83
|
+
"className": "mb-2",
|
|
84
|
+
"body": [
|
|
85
|
+
{
|
|
86
|
+
"type": "button",
|
|
87
|
+
"id": "u:a35a2276145d",
|
|
88
|
+
"label": "${'apps.apps_form.tab_generate' | t}",
|
|
89
|
+
"hidden": true,
|
|
90
|
+
"onEvent": {
|
|
91
|
+
"click": {
|
|
92
|
+
"actions": [
|
|
93
|
+
{
|
|
94
|
+
"script": "const appId = null; const page = Steedos.Page.getPage('app', appId, null, null, 'generate_object_tabs'); if (page && page.schema) { const pageSchema = JSON.parse(page.schema); let formSchema = pageSchema.body[0]; formSchema.canAccessSuperData = false; formSchema.wrapWithPanel = false; formSchema.className = 'steedos-amis-form'; const title = t('apps.apps_form.tab_generate_title'); doAction({ 'actionType': 'dialog', 'dialog': { 'type': 'dialog', 'title': title, 'body': formSchema, 'size': 'lg' } }); }",
|
|
95
|
+
"actionType": "custom"
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"weight": 0
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"tpl": "内容"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "button",
|
|
105
|
+
"label": "${'apps.apps_form.tab_set' | t}",
|
|
106
|
+
"id": "u:853b890ab524",
|
|
107
|
+
"actionType": "dialog",
|
|
108
|
+
"dialog": {
|
|
109
|
+
"type": "dialog",
|
|
110
|
+
"title": "${'apps.apps_form.tab_set' | t}",
|
|
111
|
+
"body": [
|
|
112
|
+
{
|
|
113
|
+
"type": "transfer",
|
|
114
|
+
"name": "picked_tabs",
|
|
115
|
+
"value": "${tab_items|pick:tab_name}",
|
|
116
|
+
"sortable": true,
|
|
117
|
+
"source": "${tabs_options}",
|
|
118
|
+
"searchable": true,
|
|
119
|
+
"itemHeight": 40,
|
|
120
|
+
"id": "u:f2d36873abd1"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"onEvent": {
|
|
124
|
+
"confirm": {
|
|
125
|
+
"actions": [
|
|
126
|
+
{
|
|
127
|
+
"actionType": "custom",
|
|
128
|
+
"script": "const tabGroupKey = 'group';const getTabsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[tabGroupKey] ? 1 : 0; var tempN = !!n[tabGroupKey] ? 1 : 0; if (!m[tabGroupKey] || !n[tabGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[tabGroupKey]) - groupNames.indexOf(n[tabGroupKey]); };};const clearTabs = function (input) { return { tab_items: [] }};const convertDataForTabs = function (input) { let pickedTabs = input.picked_tabs || []; const superTabs = _.keyBy(input.__super.tab_items, 'tab_name'); if (typeof pickedTabs === 'string') { pickedTabs = pickedTabs.split(','); } const tabOptions = _.keyBy(input.__super.tabs_options, 'value'); const convertedTabs = pickedTabs.map(function (tab_name) { const superTab = superTabs[tab_name]; if (superTab) { return superTab; } else { const tabOption = tabOptions[tab_name]; return { tab_name: tab_name, group: tabOption.group } } }); const tabGroups = input.__super.tab_groups; const groupNames = _.compact(_.map(tabGroups, 'group_name')); if (groupNames && groupNames.length) { convertedTabs.sort(getTabsSortFun(groupNames)); } return { tab_items: convertedTabs }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: 'object_form', args: { value: convertDataForTabs(eventData) }});doAction({ actionType: 'setValue', componentId: 'tabs-options-service', args: { value: convertDataForTabs(eventData) }});"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"size": "lg",
|
|
134
|
+
"id": "u:9c93896a73cf",
|
|
135
|
+
"closeOnEsc": false,
|
|
136
|
+
"closeOnOutside": false,
|
|
137
|
+
"showCloseButton": true,
|
|
138
|
+
"showErrorMsg": true,
|
|
139
|
+
"showLoading": true,
|
|
140
|
+
"dataMapSwitch": false
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "button",
|
|
145
|
+
"label": "${'apps.apps_form.tab_grouping_set' | t}",
|
|
146
|
+
"actionType": "dialog",
|
|
147
|
+
"dialog": {
|
|
148
|
+
"title": "${'apps.apps_form.tab_grouping_set' | t}",
|
|
149
|
+
"body": [
|
|
150
|
+
{
|
|
151
|
+
"type": "input-table",
|
|
152
|
+
"name": "setting_groups",
|
|
153
|
+
"value": "${tab_groups}",
|
|
154
|
+
"addable": true,
|
|
155
|
+
"draggable": true,
|
|
156
|
+
"editable": true,
|
|
157
|
+
"needConfirm": false,
|
|
158
|
+
"columns": [
|
|
159
|
+
{
|
|
160
|
+
"name": "group_name",
|
|
161
|
+
"label": "${'apps.apps_form.tab_grouping_name' | t}",
|
|
162
|
+
"id": "u:383c7744b499"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "default_open",
|
|
166
|
+
"label": "${'apps.apps_form.tab_grouping_open' | t}",
|
|
167
|
+
"id": "u:7a243c84ed66",
|
|
168
|
+
"type": "checkbox",
|
|
169
|
+
"value": true
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"removable": true,
|
|
173
|
+
"id": "setting_groups"
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"onEvent": {
|
|
177
|
+
"confirm": {
|
|
178
|
+
"actions": [
|
|
179
|
+
{
|
|
180
|
+
"actionType": "custom",
|
|
181
|
+
"script": "const tabGroupKey = 'group';\nconst getTabsSortFun = function (groupNames) {\n return function (m, n) {\n var tempM = !!m[tabGroupKey] ? 1 : 0;\n var tempN = !!n[tabGroupKey] ? 1 : 0;\n if (!m[tabGroupKey] || !n[tabGroupKey]) {\n return tempM - tempN;\n }\n return groupNames.indexOf(m[tabGroupKey]) - groupNames.indexOf(n[tabGroupKey]);\n };\n};\nconst clearTabs = function (input) { return { tab_items: [] } };\nconst convertDataForGroups = function (input) {\n \n const settingGroups = input.setting_groups || [];\n const convertedGroups = _.uniqBy(settingGroups.map(function (item) {\n return { group_name: item.group_name, default_open: item.default_open }\n }), 'group_name');\n const groupNames = _.compact(_.map(convertedGroups, 'group_name'));\n const tab_items = input.tab_items;\n tab_items?.sort(getTabsSortFun(groupNames));\n \n return { tab_groups: convertedGroups, tab_items: tab_items }\n};\nconst eventData = event.data;\ndoAction(\n {\n actionType: 'setValue',\n componentId: 'object_form',\n args: { value: convertDataForGroups(eventData) }\n }\n);"
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"type": "dialog",
|
|
187
|
+
"size": "lg",
|
|
188
|
+
"id": "setting_groups",
|
|
189
|
+
"closeOnEsc": false,
|
|
190
|
+
"closeOnOutside": false,
|
|
191
|
+
"showCloseButton": true,
|
|
192
|
+
"showErrorMsg": true,
|
|
193
|
+
"showLoading": true,
|
|
194
|
+
"dataMapSwitch": false
|
|
195
|
+
},
|
|
196
|
+
"id": "u:111b043b193c"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"messages": {
|
|
200
|
+
},
|
|
201
|
+
"api": {
|
|
202
|
+
"method": "post",
|
|
203
|
+
"url": "${context.rootUrl}/graphql",
|
|
204
|
+
"adaptor": "let data = payload.data;\ndata.tabs_options = [];\nif (data.options && data.options.length) {\n data.tabs_options = data.options.map(function (option) {\n option.label = option.label + '(' + option.value + ')';\n return option;\n });\n}\nif (!api.body.recordId) {\n const defaultValues = {\n is_creator: true,\n mobile: true,\n visible: true,\n sort: 9100\n };\n data = Object.assign({}, data, defaultValues);\n}\ndelete data.options;\npayload.data = data;\nreturn payload; ",
|
|
205
|
+
"data": {
|
|
206
|
+
"query": "{options:tabs{_id label:label value:name,type,object,desktop,mobile}}",
|
|
207
|
+
"recordId": "${recordId}"
|
|
208
|
+
},
|
|
209
|
+
"headers": {
|
|
210
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
211
|
+
},
|
|
212
|
+
"messages": {
|
|
213
|
+
},
|
|
214
|
+
"requestAdaptor": ""
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"enableDialog": false,
|
|
219
|
+
"id": "u:7949aecf0ca9"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"objects": {
|
|
223
|
+
"amis": {
|
|
224
|
+
"name": "objects",
|
|
225
|
+
"type": "select",
|
|
226
|
+
"className": "m-0",
|
|
227
|
+
"labelClassName": "text-left",
|
|
228
|
+
"id": "u:4e5047e44905",
|
|
229
|
+
"joinValues": false,
|
|
230
|
+
"extractValue": true,
|
|
231
|
+
"labelField": "label",
|
|
232
|
+
"valueField": "value",
|
|
233
|
+
"multiple": true,
|
|
234
|
+
"checkAll": false,
|
|
235
|
+
"searchable": true,
|
|
236
|
+
"menuTpl": "",
|
|
237
|
+
"source": {
|
|
238
|
+
"method": "get",
|
|
239
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/options",
|
|
240
|
+
"headers": {
|
|
241
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"autoComplete": ""
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"mobile_objects": {
|
|
248
|
+
"amis": {
|
|
249
|
+
"name": "mobile_objects",
|
|
250
|
+
"type": "select",
|
|
251
|
+
"className": "m-0",
|
|
252
|
+
"labelClassName": "text-left",
|
|
253
|
+
"id": "u:cfaeb2f857a8",
|
|
254
|
+
"joinValues": false,
|
|
255
|
+
"extractValue": true,
|
|
256
|
+
"labelField": "label",
|
|
257
|
+
"valueField": "value",
|
|
258
|
+
"multiple": true,
|
|
259
|
+
"checkAll": false,
|
|
260
|
+
"searchable": true,
|
|
261
|
+
"menuTpl": "",
|
|
262
|
+
"source": {
|
|
263
|
+
"method": "get",
|
|
264
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/options",
|
|
265
|
+
"messages": {
|
|
266
|
+
},
|
|
267
|
+
"headers": {
|
|
268
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
"autoComplete": ""
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"visible_on": {
|
|
275
|
+
"amis": {
|
|
276
|
+
"type": "control",
|
|
277
|
+
"body": [
|
|
278
|
+
{
|
|
279
|
+
"type": "service",
|
|
280
|
+
"id": "u:edcd865de7d8",
|
|
281
|
+
"body": [
|
|
282
|
+
{
|
|
283
|
+
"type": "input-formula",
|
|
284
|
+
"name": "visible_on",
|
|
285
|
+
"evalMode": false,
|
|
286
|
+
"variableMode": "tabs",
|
|
287
|
+
"variables": "${visibleOnVariables}",
|
|
288
|
+
"visibleOn": "${visibleOnVariables}",
|
|
289
|
+
"id": "u:618105d5bfad",
|
|
290
|
+
"labelClassName": "none"
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"api": {
|
|
294
|
+
"method": "get",
|
|
295
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/apps/fields/options",
|
|
296
|
+
"cache": 30000,
|
|
297
|
+
"adaptor": "const visibleOnVariables = SteedosUI.getFormulaVariables(payload.data.options);\nconst defaultValueVariables = [visibleOnVariables[1]];\npayload = {\n data: {\n visibleOnVariables,\n defaultValueVariables\n }\n};\nreturn payload;",
|
|
298
|
+
"headers": {
|
|
299
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"dsType": "api"
|
|
303
|
+
}
|
|
304
|
+
],
|
|
305
|
+
"id": "u:996ef29c6851"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"enableTabs": true,
|
|
310
|
+
"debug": false,
|
|
311
|
+
"initApiRequestAdaptor": "",
|
|
312
|
+
"initApiAdaptor": "var data = payload.data;\nif (data.tab_items && !_.isArray(data.tab_items)) {\n // 数据库中存储的是对象格式而不是数组,转换为数组用于界面显示\n let arrTabItems = [];\n _.each(data.tab_items, function (n, k) {\n n.tab_name = k;\n delete n.index;\n arrTabItems.push(n);\n });\n data.tab_items = arrTabItems;\n}\nif (data._id && !data.tab_items) {\n const tabOptions = data.tabs_options || [];\n const tabItems = [];\n // 把应用中原来tabs属性值添加到新的tab_items属性的默认值中\n if (data.tabs && data.tabs.length) {\n data.tabs.forEach(function (item) {\n tabItems.push({ tab_name: item });\n });\n }\n const pushObjectsToTabItems = function (objects) {\n objects.forEach(function (item) {\n // 已经有绑定到指定对象的选项卡就不添加\n let existObjectItem = !!tabItems.find(function (tabItem) {\n return !!tabOptions.find(function (option) {\n return tabItem.tab_name === tabItem.value && option.object === item;\n });\n });\n if (existObjectItem) {\n return;\n }\n // 找到指向指定对象的选项卡\n let tempOption = tabOptions.find(function (option) {\n return option.type === \"object\" && option.object === item;\n });\n if (!tempOption) {\n return;\n }\n // 选项卡名称如果重复了就不添加\n let existTabItem = !!tabItems.find(function (tabItem) {\n return tabItem.tab_name === tempOption.value;\n });\n if (existTabItem) {\n return;\n }\n if (tempOption) {\n tabItems.push({ tab_name: tempOption.value });\n }\n });\n }\n // 把应用中原来objects属性值添加到新的tab_items属性的默认值中\n if (data.objects && data.objects.length) {\n pushObjectsToTabItems(data.objects);\n }\n // 把应用中原来mobile_objects属性值添加到新的tab_items属性的默认值中\n if (data.mobile_objects && data.mobile_objects.length) {\n pushObjectsToTabItems(data.mobile_objects);\n }\n data.tab_items = tabItems;\n}\n\npayload.data = data;\ndelete payload.extensions;\nreturn payload;\n ",
|
|
313
|
+
"apiRequestAdaptor": "delete formData.tabs_options;\nconst recordId = formData.recordId;\n\n// 新加字段tab_items,值同步回传到老字段tabs中兼容老UI界面\nformData.tabs = [];\nif (formData.tab_items && formData.tab_items.length) { \n formData.tabs = formData.tab_items.map(function (item) { return item.tab_name; });\n}\n\n/*\ntab_items存储为:\ntab_items: {\n test1:{\n group:\"xxx\"\n },\n test3:{\n group:\"yyy\"\n }\n}\n而不是:\ntab_items: [\n {\n \"index\":1,\n \"group\":\"xxx\"\n },\n {\n \"index\":2,\n \"group\":\"yyy\"\n }\n]\n*/\nif (formData.tab_items) { \n formData.tab_items = _.keyBy(formData.tab_items, \"tab_name\")\n let tempIndex = 0;\n _.each(formData.tab_items, function (n, k) {\n tempIndex++;\n n.index = tempIndex;\n delete n.tab_name;\n });\n}\n\nquery = `mutation{record: ${objectName}__insert(doc: {__saveData}){_id}}`;\nif(recordId){\n query = `mutation{record: ${objectName}__update(id: \"${recordId}\", doc: {__saveData}){_id}}`;\n};\n__saveData = JSON.stringify(JSON.stringify(formData));\n\napi.data = {query: query.replace('{__saveData}', __saveData)};\nreturn api;\n",
|
|
314
|
+
"apiAdaptor": "",
|
|
315
|
+
"form": {
|
|
316
|
+
"id": "object_form"
|
|
317
|
+
},
|
|
318
|
+
"id": "u:e1c1a841d373",
|
|
319
|
+
"tabsMode": "line"
|
|
320
|
+
}
|
|
321
|
+
],
|
|
322
|
+
"regions": [
|
|
323
|
+
"body"
|
|
324
|
+
],
|
|
325
|
+
"data": {
|
|
326
|
+
"objectName": "apps",
|
|
327
|
+
"initialValues": {},
|
|
328
|
+
"appId": "builder",
|
|
329
|
+
"title": "",
|
|
330
|
+
"context": {
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"id": "u:de840f3523f2"
|
|
334
|
+
}
|
|
@@ -50,13 +50,13 @@
|
|
|
50
50
|
"loading": true
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
"type": "
|
|
53
|
+
"type": "iframe",
|
|
54
54
|
"id": "pdf-viewer",
|
|
55
55
|
"name": "file",
|
|
56
|
-
"width": 500,
|
|
57
56
|
"source": "src",
|
|
58
57
|
"src": "/api/v6/files/download/cfs.files.filerecord/${_id}/${original.name}",
|
|
59
|
-
"visibleOn": "${ARRAYINCLUDES(['application/pdf'],record.original.type)}"
|
|
58
|
+
"visibleOn": "${ARRAYINCLUDES(['application/pdf'],record.original.type)}",
|
|
59
|
+
"className": "pdf-viewer w-full"
|
|
60
60
|
},
|
|
61
61
|
{
|
|
62
62
|
"type": "image",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
],
|
|
117
117
|
"id": "u:0bed5e9e0a6f",
|
|
118
118
|
"visibleOn": "${ARRAYINCLUDES(['application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/pdf','image/png','image/jpeg','image/bmp','image/gif','image/webp','image/psd','image/svg','image/tiff'],${record.original.type})}",
|
|
119
|
-
"className": "tab-container-office-preview"
|
|
119
|
+
"className": "tab-container-office-preview p-0"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"title": "详细",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"className": "steedos-record-tabs bg-white p-4 sm:m-4 sm:border sm:rounded",
|
|
14
14
|
"tabs": [
|
|
15
15
|
{
|
|
16
|
-
"title": "
|
|
17
|
-
"className": "tab-container-office-preview",
|
|
16
|
+
"title": "${'CustomLabels.cms_files_pagedetail_tab_preview' | t}",
|
|
17
|
+
"className": "tab-container-office-preview p-0",
|
|
18
18
|
"body": [
|
|
19
19
|
{
|
|
20
20
|
"type": "page",
|
|
@@ -49,11 +49,11 @@
|
|
|
49
49
|
"loading": true
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
|
-
"type": "
|
|
52
|
+
"type": "iframe",
|
|
53
53
|
"id": "pdf-viewer",
|
|
54
54
|
"name": "file",
|
|
55
|
-
"width": 500,
|
|
56
55
|
"source": "src",
|
|
56
|
+
"className": "pdf-viewer w-full",
|
|
57
57
|
"src": "/api/v6/files/download/cfs.files.filerecord/${versions[0].value}/${name}",
|
|
58
58
|
"visibleOn": "${ARRAYINCLUDES(['pdf','PDF'],extention)}"
|
|
59
59
|
},
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"visibleOn": "${ARRAYINCLUDES(['docx', 'xlsx', 'pdf', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'],${extention})}"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
|
-
"title": "
|
|
122
|
+
"title": "${'CustomLabels.cms_files_pagedetail_tab_detail' | t}",
|
|
123
123
|
"body": [
|
|
124
124
|
{
|
|
125
125
|
"type": "steedos-object-form",
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"id": "u:5d4e7e3f6ecc"
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
|
-
"title": "
|
|
137
|
+
"title": "${'CustomLabels.cms_files_pagedetail_tab_historical_versions' | t}",
|
|
138
138
|
"body": [
|
|
139
139
|
{
|
|
140
140
|
"type": "steedos-object-related-lists",
|
|
@@ -147,6 +147,25 @@
|
|
|
147
147
|
],
|
|
148
148
|
"className": "px-0 pt-4",
|
|
149
149
|
"id": "u:f2f42d8195ab"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"title": "${'CustomLabels.cms_files_pagedetail_tab_chatter' | t}",
|
|
153
|
+
"body": [
|
|
154
|
+
{
|
|
155
|
+
"type": "rooms-provider",
|
|
156
|
+
"baseUrl": "${context.rootUrl}",
|
|
157
|
+
"body": [
|
|
158
|
+
{
|
|
159
|
+
"type": "rooms-comments",
|
|
160
|
+
"className": "flex flex-col gap-3",
|
|
161
|
+
"roomId": "objects:${objectName}:${recordId}"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
],
|
|
166
|
+
"className": "px-0 pt-4",
|
|
167
|
+
"id": "u:f2f42d8195ab",
|
|
168
|
+
"visibleOn": "${uiSchema.enable_chatter}"
|
|
150
169
|
}
|
|
151
170
|
],
|
|
152
171
|
"id": "u:560caa275d48"
|
|
@@ -173,6 +173,22 @@
|
|
|
173
173
|
"recordId": "${recordId}",
|
|
174
174
|
"relatedObjectApiName": "object_functions",
|
|
175
175
|
"relatedKey": "objectApiName",
|
|
176
|
+
"perPage": 20,
|
|
177
|
+
"id": "u:e0aff125ad0f"
|
|
178
|
+
}
|
|
179
|
+
],
|
|
180
|
+
"id": "u:13fd52c4e905"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"title": "${'objects_amis_queue_import' | t}",
|
|
184
|
+
"id": "u:b36e7189917a",
|
|
185
|
+
"body": [
|
|
186
|
+
{
|
|
187
|
+
"type": "steedos-object-related-listview",
|
|
188
|
+
"objectApiName": "objects",
|
|
189
|
+
"recordId": "${recordId}",
|
|
190
|
+
"relatedObjectApiName": "queue_import",
|
|
191
|
+
"relatedKey": "object_name",
|
|
176
192
|
"perPage": 20
|
|
177
193
|
}
|
|
178
194
|
]
|
|
@@ -180,7 +196,7 @@
|
|
|
180
196
|
],
|
|
181
197
|
"id": "u:6a3b45d7adcf",
|
|
182
198
|
"tabsMode": "vertical",
|
|
183
|
-
"className": "steedos-record-tabs bg-white m-4 border-
|
|
199
|
+
"className": "steedos-record-tabs bg-white m-4 border-none sm:shadow",
|
|
184
200
|
"toolbarClassName": "",
|
|
185
201
|
"linksClassName": "",
|
|
186
202
|
"contentClassName": "bg-white",
|
|
@@ -206,16 +222,6 @@
|
|
|
206
222
|
}
|
|
207
223
|
}
|
|
208
224
|
],
|
|
209
|
-
"data": {
|
|
210
|
-
"objectName": "objects",
|
|
211
|
-
"recordId": "space_users",
|
|
212
|
-
"context": {
|
|
213
|
-
"rootUrl": "http://127.0.0.1:5800",
|
|
214
|
-
"tenantId": "hKdnwE55WcnWveYxS",
|
|
215
|
-
"userId": "62ede4f62161e377e35de58c",
|
|
216
|
-
"authToken": "b6475c5536a26d23d3db84e96536e08e82e1e726380cdd5cb09fc977e1d6e57c08fb23d7a1090006189d3d"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
225
|
"id": "page_objects_record_detail",
|
|
220
226
|
"objectApiName": "${objectName}",
|
|
221
227
|
"name": "page_objects_record_detail",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"actionType": "toast",
|
|
58
58
|
"args": {
|
|
59
59
|
"msgType": "success",
|
|
60
|
-
"msg": "
|
|
60
|
+
"msg": "${'submitSuccRequireRefreshMsg' | t}",
|
|
61
61
|
"position": "top-right"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -224,17 +224,6 @@
|
|
|
224
224
|
"formula"
|
|
225
225
|
]
|
|
226
226
|
},
|
|
227
|
-
"onEvent": {
|
|
228
|
-
"init": {
|
|
229
|
-
"weight": 0,
|
|
230
|
-
"actions": [
|
|
231
|
-
{
|
|
232
|
-
"actionType": "custom",
|
|
233
|
-
"script": "//初始化时给外层dialog加上类名,使过滤组件popover正常显示\n$('.steedos-object-fields-form-page').closest('.amis-dialog-widget.antd-Modal').addClass('steedos-overflow-visible-dialog');"
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
227
|
"name": "object_fields_form",
|
|
239
228
|
"className": "steedos-object-fields-form-page",
|
|
240
229
|
"id": "steedos_object_fields_service"
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "service",
|
|
3
|
+
"body": [
|
|
4
|
+
{
|
|
5
|
+
"type": "steedos-object-form",
|
|
6
|
+
"label": "对象表单",
|
|
7
|
+
"objectApiName": "object_validation_rules",
|
|
8
|
+
"recordId": "${recordId}",
|
|
9
|
+
"className": "",
|
|
10
|
+
"id": "u:b3d626885b90",
|
|
11
|
+
"enableTabs": false,
|
|
12
|
+
"mode": "edit",
|
|
13
|
+
"layout": "normal",
|
|
14
|
+
"tabsMode": "",
|
|
15
|
+
"fieldsExtend": {
|
|
16
|
+
"error_condition_formula": {
|
|
17
|
+
"amis": {
|
|
18
|
+
"type": "service",
|
|
19
|
+
"schemaApi": {
|
|
20
|
+
"method": "get",
|
|
21
|
+
"url": "${context.rootUrl}/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
22
|
+
"cache": 30000,
|
|
23
|
+
"adaptor": "const field = context.uiSchema.fields.error_condition_formula; const variables = SteedosUI.getFormulaVariables(payload.data.options); \n var fieldSchema={label: field.label, type:'input-formula', name: 'error_condition_formula', 'evalMode': false, variableMode: 'tabs', variables: variables, labelRemark: field.inlineHelpText, description: field.description } \n return {...payload, data:fieldSchema};",
|
|
24
|
+
"trackExpression": "${object_name}",
|
|
25
|
+
"sendOn": "${object_name}"
|
|
26
|
+
},
|
|
27
|
+
"dsType": "api",
|
|
28
|
+
"id": "u:508198dbfac7"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"data": {},
|
|
35
|
+
"name": "page_object_validation_rules_form",
|
|
36
|
+
"id": "u:5f4f07272db7",
|
|
37
|
+
"dsType": "api"
|
|
38
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: object_validation_rules_form
|
|
2
|
+
is_active: true
|
|
3
|
+
label: 对象验证规则表单
|
|
4
|
+
locked: false
|
|
5
|
+
object_name: object_validation_rules
|
|
6
|
+
pageAssignments:
|
|
7
|
+
- type: orgDefault
|
|
8
|
+
page: object_validation_rules_form
|
|
9
|
+
desktop: true
|
|
10
|
+
mobile: true
|
|
11
|
+
render_engine: amis
|
|
12
|
+
type: form
|
|
13
|
+
widgets: []
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"method": "get",
|
|
17
17
|
"url": "/service/api/amis-metadata-objects/objects/${object_name}/fields/options",
|
|
18
18
|
"cache": 30000,
|
|
19
|
-
"adaptor": "const field = context.uiSchema.fields.condition; const
|
|
19
|
+
"adaptor": "const field = context.uiSchema.fields.condition; const variables = SteedosUI.getFormulaVariables(payload.data.options);\n var fieldSchema={label: field.label, type:'input-formula', name: 'condition', 'evalMode': false, variableMode: 'tabs', variables: variables, labelRemark: field.inlineHelpText, description: field.description } \n return {...payload, data:fieldSchema};",
|
|
20
20
|
"trackExpression": "${object_name}",
|
|
21
21
|
"sendOn": "${object_name}"
|
|
22
22
|
}
|
|
@@ -31,10 +31,6 @@
|
|
|
31
31
|
"data": {
|
|
32
32
|
"objectName": "organizations",
|
|
33
33
|
"context": {
|
|
34
|
-
"rootUrl": "http://127.0.0.1:5800",
|
|
35
|
-
"tenantId": "654300b5074594d15147bcfa",
|
|
36
|
-
"userId": "654300a4074594d15147bcf8",
|
|
37
|
-
"authToken": "e9bcdfdc56579ec21b9e520e1e1a903a42fa829de27c9eb70f7e6caf8599f95e705d5aedf2336fbb818d98"
|
|
38
34
|
}
|
|
39
35
|
},
|
|
40
36
|
"id": "u:b7fa9418ef38",
|