@steedos-labs/plugin-workflow 3.0.0-beta.18 → 3.0.0-beta.19
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/instance_tasks/buttons/instance_new.button.yml +1 -3
- package/main/default/objects/instances/buttons/instance_new.button.yml +1 -3
- package/main/default/objects/instances/buttons/instance_related.button.yml +2 -2
- package/main/default/objects/instances/buttons/instance_save.button.yml +2 -8
- package/package.json +1 -1
|
@@ -43,12 +43,10 @@ amis_schema: |-
|
|
|
43
43
|
"flow": "$event.data.value"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
"adaptor": "return payload.instance ? {data: {...payload}, status: 0, msg: t('instance_action_new_dialog_msg_success')} : {...payload, status: 1, msg: t('instance_action_new_dialog_msg_failed')};",
|
|
46
47
|
"headers": {
|
|
47
48
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
48
49
|
}
|
|
49
|
-
},
|
|
50
|
-
"messages": {
|
|
51
|
-
"success": "创建成功!"
|
|
52
50
|
}
|
|
53
51
|
},
|
|
54
52
|
"actionType": "ajax"
|
|
@@ -43,12 +43,10 @@ amis_schema: |-
|
|
|
43
43
|
"flow": "$event.data.value"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
"adaptor": "return payload.instance ? {data: {...payload}, status: 0, msg: t('instance_action_new_dialog_msg_success')} : {...payload, status: 1, msg: t('instance_action_new_dialog_msg_failed')};",
|
|
46
47
|
"headers": {
|
|
47
48
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
48
49
|
}
|
|
49
|
-
},
|
|
50
|
-
"messages": {
|
|
51
|
-
"success": "创建成功!"
|
|
52
50
|
}
|
|
53
51
|
},
|
|
54
52
|
"actionType": "ajax"
|
|
@@ -78,7 +78,7 @@ amis_schema: |-
|
|
|
78
78
|
"actions": [
|
|
79
79
|
{
|
|
80
80
|
"type": "button",
|
|
81
|
-
"label": "
|
|
81
|
+
"label": "${'Cancel' | t}",
|
|
82
82
|
"onEvent": {
|
|
83
83
|
"click": {
|
|
84
84
|
"actions": [
|
|
@@ -94,7 +94,7 @@ amis_schema: |-
|
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
"type": "button",
|
|
97
|
-
"label": "
|
|
97
|
+
"label": "${'OK' | t}",
|
|
98
98
|
"onEvent": {
|
|
99
99
|
"click": {
|
|
100
100
|
"actions": [
|
|
@@ -18,16 +18,13 @@ amis_schema: |-
|
|
|
18
18
|
"method": "post",
|
|
19
19
|
"sendOn": "",
|
|
20
20
|
"requestAdaptor": "var _SteedosUI$getRef$get, _approveValues$next_s;\nconst formValues = context._scoped.getComponentById(\"instance_form\").getValues();\nconst approveValues = (_SteedosUI$getRef$get = context._scoped.getComponentById(\"instance_approval\")) === null || _SteedosUI$getRef$get === void 0 ? void 0 : _SteedosUI$getRef$get.getValues();\nlet nextUsers = approveValues === null || approveValues === void 0 ? void 0 : approveValues.next_users;\nif (_.isString(nextUsers)) {\n nextUsers = [approveValues.next_users];\n}\nconst instance = context.record;\nconst body = {\n instance: {\n _id: instance._id,\n applicant: formValues.applicant,\n submitter: formValues.submitter,\n traces: [{\n _id: instance.trace._id,\n step: instance.step._id,\n approves: [{\n _id: instance.approve._id,\n next_steps: [{\n step: approveValues === null || approveValues === void 0 || (_approveValues$next_s = approveValues.next_step) === null || _approveValues$next_s === void 0 ? void 0 : _approveValues$next_s._id,\n users: nextUsers\n }],\n description: approveValues === null || approveValues === void 0 ? void 0 : approveValues.suggestion,\n values: formValues\n }]\n }]\n }\n};\napi.data = body;\nreturn api;",
|
|
21
|
+
"adaptor": "return payload.instance === true ? {...payload, status: 0, msg: t('instance_action_instance_save_msg_success')} : {...payload, status: 1, msg: t('instance_action_instance_save_msg_failed')};",
|
|
21
22
|
"headers": {
|
|
22
23
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
23
24
|
},
|
|
24
25
|
"data": {
|
|
25
26
|
"&": "$$"
|
|
26
27
|
}
|
|
27
|
-
},
|
|
28
|
-
"messages": {
|
|
29
|
-
"success": "暂存成功",
|
|
30
|
-
"failed": "暂存失败"
|
|
31
28
|
}
|
|
32
29
|
},
|
|
33
30
|
"actionType": "ajax",
|
|
@@ -40,16 +37,13 @@ amis_schema: |-
|
|
|
40
37
|
"method": "post",
|
|
41
38
|
"sendOn": "",
|
|
42
39
|
"requestAdaptor": "var _SteedosUI$getRef$get, _approveValues$next_s;\nconst formValues = context._scoped.getComponentById(\"instance_form\").getValues();\nconst approveValues = (_SteedosUI$getRef$get = context._scoped.getComponentById(\"instance_approval\")) === null || _SteedosUI$getRef$get === void 0 ? void 0 : _SteedosUI$getRef$get.getValues();\nlet nextUsers = approveValues === null || approveValues === void 0 ? void 0 : approveValues.next_users;\nif (_.isString(nextUsers)) {\n nextUsers = [approveValues.next_users];\n}\nconst instance = context.record;\nconst body = {\n approve: {\n id: instance.approve._id,\n instance: instance._id,\n trace: instance.trace._id,\n next_steps: [{\n step: approveValues === null || approveValues === void 0 || (_approveValues$next_s = approveValues.next_step) === null || _approveValues$next_s === void 0 ? void 0 : _approveValues$next_s._id,\n users: nextUsers\n }],\n description: approveValues === null || approveValues === void 0 ? void 0 : approveValues.suggestion,\n judge: approveValues === null || approveValues === void 0 ? void 0 : approveValues.judge,\n values: formValues\n }\n};\napi.data = body;\nreturn api;",
|
|
40
|
+
"adaptor": "return payload.instance ? {...payload, status: 0, msg: t('instance_action_instance_save_msg_success')} : {...payload, status: 1, msg: t('instance_action_instance_save_msg_failed')};",
|
|
43
41
|
"headers": {
|
|
44
42
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
45
43
|
},
|
|
46
44
|
"data": {
|
|
47
45
|
"&": "$$"
|
|
48
46
|
}
|
|
49
|
-
},
|
|
50
|
-
"messages": {
|
|
51
|
-
"success": "暂存成功",
|
|
52
|
-
"failed": "暂存失败"
|
|
53
47
|
}
|
|
54
48
|
},
|
|
55
49
|
"actionType": "ajax",
|