@steedos/service-plugin-amis 3.0.0-beta.105 → 3.0.0-beta.107
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.
|
@@ -30,10 +30,7 @@ const draftsApiAdaptor = `
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
var instance = payload.inserts[0];
|
|
33
|
-
var url = Steedos.absoluteUrl("/app/" +
|
|
34
|
-
// 这里不可以直接openWindow,因为手机浏览器上打不开新窗口,迁移到下面的afterDrafts脚本中,在custom动作单独执行openWindow才行
|
|
35
|
-
// Steedos.openWindow(url);
|
|
36
|
-
// if(!Steedos.isMobile()){ FlowRouter.reload();}
|
|
33
|
+
var url = Steedos.absoluteUrl("/app/" + context.app_id + "/instances/view/" + instance._id + "?display=" + (Steedos.Page.getDisplay('instances') || '') + "&side_object=instances&side_listview_id=draft");
|
|
37
34
|
payload.draftUrl = url;
|
|
38
35
|
return payload;
|
|
39
36
|
`;
|
|
@@ -41,7 +38,7 @@ const draftsApiAdaptor = `
|
|
|
41
38
|
const afterDrafts = `
|
|
42
39
|
var url = event.data.draftUrl;
|
|
43
40
|
Steedos.openWindow(url);
|
|
44
|
-
|
|
41
|
+
window.navigate(0);
|
|
45
42
|
`;
|
|
46
43
|
|
|
47
44
|
amisLib.registerAction('steedos_actions_standard_approve', {
|
|
@@ -49,7 +46,7 @@ amisLib.registerAction('steedos_actions_standard_approve', {
|
|
|
49
46
|
return amisLib.runActions([
|
|
50
47
|
{
|
|
51
48
|
"actionType": "custom",
|
|
52
|
-
"script": "var objectName = event.data.objectName || event.data.object_name;const flows = lodash.filter(
|
|
49
|
+
"script": "var objectName = event.data.objectName || event.data.object_name;const flows = lodash.filter(Steedos.object_workflows, (item) => { return item.object_name == objectName && (!item.sync_direction || item.sync_direction == 'both' || item.sync_direction == 'obj_to_ins') })\n\nevent.setData({ ...event.data, ...{ flows: flows, flowCount: flows.length } })\n\n"
|
|
53
50
|
},
|
|
54
51
|
{
|
|
55
52
|
"actionType": "ajax",
|
|
@@ -132,7 +129,7 @@ amisLib.registerAction('steedos_actions_standard_approve', {
|
|
|
132
129
|
"url": "${context.rootUrl}/api/object/workflow/drafts",
|
|
133
130
|
"method": "post",
|
|
134
131
|
"requestAdaptor":"api.data = {\n \'Instances\': [{\n \'flow\': api.body.flowId,\n \'applicant\': api.body.context.userId,\n \'space\': api.body.context.tenantId,\n \'record_ids\': [{ o: api.body.objectName, ids: [api.body.recordId] }]\n }]\n}\n\nreturn api;",
|
|
135
|
-
"adaptor":"\nif (payload.error) { \n return {\n status: 2,\n msg: payload.error\n }\n}\nconst instance = payload.inserts[0];\nSteedos.openWindow(Steedos.absoluteUrl(\'/app/\' +
|
|
132
|
+
"adaptor":"\nif (payload.error) { \n return {\n status: 2,\n msg: payload.error\n }\n}\nconst instance = payload.inserts[0];\nSteedos.openWindow(Steedos.absoluteUrl(\'/app/\' + context.app_id + \'/instances/view/\' + instance._id + \'?display=\' + (Steedos.Page.getDisplay('instances') || '') + \'&side_object=instances&side_listview_id=draft\'))\nwindow.navigate(0);\nreturn payload;",
|
|
136
133
|
"messages": {},
|
|
137
134
|
"headers": {
|
|
138
135
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-plugin-amis",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.107",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn build:tailwind-base && yarn build:tailwind",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "1af567ed119c938f6214ea192e610f07aa8612af",
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"tailwindcss": "^3.4.17"
|
|
19
19
|
}
|