@steedos/service-core-objects 3.0.0-beta.99 → 3.0.1
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/README.md +3 -3
- package/main/default/applications/.gitkeep +0 -0
- package/main/default/applications/admin.app.yml +179 -0
- package/main/default/client/socket.client.js +1 -1
- 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/company.en/company.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/logs.en/logs.en.objectTranslation.yml +1 -1
- 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/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 +1 -5
- package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/operation_logs.en/operation_logs.en.objectTranslation.yml +1 -1
- 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/reports.en/reports.en.objectTranslation.yml +7 -1
- package/main/default/objectTranslations/reports.zh-CN/reports.zh-CN.objectTranslation.yml +7 -1
- package/main/default/objectTranslations/sessions.en/sessions.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/settings.en/settings.en.objectTranslation.yml +1 -1
- package/main/default/objectTranslations/space_users.en/space_users.en.objectTranslation.yml +1 -1
- package/main/default/objects/_base/base.client.js +113 -114
- package/main/default/objects/_base/base.object.js +225 -217
- package/main/default/objects/_base/base.recordFieldAudit.trigger.js +3 -0
- package/main/default/objects/_base/base.trigger.js +7 -144
- package/main/default/objects/audit_records.object.yml +1 -1
- package/main/default/objects/cms_files/cms_files.object.yml +1 -1
- package/main/default/objects/company/company.object.yml +1 -1
- package/main/default/objects/license.object.yml +13 -33
- package/main/default/objects/logs/logs.object.yml +1 -1
- package/main/default/objects/notifications/fields/related_to.field.yml +12 -4
- 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/object_fields/listviews/all.listview.yml +1 -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/fields/extra_columns.field.yml +1 -1
- package/main/default/objects/object_triggers/fields/handler.field.yml +3 -2
- package/main/default/objects/object_webhooks/object_webhooks.object.yml +1 -1
- package/main/default/objects/objects/buttons/show_object.button.js +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 -1
- package/main/default/objects/reports.object.yml +125 -258
- package/main/default/objects/roles.object.yml +1 -0
- package/main/default/objects/sessions.object.yml +1 -1
- package/main/default/objects/space_users/buttons/clear_login_tokens.button.yml +1 -1
- package/main/default/objects/space_users/buttons/setPassword.button.js +12 -12
- 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/apps_form.page.amis.json +2 -1
- package/main/default/pages/cfs_files_record_preview.page.amis.json +8 -8
- package/main/default/pages/cms_files_preview.page.amis.json +7 -7
- package/main/default/pages/object_detail.page.amis.json +1 -1
- package/main/default/pages/space_users_list.page.amis.json +5 -2
- package/main/default/routes/amis_button_design.router.js +2 -12
- package/main/default/routes/amis_listview_design.router.js +2 -11
- package/main/default/routes/object_fields_design.ejs +2 -1
- package/main/default/routes/object_fields_design.router.js +1 -14
- package/main/default/services/spaces.service.js +1 -1
- package/main/default/services/users.service.js +5 -2
- package/main/default/tabs/admin_bull_dashboard.tab.yml +2 -1
- package/main/default/tabs/admin_object_functions.tab.yml +21 -0
- package/main/default/tabs/admin_swagger.tab.yml +22 -0
- package/main/default/translations/en.translation.yml +2 -2
- package/main/default/triggers/space_users.trigger.js +3 -3
- package/package.json +3 -4
- package/public/platform.css +5 -0
- 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 -211
- package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +0 -208
- package/main/default/objects/object_functions/fields/is_rest.field.yml +0 -5
- package/main/default/objects/spaces/buttons/upgrade.button.js +0 -12
- package/main/default/objects/spaces/buttons/upgrade.button.yml +0 -4
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
name: set_permission_tabs
|
|
2
|
+
amis_schema: |-
|
|
3
|
+
{
|
|
4
|
+
"type": "service",
|
|
5
|
+
"body": [
|
|
6
|
+
{
|
|
7
|
+
"type": "button",
|
|
8
|
+
"label": "${'permission_set.set_permission_tabs.set_permission' | t}",
|
|
9
|
+
"id": "u:set_permission_tabs",
|
|
10
|
+
"onEvent": {
|
|
11
|
+
"click": {
|
|
12
|
+
"actions": [
|
|
13
|
+
{
|
|
14
|
+
"actionType": "dialog",
|
|
15
|
+
"dialog": {
|
|
16
|
+
"type": "dialog",
|
|
17
|
+
"title": "${'permission_set.set_permission_tabs.set_permission' | t}",
|
|
18
|
+
"body": [
|
|
19
|
+
{
|
|
20
|
+
"type": "form",
|
|
21
|
+
"id": "u:2281889ba1e7",
|
|
22
|
+
"body": [
|
|
23
|
+
{
|
|
24
|
+
"type": "input-table",
|
|
25
|
+
"id": "u:1516aff9070c",
|
|
26
|
+
"name": "permission_tabs_list",
|
|
27
|
+
"label": "",
|
|
28
|
+
"columns": [
|
|
29
|
+
{
|
|
30
|
+
"label": "${'permission_set.set_permission_tabs.tab' | t}",
|
|
31
|
+
"name": "tab.label",
|
|
32
|
+
"type": "text",
|
|
33
|
+
"id": "u:ebd95b18057a",
|
|
34
|
+
"placeholder": "-"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"label": "${'permission_set.set_permission_tabs.permission' | t}",
|
|
38
|
+
"name": "permission",
|
|
39
|
+
"type": "select",
|
|
40
|
+
"id": "u:ad5dcb76754f",
|
|
41
|
+
"options": [
|
|
42
|
+
{
|
|
43
|
+
"label": "默认打开",
|
|
44
|
+
"value": "on"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"label": "默认关闭",
|
|
48
|
+
"value": "off"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"value": "on"
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"strictMode": true,
|
|
55
|
+
"disabled": false,
|
|
56
|
+
"mode": "normal"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
"messages": {},
|
|
60
|
+
"initApi": {
|
|
61
|
+
"method": "post",
|
|
62
|
+
"url": "${context.rootUrl}/graphql",
|
|
63
|
+
"data": {
|
|
64
|
+
"&": "$$",
|
|
65
|
+
"record": "${record}"
|
|
66
|
+
},
|
|
67
|
+
"adaptor": "const data = payload.data\nconst { permission_tabs, tabs } = data\nconst tableOptions = []\nconst tabNames = [] // 用于存储已经遍历过的选项卡,防止重复\nfor (const pTab of permission_tabs) {\n tableOptions.push({\n tab: {\n _id: pTab.tab__expand?._id,\n name: pTab.tab__expand?.name,\n label: pTab.tab__expand?.label\n },\n permission: pTab.permission\n })\n tabNames.push(pTab.tab__expand?.name)\n}\n\nfor (const tab of tabs) {\n if (tabNames.includes(tab.name)) {\n continue\n }\n tableOptions.push({\n tab: {\n _id: tab._id,\n name: tab.name,\n label: tab.label\n },\n permission: 'on'\n })\n}\n\ndata.permission_tabs_list = tableOptions\n\nreturn payload\n",
|
|
68
|
+
"headers": {
|
|
69
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
70
|
+
},
|
|
71
|
+
"requestAdaptor": "const record = api.body.record\napi.data.query = `\n{\n permission_tabs(filters: [[\"permission_set\", \"=\", \"${record.name}\"]]) {\n _id\n permission\n tab__expand {\n _id\n name\n label\n }\n }\n tabs {\n _id\n name\n label\n }\n}\n`\ndelete api.body.record;\nreturn api;",
|
|
72
|
+
"dataType": "json"
|
|
73
|
+
},
|
|
74
|
+
"api": {
|
|
75
|
+
"method": "post",
|
|
76
|
+
"url": "${context.rootUrl}/api/permission/permission_set/batchSavePermissionTabs",
|
|
77
|
+
"data": {
|
|
78
|
+
"&": "$$",
|
|
79
|
+
"record": "${record}",
|
|
80
|
+
"record_id": "${record_id}"
|
|
81
|
+
},
|
|
82
|
+
"requestAdaptor": "api.data.permission_set_name = api.data.record.name\ndelete api.data.permission_tabs\ndelete api.data.record\ndelete api.data.tabs\n\nreturn api",
|
|
83
|
+
"dataType": "json"
|
|
84
|
+
},
|
|
85
|
+
"onEvent": {
|
|
86
|
+
"submitSucc": {
|
|
87
|
+
"weight": 0,
|
|
88
|
+
"actions": [
|
|
89
|
+
{
|
|
90
|
+
"actionType": "custom",
|
|
91
|
+
"script": "/* 自定义JS使用说明: \n * 1.动作执行函数doAction,可以执行所有类型的动作\n * 2.通过上下文对象context可以获取当前组件实例,例如context.props可以获取该组件相关属性\n * 3.事件对象event,在doAction之后执行event.stopPropagation = true;可以阻止后续动作执行\n*/\n\nSteedosUI.router.go({ objectName: 'permission_set', recordId: context.props.data.record_id, type: 'edit' });\n"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
"id": "u:5d6ebd078296",
|
|
99
|
+
"closeOnEsc": false,
|
|
100
|
+
"closeOnOutside": false,
|
|
101
|
+
"showCloseButton": true,
|
|
102
|
+
"data": null,
|
|
103
|
+
"size": "lg",
|
|
104
|
+
"actions": [
|
|
105
|
+
{
|
|
106
|
+
"type": "button",
|
|
107
|
+
"label": "${'permission_set.set_permission_tabs.cancel' | t}",
|
|
108
|
+
"onEvent": {
|
|
109
|
+
"click": {
|
|
110
|
+
"actions": [
|
|
111
|
+
{
|
|
112
|
+
"componentId": "",
|
|
113
|
+
"args": {},
|
|
114
|
+
"actionType": "closeDialog"
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"id": "u:f1b8dabafee5",
|
|
120
|
+
"level": "default"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"type": "submit",
|
|
124
|
+
"label": "${'permission_set.set_permission_tabs.save' | t}",
|
|
125
|
+
"onEvent": {},
|
|
126
|
+
"id": "u:246398c1f14c",
|
|
127
|
+
"level": "primary",
|
|
128
|
+
"close": true,
|
|
129
|
+
"hidden": false
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"weight": 0
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"level": "enhance"
|
|
139
|
+
}
|
|
140
|
+
],
|
|
141
|
+
"regions": [
|
|
142
|
+
"body"
|
|
143
|
+
],
|
|
144
|
+
"data": {
|
|
145
|
+
"context": {
|
|
146
|
+
"rootUrl": "http://127.0.0.1:5100"
|
|
147
|
+
},
|
|
148
|
+
"app_id": "",
|
|
149
|
+
"tab_id": "",
|
|
150
|
+
"object_name": "",
|
|
151
|
+
"dataComponentId": "",
|
|
152
|
+
"record_id": "",
|
|
153
|
+
"record": {},
|
|
154
|
+
"permissions": {}
|
|
155
|
+
},
|
|
156
|
+
"id": "u:ae64657bc500",
|
|
157
|
+
"bodyClassName": "p-0"
|
|
158
|
+
}
|
|
159
|
+
is_enable: true
|
|
160
|
+
label: 设置选项卡权限
|
|
161
|
+
'on': record_only
|
|
162
|
+
type: amis_button
|
|
163
|
+
visible: !!js/function |
|
|
164
|
+
function (object_name, record_id, record_permissions, data) {
|
|
165
|
+
return data.record.type === 'profile';
|
|
166
|
+
}
|
|
@@ -16,50 +16,26 @@ fields:
|
|
|
16
16
|
label: Report Type
|
|
17
17
|
type: select
|
|
18
18
|
defaultValue: tabular
|
|
19
|
-
options:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
{
|
|
27
|
-
"label": t("reports_field_report_type_options_summary"),
|
|
28
|
-
"value": "summary"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"label": t("reports_field_report_type_options_matrix"),
|
|
32
|
-
"value": "matrix"
|
|
33
|
-
}
|
|
34
|
-
];
|
|
35
|
-
var plugins = Creator.Plugins;
|
|
36
|
-
if(plugins["@steedos/plugin-jsreport"]){
|
|
37
|
-
types.push({
|
|
38
|
-
"label": "JsReport",
|
|
39
|
-
"value": "jsreport"
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
if(plugins["@steedos/plugin-stimulsoft-report"]){
|
|
43
|
-
types.push({
|
|
44
|
-
"label": "StimulsoftReport",
|
|
45
|
-
"value": "stimulsoft-report"
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return types;
|
|
49
|
-
}
|
|
19
|
+
options:
|
|
20
|
+
- label: Tabular
|
|
21
|
+
value: tabular
|
|
22
|
+
- label: Summary
|
|
23
|
+
value: summary
|
|
24
|
+
- label: Matrix
|
|
25
|
+
value: matrix
|
|
50
26
|
name: report_type
|
|
51
27
|
filterable: true
|
|
52
|
-
data_source:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
28
|
+
# data_source:
|
|
29
|
+
# label: Data Source
|
|
30
|
+
# type: select
|
|
31
|
+
# defaultValue: odata
|
|
32
|
+
# options:
|
|
33
|
+
# - label: OData
|
|
34
|
+
# value: odata
|
|
35
|
+
# - label: Graphql
|
|
36
|
+
# value: graphql
|
|
37
|
+
# name: data_source
|
|
38
|
+
# filterable: true
|
|
63
39
|
object_name:
|
|
64
40
|
label: Object
|
|
65
41
|
type: lookup
|
|
@@ -68,52 +44,52 @@ fields:
|
|
|
68
44
|
required: true
|
|
69
45
|
name: object_name
|
|
70
46
|
filterable: true
|
|
71
|
-
filter_scope:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
filters:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
filters.$:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
filters.$.field:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
filters.$.operation:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
filters.$.value:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
filter_logic:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
47
|
+
# filter_scope:
|
|
48
|
+
# label: Filter Scope
|
|
49
|
+
# type: select
|
|
50
|
+
# defaultValue: '"space"'
|
|
51
|
+
# hidden: true
|
|
52
|
+
# options:
|
|
53
|
+
# - label: All
|
|
54
|
+
# value: space
|
|
55
|
+
# - label: Mine
|
|
56
|
+
# value: mine
|
|
57
|
+
# name: filter_scope
|
|
58
|
+
# filterable: true
|
|
59
|
+
# filters:
|
|
60
|
+
# label: Filters
|
|
61
|
+
# type: '[Object]'
|
|
62
|
+
# omit: true
|
|
63
|
+
# name: filters
|
|
64
|
+
# filters.$:
|
|
65
|
+
# label: Filter
|
|
66
|
+
# blackbox: true
|
|
67
|
+
# omit: true
|
|
68
|
+
# hidden: true
|
|
69
|
+
# name: filters.$
|
|
70
|
+
# filters.$.field:
|
|
71
|
+
# label: Field
|
|
72
|
+
# type: text
|
|
73
|
+
# name: filters.$.field
|
|
74
|
+
# filters.$.operation:
|
|
75
|
+
# label: Operator
|
|
76
|
+
# type: select
|
|
77
|
+
# defaultValue: =
|
|
78
|
+
# options: !<tag:yaml.org,2002:js/function> |-
|
|
79
|
+
# function () {
|
|
80
|
+
# return Creator.getFieldOperation();
|
|
81
|
+
# }
|
|
82
|
+
# name: filters.$.operation
|
|
83
|
+
# filterable: true
|
|
84
|
+
# filters.$.value:
|
|
85
|
+
# label: Value
|
|
86
|
+
# blackbox: true
|
|
87
|
+
# name: filters.$.value
|
|
88
|
+
# filter_logic:
|
|
89
|
+
# label: Filter Logic
|
|
90
|
+
# type: text
|
|
91
|
+
# omit: true
|
|
92
|
+
# name: filter_logic
|
|
117
93
|
fields:
|
|
118
94
|
label: Fields
|
|
119
95
|
type: lookup
|
|
@@ -122,10 +98,14 @@ fields:
|
|
|
122
98
|
depend_on:
|
|
123
99
|
- object_name
|
|
124
100
|
defaultIcon: service_contract
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
101
|
+
reference_to: object_fields
|
|
102
|
+
reference_to_field: name
|
|
103
|
+
enable_enhanced_lookup: false
|
|
104
|
+
filtersFunction: !<tag:yaml.org,2002:js/function> |-
|
|
105
|
+
function anonymous(filters,values
|
|
106
|
+
) {
|
|
107
|
+
return ['object', '=', values.object_name]
|
|
108
|
+
}
|
|
129
109
|
name: fields
|
|
130
110
|
filterable: true
|
|
131
111
|
rows:
|
|
@@ -136,10 +116,14 @@ fields:
|
|
|
136
116
|
depend_on:
|
|
137
117
|
- object_name
|
|
138
118
|
defaultIcon: service_contract
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
119
|
+
reference_to: object_fields
|
|
120
|
+
reference_to_field: name
|
|
121
|
+
enable_enhanced_lookup: false
|
|
122
|
+
filtersFunction: !<tag:yaml.org,2002:js/function> |-
|
|
123
|
+
function anonymous(filters,values
|
|
124
|
+
) {
|
|
125
|
+
return ['object', '=', values.object_name]
|
|
126
|
+
}
|
|
143
127
|
name: rows
|
|
144
128
|
filterable: true
|
|
145
129
|
columns:
|
|
@@ -150,10 +134,14 @@ fields:
|
|
|
150
134
|
depend_on:
|
|
151
135
|
- object_name
|
|
152
136
|
defaultIcon: service_contract
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
137
|
+
reference_to: object_fields
|
|
138
|
+
reference_to_field: name
|
|
139
|
+
enable_enhanced_lookup: false
|
|
140
|
+
filtersFunction: !<tag:yaml.org,2002:js/function> |-
|
|
141
|
+
function anonymous(filters,values
|
|
142
|
+
) {
|
|
143
|
+
return ['object', '=', values.object_name]
|
|
144
|
+
}
|
|
157
145
|
name: columns
|
|
158
146
|
filterable: true
|
|
159
147
|
values:
|
|
@@ -164,37 +152,41 @@ fields:
|
|
|
164
152
|
depend_on:
|
|
165
153
|
- object_name
|
|
166
154
|
defaultIcon: service_contract
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
155
|
+
reference_to: object_fields
|
|
156
|
+
reference_to_field: name
|
|
157
|
+
enable_enhanced_lookup: false
|
|
158
|
+
filtersFunction: !<tag:yaml.org,2002:js/function> |-
|
|
159
|
+
function anonymous(filters,values
|
|
160
|
+
) {
|
|
161
|
+
return ['object', '=', values.object_name]
|
|
162
|
+
}
|
|
171
163
|
name: values
|
|
172
164
|
filterable: true
|
|
173
|
-
filter_fields:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
filter_fields.$:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
filter_fields.$.field:
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
filter_fields.$.required:
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
165
|
+
# filter_fields:
|
|
166
|
+
# label: Filter Fields
|
|
167
|
+
# type: grid
|
|
168
|
+
# is_wide: true
|
|
169
|
+
# name: filter_fields
|
|
170
|
+
# depend_on:
|
|
171
|
+
# - object_name
|
|
172
|
+
# filter_fields.$:
|
|
173
|
+
# label: Filter Field
|
|
174
|
+
# blackbox: true
|
|
175
|
+
# type: object
|
|
176
|
+
# name: filter_fields.$
|
|
177
|
+
# filter_fields.$.field:
|
|
178
|
+
# label: Field
|
|
179
|
+
# type: lookup
|
|
180
|
+
# optionsFunction: !<tag:yaml.org,2002:js/function> |-
|
|
181
|
+
# function (values) {
|
|
182
|
+
# return Creator.getObjectFilterFieldOptions(values != null ? values.object_name : void 0);
|
|
183
|
+
# }
|
|
184
|
+
# name: filter_fields.$.field
|
|
185
|
+
# filterable: true
|
|
186
|
+
# filter_fields.$.required:
|
|
187
|
+
# label: Required
|
|
188
|
+
# type: boolean
|
|
189
|
+
# name: filter_fields.$.required
|
|
198
190
|
options:
|
|
199
191
|
label: Options
|
|
200
192
|
omit: true
|
|
@@ -225,39 +217,6 @@ fields:
|
|
|
225
217
|
type: boolean
|
|
226
218
|
defaultValue: true
|
|
227
219
|
name: counting
|
|
228
|
-
graphql:
|
|
229
|
-
label: Graphql
|
|
230
|
-
type: textarea
|
|
231
|
-
is_wide: true
|
|
232
|
-
hidden: false
|
|
233
|
-
group: JsReport
|
|
234
|
-
name: graphql
|
|
235
|
-
html:
|
|
236
|
-
label: Html
|
|
237
|
-
type: textarea
|
|
238
|
-
is_wide: true
|
|
239
|
-
hidden: false
|
|
240
|
-
group: JsReport
|
|
241
|
-
name: html
|
|
242
|
-
helper:
|
|
243
|
-
label: Helper
|
|
244
|
-
type: textarea
|
|
245
|
-
is_wide: true
|
|
246
|
-
hidden: false
|
|
247
|
-
group: JsReport
|
|
248
|
-
name: helper
|
|
249
|
-
script:
|
|
250
|
-
label: Script
|
|
251
|
-
type: textarea
|
|
252
|
-
is_wide: true
|
|
253
|
-
hidden: false
|
|
254
|
-
group: JsReport
|
|
255
|
-
name: script
|
|
256
|
-
mrt:
|
|
257
|
-
label: Mrt
|
|
258
|
-
type: textarea
|
|
259
|
-
is_wide: true
|
|
260
|
-
hidden: true
|
|
261
220
|
is_system:
|
|
262
221
|
type: boolean
|
|
263
222
|
label: System
|
|
@@ -266,115 +225,23 @@ fields:
|
|
|
266
225
|
visible_on: "{{global.mode ==='read' ? true : false}}"
|
|
267
226
|
disabled: true
|
|
268
227
|
list_views:
|
|
269
|
-
default:
|
|
270
|
-
columns:
|
|
271
|
-
- name
|
|
272
|
-
- report_type
|
|
273
|
-
- object_name
|
|
274
|
-
- is_system
|
|
275
228
|
all:
|
|
276
229
|
label: All Reports
|
|
277
230
|
filter_scope: space
|
|
278
231
|
filter_fields:
|
|
279
232
|
- report_type
|
|
280
233
|
- created
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
filter_scope: space
|
|
284
|
-
filters: !<tag:yaml.org,2002:js/function> |-
|
|
285
|
-
function () {
|
|
286
|
-
var object_names;
|
|
287
|
-
object_names = Creator.getAppObjectNames();
|
|
288
|
-
return [["object_name", "=", object_names]];
|
|
289
|
-
}
|
|
290
|
-
filter_fields:
|
|
234
|
+
columns:
|
|
235
|
+
- name
|
|
291
236
|
- report_type
|
|
292
|
-
-
|
|
237
|
+
- object_name
|
|
238
|
+
- is_system
|
|
293
239
|
mine:
|
|
294
240
|
label: My Reports
|
|
295
241
|
filter_scope: mine
|
|
296
242
|
filter_fields:
|
|
297
243
|
- report_type
|
|
298
244
|
- created
|
|
299
|
-
global:
|
|
300
|
-
label: Standard Reports
|
|
301
|
-
filter_scope: space
|
|
302
|
-
filters:
|
|
303
|
-
- - space
|
|
304
|
-
- =
|
|
305
|
-
- global
|
|
306
|
-
filter_fields:
|
|
307
|
-
- report_type
|
|
308
|
-
- created
|
|
309
|
-
actions:
|
|
310
|
-
standard_new_by_template:
|
|
311
|
-
label: Pull from Library
|
|
312
|
-
visible: !<tag:yaml.org,2002:js/function> |-
|
|
313
|
-
function () {
|
|
314
|
-
var permissions;
|
|
315
|
-
permissions = Creator.getPermissions();
|
|
316
|
-
if (Creator.getTemplateSpaceId() && permissions) {
|
|
317
|
-
return permissions["allowCreate"];
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
'on': list
|
|
321
|
-
todo: !<tag:yaml.org,2002:js/function> |-
|
|
322
|
-
function (object_name, record_id, fields) {
|
|
323
|
-
Template.gridModal.show({
|
|
324
|
-
id: 'gridModal',
|
|
325
|
-
heading: '请选择报表',
|
|
326
|
-
onConfirm: function (selection) {
|
|
327
|
-
if (selection && selection.length > 0) {
|
|
328
|
-
var record = selection[0];
|
|
329
|
-
var recordId = record._id;
|
|
330
|
-
var url = Steedos.absoluteUrl("/api/v4/reports/all/copy");
|
|
331
|
-
var data = {
|
|
332
|
-
recordId: recordId
|
|
333
|
-
};
|
|
334
|
-
if (recordId) {
|
|
335
|
-
$.ajax({
|
|
336
|
-
url: url,
|
|
337
|
-
type: 'POST',
|
|
338
|
-
async: true,
|
|
339
|
-
data: JSON.stringify(data),
|
|
340
|
-
dataType: 'json',
|
|
341
|
-
processData: false,
|
|
342
|
-
contentType: 'application/json',
|
|
343
|
-
success: function (data) {
|
|
344
|
-
if (data.errors) {
|
|
345
|
-
data.errors.forEach(function (e) {
|
|
346
|
-
toastr.error(e.errorMessage);
|
|
347
|
-
});
|
|
348
|
-
return;
|
|
349
|
-
} else if (data.value) {
|
|
350
|
-
FlowRouter.go("/app/-/reports/view/" + data.value._id);
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
error: function (xhr, msg, ex) {
|
|
354
|
-
toastr.error(msg);
|
|
355
|
-
}
|
|
356
|
-
})
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
gridProp: {
|
|
361
|
-
id: 'reports_object_grid',
|
|
362
|
-
objectName: 'reports',
|
|
363
|
-
enableSearch: true,
|
|
364
|
-
selectRows: 'radio',
|
|
365
|
-
spaceId: Creator.getTemplateSpaceId(),
|
|
366
|
-
columns: [{
|
|
367
|
-
field: 'name',
|
|
368
|
-
label: '名称',
|
|
369
|
-
width: '30%'
|
|
370
|
-
}, {
|
|
371
|
-
field: 'description',
|
|
372
|
-
type: 'markdown',
|
|
373
|
-
label: '描述'
|
|
374
|
-
}]
|
|
375
|
-
}
|
|
376
|
-
})
|
|
377
|
-
}
|
|
378
245
|
permission_set:
|
|
379
246
|
user:
|
|
380
247
|
allowCreate: true
|
|
@@ -20,7 +20,7 @@ amis_schema: |-
|
|
|
20
20
|
"args": {
|
|
21
21
|
"options": {},
|
|
22
22
|
"api": {
|
|
23
|
-
"url": "${context.rootUrl}/api/users/${
|
|
23
|
+
"url": "${context.rootUrl}/api/users/${user}/clear_login_tokens",
|
|
24
24
|
"method": "get",
|
|
25
25
|
"requestAdaptor": "",
|
|
26
26
|
"adaptor": "return payload.success ? {data: {...payload}, status: 0, msg: t('CustomLabels.space_users_actions_clear_login_tokens_success')} : {...payload, status: 1};"
|