@steedos-labs/plugin-workflow 3.0.0-beta.24 → 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/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/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.router.js +1 -1
- package/package.json +1 -1
|
@@ -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": [
|
|
@@ -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"
|
|
@@ -34,7 +34,7 @@ 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";
|
|
37
|
+
let locale = userSession.language || process.env.STEEDOS_DEFAULT_LANGUAGE || "zh-CN";
|
|
38
38
|
if (req.query.locale?.startsWith('en')) {
|
|
39
39
|
locale = "en-US";
|
|
40
40
|
} else if (req.query.locale == "zh-cn") {
|