@steedos-labs/plugin-workflow 3.0.67 → 3.0.69
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/designer/dist/amis-renderer/amis-renderer.css +1 -1
- package/designer/dist/amis-renderer/amis-renderer.js +1 -1
- package/designer/dist/assets/index-BocXPX7W.css +1 -0
- package/designer/dist/assets/{index-CuWu3LJm.js → index-CRxbSR2M.js} +143 -143
- package/designer/dist/index.html +2 -2
- package/main/default/manager/uuflow_manager.js +10 -1
- package/main/default/objects/instance_tasks/buttons/instance_new.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_delete.button.yml +1 -1
- package/main/default/objects/instances/buttons/instance_new.button.yml +1 -1
- package/main/default/objects/instances/buttons/view_instance.button.yml +2 -6
- package/main/default/pages/page_instance_print.page.amis.json +69 -12
- package/main/default/routes/am.router.js +1 -1
- package/main/default/routes/api_workflow_next_step_users.router.js +12 -12
- package/package.json +1 -1
- package/public/amis-renderer/amis-renderer.css +1 -1
- package/public/amis-renderer/amis-renderer.js +1 -1
- package/designer/dist/assets/index-D2CMqwIn.css +0 -1
package/designer/dist/index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
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-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/api/workflow/designer-v2/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/api/workflow/designer-v2/assets/index-CRxbSR2M.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/api/workflow/designer-v2/assets/index-BocXPX7W.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<div id="root"></div>
|
|
@@ -1699,8 +1699,17 @@ UUFlowManager.workflow_engine = async function (approve_from_client, current_use
|
|
|
1699
1699
|
const t10 = Date.now();
|
|
1700
1700
|
// Send message to current user and trigger webhook
|
|
1701
1701
|
await pushManager.send_message_current_user(current_user_info);
|
|
1702
|
-
|
|
1702
|
+
|
|
1703
|
+
// 给下一步处理人(inbox_users)推送 badge,确保被驳回人/审批人的待办角标实时更新
|
|
1703
1704
|
let to_users = finalInstance.inbox_users;
|
|
1705
|
+
if (to_users && to_users.length > 0) {
|
|
1706
|
+
for (const to_user_id of to_users) {
|
|
1707
|
+
if (to_user_id !== current_user) {
|
|
1708
|
+
await pushManager.send_message_to_specifyUser("current_user", to_user_id);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1704
1713
|
const last_trace = _.last(finalInstance.traces);
|
|
1705
1714
|
const last_step = await UUFlowManager.getStep(finalInstance, flow, last_trace.step);
|
|
1706
1715
|
|
|
@@ -62,7 +62,7 @@ amis_schema: |-
|
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
"actionType": "custom",
|
|
65
|
-
"script": "const {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n link: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft
|
|
65
|
+
"script": "const {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n link: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft`\n }\n});\n;"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"actionType": "wait",
|
|
@@ -27,7 +27,7 @@ amis_schema: |-
|
|
|
27
27
|
{
|
|
28
28
|
"ignoreError": false,
|
|
29
29
|
"actionType": "custom",
|
|
30
|
-
"script": "SteedosWorkflow.Instance.changed=false; navigate('/app/approve_workflow/instances/view/none?side_object=instances&side_listview_id=draft
|
|
30
|
+
"script": "SteedosWorkflow.Instance.changed=false; navigate('/app/approve_workflow/instances/view/none?side_object=instances&side_listview_id=draft')"
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
"actionType": "wait",
|
|
@@ -63,7 +63,7 @@ amis_schema: |-
|
|
|
63
63
|
,
|
|
64
64
|
{
|
|
65
65
|
"actionType": "custom",
|
|
66
|
-
"script": "const {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n link: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft
|
|
66
|
+
"script": "const {instance, appId, objectName} = event.data;\nconsole.log(`instance===`);doAction({\n actionType: 'link',\n args: {\n blank: false,\n link: `/app/${appId}/instances/view/${instance._id}?side_object=instances&side_listview_id=draft`\n }\n});\n;"
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
"actionType": "wait",
|
|
@@ -13,12 +13,8 @@ amis_schema: |-
|
|
|
13
13
|
{
|
|
14
14
|
"componentId": "",
|
|
15
15
|
"args": {
|
|
16
|
-
"url": "${context.rootUrl}/workflow/
|
|
17
|
-
"
|
|
18
|
-
"box": "monitor",
|
|
19
|
-
"print_is_show_traces": "1",
|
|
20
|
-
"print_is_show_attachments": "1"
|
|
21
|
-
}
|
|
16
|
+
"url": "${context.rootUrl}/api/workflow/instance/${record._id}",
|
|
17
|
+
"blank": false
|
|
22
18
|
},
|
|
23
19
|
"actionType": "url"
|
|
24
20
|
}
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"actions": [
|
|
108
108
|
{
|
|
109
109
|
"actionType": "custom",
|
|
110
|
-
"script": "doAction({actionType: 'setValue', componentId: 'u:print-width', args: {value: Number(event.data.value)}}); $('.steedos-instance-related-view-wrapper').css('width', event.data.value + 'mm');"
|
|
110
|
+
"script": "doAction({actionType: 'setValue', componentId: 'u:print-width', args: {value: Number(event.data.value)}}); $('.steedos-instance-related-view-wrapper').css('width', event.data.value + 'mm'); var el=document.getElementById('print-page-orientation'); if(el){ var v=Number(event.data.value); el.textContent = v && v !== 210 ? '@media print { .steedos-instance-related-view-wrapper { width: ' + v + 'mm !important; } }' : ''; }"
|
|
111
111
|
}
|
|
112
112
|
]
|
|
113
113
|
}
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"actions": [
|
|
127
127
|
{
|
|
128
128
|
"actionType": "custom",
|
|
129
|
-
"script": "$('.steedos-instance-related-view-wrapper').css('width', event.data.value + 'mm');"
|
|
129
|
+
"script": "$('.steedos-instance-related-view-wrapper').css('width', event.data.value + 'mm'); var el=document.getElementById('print-page-orientation'); if(el){ var v=Number(event.data.value); el.textContent = v && v !== 210 ? '@media print { .steedos-instance-related-view-wrapper { width: ' + v + 'mm !important; } }' : ''; }"
|
|
130
130
|
}
|
|
131
131
|
]
|
|
132
132
|
}
|
|
@@ -234,7 +234,8 @@
|
|
|
234
234
|
"editorState": "default",
|
|
235
235
|
"css": {
|
|
236
236
|
"body": {
|
|
237
|
-
"background-color": "#C0C0C0"
|
|
237
|
+
"background-color": "#C0C0C0",
|
|
238
|
+
"overflow-x": "hidden !important"
|
|
238
239
|
},
|
|
239
240
|
"body > .bg-slate-50": {
|
|
240
241
|
"background-color": "transparent !important"
|
|
@@ -244,21 +245,27 @@
|
|
|
244
245
|
"margin": "0 auto",
|
|
245
246
|
"background-color": "#fff"
|
|
246
247
|
},
|
|
248
|
+
".steedos-instance-related-view-wrapper .steedos-amis-instance-view-content": {
|
|
249
|
+
"min-width": "0 !important",
|
|
250
|
+
"padding": "12px 15px 0 15px"
|
|
251
|
+
},
|
|
247
252
|
".steedos-instance-related-view-wrapper > .antd-Page-content": {
|
|
248
253
|
"transition": "width 0.5s ease-in-out"
|
|
249
254
|
},
|
|
250
255
|
".steedos-instance-related-view-wrapper .instance-form": {
|
|
251
256
|
"width": "100%",
|
|
252
257
|
"margin": "0 auto",
|
|
253
|
-
"padding": "0 15px",
|
|
254
258
|
"transition": "width 0.5s ease-in-out"
|
|
255
259
|
},
|
|
256
260
|
".steedos-instance-related-view-wrapper .instance-approve-history": {
|
|
257
261
|
"width": "100%",
|
|
258
262
|
"margin": "0 auto",
|
|
259
|
-
"padding": "0 15px",
|
|
260
263
|
"transition": "width 0.5s ease-in-out"
|
|
261
264
|
},
|
|
265
|
+
".steedos-instance-related-view-wrapper .instance-approve-history table td": {
|
|
266
|
+
"min-width": "0 !important",
|
|
267
|
+
"width": "auto !important"
|
|
268
|
+
},
|
|
262
269
|
".steedos-instance-related-view-wrapper .instance-name": {
|
|
263
270
|
"margin": "10px 0 5px 0"
|
|
264
271
|
},
|
|
@@ -309,7 +316,8 @@
|
|
|
309
316
|
".instance-approve-history": {
|
|
310
317
|
},
|
|
311
318
|
".instance-file-list": {
|
|
312
|
-
"display": "none"
|
|
319
|
+
"display": "none",
|
|
320
|
+
"margin-bottom": "8px"
|
|
313
321
|
},
|
|
314
322
|
".instance-file-list .no-print": {
|
|
315
323
|
"display": "none !important"
|
|
@@ -320,6 +328,9 @@
|
|
|
320
328
|
".instance-related-list .no-print": {
|
|
321
329
|
"display": "none !important"
|
|
322
330
|
},
|
|
331
|
+
".instance-file-list .liquid-amis-container button, .instance-related-list .liquid-amis-container a": {
|
|
332
|
+
"font-weight": "400 !important"
|
|
333
|
+
},
|
|
323
334
|
".antd-Form-star":{
|
|
324
335
|
"display": "none !important"
|
|
325
336
|
},
|
|
@@ -378,6 +389,7 @@
|
|
|
378
389
|
},
|
|
379
390
|
".steedos-instance-related-view-wrapper": {
|
|
380
391
|
"display": "block !important",
|
|
392
|
+
"width": "100% !important",
|
|
381
393
|
"height": "auto !important",
|
|
382
394
|
"margin": "0 auto !important",
|
|
383
395
|
"overflow": "visible !important",
|
|
@@ -394,14 +406,18 @@
|
|
|
394
406
|
"padding": "0 !important",
|
|
395
407
|
"margin": "0 !important"
|
|
396
408
|
},
|
|
409
|
+
".steedos-instance-related-view-wrapper .steedos-amis-instance-view-content": {
|
|
410
|
+
"padding": "0 15px !important"
|
|
411
|
+
},
|
|
412
|
+
".steedos-instance-related-view-wrapper .steedos-amis-instance-view-content > .antd-TplField": {
|
|
413
|
+
"display": "block !important"
|
|
414
|
+
},
|
|
397
415
|
".steedos-instance-related-view-wrapper .instance-form": {
|
|
398
416
|
"margin": "0 auto",
|
|
399
|
-
"padding": "0 15px !important",
|
|
400
417
|
"width": "100% !important"
|
|
401
418
|
},
|
|
402
419
|
".steedos-instance-related-view-wrapper .instance-approve-history": {
|
|
403
420
|
"margin": "0 auto",
|
|
404
|
-
"padding": "0 15px !important",
|
|
405
421
|
"width": "100% !important"
|
|
406
422
|
},
|
|
407
423
|
".steedos-instance-related-view-wrapper .instance-form-view": {
|
|
@@ -419,8 +435,9 @@
|
|
|
419
435
|
"height": "auto !important"
|
|
420
436
|
},
|
|
421
437
|
".steedos-instance-related-view-wrapper .instance-form .td-childfield": {
|
|
422
|
-
"overflow
|
|
423
|
-
"
|
|
438
|
+
"overflow": "visible !important",
|
|
439
|
+
"vertical-align": "top !important",
|
|
440
|
+
"padding": "0 !important"
|
|
424
441
|
},
|
|
425
442
|
".steedos-instance-related-view-wrapper .instance-form-view td": {
|
|
426
443
|
"border-width": "1px !important"
|
|
@@ -429,7 +446,7 @@
|
|
|
429
446
|
"-webkit-print-color-adjust": "exact !important",
|
|
430
447
|
"print-color-adjust": "exact !important",
|
|
431
448
|
"table-layout": "auto !important",
|
|
432
|
-
"width": "100% !important",
|
|
449
|
+
"min-width": "100% !important",
|
|
433
450
|
"border-collapse": "collapse !important"
|
|
434
451
|
},
|
|
435
452
|
".steedos-instance-related-view-wrapper .steedos-input-table .antd-Table-table thead": {
|
|
@@ -451,6 +468,20 @@
|
|
|
451
468
|
".steedos-instance-related-view-wrapper .steedos-input-table .antd-Table-table td": {
|
|
452
469
|
"border": "1px solid #000 !important"
|
|
453
470
|
},
|
|
471
|
+
".steedos-instance-related-view-wrapper td.td-childfield .antd-Form-item, .steedos-instance-related-view-wrapper td.td-childfield .antd-Service, .steedos-instance-related-view-wrapper td.td-childfield .antd-InputTable, .steedos-instance-related-view-wrapper td.td-childfield .antd-Table, .steedos-instance-related-view-wrapper td.td-childfield .antd-Table-contentWrap, .steedos-instance-related-view-wrapper td.td-childfield .antd-Table-content": {
|
|
472
|
+
"padding-top": "0 !important",
|
|
473
|
+
"margin-top": "0 !important",
|
|
474
|
+
"border-top": "0 !important",
|
|
475
|
+
"border-radius": "0 !important"
|
|
476
|
+
},
|
|
477
|
+
".steedos-instance-related-view-wrapper .steedos-input-table table.antd-Table-table th, .steedos-instance-related-view-wrapper .steedos-input-table table.antd-Table-table td": {
|
|
478
|
+
"box-shadow": "inset -1px 0 0 #666, inset 0 -1px 0 #666 !important",
|
|
479
|
+
"background-image": "none !important",
|
|
480
|
+
"outline": "0 !important"
|
|
481
|
+
},
|
|
482
|
+
".steedos-instance-related-view-wrapper .steedos-input-table table.antd-Table-table th:last-child, .steedos-instance-related-view-wrapper .steedos-input-table table.antd-Table-table td:last-child": {
|
|
483
|
+
"box-shadow": "inset 0 -1px 0 #666 !important"
|
|
484
|
+
},
|
|
454
485
|
".steedos-instance-related-view-wrapper .steedos-input-table .antd-Table-table th.antd-Table-operationCell, .steedos-instance-related-view-wrapper .steedos-input-table .antd-Table-table td.antd-Table-operationCell, .steedos-instance-related-view-wrapper .steedos-input-table .antd-Table-table td.steedos-input-table-column-operation": {
|
|
455
486
|
"display": "none !important"
|
|
456
487
|
},
|
|
@@ -471,6 +502,25 @@
|
|
|
471
502
|
".steedos-instance-related-view-wrapper .instance-approve-history .antd-Table-table tr td": {
|
|
472
503
|
"border-bottom": "1px solid #e8e8e8 !important"
|
|
473
504
|
},
|
|
505
|
+
".steedos-instance-related-view-wrapper a, .steedos-instance-related-view-wrapper a:link, .steedos-instance-related-view-wrapper a:visited, .steedos-instance-related-view-wrapper a:hover, .steedos-instance-related-view-wrapper a:active": {
|
|
506
|
+
"color": "inherit !important",
|
|
507
|
+
"text-decoration": "none !important",
|
|
508
|
+
"cursor": "text !important",
|
|
509
|
+
"pointer-events": "none !important",
|
|
510
|
+
"display": "contents !important"
|
|
511
|
+
},
|
|
512
|
+
".steedos-instance-related-view-wrapper .instance-approve-history, .steedos-instance-related-view-wrapper .instance-approve-history *": {
|
|
513
|
+
"color": "inherit !important",
|
|
514
|
+
"background-color": "transparent !important"
|
|
515
|
+
},
|
|
516
|
+
".steedos-instance-related-view-wrapper .steedos-field-lookup-wrapper, .steedos-instance-related-view-wrapper .steedos-field-lookup-each, .steedos-instance-related-view-wrapper .steedos-field-lookup-each > .antd-Form-item, .steedos-instance-related-view-wrapper .steedos-field-lookup-each .antd-Form-static, .steedos-instance-related-view-wrapper .steedos-field-lookup-each .antd-Form-control, .steedos-instance-related-view-wrapper .steedos-field-lookup-each .antd-TplField, .steedos-instance-related-view-wrapper .steedos-field-lookup-each .antd-TplField > span": {
|
|
517
|
+
"padding": "0 !important",
|
|
518
|
+
"margin": "0 !important",
|
|
519
|
+
"min-height": "0 !important"
|
|
520
|
+
},
|
|
521
|
+
".steedos-instance-related-view-wrapper .steedos-field-lookup-each .antd-Form-control": {
|
|
522
|
+
"padding-left": "12px !important"
|
|
523
|
+
},
|
|
474
524
|
".antd-Table-content.scroll-end": {
|
|
475
525
|
"direction": "rtl !important"
|
|
476
526
|
},
|
|
@@ -482,6 +532,13 @@
|
|
|
482
532
|
},
|
|
483
533
|
".steedos-instance-related-view-wrapper .table-page-body.form-table > tbody > tr:nth-child(2) td": {
|
|
484
534
|
"border-top": "none !important"
|
|
535
|
+
},
|
|
536
|
+
".instance-related-list .liquid-amis-container a": {
|
|
537
|
+
"display": "inline !important",
|
|
538
|
+
"font-weight": "400 !important"
|
|
539
|
+
},
|
|
540
|
+
".instance-file-list .liquid-amis-container button": {
|
|
541
|
+
"font-weight": "400 !important"
|
|
485
542
|
}
|
|
486
543
|
}
|
|
487
544
|
},
|
|
@@ -491,7 +548,7 @@
|
|
|
491
548
|
"actions": [
|
|
492
549
|
{
|
|
493
550
|
"actionType": "custom",
|
|
494
|
-
"script": "document.querySelectorAll('link[rel=\"stylesheet\"]').forEach(link => { if (link.href.includes('salesforce-lightning-design-system.min.css')) { link.remove(); } }); for(var si=0;si<document.styleSheets.length;si++){try{var sh=document.styleSheets[si];if(!sh.href||!sh.href.match(/index-[A-Za-z0-9]+\\.css/))continue;for(var ri=sh.cssRules.length-1;ri>=0;ri--){var sel=sh.cssRules[ri].selectorText||'';if(sel.match(/^::?-webkit-scrollbar/))sh.deleteRule(ri);}}catch(e){}} var styleEl=document.createElement('style'); styleEl.id='print-page-orientation'; styleEl.textContent='
|
|
551
|
+
"script": "document.querySelectorAll('link[rel=\"stylesheet\"]').forEach(link => { if (link.href.includes('salesforce-lightning-design-system.min.css')) { link.remove(); } }); for(var si=0;si<document.styleSheets.length;si++){try{var sh=document.styleSheets[si];if(!sh.href||!sh.href.match(/index-[A-Za-z0-9]+\\.css/))continue;for(var ri=sh.cssRules.length-1;ri>=0;ri--){var sel=sh.cssRules[ri].selectorText||'';if(sel.match(/^::?-webkit-scrollbar/))sh.deleteRule(ri);}}catch(e){}} var styleEl=document.createElement('style'); styleEl.id='print-page-orientation'; styleEl.textContent=''; document.head.appendChild(styleEl); document.addEventListener('scroll',function(e){var t=e.target;if(t&&t.classList&&t.classList.contains('antd-Table-content')){if(window._isPrinting)return;var sl=t.scrollLeft;var max=t.scrollWidth-t.clientWidth;if(sl>0&&sl>=max-1){t.classList.add('scroll-end');}else{t.classList.remove('scroll-end');}}},true); window.addEventListener('beforeprint',function(){window._isPrinting=true;}); window.addEventListener('afterprint',function(){window._isPrinting=false;});"
|
|
495
552
|
},
|
|
496
553
|
{
|
|
497
554
|
"actionType": "custom",
|
|
@@ -181,7 +181,7 @@ router.post('/am/forms', async function (req, res) {
|
|
|
181
181
|
space: form['space'],
|
|
182
182
|
user: userId
|
|
183
183
|
});
|
|
184
|
-
let companyId = currentSpaceUser.company_id;
|
|
184
|
+
let companyId = form.company_id || currentSpaceUser.company_id;
|
|
185
185
|
let newForm = {
|
|
186
186
|
_id: form["id"] || form["_id"],
|
|
187
187
|
name: form["name"],
|
|
@@ -280,19 +280,19 @@ router.post('/api/workflow/v2/nextStepUsersValue', requireAuthentication, async
|
|
|
280
280
|
|
|
281
281
|
let instance = await UUFlowManager.getInstance(instanceId);
|
|
282
282
|
|
|
283
|
-
// 优先从最近一次 traces 中查找 nextStepId 对应的处理人
|
|
283
|
+
// // 优先从最近一次 traces 中查找 nextStepId 对应的处理人
|
|
284
284
|
let newNextUsers = [];
|
|
285
|
-
const traces = instance.traces || [];
|
|
286
|
-
for (let i = traces.length - 1; i >= 0; i--) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
285
|
+
// const traces = instance.traces || [];
|
|
286
|
+
// for (let i = traces.length - 1; i >= 0; i--) {
|
|
287
|
+
// const trace = traces[i];
|
|
288
|
+
// if (trace.step === nextStepId && trace.approves && trace.approves.length > 0) {
|
|
289
|
+
// // 需要排除以下 approve.jude ['returned', 'terminated', 'retrieved'].includes(judge)
|
|
290
|
+
// newNextUsers = trace.approves
|
|
291
|
+
// .filter(approve => !['returned', 'terminated', 'retrieved'].includes(approve.judge))
|
|
292
|
+
// .map(approve => approve.handler);
|
|
293
|
+
// break;
|
|
294
|
+
// }
|
|
295
|
+
// }
|
|
296
296
|
|
|
297
297
|
// 如果 traces 中没有找到,回退到 step_approve
|
|
298
298
|
if (newNextUsers.length === 0) {
|