@steedos-labs/content-compliance-bev 0.0.1 → 0.0.2
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/dist/index.js +1 -1
- package/lib/actions/submit.d.ts +9 -1
- package/lib/actions/submit.js +50 -11
- package/lib/actions/submit.js.map +1 -1
- package/lib/actions/submitMaterial.js +1 -1
- package/lib/actions/submitMaterial.js.map +1 -1
- package/lib/index.js +12 -3
- package/lib/index.js.map +1 -1
- package/lib/methods/approval_engine.js +66 -50
- package/lib/methods/approval_engine.js.map +1 -1
- package/lib/methods/consts.d.ts +3 -1
- package/lib/methods/consts.js.map +1 -1
- package/lib/methods/content_hub.js +5 -0
- package/lib/methods/content_hub.js.map +1 -1
- package/lib/methods/index.d.ts +1 -0
- package/lib/methods/index.js +1 -0
- package/lib/methods/index.js.map +1 -1
- package/lib/methods/material.js +5 -5
- package/lib/methods/material.js.map +1 -1
- package/lib/methods/task.d.ts +7 -0
- package/lib/methods/task.js +269 -0
- package/lib/methods/task.js.map +1 -0
- package/main/default/applications/approve_workflow.app.yml +92 -0
- package/main/default/applications/pepsico_content_setting.app.yml +26 -19
- package/main/default/client/pepsico_content.client.js +30 -0
- package/main/default/objects/pepsico_approval_process/fields/approved.field.yml +1 -2
- package/main/default/objects/pepsico_approval_process/fields/current_step.field.yml +1 -1
- package/main/default/objects/pepsico_approval_process/fields/type.field.yml +1 -1
- package/main/default/objects/pepsico_approval_task/fields/approval_field.field.yml +23 -0
- package/main/default/objects/pepsico_approval_task/fields/approval_status.field.yml +15 -0
- package/main/default/objects/pepsico_approval_task/fields/approve_time.field.yml +7 -0
- package/main/default/objects/pepsico_approval_task/fields/comment.field.yml +9 -0
- package/main/default/objects/pepsico_approval_task/fields/owner.field.yml +11 -0
- package/main/default/objects/pepsico_approval_task/fields/pepsico_material.field.yml +8 -0
- package/main/default/objects/pepsico_approval_task/fields/pepsico_material_approval.field.yml +8 -0
- package/main/default/objects/pepsico_approval_task/listviews/all.listview.yml +17 -0
- package/main/default/objects/pepsico_approval_task/listviews/recent.listview.yml +14 -0
- package/main/default/objects/pepsico_approval_task/pepsico_approval_task.object.yml +26 -0
- package/main/default/objects/pepsico_approval_task/permissions/admin.permission.yml +17 -0
- package/main/default/objects/pepsico_approval_task/permissions/user.permission.yml +16 -0
- package/main/default/objects/pepsico_brand_leader/fields/classification.field.yml +0 -26
- package/main/default/objects/pepsico_mail_send_log/fields/classification.field.yml +0 -26
- package/main/default/objects/pepsico_material/buttons/pepsico_material_approve.button.yml +4 -0
- package/main/default/objects/pepsico_material/buttons/pepsico_material_reject.button.yml +4 -0
- package/main/default/objects/pepsico_material/buttons/pepsico_onedrive_edit_material.button.yml +1 -1
- package/main/default/objects/pepsico_material/buttons/pepsico_onedrive_review_material.button.yml +1 -1
- package/main/default/objects/pepsico_material/buttons/pepsico_update_material.button.yml +2 -2
- package/main/default/objects/pepsico_material/buttons/pepsico_upload_supplement.button.yml +3 -3
- package/main/default/objects/pepsico_material/fields/approval_status.field.yml +1 -1
- package/main/default/objects/pepsico_material/fields/classification.field.yml +0 -31
- package/main/default/objects/pepsico_material/fields/material_one_drive_history.field.yml +1 -1
- package/main/default/objects/pepsico_material/fields/material_update_history.field.yml +1 -1
- package/main/default/objects/pepsico_material/fields/social_media.field.yml +2 -0
- package/main/default/objects/pepsico_material/permissions/user.permission.yml +1 -0
- package/main/default/objects/pepsico_material_approval/buttons/pepsico_copyright_upload.button.yml +5 -2
- package/main/default/objects/pepsico_material_approval/buttons/pepsico_material_upload.button.yml +6 -4
- package/main/default/objects/pepsico_material_approval/buttons/pepsico_submit.button.yml +104 -42
- package/main/default/objects/pepsico_material_approval/buttons/pepsico_terminate.button.yml +6 -5
- package/main/default/objects/pepsico_material_approval/buttons/standard_delete.button.js +1 -1
- package/main/default/objects/pepsico_material_approval/buttons/standard_edit.button.js +1 -1
- package/main/default/objects/pepsico_material_approval/fields/approval_status.field.yml +1 -1
- package/main/default/objects/pepsico_material_approval/fields/approval_type.field.yml +2 -2
- package/main/default/objects/pepsico_material_approval/fields/assistance.field.yml +1 -1
- package/main/default/objects/pepsico_material_approval/fields/ca_spot_check.field.yml +2 -2
- package/main/default/objects/pepsico_material_approval/fields/classification.field.yml +33 -0
- package/main/default/objects/pepsico_material_approval/fields/current_step.field.yml +1 -1
- package/main/default/objects/pepsico_material_approval/fields/followers.field.yml +12 -0
- package/main/default/objects/pepsico_material_approval/fields/handler_guding.field.yml +1 -1
- package/main/default/objects/pepsico_material_approval/fields/internal_collaborator_edit.field.yml +1 -1
- package/main/default/objects/pepsico_material_approval/fields/kids_assistance.field.yml +4 -6
- package/main/default/objects/pepsico_material_approval/fields/kids_reviewer.field.yml +3 -2
- package/main/default/objects/pepsico_material_approval/fields/legal_spot_check.field.yml +2 -2
- package/main/default/objects/pepsico_material_approval/fields/ns_spot_check.field.yml +2 -2
- package/main/default/objects/pepsico_material_approval/fields/owner.field.yml +0 -2
- package/main/default/objects/pepsico_material_approval/fields/product.field.yml +34 -0
- package/main/default/objects/pepsico_material_approval/fields/reviewer.field.yml +1 -1
- package/main/default/objects/pepsico_material_approval/fields/social_media.field.yml +8 -0
- package/main/default/objects/pepsico_material_approval/fields/special_spot_check.field.yml +3 -3
- package/main/default/objects/pepsico_material_approval/fields/sra_spot_check.field.yml +2 -2
- package/main/default/objects/pepsico_material_approval/listviews/handle.listview.yml +1 -1
- package/main/default/objects/pepsico_material_approval/pepsico_material_approval.object.yml +2 -0
- package/main/default/objects/pepsico_reviewer/fields/assistance.field.yml +1 -1
- package/main/default/objects/pepsico_reviewer/fields/reviewer.field.yml +1 -1
- package/main/default/objects/pepsico_reviewer/fields/special_spot_check.field.yml +1 -1
- package/main/default/pages/pepsico_content_review_detail.page.amis.json +80 -7
- package/main/default/pages/pepsico_material_detail.page.amis.json +2 -2
- package/main/default/pages/pepsico_material_detail_mobile.page.amis.json +1 -1
- package/main/default/pages/pepsico_midtier_spot_check.page.amis.json +1 -1
- package/main/default/pages/pepsico_spot_check.page.amis.json +1 -1
- package/main/default/pages/pepsico_spot_check_dco.page.amis.json +1 -1
- package/package.json +2 -2
- package/public/content-review/amis.css +32 -0
- package/public/content-review/topic.css +8 -1
- package/public/pepsico_login.css +196 -0
- package/public/{dynamic.js → pepsico_login.js} +0 -2
- package/public/privacy-policy/index.html +657 -879
- package/public/dynamic.css +0 -191
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: pepsico_approval_task
|
|
2
|
+
enable_api: true
|
|
3
|
+
enable_audit: false
|
|
4
|
+
enable_chatter: false
|
|
5
|
+
enable_dataloader: true
|
|
6
|
+
enable_enhanced_lookup: true
|
|
7
|
+
enable_events: false
|
|
8
|
+
enable_files: false
|
|
9
|
+
enable_form_tabs: false
|
|
10
|
+
enable_inline_edit: true
|
|
11
|
+
enable_instances: false
|
|
12
|
+
enable_lock_detail: true
|
|
13
|
+
enable_print: false
|
|
14
|
+
enable_split: false
|
|
15
|
+
enable_tasks: false
|
|
16
|
+
enable_tree: false
|
|
17
|
+
enable_workflow: true
|
|
18
|
+
field_groups:
|
|
19
|
+
- group_name: 通用
|
|
20
|
+
- group_name: 系统信息
|
|
21
|
+
collapsed: true
|
|
22
|
+
icon: task
|
|
23
|
+
is_enable: true
|
|
24
|
+
label: 审批任务
|
|
25
|
+
locked: false
|
|
26
|
+
version: 2
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name: pepsico_approval_task.admin
|
|
2
|
+
allowCreate: true
|
|
3
|
+
allowCreateFiles: true
|
|
4
|
+
allowCreateListViews: true
|
|
5
|
+
allowDelete: true
|
|
6
|
+
allowDeleteFiles: true
|
|
7
|
+
allowEdit: true
|
|
8
|
+
allowEditFiles: true
|
|
9
|
+
allowExport: true
|
|
10
|
+
allowRead: true
|
|
11
|
+
allowReadFiles: true
|
|
12
|
+
modifyAllFiles: true
|
|
13
|
+
modifyAllRecords: true
|
|
14
|
+
permission_set_id: admin
|
|
15
|
+
viewAllFiles: true
|
|
16
|
+
viewAllRecords: true
|
|
17
|
+
field_permissions: []
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: pepsico_approval_task.user
|
|
2
|
+
allowCreate: true
|
|
3
|
+
allowCreateFiles: true
|
|
4
|
+
allowCreateListViews: true
|
|
5
|
+
allowDelete: true
|
|
6
|
+
allowDeleteFiles: true
|
|
7
|
+
allowEdit: true
|
|
8
|
+
allowEditFiles: true
|
|
9
|
+
allowExport: true
|
|
10
|
+
allowRead: true
|
|
11
|
+
allowReadFiles: true
|
|
12
|
+
modifyAllRecords: false
|
|
13
|
+
permission_set_id: user
|
|
14
|
+
viewAllFiles: true
|
|
15
|
+
viewAllRecords: true
|
|
16
|
+
field_permissions: []
|
|
@@ -62,32 +62,6 @@ data_type: text
|
|
|
62
62
|
description: ''
|
|
63
63
|
enable_thousands: true
|
|
64
64
|
filters: []
|
|
65
|
-
inlineHelpText: >-
|
|
66
|
-
<b>Top KOL account: </b><br>
|
|
67
|
-
|
|
68
|
-
- Tiktok fans >800w;<br>
|
|
69
|
-
|
|
70
|
-
- XHS fans >100w;<br>
|
|
71
|
-
|
|
72
|
-
- Weibo fans >1000w;<br>
|
|
73
|
-
|
|
74
|
-
- WeChat fans >100w;<br>
|
|
75
|
-
|
|
76
|
-
- Bilibili fans > 100w;<br>
|
|
77
|
-
|
|
78
|
-
- Kuaishou fans >800w ;<br>
|
|
79
|
-
|
|
80
|
-
<br>
|
|
81
|
-
|
|
82
|
-
<b>Top Media account: </b><br>
|
|
83
|
-
|
|
84
|
-
-State owned media platforms with national coverage - CCTV series; National /
|
|
85
|
-
Provincial Satellite TV;<br>
|
|
86
|
-
|
|
87
|
-
- Newspaper/Radio/website affiliated to National ministries and
|
|
88
|
-
commissions;<br>
|
|
89
|
-
|
|
90
|
-
- social accounts affiliated to above media owners;
|
|
91
65
|
is_wide: false
|
|
92
66
|
label: 分类
|
|
93
67
|
options:
|
|
@@ -62,32 +62,6 @@ data_type: text
|
|
|
62
62
|
description: ''
|
|
63
63
|
enable_thousands: true
|
|
64
64
|
filters: []
|
|
65
|
-
inlineHelpText: >-
|
|
66
|
-
<b>Top KOL account: </b><br>
|
|
67
|
-
|
|
68
|
-
- Tiktok fans >800w;<br>
|
|
69
|
-
|
|
70
|
-
- XHS fans >100w;<br>
|
|
71
|
-
|
|
72
|
-
- Weibo fans >1000w;<br>
|
|
73
|
-
|
|
74
|
-
- WeChat fans >100w;<br>
|
|
75
|
-
|
|
76
|
-
- Bilibili fans > 100w;<br>
|
|
77
|
-
|
|
78
|
-
- Kuaishou fans >800w ;<br>
|
|
79
|
-
|
|
80
|
-
<br>
|
|
81
|
-
|
|
82
|
-
<b>Top Media account: </b><br>
|
|
83
|
-
|
|
84
|
-
-State owned media platforms with national coverage - CCTV series; National /
|
|
85
|
-
Provincial Satellite TV;<br>
|
|
86
|
-
|
|
87
|
-
- Newspaper/Radio/website affiliated to National ministries and
|
|
88
|
-
commissions;<br>
|
|
89
|
-
|
|
90
|
-
- social accounts affiliated to above media owners;
|
|
91
65
|
is_wide: false
|
|
92
66
|
label: 分类
|
|
93
67
|
options:
|
package/main/default/objects/pepsico_material/buttons/pepsico_onedrive_edit_material.button.yml
CHANGED
|
@@ -11,7 +11,7 @@ amis_schema: |-
|
|
|
11
11
|
"label": "编辑素材",
|
|
12
12
|
"id": "u:f7ac1cc7ac3a",
|
|
13
13
|
"editorState": "default",
|
|
14
|
-
"visibleOn": "${void_material !== true && (extension_type === 'doc' || extension_type === 'docx' || extension_type === 'ppt' || extension_type === 'pptx') &&(((current_step == 'departmental_review' || current_step == 'personnel_review') && !((owner === context.userId || created_by === context.userId)))|| (current_step == 'submitter_revisions' && owner === context.userId)) && formFactor != 'SMALL'}",
|
|
14
|
+
"visibleOn": "${void_material !== true && (extension_type === 'doc' || extension_type === 'docx' || extension_type === 'ppt' || extension_type === 'pptx' || extension_type == 'xls' || extension_type == 'xlsx') &&(((current_step == 'departmental_review' || current_step == 'personnel_review') && !((owner === context.userId || created_by === context.userId)))|| (current_step == 'submitter_revisions' && owner === context.userId)) && formFactor != 'SMALL'}",
|
|
15
15
|
"onEvent": {
|
|
16
16
|
"click": {
|
|
17
17
|
"actions": [
|
package/main/default/objects/pepsico_material/buttons/pepsico_onedrive_review_material.button.yml
CHANGED
|
@@ -7,7 +7,7 @@ amis_schema: |-
|
|
|
7
7
|
"type": "button",
|
|
8
8
|
"label": "${ permanent_deleted == true ? '下载素材' : '查看素材'}",
|
|
9
9
|
"id": "u:pepsico_review_material",
|
|
10
|
-
"visibleOn": "${(extension_type === 'doc' || extension_type === 'docx' || extension_type === 'ppt' || extension_type === 'pptx') && !(current_step == 'draft'||current_step == 'ai_review')}",
|
|
10
|
+
"visibleOn": "${(extension_type === 'doc' || extension_type === 'docx' || extension_type === 'ppt' || extension_type === 'pptx' || extension_type == 'xls' || extension_type == 'xlsx') && !(current_step == 'draft'||current_step == 'ai_review')}",
|
|
11
11
|
"onEvent": {
|
|
12
12
|
"click": {
|
|
13
13
|
"actions": [
|
|
@@ -11,7 +11,7 @@ amis_schema: |-
|
|
|
11
11
|
"label": "替换素材",
|
|
12
12
|
"id": "u:683f062fed98",
|
|
13
13
|
"editorState": "default",
|
|
14
|
-
"visibleOn": "${void_material !== true && (current_step == 'submitter_revisions' && extension_type !== 'doc' && extension_type !== 'docx' && extension_type !== 'ppt' && extension_type !== 'pptx') && owner === context.userId && formFactor != 'SMALL'}",
|
|
14
|
+
"visibleOn": "${void_material !== true && (current_step == 'submitter_revisions' && extension_type !== 'doc' && extension_type !== 'docx' && extension_type !== 'ppt' && extension_type !== 'pptx' && extension_type !== 'xls' && extension_type !== 'xlsx') && owner === context.userId && formFactor != 'SMALL'}",
|
|
15
15
|
"onEvent": {
|
|
16
16
|
"click": {
|
|
17
17
|
"weight": 0,
|
|
@@ -35,7 +35,7 @@ amis_schema: |-
|
|
|
35
35
|
"maxSize": 1073741824,
|
|
36
36
|
"multiple": false,
|
|
37
37
|
"useChunk": false,
|
|
38
|
-
"accept": ".jpg, .jpeg, .png, .pptx, .mp4, .avi, .mov, .doc, .docx",
|
|
38
|
+
"accept": ".jpg, .jpeg, .png, .pptx, .mp4, .avi, .mov, .doc, .docx, .xls, .xlsx",
|
|
39
39
|
"drag": true,
|
|
40
40
|
"onEvent": {
|
|
41
41
|
"success": {
|
|
@@ -43,10 +43,10 @@ amis_schema: |-
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"receiver": {
|
|
46
|
-
|
|
46
|
+
"url": "/api/v6/files/cfs.files.filerecord",
|
|
47
47
|
"method": "post",
|
|
48
|
-
"requestAdaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { _master, global } = superData;\nconst { spaceId, userId, user } = global;\n\napi.data.append('space', spaceId);\napi.data.append('owner', userId);\n\nreturn api;",
|
|
49
|
-
"adaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { context: pageContext } = superData;\nvar rootUrl = pageContext.rootUrl + \"/api/files/files/\";\npayload = {\n status: response.status == 200 ? 0 : response.status,\n msg: response.statusText,\n data: {\n value: payload._id,\n name: payload.original.name,\n url: rootUrl + payload._id,\n }\n}\nreturn payload;",
|
|
48
|
+
"requestAdaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { _master, global } = superData;\nconst { spaceId, userId, user } = global;\n\napi.data.append('space', spaceId);\napi.data.append('owner', userId);\napi.data.append('owner_name', user.name);\n\nreturn api;",
|
|
49
|
+
"adaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { context: pageContext } = superData;\nvar rootUrl = pageContext.rootUrl + \"/api/files/files/\";\npayload = {\n status: response.status == 200 ? 0 : response.status,\n msg: response.statusText,\n data: {\n value: {id: payload._id, md5: payload.original.md5},\n name: payload.original.name,\n url: rootUrl + payload._id,\n }\n}\nreturn payload;",
|
|
50
50
|
"messages": {},
|
|
51
51
|
"dataType": "form-data"
|
|
52
52
|
}
|
|
@@ -10,37 +10,6 @@ amis:
|
|
|
10
10
|
clearable: true
|
|
11
11
|
onlyLeaf: true
|
|
12
12
|
description: ''
|
|
13
|
-
labelRemark:
|
|
14
|
-
trigger:
|
|
15
|
-
- hover
|
|
16
|
-
className: Remark--warning
|
|
17
|
-
placement: bottom
|
|
18
|
-
content: >-
|
|
19
|
-
Top KOL account:<br>
|
|
20
|
-
|
|
21
|
-
- Tiktok fans >800w;<br>
|
|
22
|
-
|
|
23
|
-
- XHS fans >100w;<br>
|
|
24
|
-
|
|
25
|
-
- Weibo fans >1000w;<br>
|
|
26
|
-
|
|
27
|
-
- WeChat fans >100w;<br>
|
|
28
|
-
|
|
29
|
-
- Bilibili fans > 100w;<br>
|
|
30
|
-
|
|
31
|
-
- Kuaishou fans >800w;<br>
|
|
32
|
-
|
|
33
|
-
<br>
|
|
34
|
-
|
|
35
|
-
Top Media account:<br>
|
|
36
|
-
|
|
37
|
-
- CCTV series; National / Provincial Satellite TV;<br>
|
|
38
|
-
|
|
39
|
-
- Newspaper/Radio/website affiliated to National ministries and
|
|
40
|
-
commissions;<br>
|
|
41
|
-
|
|
42
|
-
- social accounts affiliated to above media owners;<br>
|
|
43
|
-
title: 分类说明
|
|
44
13
|
searchable: true
|
|
45
14
|
label: 分类
|
|
46
15
|
showOutline: false
|
package/main/default/objects/pepsico_material_approval/buttons/pepsico_copyright_upload.button.yml
CHANGED
|
@@ -36,7 +36,9 @@ amis_schema: |-
|
|
|
36
36
|
"subtitles",
|
|
37
37
|
"font_copyright",
|
|
38
38
|
"copyright_front",
|
|
39
|
-
"copyright_other"
|
|
39
|
+
"copyright_other",
|
|
40
|
+
"is_trademark_checked",
|
|
41
|
+
"trademark_files"
|
|
40
42
|
]
|
|
41
43
|
}
|
|
42
44
|
],
|
|
@@ -62,7 +64,8 @@ amis_schema: |-
|
|
|
62
64
|
"showErrorMsg": true,
|
|
63
65
|
"showLoading": true,
|
|
64
66
|
"draggable": false,
|
|
65
|
-
"size": "lg"
|
|
67
|
+
"size": "lg",
|
|
68
|
+
"actionType": "dialog"
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
]
|
package/main/default/objects/pepsico_material_approval/buttons/pepsico_material_upload.button.yml
CHANGED
|
@@ -38,9 +38,10 @@ amis_schema: |-
|
|
|
38
38
|
"btnLabel": "文件上传",
|
|
39
39
|
"multiple": true,
|
|
40
40
|
"maxSize": 10737418240,
|
|
41
|
+
"description": "Office文件大小不能超过250MB.",
|
|
41
42
|
"maxLength": 300,
|
|
42
43
|
"useChunk": false,
|
|
43
|
-
"accept": ".jpg, .jpeg, .png, .pptx, .mp4, .avi, .mov, .doc, .docx",
|
|
44
|
+
"accept": ".jpg, .jpeg, .png, .pptx, .mp4, .avi, .mov, .doc, .docx, .xls, .xlsx",
|
|
44
45
|
"drag": true,
|
|
45
46
|
"onEvent": {
|
|
46
47
|
"success": {
|
|
@@ -51,7 +52,7 @@ amis_schema: |-
|
|
|
51
52
|
"receiver": {
|
|
52
53
|
"url": "/api/v6/files/cfs.files.filerecord",
|
|
53
54
|
"method": "post",
|
|
54
|
-
"requestAdaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { _master, global } = superData;\nconst { spaceId, userId, user } = global;\n\napi.data.append('space', spaceId);\napi.data.append('owner', userId);\napi.data.append('owner_name', user.name);\n\nreturn api;",
|
|
55
|
+
"requestAdaptor": "function validateFileSize(file) { const restrictedTypes = { 'word': ['.doc', '.docx'], 'ppt': ['.ppt', '.pptx'], 'excel': ['.xls', '.xlsx'] }; const fileName = file.name.toLowerCase(); const fileExtension = fileName.substring(fileName.lastIndexOf('.')); const isRestrictedType = Object.values(restrictedTypes) .flat() .includes(fileExtension); if (isRestrictedType) { const maxSize = 250 * 1024 * 1024; if (file.size > maxSize) { throw new Error(`Office文件大小不能超过250MB,当前文件大小为 ${(file.size / (1024 * 1024)).toFixed(2)}MB`) } }};validateFileSize(api.data.get('file'));; const superData = (typeof context != 'undefined') ? context : api.body;\nconst { _master, global } = superData;\nconst { spaceId, userId, user } = global;\n\napi.data.append('space', spaceId);\napi.data.append('owner', userId);\napi.data.append('owner_name', user.name);\n\nreturn api;",
|
|
55
56
|
"adaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { context: pageContext } = superData;\nvar rootUrl = pageContext.rootUrl + \"/api/files/files/\";\npayload = {\n status: response.status == 200 ? 0 : response.status,\n msg: response.statusText,\n data: {\n value: payload._id,\n name: payload.original.name,\n url: rootUrl + payload._id,\n }\n}\nreturn payload;",
|
|
56
57
|
"messages": {},
|
|
57
58
|
"dataType": "form-data"
|
|
@@ -236,11 +237,12 @@ amis_schema: |-
|
|
|
236
237
|
"name": "files",
|
|
237
238
|
"id": "u:353a3c44dde9",
|
|
238
239
|
"btnLabel": "文件上传",
|
|
240
|
+
"description": "Office文件大小不能超过250MB.",
|
|
239
241
|
"multiple": true,
|
|
240
242
|
"maxSize": 1073741824,
|
|
241
243
|
"maxLength": 50,
|
|
242
244
|
"useChunk": false,
|
|
243
|
-
"accept": ".jpg, .jpeg, .png, .pptx, .mp4, .avi, .mov, .doc, .docx",
|
|
245
|
+
"accept": ".jpg, .jpeg, .png, .pptx, .mp4, .avi, .mov, .doc, .docx, .xls, .xlsx",
|
|
244
246
|
"drag": true,
|
|
245
247
|
"onEvent": {
|
|
246
248
|
"success": {
|
|
@@ -251,7 +253,7 @@ amis_schema: |-
|
|
|
251
253
|
"receiver": {
|
|
252
254
|
"url": "/api/v6/files/cfs.files.filerecord",
|
|
253
255
|
"method": "post",
|
|
254
|
-
"requestAdaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { _master, global } = superData;\nconst { spaceId, userId, user } = global;\n\napi.data.append('space', spaceId);\napi.data.append('owner', userId);\napi.data.append('owner_name', user.name);\n\nreturn api;",
|
|
256
|
+
"requestAdaptor": "function validateFileSize(file) { const restrictedTypes = { 'word': ['.doc', '.docx'], 'ppt': ['.ppt', '.pptx'], 'excel': ['.xls', '.xlsx'] }; const fileName = file.name.toLowerCase(); const fileExtension = fileName.substring(fileName.lastIndexOf('.')); const isRestrictedType = Object.values(restrictedTypes) .flat() .includes(fileExtension); if (isRestrictedType) { const maxSize = 250 * 1024 * 1024; if (file.size > maxSize) { throw new Error(`Office文件大小不能超过250MB,当前文件大小为 ${(file.size / (1024 * 1024)).toFixed(2)}MB`) } }};validateFileSize(api.data.get('file'));; const superData = (typeof context != 'undefined') ? context : api.body;\nconst { _master, global } = superData;\nconst { spaceId, userId, user } = global;\n\napi.data.append('space', spaceId);\napi.data.append('owner', userId);\napi.data.append('owner_name', user.name);\n\nreturn api;",
|
|
255
257
|
"adaptor": "const superData = (typeof context != 'undefined') ? context : api.body;\nconst { context: pageContext } = superData;\nvar rootUrl = pageContext.rootUrl + \"/api/files/files/\";\npayload = {\n status: response.status == 200 ? 0 : response.status,\n msg: response.statusText,\n data: {\n value: payload._id,\n name: payload.original.name,\n url: rootUrl + payload._id,\n }\n}\nreturn payload;",
|
|
256
258
|
"messages": {},
|
|
257
259
|
"dataType": "form-data"
|
|
@@ -9,8 +9,6 @@ amis_schema: |-
|
|
|
9
9
|
"id": "u:pepsico_submit",
|
|
10
10
|
"editorState": "default",
|
|
11
11
|
"visibleOn": "${owner === context.userId && current_step == 'submitter_revisions' && formFactor != 'SMALL'}",
|
|
12
|
-
"actionType": "ajax",
|
|
13
|
-
"confirmText": "您已经修改完成,确认要再次提交审核吗?",
|
|
14
12
|
"confirmTitle": "提交人修改",
|
|
15
13
|
"themeCss": {
|
|
16
14
|
"className": {
|
|
@@ -30,45 +28,108 @@ amis_schema: |-
|
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
31
|
+
"onEvent": {
|
|
32
|
+
"click": {
|
|
33
|
+
"weight": 0,
|
|
34
|
+
"actions": [
|
|
35
|
+
{
|
|
36
|
+
"ignoreError": false,
|
|
37
|
+
"actionType": "dialog",
|
|
38
|
+
"dialog": {
|
|
39
|
+
"type": "dialog",
|
|
40
|
+
"title": "再次提交素材审核操作",
|
|
41
|
+
"body": [
|
|
42
|
+
{
|
|
43
|
+
"id": "u:39a0fdfa57ab",
|
|
44
|
+
"type": "form",
|
|
45
|
+
"title": "表单",
|
|
46
|
+
"mode": "normal",
|
|
47
|
+
"dsType": "api",
|
|
48
|
+
"feat": "Insert",
|
|
49
|
+
"body": [
|
|
50
|
+
{
|
|
51
|
+
"type": "textarea",
|
|
52
|
+
"label": "请简要说明本次修改素材内容",
|
|
53
|
+
"name": "comment",
|
|
54
|
+
"id": "u:fc0716485c3f",
|
|
55
|
+
"minRows": 3,
|
|
56
|
+
"maxRows": 20,
|
|
57
|
+
"placeholder": "",
|
|
58
|
+
"required": true
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"actions": [
|
|
62
|
+
{
|
|
63
|
+
"type": "button",
|
|
64
|
+
"label": "提交",
|
|
65
|
+
"onEvent": {
|
|
66
|
+
"click": {
|
|
67
|
+
"actions": [
|
|
68
|
+
{
|
|
69
|
+
"actionType": "submit",
|
|
70
|
+
"componentId": "u:39a0fdfa57ab"
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"level": "primary"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"resetAfterSubmit": true,
|
|
79
|
+
"api": {
|
|
80
|
+
"url": "/api/pepsico-content/approve/submit/${recordId}",
|
|
81
|
+
"method": "post",
|
|
82
|
+
"requestAdaptor": "",
|
|
83
|
+
"adaptor": "",
|
|
84
|
+
"messages": {}
|
|
85
|
+
},
|
|
86
|
+
"onEvent": {
|
|
87
|
+
"submitSucc": {
|
|
88
|
+
"actions": [
|
|
89
|
+
{
|
|
90
|
+
"actionType": "broadcast",
|
|
91
|
+
"args": {
|
|
92
|
+
"eventName": "@data.changed.pepsico_material_approval"
|
|
93
|
+
},
|
|
94
|
+
"data": {
|
|
95
|
+
"objectName": "pepsico_material_approval"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"id": "u:c047b964da8e",
|
|
104
|
+
"actions": [
|
|
105
|
+
{
|
|
106
|
+
"type": "button",
|
|
107
|
+
"actionType": "cancel",
|
|
108
|
+
"label": "取消",
|
|
109
|
+
"id": "u:82ec6564ce74"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "button",
|
|
113
|
+
"actionType": "confirm",
|
|
114
|
+
"label": "提交",
|
|
115
|
+
"primary": true,
|
|
116
|
+
"id": "u:356364a5efc0",
|
|
117
|
+
"editorState": "default"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"showCloseButton": true,
|
|
121
|
+
"closeOnOutside": false,
|
|
122
|
+
"closeOnEsc": false,
|
|
123
|
+
"showErrorMsg": true,
|
|
124
|
+
"showLoading": true,
|
|
125
|
+
"draggable": false,
|
|
126
|
+
"actionType": "dialog",
|
|
127
|
+
"size": "md"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
72
133
|
}
|
|
73
134
|
],
|
|
74
135
|
"regions": [
|
|
@@ -83,7 +144,8 @@ amis_schema: |-
|
|
|
83
144
|
},
|
|
84
145
|
"id": "u:432b344de69a",
|
|
85
146
|
"bodyClassName": "p-0",
|
|
86
|
-
"dsType": "api"
|
|
147
|
+
"dsType": "api",
|
|
148
|
+
"definitions": {}
|
|
87
149
|
}
|
|
88
150
|
is_enable: true
|
|
89
151
|
label: 再次提交审核
|
|
@@ -18,7 +18,7 @@ amis_schema: |-
|
|
|
18
18
|
"actionType": "dialog",
|
|
19
19
|
"dialog": {
|
|
20
20
|
"type": "dialog",
|
|
21
|
-
"title": "
|
|
21
|
+
"title": "请确定是否要中止审核?",
|
|
22
22
|
"body": [
|
|
23
23
|
{
|
|
24
24
|
"id": "u:a00aca5cd32e",
|
|
@@ -29,14 +29,15 @@ amis_schema: |-
|
|
|
29
29
|
"feat": "Insert",
|
|
30
30
|
"body": [
|
|
31
31
|
{
|
|
32
|
-
"type": "textarea",
|
|
33
|
-
"label": "",
|
|
32
|
+
"type": "textarea",
|
|
33
|
+
"label": "请填写中止原因",
|
|
34
34
|
"name": "description",
|
|
35
35
|
"id": "u:371555242000",
|
|
36
36
|
"minRows": 3,
|
|
37
37
|
"maxRows": 20,
|
|
38
|
-
"value": "",
|
|
39
|
-
"
|
|
38
|
+
"value": "",
|
|
39
|
+
"requiredOn": "${true}",
|
|
40
|
+
"placeholder": ""
|
|
40
41
|
}
|
|
41
42
|
],
|
|
42
43
|
"actions": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
|
|
3
3
|
standard_deleteVisible: function(object_name, record_id, record_permissions, record) {
|
|
4
|
-
return record.review_status === 'draft' && record.owner === Steedos.
|
|
4
|
+
return record.review_status === 'draft' && record.owner === Steedos.User.get().userId && Steedos.isMobile() != true
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
}
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
*/
|
|
8
8
|
module.exports = {
|
|
9
9
|
standard_editVisible: function (object_name, record_id, record_permissions, record) {
|
|
10
|
-
return record.current_step === 'draft' && record.owner === Steedos.
|
|
10
|
+
return record.current_step === 'draft' && record.owner === Steedos.User.get().userId && Steedos.isMobile() != true
|
|
11
11
|
}
|
|
12
12
|
}
|