@steedos-labs/plugin-workflow 3.0.6 → 3.0.7

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.
@@ -45,6 +45,7 @@ window.waitForThing(window, 'socket').then(()=>{
45
45
  };
46
46
  if (shouldReloadView()) {
47
47
  window.$(".list-view-btn-reload").click()
48
+ window.$(".instance-nav-reload").click()
48
49
  }
49
50
  });
50
51
 
@@ -4316,7 +4316,7 @@ UUFlowManager.caculateExtras = async function (values = {}, formDoc, formVersion
4316
4316
  extras[field.code] = tableExtras;
4317
4317
  }
4318
4318
  } else if (field.type === 'section') {
4319
- field.fields.forEach(s_field => {
4319
+ field.fields?.forEach(s_field => {
4320
4320
  if (s_field.is_list_display && values[s_field.code] !== undefined) {
4321
4321
  extras[s_field.code] = values[s_field.code];
4322
4322
  }
@@ -13,7 +13,7 @@ amis_schema: |-
13
13
  "actions": [
14
14
  {
15
15
  "args": {
16
- "url": "${context.rootUrl}/api/workflow/chart?instance_id=${instanceId || recordId}&title=${record.flow.name}",
16
+ "url": "${context.rootUrl}/api/workflow/chart?instance_id=${instanceId || record._id || recordId}&title=${record.flow.name}",
17
17
  "blank": true
18
18
  },
19
19
  "actionType": "url"
@@ -126,6 +126,10 @@ amis_schema: |-
126
126
 
127
127
  }
128
128
  },
129
+ {
130
+ "actionType": "reload",
131
+ "componentId": "u:instancePage"
132
+ },
129
133
  {
130
134
  "componentId": "",
131
135
  "args": {},
@@ -2,8 +2,7 @@ name: instance_submit
2
2
  amis_schema: |-
3
3
  {
4
4
  "type": "service",
5
- "body": [
6
- {
5
+ "body": [{
7
6
  "type": "button",
8
7
  "label": "${'CustomAction.instances.instance_submit' | t}",
9
8
  "level": "primary",
@@ -11,18 +10,30 @@ amis_schema: |-
11
10
  "hiddenOn": "!(this.record.box === 'inbox' || this.record.box === 'draft')",
12
11
  "onEvent": {
13
12
  "click": {
14
- "weight": 0,
15
- "actions": [
16
- {
17
- "componentId": "steedos-approve-button",
18
- "groupType": "component",
19
- "actionType": "click"
20
- }
21
- ]
13
+ "weight": 0,
14
+ "actions": [
15
+ {
16
+ "actionType": "custom",
17
+ "script": "event.data.isApprovalDrawerOpen = !!document.querySelector('.steedos-instance-detail-wrapper .approval-drawer');"
18
+ },
19
+ {
20
+ "componentId": "steedos-approve-button",
21
+ "groupType": "component",
22
+ "actionType": "click",
23
+ "args": {
24
+ "autoSubmitInstance": true
25
+ },
26
+ "expression": "${!isApprovalDrawerOpen}"
27
+ },
28
+ {
29
+ "componentId": "steedos-approve-submit-button",
30
+ "actionType": "click",
31
+ "expression": "${isApprovalDrawerOpen}"
32
+ }
33
+ ]
22
34
  }
23
35
  }
24
- }
25
- ],
36
+ }],
26
37
  "regions": [
27
38
  "body"
28
39
  ],
@@ -14,7 +14,21 @@
14
14
  }]
15
15
  }
16
16
  },
17
- "body": [{
17
+ "body": [
18
+ {
19
+ "type": "button",
20
+ "label": "刷新",
21
+ "className": "instance-nav-reload hidden",
22
+ "onEvent": {
23
+ "click": {
24
+ "actions": [{
25
+ "actionType": "reload",
26
+ "componentId": "u:instanceNav"
27
+ }]
28
+ }
29
+ }
30
+ },
31
+ {
18
32
  "type": "input-tree",
19
33
  "treeContainerClassName": "h-full",
20
34
  "name": "tree",
@@ -71,7 +85,7 @@
71
85
  "unfoldedLevel": 2,
72
86
  "source": "${options}"
73
87
  }],
74
- "id": "u:aa4f4dc5f439",
88
+ "id": "u:instanceNav",
75
89
  "api": {
76
90
  "method": "get",
77
91
  "url": "${context.rootUrl}/api/${appId}/workflow/nav",
@@ -81,7 +95,6 @@
81
95
  },
82
96
  "dsType": "api"
83
97
  }],
84
- "id": "u:3723a0a5ded0",
85
98
  "mobile": {
86
99
  "visibleOn": "false"
87
100
  }
@@ -19,6 +19,19 @@
19
19
  }
20
20
  },
21
21
  "body": [
22
+ {
23
+ "type": "button",
24
+ "label": "刷新",
25
+ "className": "instance-nav-reload hidden",
26
+ "onEvent": {
27
+ "click": {
28
+ "actions": [{
29
+ "actionType": "reload",
30
+ "componentId": "u:instanceNav"
31
+ }]
32
+ }
33
+ }
34
+ },
22
35
  {
23
36
  "type": "input-tree",
24
37
  "treeContainerClassName": "h-full",
@@ -77,7 +90,7 @@
77
90
  "source": "${options}"
78
91
  }
79
92
  ],
80
- "id": "u:aa4f4dc5f439",
93
+ "id": "u:instanceNav",
81
94
  "api": {
82
95
  "method": "get",
83
96
  "url": "${context.rootUrl}/api/${appId}/workflow/nav",
@@ -86,8 +99,7 @@
86
99
  }
87
100
  }
