@steedos-labs/plugin-workflow 3.0.0-beta.23 → 3.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/main/default/objectTranslations/flows.en/flows.en.objectTranslation.yml +5 -0
- package/main/default/objectTranslations/flows.zh-CN/flows.zh-CN.objectTranslation.yml +6 -1
- package/main/default/objects/flows/buttons/design_form_layout.button.js +5 -2
- package/main/default/objects/instances/buttons/instance_relocate.button.yml +8 -11
- package/main/default/objects/instances/buttons/instance_terminate.button.yml +6 -9
- package/main/default/pages/flowdetail.page.amis.json +9 -9
- package/main/default/pages/instance_tasks_list.page.amis.json +7 -7
- package/main/default/pages/instances_list.page.amis.json +7 -7
- package/main/default/routes/flow_form_design.ejs +4 -1
- package/main/default/routes/flow_form_design.router.js +4 -3
- package/package.json +1 -1
|
@@ -329,3 +329,8 @@ CustomLabels:
|
|
|
329
329
|
flows_action_distributeAdmin_dialog_field_distribute_to_self: When distributing, you can give it to yourself
|
|
330
330
|
flows_action_distributeAdmin_dialog_field_distribute_end_notification: Remind the initiator after the distribution is completed
|
|
331
331
|
flows_action_distributeAdmin_dialog_field_upload_after_being_distributed: Is it allowed to upload attachments after being distributed
|
|
332
|
+
flows_page_record_field_form_name: Form Name
|
|
333
|
+
flows_page_record_field_form_description: Form Description
|
|
334
|
+
flows_page_record_field_form_name_forumla: Title Formula
|
|
335
|
+
flows_page_record_field_form_script: Form Script
|
|
336
|
+
flows_page_record_action_edit_dialog_title: Edit Form
|
|
@@ -325,4 +325,9 @@ CustomLabels:
|
|
|
325
325
|
flows_action_distributeAdmin_dialog_field_distribute_optional_users_id: 流程被分发时分发对象选择范围
|
|
326
326
|
flows_action_distributeAdmin_dialog_field_distribute_to_self: 分发时可分发给自己
|
|
327
327
|
flows_action_distributeAdmin_dialog_field_distribute_end_notification: 分发结束后提醒发起人
|
|
328
|
-
flows_action_distributeAdmin_dialog_field_upload_after_being_distributed: 被分发后是否允许上传附件
|
|
328
|
+
flows_action_distributeAdmin_dialog_field_upload_after_being_distributed: 被分发后是否允许上传附件
|
|
329
|
+
flows_page_record_field_form_name: 表单名称
|
|
330
|
+
flows_page_record_field_form_description: 表单描述
|
|
331
|
+
flows_page_record_field_form_name_forumla: 标题公式
|
|
332
|
+
flows_page_record_field_form_script: 表单脚本
|
|
333
|
+
flows_page_record_action_edit_dialog_title: 编辑表单
|
|
@@ -15,8 +15,11 @@ module.exports = {
|
|
|
15
15
|
if (!record) {
|
|
16
16
|
return toastr.error("未找到记录");
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var locale = Builder.settings.context?.user?.language || window.navigator.language;
|
|
19
|
+
if(locale === 'en' || locale.startsWith('en-')){
|
|
20
|
+
locale = 'en-US'
|
|
21
|
+
}
|
|
22
|
+
window.open(Steedos.getRelativeUrl("/api/workflow/form_design?fid=" + record_id+`&assetUrls=${Builder.settings.assetUrls}&locale=${locale}`));
|
|
20
23
|
},
|
|
21
24
|
design_form_layoutVisible: function(object_name, record_id, record_permissions, data) {
|
|
22
25
|
var record = data && data.record;
|
|
@@ -15,7 +15,7 @@ amis_schema: |-
|
|
|
15
15
|
"body": [
|
|
16
16
|
{
|
|
17
17
|
"type": "button",
|
|
18
|
-
"label": "
|
|
18
|
+
"label": "${'CustomAction.instances.instance_relocate' | t}",
|
|
19
19
|
"hiddenOn": "!(this.record.box === 'monitor' && this.record.state != 'draft' && this.flowPermissions.includes('admin'))",
|
|
20
20
|
"onEvent": {
|
|
21
21
|
"click": {
|
|
@@ -24,7 +24,7 @@ amis_schema: |-
|
|
|
24
24
|
{
|
|
25
25
|
"dialog": {
|
|
26
26
|
"type": "dialog",
|
|
27
|
-
"title": "
|
|
27
|
+
"title": "${'instance_action_instance_relocate_dialog_title' | t}",
|
|
28
28
|
"body": [
|
|
29
29
|
{
|
|
30
30
|
"type": "service",
|
|
@@ -37,14 +37,14 @@ amis_schema: |-
|
|
|
37
37
|
"body": [
|
|
38
38
|
{
|
|
39
39
|
"type": "tpl",
|
|
40
|
-
"tpl": "
|
|
40
|
+
"tpl": "${'instance_action_instance_relocate_dialog_title_prefix' | t} <p class='font-medium inline'>${record.currentStep.name}</p>",
|
|
41
41
|
"inline": true,
|
|
42
42
|
"wrapperComponent": "",
|
|
43
43
|
"id": "u:1f7dd93080d3"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"type": "select",
|
|
47
|
-
"label": "
|
|
47
|
+
"label": "${'instance_next_step' | t",
|
|
48
48
|
"name": "relocate_step",
|
|
49
49
|
"id": "u:ee15214c1808",
|
|
50
50
|
"multiple": false,
|
|
@@ -53,7 +53,7 @@ amis_schema: |-
|
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"type": "steedos-select-user",
|
|
56
|
-
"label": "
|
|
56
|
+
"label": "${'instance_next_step_users' | t}",
|
|
57
57
|
"name": "relocate_users",
|
|
58
58
|
"id": "u:c3ad733db360",
|
|
59
59
|
"multiple": true,
|
|
@@ -68,7 +68,7 @@ amis_schema: |-
|
|
|
68
68
|
"id": "u:bffe87a42168",
|
|
69
69
|
"minRows": 3,
|
|
70
70
|
"maxRows": 20,
|
|
71
|
-
"
|
|
71
|
+
"description": "${'instance_action_instance_relocate_dialog_field_reason' | t}",
|
|
72
72
|
"className": "mt-3"
|
|
73
73
|
}
|
|
74
74
|
],
|
|
@@ -78,12 +78,9 @@ amis_schema: |-
|
|
|
78
78
|
"api": {
|
|
79
79
|
"url": "${context.rootUrl}/api/workflow/relocate",
|
|
80
80
|
"method": "post",
|
|
81
|
-
"messages": {
|
|
82
|
-
"success": "重定位成功",
|
|
83
|
-
"failed": "重定位失败"
|
|
84
|
-
},
|
|
85
81
|
"dataType": "json",
|
|
86
|
-
"requestAdaptor": "const { record, relocate_users, relocate_step, reason } = api.data;\napi.data = {\n \"Instances\": [{\n _id: record._id, relocate_next_step: relocate_step.split('.')[1], relocate_inbox_users: relocate_users, relocate_comment: reason\n }]\n}\n\nreturn api;"
|
|
82
|
+
"requestAdaptor": "const { record, relocate_users, relocate_step, reason } = api.data;\napi.data = {\n \"Instances\": [{\n _id: record._id, relocate_next_step: relocate_step.split('.')[1], relocate_inbox_users: relocate_users, relocate_comment: reason\n }]\n}\n\nreturn api;",
|
|
83
|
+
"adaptor": "return response.status == 200 ? {data: {...payload}, status: 0, msg: t('instance_action_relocate_dialog_msg_success')} : {...payload, status: 1, msg: t('instance_action_relocate_dialog_msg_failed')};"
|
|
87
84
|
},
|
|
88
85
|
"onEvent": {
|
|
89
86
|
"submitFail": {
|
|
@@ -15,11 +15,11 @@ amis_schema: |-
|
|
|
15
15
|
"actionType": "dialog",
|
|
16
16
|
"dialog": {
|
|
17
17
|
"type": "dialog",
|
|
18
|
-
"title": "
|
|
18
|
+
"title": "${'CustomLabels.instance_action_terminate_dialog_title' | t}",
|
|
19
19
|
"body": [
|
|
20
20
|
{
|
|
21
21
|
"type": "tpl",
|
|
22
|
-
"tpl": "
|
|
22
|
+
"tpl": "${'CustomLabels.instance_action_terminate_dialog_content' | t}",
|
|
23
23
|
"inline": false,
|
|
24
24
|
"id": "u:0a1847d1d018",
|
|
25
25
|
"className": "m-b-sm"
|
|
@@ -47,12 +47,9 @@ amis_schema: |-
|
|
|
47
47
|
"record": "${record}"
|
|
48
48
|
},
|
|
49
49
|
"requestAdaptor": "\nconsole.log(\"api.data\", api.data)\nconst { record, terminate_reason } = api.data;\napi.data = {\n terminate_reason: terminate_reason,\n instance_id: record._id\n}\nreturn api;",
|
|
50
|
+
"adaptor": "return response.status == 200 ? {data: {...payload}, status: 0, msg: t('instance_action_terminate_dialog_msg_success')} : {...payload, status: 1, msg: t('instance_action_terminate_dialog_msg_failed')};",
|
|
50
51
|
"headers": {
|
|
51
52
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
52
|
-
},
|
|
53
|
-
"messages": {
|
|
54
|
-
"success": "取消申请成功!",
|
|
55
|
-
"failed": "取消申请失败"
|
|
56
53
|
}
|
|
57
54
|
},
|
|
58
55
|
"onEvent": {
|
|
@@ -67,7 +64,7 @@ amis_schema: |-
|
|
|
67
64
|
"componentId": "",
|
|
68
65
|
"args": {
|
|
69
66
|
"blank": false,
|
|
70
|
-
"url": "/app/${appId}/
|
|
67
|
+
"url": "/app/${appId}/instances/grid/${side_listview_id}"
|
|
71
68
|
},
|
|
72
69
|
"actionType": "url"
|
|
73
70
|
}
|
|
@@ -80,7 +77,7 @@ amis_schema: |-
|
|
|
80
77
|
"actions": [
|
|
81
78
|
{
|
|
82
79
|
"type": "button",
|
|
83
|
-
"label": "
|
|
80
|
+
"label": "${'Cancel' | t}",
|
|
84
81
|
"onEvent": {
|
|
85
82
|
"click": {
|
|
86
83
|
"actions": [
|
|
@@ -96,7 +93,7 @@ amis_schema: |-
|
|
|
96
93
|
},
|
|
97
94
|
{
|
|
98
95
|
"type": "button",
|
|
99
|
-
"label": "
|
|
96
|
+
"label": "${'OK' | t}",
|
|
100
97
|
"onEvent": {
|
|
101
98
|
"click": {
|
|
102
99
|
"actions": [
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"actionType": "dialog",
|
|
73
73
|
"dialog": {
|
|
74
74
|
"type": "dialog",
|
|
75
|
-
"title": "
|
|
75
|
+
"title": "${'flows_page_record_action_edit_dialog_title' | t}",
|
|
76
76
|
"body": [
|
|
77
77
|
{
|
|
78
78
|
"type": "form",
|
|
@@ -80,13 +80,13 @@
|
|
|
80
80
|
"body": [
|
|
81
81
|
{
|
|
82
82
|
"type": "input-text",
|
|
83
|
-
"label": "
|
|
83
|
+
"label": "${'flows_page_record_field_form_name' | t}",
|
|
84
84
|
"name": "name",
|
|
85
85
|
"id": "u:84af37d53da42"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"type": "textarea",
|
|
89
|
-
"label": "
|
|
89
|
+
"label": "${'flows_page_record_field_form_description' | t}",
|
|
90
90
|
"name": "description",
|
|
91
91
|
"id": "u:84af37d53da4",
|
|
92
92
|
"minRows": 3,
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"type": "textarea",
|
|
97
|
-
"label": "
|
|
97
|
+
"label": "${'flows_page_record_field_form_name_forumla' | t}",
|
|
98
98
|
"name": "name_forumla",
|
|
99
99
|
"id": "u:69b6536e9fd8",
|
|
100
100
|
"minRows": 3,
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"type": "editor",
|
|
105
|
-
"label": "
|
|
105
|
+
"label": "${'flows_page_record_field_form_script' | t}",
|
|
106
106
|
"name": "form_script",
|
|
107
107
|
"id": "u:025f8c4f09b6",
|
|
108
108
|
"minRows": 3,
|
|
@@ -163,13 +163,13 @@
|
|
|
163
163
|
"body": [
|
|
164
164
|
{
|
|
165
165
|
"type": "input-text",
|
|
166
|
-
"label": "
|
|
166
|
+
"label": "${'flows_page_record_field_form_name' | t}",
|
|
167
167
|
"name": "name",
|
|
168
168
|
"id": "u:84af37d53da42"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"type": "textarea",
|
|
172
|
-
"label": "
|
|
172
|
+
"label": "${'flows_page_record_field_form_description' | t}",
|
|
173
173
|
"name": "description",
|
|
174
174
|
"id": "u:84af37d53da4",
|
|
175
175
|
"minRows": 3,
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"type": "textarea",
|
|
180
|
-
"label": "
|
|
180
|
+
"label": "${'flows_page_record_field_form_name_forumla' | t}",
|
|
181
181
|
"name": "name_forumla",
|
|
182
182
|
"id": "u:69b6536e9fd8",
|
|
183
183
|
"minRows": 3,
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
"type": "editor",
|
|
188
|
-
"label": "
|
|
188
|
+
"label": "${'flows_page_record_field_form_script' | t}",
|
|
189
189
|
"name": "form_script",
|
|
190
190
|
"id": "u:025f8c4f09b6",
|
|
191
191
|
"minRows": 3,
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
"className": {
|
|
66
66
|
"mobileCss": "${window:innerWidth < 768}",
|
|
67
67
|
"pcCss": "${window:innerWidth > 768}",
|
|
68
|
-
"instances-sidebar-wrapper px-0 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col overflow-y-auto bg-white block -translate-x-0 py-0": "true"
|
|
68
|
+
"instances-sidebar-wrapper px-0 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col overflow-y-auto bg-white block -translate-x-0 py-0 rounded shadow bg-white my-4 ml-4 mr-1": "true"
|
|
69
69
|
},
|
|
70
70
|
"body": [
|
|
71
71
|
{
|
|
72
72
|
"type": "service",
|
|
73
73
|
"id": "u:aa4f4dc5f439",
|
|
74
|
-
"className": "w-full h-full
|
|
74
|
+
"className": "w-full h-full rounded",
|
|
75
75
|
"onEvent": {
|
|
76
76
|
"@data.changed.instance_tasks": {
|
|
77
77
|
"actions": [
|
|
@@ -242,7 +242,7 @@
|
|
|
242
242
|
},
|
|
243
243
|
"css": {
|
|
244
244
|
".instances-customPage.instances-sidebar.instances-sidebar-open.pc": {
|
|
245
|
-
"margin-left": "
|
|
245
|
+
"margin-left": "256px"
|
|
246
246
|
},
|
|
247
247
|
".instances-sidebar-wrapper": {
|
|
248
248
|
"transition": "0.5s ease transform",
|
|
@@ -261,14 +261,14 @@
|
|
|
261
261
|
"-ms-transform": "translate(0,0)",
|
|
262
262
|
"-o-transform": "translate(0,0)"
|
|
263
263
|
},
|
|
264
|
-
".pcCss": {
|
|
265
|
-
"top": "
|
|
264
|
+
".instances-sidebar-wrapper.pcCss": {
|
|
265
|
+
"top": "50px",
|
|
266
266
|
"left": "0px"
|
|
267
267
|
},
|
|
268
|
-
".sidebar .pcCss": {
|
|
268
|
+
".sidebar .instances-sidebar-wrapper.pcCss": {
|
|
269
269
|
"left": "220px"
|
|
270
270
|
},
|
|
271
|
-
".mobileCss": {
|
|
271
|
+
".instances-sidebar-wrapper.mobileCss": {
|
|
272
272
|
"top": "50px",
|
|
273
273
|
"left": "0px",
|
|
274
274
|
"padding-bottom": "65px"
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"className": {
|
|
64
64
|
"mobileCss": "${window:innerWidth < 768}",
|
|
65
65
|
"pcCss": "${window:innerWidth > 768}",
|
|
66
|
-
"instances-sidebar-wrapper px-0 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col overflow-y-auto bg-white block -translate-x-0 py-0": "true"
|
|
66
|
+
"instances-sidebar-wrapper px-0 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col overflow-y-auto bg-white block -translate-x-0 py-0 rounded shadow bg-white my-4 ml-4 mr-1": "true"
|
|
67
67
|
},
|
|
68
68
|
"body": [
|
|
69
69
|
{
|
|
70
70
|
"type": "service",
|
|
71
71
|
"id": "u:aa4f4dc5f439",
|
|
72
|
-
"className": "w-full h-full
|
|
72
|
+
"className": "w-full h-full rounded",
|
|
73
73
|
"onEvent": {
|
|
74
74
|
"@data.changed.instances": {
|
|
75
75
|
"actions": [
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
},
|
|
241
241
|
"css": {
|
|
242
242
|
".instances-customPage.instances-sidebar.instances-sidebar-open.pc": {
|
|
243
|
-
"margin-left": "
|
|
243
|
+
"margin-left": "256px"
|
|
244
244
|
},
|
|
245
245
|
".instances-sidebar-wrapper": {
|
|
246
246
|
"transition": "0.5s ease transform",
|
|
@@ -259,14 +259,14 @@
|
|
|
259
259
|
"-ms-transform": "translate(0,0)",
|
|
260
260
|
"-o-transform": "translate(0,0)"
|
|
261
261
|
},
|
|
262
|
-
".pcCss": {
|
|
263
|
-
"top": "
|
|
262
|
+
".instances-sidebar-wrapper.pcCss": {
|
|
263
|
+
"top": "50px",
|
|
264
264
|
"left": "0px"
|
|
265
265
|
},
|
|
266
|
-
".sidebar .pcCss": {
|
|
266
|
+
".sidebar .instances-sidebar-wrapper.pcCss": {
|
|
267
267
|
"left": "220px"
|
|
268
268
|
},
|
|
269
|
-
".mobileCss": {
|
|
269
|
+
".instances-sidebar-wrapper.mobileCss": {
|
|
270
270
|
"top": "50px",
|
|
271
271
|
"left": "0px",
|
|
272
272
|
"padding-bottom": "65px"
|
|
@@ -66,7 +66,10 @@
|
|
|
66
66
|
useOpenAPI: useOpenAPI,
|
|
67
67
|
id: "<%=id%>",
|
|
68
68
|
pageId: "<%=id%>",
|
|
69
|
-
hiddenDeploy: true
|
|
69
|
+
hiddenDeploy: true,
|
|
70
|
+
title: "<%=locale%>" === 'zh-CN' ? '流程表单设计器': 'Flow Form Designer',
|
|
71
|
+
saveText: "<%=locale%>" === 'zh-CN' ? '保存': 'Save',
|
|
72
|
+
deployText: "<%=locale%>" === 'zh-CN' ? '发布': 'Deploy',
|
|
70
73
|
};
|
|
71
74
|
|
|
72
75
|
let comp = document.querySelector("builder-fiddle");
|
|
@@ -34,8 +34,8 @@ router.get('/api/workflow/form_design', auth.requireAuthentication, async functi
|
|
|
34
34
|
// userId: userSession.userId,
|
|
35
35
|
// authToken: userSession.authToken
|
|
36
36
|
// }
|
|
37
|
-
let locale = "zh-CN";
|
|
38
|
-
if (req.query.locale
|
|
37
|
+
let locale = userSession.language || process.env.STEEDOS_DEFAULT_LANGUAGE || "zh-CN";
|
|
38
|
+
if (req.query.locale?.startsWith('en')) {
|
|
39
39
|
locale = "en-US";
|
|
40
40
|
} else if (req.query.locale == "zh-cn") {
|
|
41
41
|
locale = "zh-CN";
|
|
@@ -56,7 +56,8 @@ router.get('/api/workflow/form_design', auth.requireAuthentication, async functi
|
|
|
56
56
|
authToken: userSession.authToken,
|
|
57
57
|
userSession: userSession,
|
|
58
58
|
id: flow.form,
|
|
59
|
-
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API
|
|
59
|
+
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API,
|
|
60
|
+
locale
|
|
60
61
|
}
|
|
61
62
|
const options = {}
|
|
62
63
|
ejs.renderFile(filename, data, options, function(err, str){
|