@steedos-labs/plugin-workflow 3.0.91 → 3.0.93

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.
@@ -5,7 +5,7 @@
5
5
  <link rel="shortcut icon" type="image/svg+xml" href="/images/logo.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>designer</title>
8
- <script type="module" crossorigin src="/api/workflow/designer-v2/assets/index-DRkz8SIR.js"></script>
8
+ <script type="module" crossorigin src="/api/workflow/designer-v2/assets/index-Dl-JLUsW.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/api/workflow/designer-v2/assets/index-JMhKzdal.css">
10
10
  </head>
11
11
  <body>
@@ -1,5 +1,5 @@
1
1
  waitForThing(window, 'antd').then(function(){
2
- var v = '3.0.91';
2
+ var v = '3.0.93';
3
3
  loadJs('/amis-renderer/amis-renderer.js?v=' + v);
4
4
  loadCss('/amis-renderer/amis-renderer.css?v=' + v)
5
- })
5
+ })
@@ -17,16 +17,69 @@ amis_schema: |-
17
17
  "actionType": "dialog",
18
18
  "dialog": {
19
19
  "type": "dialog",
20
+ "className": "instance-action-dialog",
20
21
  "title": "取回",
21
22
  "body": [
22
23
  {
23
- "type": "textarea",
24
- "label": "备注",
25
- "name": "retrieve_comment",
26
- "id": "u:c7fa318c8af1",
27
- "editorState": "default",
28
- "minRows": 3,
29
- "maxRows": 20
24
+ "type": "form",
25
+ "id": "u:instance_retrieve_form",
26
+ "mode": "normal",
27
+ "wrapWithPanel": false,
28
+ "body": [
29
+ {
30
+ "type": "textarea",
31
+ "label": "备注",
32
+ "name": "retrieve_comment",
33
+ "id": "u:c7fa318c8af1",
34
+ "editorState": "default",
35
+ "minRows": 3,
36
+ "maxRows": 20
37
+ }
38
+ ],
39
+ "api": {
40
+ "url": "${context.rootUrl}/api/workflow/retrieve",
41
+ "method": "post",
42
+ "requestAdaptor": "api.data = {\n \"_id\": api.body.record._id,\n \"retrieve_comment\": api.body.retrieve_comment\n};\nreturn api;",
43
+ "adaptor": "if (payload && payload.status === -1) {\n return {...payload, status: 1, msg: payload.msg || '取回失败'};\n}\nreturn {...payload, status: 0, msg: payload && payload.msg ? payload.msg : '取回成功'};",
44
+ "messages": {
45
+ "success": "取回成功",
46
+ "failed": "${msg}"
47
+ },
48
+ "headers": {
49
+ "Authorization": "Bearer ${context.tenantId},${context.authToken}"
50
+ },
51
+ "data": {
52
+ "&": "$$",
53
+ "record": "${record}"
54
+ }
55
+ },
56
+ "onEvent": {
57
+ "submitFail": {
58
+ "weight": 0,
59
+ "actions": []
60
+ },
61
+ "submitSucc": {
62
+ "weight": 0,
63
+ "actions": [
64
+ {
65
+ "actionType": "broadcast",
66
+ "args": {
67
+ "eventName": "@data.@instanceDetail.changed"
68
+ },
69
+ "data": {}
70
+ },
71
+ {
72
+ "componentId": "",
73
+ "args": {},
74
+ "actionType": "closeDialog"
75
+ },
76
+ {
77
+ "actionType": "custom",
78
+ "script": "$('.steedos-workflow-reload-btn').trigger('click')"
79
+ }
80
+ ]
81
+ }
82
+ }
30
83
  }
31
84
  ],
32
85
  "id": "u:b05694926b78",
@@ -39,7 +92,6 @@ amis_schema: |-
39
92
  },
40
93
  {
41
94
  "type": "button",
42
- "actionType": "confirm",
43
95
  "label": "确定",
44
96
  "primary": true,
45
97
  "id": "u:907978324dc2",
@@ -49,35 +101,14 @@ amis_schema: |-
49
101
  "weight": 0,
50
102
  "actions": [
51
103
  {
52
- "ignoreError": false,
53
- "actionType": "ajax",
54
- "outputVar": "responseResult",
55
- "options": {},
56
- "api": {
57
- "url": "${context.rootUrl}/api/workflow/retrieve",
58
- "method": "post",
59
- "requestAdaptor": "api.data = {\n \"_id\": api.body.record._id,\n \"retrieve_comment\": api.body.retrieve_comment\n};\nreturn api;",
60
- "adaptor": "console.log('payload', payload);\nreturn payload;",
61
- "messages": {},
62
- "headers": {
63
- "Authorization": "Bearer ${context.tenantId},${context.authToken}"
64
- },
65
- "data": {
66
- "&": "$$",
67
- "record": "${record}"
68
- }
69
- }
70
- },
71
- {
72
- "actionType": "broadcast",
73
- "args": {
74
- "eventName": "@data.@instanceDetail.changed"
75
- },
76
- "data": {}
104
+ "componentId": "u:instance_retrieve_form",
105
+ "args": {},
106
+ "actionType": "validate"
77
107
  },
78
108
  {
79
- "actionType": "custom",
80
- "script": "$('.steedos-workflow-reload-btn').trigger('click')"
109
+ "componentId": "u:instance_retrieve_form",
110
+ "args": {},
111
+ "actionType": "submit"
81
112
  }
82
113
  ]
83
114
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.91",
3
+ "version": "3.0.93",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "files": [