@steedos-labs/plugin-workflow 3.0.16 → 3.0.18
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/applications/approve_workflow.app.yml +18 -104
- package/main/default/objects/instances/buttons/instance_delete.button.yml +4 -0
- package/main/default/objects/instances/buttons/instance_new.button.yml +4 -0
- package/main/default/pages/page_instance_print.page.amis.json +28 -2
- package/main/default/routes/api_workflow_chart.router.js +1 -1
- package/package.json +1 -1
- package/public/workflow/index.css +36 -0
|
@@ -27,6 +27,21 @@ nav_schema: {
|
|
|
27
27
|
"size": "none",
|
|
28
28
|
"className": "instances-sidebar-wrapper mt-1 bg-white",
|
|
29
29
|
"body": [
|
|
30
|
+
{
|
|
31
|
+
"type": "button",
|
|
32
|
+
"label": "刷新",
|
|
33
|
+
"className": "instance-nav-reload hidden",
|
|
34
|
+
"onEvent": {
|
|
35
|
+
"click": {
|
|
36
|
+
"actions": [
|
|
37
|
+
{
|
|
38
|
+
"actionType": "rebuild",
|
|
39
|
+
"componentId": "u:instanceNav"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
30
45
|
{
|
|
31
46
|
"type": "service",
|
|
32
47
|
"id": "u:instanceNav",
|
|
@@ -41,117 +56,16 @@ nav_schema: {
|
|
|
41
56
|
}
|
|
42
57
|
},
|
|
43
58
|
"body": [
|
|
44
|
-
{
|
|
45
|
-
"type": "button",
|
|
46
|
-
"label": "刷新",
|
|
47
|
-
"className": "instance-nav-reload hidden",
|
|
48
|
-
"onEvent": {
|
|
49
|
-
"click": {
|
|
50
|
-
"actions": [
|
|
51
|
-
{
|
|
52
|
-
"actionType": "reload",
|
|
53
|
-
"componentId": "u:instanceNav"
|
|
54
|
-
}
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"type": "input-tree",
|
|
61
|
-
"name": "tree",
|
|
62
|
-
"treeContainerClassName": "h-full bg-white",
|
|
63
|
-
"className": "instance-box-tree h-full w-full p-0 bg-white",
|
|
64
|
-
"id": "u:9f3dd961ca12",
|
|
65
|
-
"stacked": true,
|
|
66
|
-
"multiple": false,
|
|
67
|
-
"enableNodePath": false,
|
|
68
|
-
"hideRoot": true,
|
|
69
|
-
"showIcon": true,
|
|
70
|
-
"initiallyOpen": false,
|
|
71
|
-
"virtualThreshold": 100000,
|
|
72
|
-
"value": "${value}",
|
|
73
|
-
"size": "md",
|
|
74
|
-
"onEvent": {
|
|
75
|
-
"change": {
|
|
76
|
-
"actions": [
|
|
77
|
-
{
|
|
78
|
-
"actionType": "setValue",
|
|
79
|
-
"componentId": "instances_list_service",
|
|
80
|
-
"args": {
|
|
81
|
-
"value": {
|
|
82
|
-
"isFlowDataDone": false
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"actionType": "custom",
|
|
88
|
-
"script": "//获取上一次的flowId和categoryId\nconst lastFlowId = event.data.flowId;\nconst lastCategoryId = event.data.categoryId;\n//从value中获取最新的flowId\nvar flowIdRegex = /&flowId=([^&]+)/;\nvar flowIdMatch = event.data.value.match(flowIdRegex);\nconst flowId = flowIdMatch && flowIdMatch.length > 0 ? flowIdMatch[1] : \"\";\n//从value中获取最新的categoryId\nvar categoryIdRegex = /&categoryId=([^&]+)/;\nvar categoryIdMatch = event.data.value.match(categoryIdRegex);\nconst categoryId = categoryIdMatch && categoryIdMatch.length > 0 ? categoryIdMatch[1] : \"\";\n//获取上一次的listname和最新的listname\nconst lastListName = event.data.listName;\nconst listName = event.data.value.split('?')[0].split('instances/grid/')[1];\n//切换流程时清除过滤条件\nif (lastListName == \"monitor\" && listName == \"monitor\" && (flowId != lastFlowId || categoryId != lastCategoryId)) {\n listViewPropsStoreKey = window.location.pathname + \"/crud\";\n sessionStorage.removeItem(listViewPropsStoreKey);\n sessionStorage.removeItem(listViewPropsStoreKey + \"/query\");\n}"
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
"actionType": "setValue",
|
|
92
|
-
"componentId": "instances_list_service",
|
|
93
|
-
"args": {
|
|
94
|
-
"value": {
|
|
95
|
-
"additionalFilters": [
|
|
96
|
-
"${event.data.options.name}",
|
|
97
|
-
"=",
|
|
98
|
-
"${event.data.options.value}"
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
"expression": "${event.data.options.level>=10}"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"args": {
|
|
106
|
-
"link": "${event.data.value}",
|
|
107
|
-
"blank": false
|
|
108
|
-
},
|
|
109
|
-
"actionType": "link"
|
|
110
|
-
}
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"menuTpl": {
|
|
115
|
-
"type": "wrapper",
|
|
116
|
-
"className": "flex items-center py-1.5 px-3 m-0 rounded-md transition-colors duration-150",
|
|
117
|
-
"body": [
|
|
118
|
-
{
|
|
119
|
-
"type": "tpl",
|
|
120
|
-
"className": "flex-1 leading-6 truncate instance-menu-label",
|
|
121
|
-
"tpl": "${label}",
|
|
122
|
-
"id": "u:9dee51f00db4"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"type": "tpl",
|
|
126
|
-
"className": "ml-auto",
|
|
127
|
-
"tpl": "",
|
|
128
|
-
"badge": {
|
|
129
|
-
"className": "h-0",
|
|
130
|
-
"offset": [
|
|
131
|
-
-5,
|
|
132
|
-
0
|
|
133
|
-
],
|
|
134
|
-
"mode": "text",
|
|
135
|
-
"text": "${tag | toInt}",
|
|
136
|
-
"overflowCount": 999
|
|
137
|
-
},
|
|
138
|
-
"id": "u:2329cd1fecc2"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"id": "u:545154bcc334"
|
|
142
|
-
},
|
|
143
|
-
"unfoldedLevel": 2,
|
|
144
|
-
"source": "${options}"
|
|
145
|
-
}
|
|
146
59
|
],
|
|
147
|
-
"
|
|
60
|
+
"schemaApi": {
|
|
148
61
|
"method": "get",
|
|
149
62
|
"url": "${context.rootUrl}/api/${appId}/workflow/nav",
|
|
150
63
|
"headers": {
|
|
151
64
|
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
152
65
|
},
|
|
153
66
|
"messages": {},
|
|
154
|
-
"adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search)
|
|
67
|
+
"adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search);\n// return payload;\n\n\nreturn {\n \"type\": \"service\",\n \"data\": payload.data,\n \"body\": [{\n \"type\": \"input-tree\",\n \"name\": \"tree\",\n \"treeContainerClassName\": \"h-full bg-white\",\n \"className\": \"instance-box-tree h-full w-full p-0 bg-white\",\n \"id\": \"u:9f3dd961ca12\",\n \"stacked\": true,\n \"multiple\": false,\n \"enableNodePath\": false,\n \"hideRoot\": true,\n \"showIcon\": true,\n \"initiallyOpen\": false,\n \"virtualThreshold\": 100000,\n \"value\": \"${value}\",\n \"size\": \"md\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"instances_list_service\",\n \"args\": {\n \"value\": {\n \"isFlowDataDone\": false\n }\n }\n },\n {\n \"actionType\": \"custom\",\n \"script\": \"//获取上一次的flowId和categoryId\\nconst lastFlowId = event.data.flowId;\\nconst lastCategoryId = event.data.categoryId;\\n//从value中获取最新的flowId\\nvar flowIdRegex = /&flowId=([^&]+)/;\\nvar flowIdMatch = event.data.value.match(flowIdRegex);\\nconst flowId = flowIdMatch && flowIdMatch.length > 0 ? flowIdMatch[1] : \\\"\\\";\\n//从value中获取最新的categoryId\\nvar categoryIdRegex = /&categoryId=([^&]+)/;\\nvar categoryIdMatch = event.data.value.match(categoryIdRegex);\\nconst categoryId = categoryIdMatch && categoryIdMatch.length > 0 ? categoryIdMatch[1] : \\\"\\\";\\n//获取上一次的listname和最新的listname\\nconst lastListName = event.data.listName;\\nconst listName = event.data.value.split('?')[0].split('instances/grid/')[1];\\n//切换流程时清除过滤条件\\nif (lastListName == \\\"monitor\\\" && listName == \\\"monitor\\\" && (flowId != lastFlowId || categoryId != lastCategoryId)) {\\n listViewPropsStoreKey = window.location.pathname + \\\"/crud\\\";\\n sessionStorage.removeItem(listViewPropsStoreKey);\\n sessionStorage.removeItem(listViewPropsStoreKey + \\\"/query\\\");\\n}\"\n },\n {\n \"actionType\": \"setValue\",\n \"componentId\": \"instances_list_service\",\n \"args\": {\n \"value\": {\n \"additionalFilters\": [\n \"${event.data.options.name}\",\n \"=\",\n \"${event.data.options.value}\"\n ]\n }\n },\n \"expression\": \"${event.data.options.level>=10}\"\n },\n {\n \"args\": {\n \"link\": \"${event.data.value}\",\n \"blank\": false\n },\n \"actionType\": \"link\"\n }\n ]\n }\n },\n \"menuTpl\": {\n \"type\": \"wrapper\",\n \"className\": \"flex items-center py-1.5 px-3 m-0 rounded-md transition-colors duration-150\",\n \"body\": [\n {\n \"type\": \"tpl\",\n \"className\": \"flex-1 leading-6 truncate instance-menu-label\",\n \"tpl\": \"${label}\",\n \"id\": \"u:9dee51f00db4\"\n },\n {\n \"type\": \"tpl\",\n \"className\": \"ml-auto\",\n \"tpl\": \"\",\n \"badge\": {\n \"className\": \"h-0\",\n \"offset\": [\n -5,\n 0\n ],\n \"mode\": \"text\",\n \"text\": \"${tag | toInt}\",\n \"overflowCount\": 999\n },\n \"id\": \"u:2329cd1fecc2\"\n }\n ],\n \"id\": \"u:545154bcc334\"\n },\n \"unfoldedLevel\": 2,\n \"source\": \"${options}\"\n }]\n}"
|
|
68
|
+
# "adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search); return payload;"
|
|
155
69
|
},
|
|
156
70
|
"messages": {},
|
|
157
71
|
"dsType": "api"
|
|
@@ -350,6 +350,19 @@
|
|
|
350
350
|
".steedos-amis-instance-view .form-control .antd-Table-table tbody tr:last-child td": {
|
|
351
351
|
"border-right": "0px"
|
|
352
352
|
},
|
|
353
|
+
".steedos-instance-related-view-wrapper .instance-form-view": {
|
|
354
|
+
"table-layout": "fixed !important",
|
|
355
|
+
"width": "100% !important"
|
|
356
|
+
},
|
|
357
|
+
".steedos-instance-related-view-wrapper .steedos-input-table": {
|
|
358
|
+
"width": "100% !important",
|
|
359
|
+
"display": "block !important"
|
|
360
|
+
},
|
|
361
|
+
".steedos-instance-related-view-wrapper .antd-Table-contentWrap": {
|
|
362
|
+
"overflow-x": "auto !important",
|
|
363
|
+
"display": "block !important",
|
|
364
|
+
"width": "100% !important"
|
|
365
|
+
},
|
|
353
366
|
".antd-Table-content-colDragLine": {
|
|
354
367
|
"display": "none !important"
|
|
355
368
|
},
|
|
@@ -373,10 +386,23 @@
|
|
|
373
386
|
"position": "static !important"
|
|
374
387
|
},
|
|
375
388
|
".steedos-instance-related-view-wrapper .instance-form": {
|
|
376
|
-
"margin": "0 auto"
|
|
389
|
+
"margin": "0 auto",
|
|
390
|
+
"width": "100% !important",
|
|
391
|
+
"max-width": "100% !important"
|
|
392
|
+
},
|
|
393
|
+
".steedos-instance-related-view-wrapper .instance-form-view": {
|
|
394
|
+
"table-layout": "fixed !important",
|
|
395
|
+
"width": "100% !important"
|
|
396
|
+
},
|
|
397
|
+
".steedos-instance-related-view-wrapper .steedos-input-table": {
|
|
398
|
+
"width": "100% !important",
|
|
399
|
+
"display": "block !important"
|
|
377
400
|
},
|
|
378
401
|
".steedos-instance-related-view-wrapper .antd-Table-contentWrap": {
|
|
379
|
-
"overflow": "visible !important",
|
|
402
|
+
"overflow-y": "visible !important",
|
|
403
|
+
"overflow-x": "auto !important",
|
|
404
|
+
"display": "block !important",
|
|
405
|
+
"width": "100% !important",
|
|
380
406
|
"height": "auto !important"
|
|
381
407
|
},
|
|
382
408
|
".steedos-instance-related-view-wrapper .instance-form-view td": {
|
|
@@ -513,7 +513,7 @@ const FlowversionAPI = {
|
|
|
513
513
|
<meta name="mobile-web-app-capable" content="yes">
|
|
514
514
|
<meta name="theme-color" content="#000">
|
|
515
515
|
<meta name="application-name">
|
|
516
|
-
<script type="text/javascript" src="/unpkg.com/jquery@
|
|
516
|
+
<script type="text/javascript" src="/unpkg.com/jquery@3.7.1/dist/jquery.min.js"></script>
|
|
517
517
|
<script type="text/javascript" src="/unpkg.com/mermaid@9.1.2/dist/mermaid.min.js"></script>
|
|
518
518
|
<style>
|
|
519
519
|
body {
|
package/package.json
CHANGED
|
@@ -625,6 +625,42 @@ tbody .color-priority-muted *{
|
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
|
|
628
|
+
/* 1. 基础设置:合并边框并去掉表格容器的外边框 */
|
|
629
|
+
.instance-form .antd-Table-table {
|
|
630
|
+
border-collapse: collapse;
|
|
631
|
+
border: none !important; /* 强制移除最外层边框 */
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* 2. 给所有单元格添加边框(内部边框) */
|
|
635
|
+
.instance-form .antd-Table-table th,
|
|
636
|
+
.instance-form .antd-Table-table td {
|
|
637
|
+
border: 1px solid #000; /* 这里可以修改你想要的颜色,比如 #000 */
|
|
638
|
+
padding: 8px; /* 适当增加间距更美观 */
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/* 3. 移除最左侧和最右侧的垂直边框 */
|
|
642
|
+
.instance-form .antd-Table-table tr th:first-child,
|
|
643
|
+
.instance-form .antd-Table-table tr td:first-child {
|
|
644
|
+
border-left: none;
|
|
645
|
+
}
|
|
646
|
+
.instance-form .antd-Table-table tr th:last-child,
|
|
647
|
+
.instance-form .antd-Table-table tr td:last-child {
|
|
648
|
+
border-right: none;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/* 4. 移除最顶部和最底部的水平边框 */
|
|
652
|
+
.instance-form .antd-Table-table thead tr:first-child th {
|
|
653
|
+
border-top: none;
|
|
654
|
+
}
|
|
655
|
+
.instance-form .antd-Table-table tbody tr:last-child td {
|
|
656
|
+
border-bottom: none;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
.instance-form .steedos-input-table .antd-Service>.antd-Form-item {
|
|
660
|
+
margin-bottom: 0px !important;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
|
|
628
664
|
.instance-form .steedos-input-table .antd-Table-table colgroup col:nth-child(2) {
|
|
629
665
|
width: 0px !important;
|
|
630
666
|
min-width: 0px !important;
|