88
101
  }
89
- ],
90
- "id": "u:339eb21f368c"
102
+ ]
91
103
  },
92
104
  {
93
105
  "type": "wrapper",
@@ -28,6 +28,19 @@
28
28
  }
29
29
  },
30
30
  "body": [
31
+ {
32
+ "type": "button",
33
+ "label": "刷新",
34
+ "className": "instance-nav-reload hidden",
35
+ "onEvent": {
36
+ "click": {
37
+ "actions": [{
38
+ "actionType": "reload",
39
+ "componentId": "u:instanceNav"
40
+ }]
41
+ }
42
+ }
43
+ },
31
44
  {
32
45
  "type": "input-tree",
33
46
  "name": "tree",
@@ -123,12 +136,11 @@
123
136
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
124
137
  },
125
138
  "messages": {},
126
- "trackExpression": "${_reloadKey}",
127
139
  "adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search); return payload;"
128
140
  },
129
141
  "messages": {},
130
142
  "dsType": "api",
131
- "id": "u:b22ab9089a5e"
143
+ "id": "u:instanceNav"
132
144
  }
133
145
  ],
134
146
  "id": "u:fd659f5c3657",
@@ -17,7 +17,7 @@
17
17
  "body": [
18
18
  {
19
19
  "type": "service",
20
- "id": "u:aa4f4dc5f439",
20
+ "id": "u:instanceNav",
21
21
  "className": "bg-none",
22
22
  "onEvent": {
23
23
  "@data.changed.instances": {
@@ -29,6 +29,19 @@
29
29
  }
30
30
  },
31
31
  "body": [
32
+ {
33
+ "type": "button",
34
+ "label": "刷新",
35
+ "className": "instance-nav-reload hidden",
36
+ "onEvent": {
37
+ "click": {
38
+ "actions": [{
39
+ "actionType": "reload",
40
+ "componentId": "u:instanceNav"
41
+ }]
42
+ }
43
+ }
44
+ },
32
45
  {
33
46
  "type": "input-tree",
34
47
  "name": "tree",
@@ -130,7 +143,6 @@
130
143
  "dsType": "api"
131
144
  }
132
145
  ],
133
- "id": "u:fd659f5c3657",
134
146
  "isFixedHeight": false,
135
147
  "isFixedWidth": false
136
148
  },
@@ -7,6 +7,7 @@
7
7
  "type": "grid",
8
8
  "columns": [
9
9
  {
10
+ "md": "5",
10
11
  "body": [
11
12
  {
12
13
  "type": "button",
@@ -25,6 +26,7 @@
25
26
  }
26
27
  },
27
28
  {
29
+ "md": "7",
28
30
  "name": "files",
29
31
  "type": "checkbox",
30
32
  "label": false,
@@ -86,16 +88,16 @@
86
88
  "name": "radios",
87
89
  "type": "radios",
88
90
  "label": false,
89
- "value": "210",
91
+ "value": "190",
90
92
  "className": "mr-0",
91
93
  "options": [
92
94
  {
93
95
  "label": "A4纵向",
94
- "value": "210"
96
+ "value": "190"
95
97
  },
96
98
  {
97
99
  "label": "A4横向",
98
- "value": "297"
100
+ "value": "277"
99
101
  }
100
102
  ],
101
103
  "mode": "inline",
@@ -114,7 +116,7 @@
114
116
  "name": "width",
115
117
  "type": "input-number",
116
118
  "id": "u:print-width",
117
- "value": "210",
119
+ "value": "190",
118
120
  "mode": "inline",
119
121
  "className": "w-20 mr-0",
120
122
  "min": "100",
@@ -236,9 +238,19 @@
236
238
  "width": "unset"
237
239
  },
238
240
  ".steedos-instance-related-view-wrapper .instance-form": {
239
- "width": "210mm",
241
+ "width": "190mm",
240
242
  "transition": "width 0.5s ease-in-out"
241
243
  },
244
+ ".steedos-instance-related-view-wrapper .steedos-amis-instance-view-content": {
245
+ "display": "inline-block"
246
+ },
247
+ ".steedos-amis-instance-view-body": {
248
+ "padding": "unset",
249
+ "margin": "1rem",
250
+ "display": "flex",
251
+ "flex-direction": "column",
252
+ "align-items": "center"
253
+ },
242
254
  ".steedos-global-header-root": {
243
255
  "display": "none"
244
256
  },
@@ -252,6 +264,22 @@
252
264
  ".antd-Page-toolbar": {
253
265
  "background": "#e5e5e5"
254
266
  },
267
+ ".steedos-amis-instance-view .instance-form-view .antd-Table-table thead tr th.antd-Table-operationCell": {
268
+ "border": "none !important"
269
+ },
270
+ ".antd-InputTable th": {
271
+ "border-bottom": "none !important"
272
+ },
273
+ ".steedos-input-table .antd-Form-control > .antd-Table": {
274
+ "margin-bottom": "0px !important",
275
+ "padding": "0px !important"
276
+ },
277
+ ".steedos-input-table .antd-Form-item": {
278
+ "padding": "0px !important"
279
+ },
280
+ ".antd-Page-toolbar .antd-Form-item--inline": {
281
+ "margin-right": "0.25rem"
282
+ },
255
283
  ".antd-Page-toolbar .antd-Grid": {
256
284
  "padding-top": "12px",
257
285
  "padding-left": "10px"
@@ -315,6 +343,15 @@
315
343
  },
316
344
  ".text-muted": {
317
345
  "display": "none !important"
346
+ },
347
+ ".steedos-amis-instance-view .steedos-input-table .antd-Form-item .antd-InputTable .antd-Table-content table thead tr": {
348
+ "border-bottom": "0px"
349
+ },
350
+ ".steedos-amis-instance-view .form-control .antd-Table-table tbody tr:last-child td": {
351
+ "border-right": "0px"
352
+ },
353
+ ".antd-Table-content-colDragLine": {
354
+ "display": "none !important"
318
355
  }
319
356
  },
320
357
  "wrapperCustomStyle": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/plugin-workflow",
3
- "version": "3.0.6",
3
+ "version": "3.0.7",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "scripts": {