@steedos-labs/plugin-workflow 3.0.5 → 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.
- package/main/default/client/socket.client.js +1 -0
- package/main/default/manager/uuflow_manager.js +1 -1
- package/main/default/objects/flows/flows.object.yml +12 -0
- package/main/default/objects/instances/buttons/instance_flow_chart.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_print.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_related.button.yml +4 -0
- package/main/default/objects/instances/buttons/instance_submit.button.yml +23 -12
- package/main/default/pages/instance_detail.page.amis.json +16 -3
- package/main/default/pages/instance_tasks_detail.page.amis.json +15 -3
- package/main/default/pages/instance_tasks_list.page.amis.json +14 -2
- package/main/default/pages/instances_list.page.amis.json +14 -2
- package/main/default/pages/page_instance_print.page.amis.json +84 -37
- package/package.json +1 -1
|
@@ -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
|
|
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
|
}
|
|
@@ -449,6 +449,18 @@ fields:
|
|
|
449
449
|
type: boolean
|
|
450
450
|
label: 分发时允许自动创建关联文件
|
|
451
451
|
group: Distribution
|
|
452
|
+
instance_template:
|
|
453
|
+
label: Form Template
|
|
454
|
+
type: code
|
|
455
|
+
language: html
|
|
456
|
+
is_wide: true
|
|
457
|
+
group: template
|
|
458
|
+
print_template:
|
|
459
|
+
label: Print Template
|
|
460
|
+
type: code
|
|
461
|
+
language: html
|
|
462
|
+
is_wide: true
|
|
463
|
+
group: template
|
|
452
464
|
name_formula:
|
|
453
465
|
label: Formula of Title
|
|
454
466
|
type: text
|
|
@@ -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"
|
|
@@ -15,7 +15,7 @@ amis_schema: |-
|
|
|
15
15
|
"ignoreError": false,
|
|
16
16
|
"actionType": "url",
|
|
17
17
|
"args": {
|
|
18
|
-
"url": "/app/approve_workflow/page/page_instance_print?recordId=${instanceId || record._id}"
|
|
18
|
+
"url": "/app/approve_workflow/page/page_instance_print?embed=1&recordId=${instanceId || record._id}"
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
],
|
|
@@ -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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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": "
|
|
91
|
+
"value": "190",
|
|
90
92
|
"className": "mr-0",
|
|
91
93
|
"options": [
|
|
92
94
|
{
|
|
93
95
|
"label": "A4纵向",
|
|
94
|
-
"value": "
|
|
96
|
+
"value": "190"
|
|
95
97
|
},
|
|
96
98
|
{
|
|
97
99
|
"label": "A4横向",
|
|
98
|
-
"value": "
|
|
100
|
+
"value": "277"
|
|
99
101
|
}
|
|
100
102
|
],
|
|
101
103
|
"mode": "inline",
|
|
@@ -104,7 +106,7 @@
|
|
|
104
106
|
"actions": [
|
|
105
107
|
{
|
|
106
108
|
"actionType": "custom",
|
|
107
|
-
"script": "doAction({actionType: 'setValue', componentId: 'u:print-width', args: {value: Number(event.data.value)}}); $('.steedos-instance-related-view-wrapper
|
|
109
|
+
"script": "doAction({actionType: 'setValue', componentId: 'u:print-width', args: {value: Number(event.data.value)}}); $('.steedos-instance-related-view-wrapper .instance-form').css('width', event.data.value + 'mm');"
|
|
108
110
|
}
|
|
109
111
|
]
|
|
110
112
|
}
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
"name": "width",
|
|
115
117
|
"type": "input-number",
|
|
116
118
|
"id": "u:print-width",
|
|
117
|
-
"value": "
|
|
119
|
+
"value": "190",
|
|
118
120
|
"mode": "inline",
|
|
119
121
|
"className": "w-20 mr-0",
|
|
120
122
|
"min": "100",
|
|
@@ -123,7 +125,7 @@
|
|
|
123
125
|
"actions": [
|
|
124
126
|
{
|
|
125
127
|
"actionType": "custom",
|
|
126
|
-
"script": "$('.steedos-instance-related-view-wrapper
|
|
128
|
+
"script": "$('.steedos-instance-related-view-wrapper .instance-form').css('width', event.data.value + 'mm');"
|
|
127
129
|
}
|
|
128
130
|
]
|
|
129
131
|
}
|
|
@@ -136,37 +138,42 @@
|
|
|
136
138
|
"mode": "inline"
|
|
137
139
|
},
|
|
138
140
|
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
141
|
+
"type": "wrapper",
|
|
142
|
+
"className": "inline-block p-0",
|
|
143
|
+
"body": [
|
|
144
|
+
{
|
|
145
|
+
"label": "",
|
|
146
|
+
"type": "button",
|
|
147
|
+
"icon": "fa fa-plus",
|
|
148
|
+
"mode": "inline",
|
|
149
|
+
"onEvent": {
|
|
150
|
+
"click": {
|
|
151
|
+
"actions": [
|
|
152
|
+
{
|
|
153
|
+
"actionType": "custom",
|
|
154
|
+
"script": "window.instancePrint.plusFontSize($('.steedos-amis-instance-view-body'))"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
}
|
|
151
158
|
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"label": "",
|
|
162
|
+
"type": "button",
|
|
163
|
+
"icon": "fa fa-minus",
|
|
164
|
+
"mode": "inline",
|
|
165
|
+
"onEvent": {
|
|
166
|
+
"click": {
|
|
167
|
+
"actions": [
|
|
168
|
+
{
|
|
169
|
+
"actionType": "custom",
|
|
170
|
+
"script": "window.instancePrint.minusFontSize($('.steedos-amis-instance-view-body'))"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
167
174
|
}
|
|
168
175
|
}
|
|
169
|
-
}
|
|
176
|
+
]}
|
|
170
177
|
]
|
|
171
178
|
}
|
|
172
179
|
]
|
|
@@ -186,7 +193,7 @@
|
|
|
186
193
|
"schemaApi": {
|
|
187
194
|
"method": "get",
|
|
188
195
|
"url": "/api/health_check?trace=${recordId}",
|
|
189
|
-
"adaptor": "const result = {data: {'type':'wrapper','className':'p-0 h-full','body':[{'type':'steedos-instance-detail','id':'u:steedos-instance-detail','label':'Instance Detail','instanceId':context.recordId,'boxName':context.side_listview_id}],'id':'u:steedos-instance-detail-service'}};console.log('result===>', result); return result;"
|
|
196
|
+
"adaptor": "const result = {data: {'type':'wrapper','className':'p-0 h-full','body':[{'type':'steedos-instance-detail', 'print': true, 'id':'u:steedos-instance-detail','label':'Instance Detail','instanceId':context.recordId,'boxName':context.side_listview_id}],'id':'u:steedos-instance-detail-service'}};console.log('result===>', result); return result;"
|
|
190
197
|
},
|
|
191
198
|
"visibleOn": "${permission === true}"
|
|
192
199
|
},
|
|
@@ -210,7 +217,7 @@
|
|
|
210
217
|
"bodyClassName": "p-0 flex flex-1 overflow-hidden h-full",
|
|
211
218
|
"name": "amis-root-workflow",
|
|
212
219
|
"initApi": {
|
|
213
|
-
"url": "
|
|
220
|
+
"url": "/api/workflow/v2/instance/${recordId}/permission",
|
|
214
221
|
"method": "get",
|
|
215
222
|
"data": {},
|
|
216
223
|
"requestAdaptor": "",
|
|
@@ -226,9 +233,24 @@
|
|
|
226
233
|
"editorState": "default",
|
|
227
234
|
"css": {
|
|
228
235
|
".steedos-instance-related-view-wrapper > .antd-Page-content": {
|
|
229
|
-
"
|
|
236
|
+
"display": "inline-block",
|
|
237
|
+
"transition": "width 0.5s ease-in-out",
|
|
238
|
+
"width": "unset"
|
|
239
|
+
},
|
|
240
|
+
".steedos-instance-related-view-wrapper .instance-form": {
|
|
241
|
+
"width": "190mm",
|
|
230
242
|
"transition": "width 0.5s ease-in-out"
|
|
231
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
|
+
},
|
|
232
254
|
".steedos-global-header-root": {
|
|
233
255
|
"display": "none"
|
|
234
256
|
},
|
|
@@ -242,6 +264,22 @@
|
|
|
242
264
|
".antd-Page-toolbar": {
|
|
243
265
|
"background": "#e5e5e5"
|
|
244
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
|
+
},
|
|
245
283
|
".antd-Page-toolbar .antd-Grid": {
|
|
246
284
|
"padding-top": "12px",
|
|
247
285
|
"padding-left": "10px"
|
|
@@ -305,6 +343,15 @@
|
|
|
305
343
|
},
|
|
306
344
|
".text-muted": {
|
|
307
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"
|
|
308
355
|
}
|
|
309
356
|
},
|
|
310
357
|
"wrapperCustomStyle": {}
|