@steedos-labs/plugin-workflow 3.0.12 → 3.0.14
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/AI_PLUGIN_GUIDE.md +939 -0
- package/README.md +24 -1
- package/main/default/applications/approve_workflow.app.yml +160 -3
- package/main/default/manager/handlers_manager.js +1 -1
- package/main/default/manager/instance_number_rules.js +84 -0
- package/main/default/manager/instance_tasks_manager.js +79 -1
- package/main/default/manager/uuflow_manager.js +53 -45
- package/main/default/objects/flows/buttons/design_form_layout.button.js +1 -3
- package/main/default/objects/flows/flows.object.yml +4 -3
- package/main/default/objects/instances/buttons/instance_reassign.button.yml +5 -4
- package/main/default/pages/instance_detail.page.amis.json +2 -100
- package/main/default/pages/instance_tasks_detail.page.amis.json +0 -100
- package/main/default/pages/page_instance_view.page.amis.json +1 -1
- package/main/default/routes/api_auto_number.router.js +233 -0
- package/main/default/routes/api_files.router.js +21 -0
- package/main/default/routes/api_have_read.router.js +20 -2
- package/main/default/routes/api_workflow_chart.router.js +23 -3
- package/main/default/routes/api_workflow_instance_upgrade.router.js +5 -0
- package/main/default/routes/api_workflow_nav.router.js +160 -136
- package/main/default/routes/api_workflow_next_step.router.js +111 -30
- package/main/default/routes/flow_form_design.ejs +16 -1
- package/main/default/services/instance.service.js +10 -1
- package/package.json +1 -1
- package/public/workflow/index.css +208 -10
- package/main/default/pages/instance_tasks_list.page.amis.json +0 -330
- package/main/default/pages/instance_tasks_list.page.yml +0 -12
- package/main/default/pages/instances_list.page.amis.json +0 -327
- package/main/default/pages/instances_list.page.yml +0 -12
|
@@ -51,8 +51,28 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.instance-box-tree .antd-TreeControl{
|
|
54
|
-
padding:
|
|
54
|
+
padding: 0;
|
|
55
|
+
background: #ffffff;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Remove default tree styling to allow custom styling */
|
|
59
|
+
.instance-box-tree .antd-Tree-itemLabel-item{
|
|
60
|
+
padding: 0 !important;
|
|
61
|
+
margin: 0 !important;
|
|
62
|
+
display: flex !important;
|
|
63
|
+
align-items: center !important;
|
|
64
|
+
width: 100%; /* Ensure it spans the width */
|
|
55
65
|
}
|
|
66
|
+
|
|
67
|
+
/* Ensure the label container is also flex centered and full width */
|
|
68
|
+
.instance-box-tree .antd-Tree-itemLabel {
|
|
69
|
+
display: flex !important;
|
|
70
|
+
align-items: center !important;
|
|
71
|
+
width: 100%;
|
|
72
|
+
padding-right: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Tree item wrapper - removed margin to allow full-row background */
|
|
56
76
|
/* .instance-box-tree .antd-TreeControl{
|
|
57
77
|
padding: 0;
|
|
58
78
|
border-bottom: 0px;
|
|
@@ -79,10 +99,20 @@
|
|
|
79
99
|
margin-right: 4px;
|
|
80
100
|
} */
|
|
81
101
|
.instance-box-tree .antd-Badge-text{
|
|
82
|
-
background: #
|
|
102
|
+
background: #e5e7eb;
|
|
103
|
+
color: #4b5563;
|
|
104
|
+
font-size: 11px;
|
|
105
|
+
padding: 0px 6px;
|
|
106
|
+
border-radius: 10px;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
line-height: 18px;
|
|
109
|
+
min-width: 18px;
|
|
110
|
+
display: inline-block;
|
|
111
|
+
text-align: center;
|
|
83
112
|
}
|
|
84
113
|
.instance-box-tree .antd-Tree-item:nth-child(1) .antd-Badge-text{
|
|
85
|
-
background: #
|
|
114
|
+
background: #ef4444;
|
|
115
|
+
color: #ffffff;
|
|
86
116
|
}
|
|
87
117
|
/* .instance-box-tree .antd-Tree-itemLabel-item{
|
|
88
118
|
height: 1.6rem;
|
|
@@ -115,12 +145,134 @@
|
|
|
115
145
|
border: none !important;
|
|
116
146
|
}
|
|
117
147
|
|
|
118
|
-
|
|
119
|
-
|
|
148
|
+
/* Base styling for all menu labels - must be specific enough */
|
|
149
|
+
.instance-box-tree .antd-Tree .instance-menu-label {
|
|
150
|
+
font-weight: 400;
|
|
151
|
+
color: #6b7280;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* Tree item spacing for proper layout */
|
|
155
|
+
.instance-box-tree .antd-Tree-item {
|
|
156
|
+
margin: 2px 8px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/* Selected state styling - Using robust pseudo-element strategy for cross-browser support */
|
|
160
|
+
|
|
161
|
+
/* 1. Reset positions to ensure clean background layering */
|
|
162
|
+
.instance-box-tree .antd-Tree-item {
|
|
163
|
+
margin: 2px 8px; /* Maintain standard margin */
|
|
164
|
+
position: relative !important; /* Context for absolute positioning */
|
|
165
|
+
z-index: 0; /* Create stacking context so -1 doesn't go behind the white container */
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* 2. Remove ANY positioning from the label so it doesn't trap the pseudo-element */
|
|
169
|
+
.instance-box-tree .antd-Tree-itemLabel.is-checked {
|
|
170
|
+
background-color: transparent !important;
|
|
171
|
+
position: static !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/* 3. Helper to make label static if checked is on item */
|
|
175
|
+
.instance-box-tree .antd-Tree-item.is-checked > .antd-Tree-itemLabel {
|
|
176
|
+
background-color: transparent !important;
|
|
177
|
+
position: static !important;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* 4. The background pseudo-element */
|
|
181
|
+
.instance-box-tree .antd-Tree-itemLabel.is-checked::before,
|
|
182
|
+
.instance-box-tree .antd-Tree-item.is-checked > .antd-Tree-itemLabel::before {
|
|
183
|
+
content: "";
|
|
184
|
+
position: absolute;
|
|
185
|
+
left: 0;
|
|
186
|
+
right: 0;
|
|
187
|
+
top: 0; /* Cover full height (margin handles the spacing) */
|
|
188
|
+
bottom: 0;
|
|
189
|
+
background-color: var(--color-brand-50, #dbeafe);
|
|
190
|
+
border-radius: 6px;
|
|
191
|
+
z-index: -1; /* Behind text */
|
|
120
192
|
}
|
|
121
193
|
|
|
122
|
-
.instance-box-tree .antd-Tree-
|
|
123
|
-
|
|
194
|
+
.instance-box-tree .antd-Tree-itemLabel.is-checked .instance-menu-label,
|
|
195
|
+
.instance-box-tree .antd-Tree-item.is-checked .instance-menu-label {
|
|
196
|
+
color: var(--Menu-light-fontColor-onHover, #1e40af) !important;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.instance-box-tree .antd-Tree-itemLabel.is-checked .antd-Tree-itemIcon,
|
|
200
|
+
.instance-box-tree .antd-Tree-item.is-checked .antd-Tree-itemIcon {
|
|
201
|
+
color: var(--Menu-light-fontColor-onHover, #1e40af) !important;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Hover state - entire row with light gray background */
|
|
205
|
+
.instance-box-tree .antd-Tree-item:hover {
|
|
206
|
+
background-color: #f3f4f6;
|
|
207
|
+
border-radius: 6px;
|
|
208
|
+
margin: 2px 8px;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.instance-box-tree .antd-Tree-item.is-checked:hover {
|
|
212
|
+
background-color: var(--color-brand-50, #dbeafe) !important;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* Group title styling - larger and bolder */
|
|
216
|
+
.instance-box-tree .antd-Tree .antd-Tree-item[aria-level="1"] .instance-menu-label {
|
|
217
|
+
font-size: 13px !important;
|
|
218
|
+
font-weight: 600;
|
|
219
|
+
color: #374151;
|
|
220
|
+
}
|
|
221
|
+
--isL
|
|
222
|
+
/* Child item (non-leaf) styling - normal size and weight */
|
|
223
|
+
.instance-box-tree .antd-Tree .antd-Tree-item[aria-level="2"]:not(.is-leaf) .instance-menu-label {
|
|
224
|
+
font-size: 13px !important;
|
|
225
|
+
font-weight: 400;
|
|
226
|
+
color: #6b7280;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/* Leaf node styling - darker and larger for prominence */
|
|
230
|
+
.instance-box-tree .antd-Tree .antd-Tree-item--isLeaf .instance-menu-label {
|
|
231
|
+
font-size: 14px !important;
|
|
232
|
+
font-weight: 600 !important;
|
|
233
|
+
color: rgb(71 85 105 / var(--tw-text-opacity, 1)) !important;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/* Override leaf node color when selected */
|
|
237
|
+
.instance-box-tree .antd-Tree .antd-Tree-item--isLeaf .antd-Tree-itemLabel.is-checked .instance-menu-label {
|
|
238
|
+
color: var(--Menu-light-fontColor-onHover, #1e40af) !important;
|
|
239
|
+
font-weight: 600 !important;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Fix alignment and spacing for the custom menu template wrapper */
|
|
243
|
+
.instance-box-tree .antd-Tree-itemText > div {
|
|
244
|
+
padding-top: 0px !important; /* Reduced from 4px to fix "text too low" */
|
|
245
|
+
padding-bottom: 0px !important;
|
|
246
|
+
line-height: 24px; /* Explicit line height to ensure centering */
|
|
247
|
+
display: flex;
|
|
248
|
+
align-items: center;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Ensure the text container takes available width */
|
|
252
|
+
.instance-box-tree .antd-Tree-itemText {
|
|
253
|
+
flex: 1;
|
|
254
|
+
display: flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
position: relative; /* Ensure z-index works if needed */
|
|
257
|
+
z-index: 1;
|
|
258
|
+
min-width: 0; /* Enable truncation */
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* Icon styling */
|
|
262
|
+
.instance-box-tree .antd-Tree-itemIcon{
|
|
263
|
+
color: #6b7280;
|
|
264
|
+
margin-right: 8px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* Arrow styling */
|
|
268
|
+
.instance-box-tree .antd-Tree-itemArrow{
|
|
269
|
+
color: #9ca3af;
|
|
270
|
+
transition: transform 0.2s ease;
|
|
271
|
+
margin-right: 4px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.instance-box-tree .antd-Tree-item.is-expanded > .antd-Tree-itemArrow{
|
|
275
|
+
transform: rotate(90deg);
|
|
124
276
|
}
|
|
125
277
|
|
|
126
278
|
|
|
@@ -360,7 +512,7 @@ tbody .color-priority-muted *{
|
|
|
360
512
|
}
|
|
361
513
|
|
|
362
514
|
.steedos-instance-detail-wrapper{
|
|
363
|
-
height: calc(100vh -
|
|
515
|
+
height: calc(100vh - 101px);
|
|
364
516
|
}
|
|
365
517
|
|
|
366
518
|
.steedos-amis-instance-view-body .antd-Panel-title{
|
|
@@ -372,9 +524,26 @@ tbody .color-priority-muted *{
|
|
|
372
524
|
z-index: 900;
|
|
373
525
|
}
|
|
374
526
|
|
|
527
|
+
/* Sidebar wrapper - no scrolling as parent handles it */
|
|
375
528
|
.instances-sidebar-wrapper{
|
|
376
|
-
overflow-
|
|
377
|
-
|
|
529
|
+
/* Removed overflow and height - parent layer handles scrolling */
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.instances-sidebar-wrapper::-webkit-scrollbar {
|
|
533
|
+
width: 6px;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
.instances-sidebar-wrapper::-webkit-scrollbar-track {
|
|
537
|
+
background: transparent;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.instances-sidebar-wrapper::-webkit-scrollbar-thumb {
|
|
541
|
+
background: #d1d5db;
|
|
542
|
+
border-radius: 3px;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.instances-sidebar-wrapper::-webkit-scrollbar-thumb:hover {
|
|
546
|
+
background: #9ca3af;
|
|
378
547
|
}
|
|
379
548
|
|
|
380
549
|
.steedos-instance-related-view-wrapper{
|
|
@@ -383,6 +552,12 @@ tbody .color-priority-muted *{
|
|
|
383
552
|
}
|
|
384
553
|
}
|
|
385
554
|
|
|
555
|
+
.instance-form pre{
|
|
556
|
+
white-space: pre-wrap; /* 保留空白符,允许换行 */
|
|
557
|
+
word-wrap: break-word; /* 长单词或URL换行 */
|
|
558
|
+
overflow-wrap: break-word; /* 更现代的属性 */
|
|
559
|
+
}
|
|
560
|
+
|
|
386
561
|
|
|
387
562
|
/* 公共打印隐藏样式 */
|
|
388
563
|
@media print {
|
|
@@ -400,4 +575,27 @@ tbody .color-priority-muted *{
|
|
|
400
575
|
.steedos-amis-instance-view-body{
|
|
401
576
|
margin: 20px 0 0 0 !important;
|
|
402
577
|
}
|
|
578
|
+
|
|
579
|
+
a[href]:after {
|
|
580
|
+
content: none !important;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.font-normal{
|
|
584
|
+
border: none !important;
|
|
585
|
+
}
|
|
403
586
|
}
|
|
587
|
+
|
|
588
|
+
/* .steedos-instance-detail-wrapper{
|
|
589
|
+
height: auto !important;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.steedos-amis-instance-view-body{
|
|
593
|
+
height: auto !important;
|
|
594
|
+
}
|
|
595
|
+
.creator-content-wrapper{
|
|
596
|
+
overflow: unset !important;
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
body{
|
|
600
|
+
overflow: auto !important;
|
|
601
|
+
} */
|
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "page",
|
|
3
|
-
"body": [
|
|
4
|
-
{
|
|
5
|
-
"type": "service",
|
|
6
|
-
"className": "h-full",
|
|
7
|
-
"body": [
|
|
8
|
-
{
|
|
9
|
-
"type": "wrapper",
|
|
10
|
-
"size": "none",
|
|
11
|
-
"className": "flex flex-1 overflow-hidden h-full",
|
|
12
|
-
"body": [
|
|
13
|
-
{
|
|
14
|
-
"type": "wrapper",
|
|
15
|
-
"size": "none",
|
|
16
|
-
"className": "instances-sidebar-wrapper flex-shrink-0 min-w-[240px] overflow-y-auto m-0 lg:order-first lg:flex lg:flex-col bg-white border-r",
|
|
17
|
-
"body": [
|
|
18
|
-
{
|
|
19
|
-
"type": "service",
|
|
20
|
-
"className": "bg-none",
|
|
21
|
-
"onEvent": {
|
|
22
|
-
"@data.changed.instance_tasks": {
|
|
23
|
-
"actions": [
|
|
24
|
-
{
|
|
25
|
-
"actionType": "reload"
|
|
26
|
-
}
|
|
27
|
-
]
|
|
28
|
-
}
|
|
29
|
-
},
|
|
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
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"type": "input-tree",
|
|
46
|
-
"name": "tree",
|
|
47
|
-
"treeContainerClassName": "h-full",
|
|
48
|
-
"className": "instance-box-tree h-full w-full p-0",
|
|
49
|
-
"stacked": true,
|
|
50
|
-
"multiple": false,
|
|
51
|
-
"enableNodePath": false,
|
|
52
|
-
"virtualThreshold": 100000,
|
|
53
|
-
"hideRoot": true,
|
|
54
|
-
"showIcon": true,
|
|
55
|
-
"initiallyOpen": false,
|
|
56
|
-
"value": "${value}",
|
|
57
|
-
"size": "md",
|
|
58
|
-
"onEvent": {
|
|
59
|
-
"change": {
|
|
60
|
-
"actions": [
|
|
61
|
-
{
|
|
62
|
-
"actionType": "setValue",
|
|
63
|
-
"componentId": "instance_tasks_list_service",
|
|
64
|
-
"args": {
|
|
65
|
-
"value": {
|
|
66
|
-
"isFlowDataDone": false
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"actionType": "custom",
|
|
72
|
-
"script": "if (window.innerWidth < 768) { document.querySelector('.instances-customPage').classList.remove('instances-sidebar-open'); }\n//获取上一次的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('instance_tasks/grid/')[1];\n//切换流程时清除过滤条件\nif (lastListName == \"inbox\" && listName == \"inbox\" && (flowId != lastFlowId || categoryId != lastCategoryId)) {\n listViewPropsStoreKey = window.location.pathname + \"/crud\";\n sessionStorage.removeItem(listViewPropsStoreKey);\n sessionStorage.removeItem(listViewPropsStoreKey + \"/query\");\n}\n\n"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"actionType": "setValue",
|
|
76
|
-
"args": {
|
|
77
|
-
"value": {
|
|
78
|
-
"additionalFilters": [
|
|
79
|
-
"${event.data.options.name}",
|
|
80
|
-
"=",
|
|
81
|
-
"${event.data.options.value}"
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
"componentId": "instance_tasks_list_service",
|
|
86
|
-
"expression": "${event.data.options.level>=10}"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"args": {
|
|
90
|
-
"link": "${event.data.value}",
|
|
91
|
-
"blank": false
|
|
92
|
-
},
|
|
93
|
-
"actionType": "link"
|
|
94
|
-
}
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"menuTpl": {
|
|
99
|
-
"type": "wrapper",
|
|
100
|
-
"className": "flex flex-row p-0 m-0",
|
|
101
|
-
"body": [
|
|
102
|
-
{
|
|
103
|
-
"type": "tpl",
|
|
104
|
-
"className": "flex-1 w-6/12",
|
|
105
|
-
"tpl": "${label}",
|
|
106
|
-
"id": "u:adf0cfafa63c"
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"type": "tpl",
|
|
110
|
-
"className": "-mx-11 ",
|
|
111
|
-
"tpl": "",
|
|
112
|
-
"badge": {
|
|
113
|
-
"className": "h-0",
|
|
114
|
-
"offset": [
|
|
115
|
-
-20,
|
|
116
|
-
12
|
|
117
|
-
],
|
|
118
|
-
"mode": "text",
|
|
119
|
-
"text": "${tag | toInt}",
|
|
120
|
-
"overflowCount": 999
|
|
121
|
-
},
|
|
122
|
-
"id": "u:ac230c095386"
|
|
123
|
-
}
|
|
124
|
-
],
|
|
125
|
-
"id": "u:74a18fd2df0b"
|
|
126
|
-
},
|
|
127
|
-
"unfoldedLevel": 2,
|
|
128
|
-
"source": "${options}",
|
|
129
|
-
"id": "u:09e092ab054a"
|
|
130
|
-
}
|
|
131
|
-
],
|
|
132
|
-
"api": {
|
|
133
|
-
"method": "get",
|
|
134
|
-
"url": "${context.rootUrl}/api/${appId}/workflow/nav",
|
|
135
|
-
"headers": {
|
|
136
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
137
|
-
},
|
|
138
|
-
"messages": {},
|
|
139
|
-
"adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search); return payload;"
|
|
140
|
-
},
|
|
141
|
-
"messages": {},
|
|
142
|
-
"dsType": "api",
|
|
143
|
-
"id": "u:instanceNav"
|
|
144
|
-
}
|
|
145
|
-
],
|
|
146
|
-
"id": "u:fd659f5c3657",
|
|
147
|
-
"isFixedHeight": false,
|
|
148
|
-
"isFixedWidth": false
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"type": "button",
|
|
152
|
-
"className": "instances-sidebar-overlay",
|
|
153
|
-
"id": "u:773b1d00aab2",
|
|
154
|
-
"visibleOn": "${isMobile}",
|
|
155
|
-
"body": [],
|
|
156
|
-
"onEvent": {
|
|
157
|
-
"click": {
|
|
158
|
-
"actions": [
|
|
159
|
-
{
|
|
160
|
-
"actionType": "custom",
|
|
161
|
-
"script": "document.querySelector('.instances-customPage').classList.toggle('instances-sidebar-open');"
|
|
162
|
-
}
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"type": "wrapper",
|
|
169
|
-
"size": "none",
|
|
170
|
-
"className": "flex-1 focus:outline-none lg:order-last",
|
|
171
|
-
"body": [
|
|
172
|
-
{
|
|
173
|
-
"type": "steedos-object-listview",
|
|
174
|
-
"objectApiName": "instance_tasks",
|
|
175
|
-
"columnsTogglable": false,
|
|
176
|
-
"filterVisible": true,
|
|
177
|
-
"visibleOn": "${!!!flowId}",
|
|
178
|
-
"showHeader": true,
|
|
179
|
-
"id": "u:d29cef0d1007",
|
|
180
|
-
"showDisplayAs": true,
|
|
181
|
-
"className": "h-full w-full instance-tasks-list",
|
|
182
|
-
"hiddenColumnOperation": true,
|
|
183
|
-
"formFactor": "LARGE",
|
|
184
|
-
"headerToolbarItems": [
|
|
185
|
-
{
|
|
186
|
-
"type": "button",
|
|
187
|
-
"label": "",
|
|
188
|
-
"align": "left",
|
|
189
|
-
"icon": "fa fa-bars",
|
|
190
|
-
"className": "bg-white p-2 rounded border-gray-300 text-gray-500",
|
|
191
|
-
"onEvent": {
|
|
192
|
-
"click": {
|
|
193
|
-
"actions": [
|
|
194
|
-
{
|
|
195
|
-
"actionType": "custom",
|
|
196
|
-
"script": "document.querySelector('.instances-customPage').classList.toggle('instances-sidebar-open');"
|
|
197
|
-
}
|
|
198
|
-
]
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
"id": "u:5f2ce9ca2de6"
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
"listName": "inbox",
|
|
205
|
-
"rowClassNameExpr": "<%=(data.is_read === false && (!data.clientIds || data.clientIds.length == 0 || !data.clientIds.includes(data._id))) ? 'unread-instance steedos-record-tr steedos-record-tr-'+data._id : 'steedos-record-tr steedos-record-tr-'+data._id %>",
|
|
206
|
-
"rebuildOn": "\\${flowId || categoryId}",
|
|
207
|
-
"adaptor": "const isSearch = _.some(_.keys(api.body.self), key => key.includes('__keywords') || key.includes('__searchable__'));\nif(payload.data.count==0 && !isSearch){\n const searchParams = new URLSearchParams(window.location.search);\n const flowId = searchParams.get(\"flowId\");\n const categoryId = searchParams.get(\"categoryId\");\n const pathname = window.location.pathname;\n if(flowId || categoryId){\n window.FlowRouter.go(pathname + \"?additionalFilters=&flowId=&categoryId=\");\n }\n // if(flowId) {\n // window.FlowRouter.go(pathname + \"?additionalFilters=['category','=','\" + categoryId +\"']&flowId=&categoryId=\" + categoryId);\n // }else if(categoryId) {\n // window.FlowRouter.go(pathname + \"?additionalFilters=&flowId=&categoryId=\");\n // }\n};\nif (api.body.self.listName == \"inbox\") {\n _.each(payload.data.rows, function (item, index) {\n if (item.type == 'cc') {\n item.instance_name += '(传阅)';\n }\n if (item.instance__expand.values) {\n const form_fields = api.body.self.form_fields;\n _.each(item.instance__expand.values, function (field, field_code) {\n const form_field = _.find(form_fields, { code: field_code });\n if (form_field && form_field.type == \"group\") {\n if (form_field.is_multiselect) {\n item.instance__expand.values[field_code] = field && field.length > 0 ? _.map(field, 'fullname').toString() : \"\";\n } else {\n item.instance__expand.values[field_code] = field ? field.fullname : \"\";\n }\n } else if (form_field && form_field.type == \"user\") {\n if (form_field.is_multiselect) {\n item.instance__expand.values[field_code] = field && field.length > 0 ? _.map(field, 'name').toString() : \"\";\n } else {\n item.instance__expand.values[field_code] = field ? field.name : \"\";\n }\n }\n })\n }\n })\n}\n"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
"type": "service",
|
|
211
|
-
"visibleOn": "${!!flowId && listName == 'inbox'}",
|
|
212
|
-
"schemaApi": {
|
|
213
|
-
"url": "/graphql?flowId=${flowId}&categoryId=${categoryId}",
|
|
214
|
-
"method": "post",
|
|
215
|
-
"data": {
|
|
216
|
-
"query": "{flow: flows__findOne(id:\"${flowId}\"){form__expand{current}}}"
|
|
217
|
-
},
|
|
218
|
-
"adaptor": "const schema = window.SteedosWorkflow.InstanceTask.getListViewSchema(payload.data.flow); return schema;"
|
|
219
|
-
},
|
|
220
|
-
"id": "u:dbe8ed1cab9d",
|
|
221
|
-
"dsType": "api"
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
"id": "u:a3a1e6aa0e2f"
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
"id": "u:e0bc37818327"
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"id": "instance_tasks_list_service",
|
|
231
|
-
"onEvent": {
|
|
232
|
-
"@data.changed.steedos_keyvalues": {
|
|
233
|
-
"actions": [
|
|
234
|
-
{
|
|
235
|
-
"actionType": "broadcast",
|
|
236
|
-
"args": {
|
|
237
|
-
"eventName": "@data.changed.instance_tasks"
|
|
238
|
-
},
|
|
239
|
-
"data": {
|
|
240
|
-
"objectName": "instance_tasks",
|
|
241
|
-
"recordId": "reload"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
},
|
|
247
|
-
"data": {
|
|
248
|
-
"isMobile": "${window:innerWidth <= 768}",
|
|
249
|
-
"isFlowDataDone": false
|
|
250
|
-
},
|
|
251
|
-
"dsType": "api"
|
|
252
|
-
}
|
|
253
|
-
],
|
|
254
|
-
"regions": [
|
|
255
|
-
"body"
|
|
256
|
-
],
|
|
257
|
-
"data": {
|
|
258
|
-
"objectName": "instance_tasks",
|
|
259
|
-
"initialValues": {},
|
|
260
|
-
"title": "",
|
|
261
|
-
"context": {}
|
|
262
|
-
},
|
|
263
|
-
"id": "u:b7167e2fcaf0",
|
|
264
|
-
"name": "page_instances_list",
|
|
265
|
-
"bodyClassName": "p-0",
|
|
266
|
-
"asideResizor": false,
|
|
267
|
-
"pullRefresh": {
|
|
268
|
-
"disabled": true
|
|
269
|
-
},
|
|
270
|
-
"className": {
|
|
271
|
-
"instances-customPage h-full": true,
|
|
272
|
-
"instances-list-mobile": "${window:innerWidth < 768}",
|
|
273
|
-
"instances-list-pc instances-sidebar-open": "${window:innerWidth > 768}"
|
|
274
|
-
},
|
|
275
|
-
"style": {},
|
|
276
|
-
"dsType": "api",
|
|
277
|
-
"css": {
|
|
278
|
-
".instances-customPage.instances-list-mobile .instances-sidebar-wrapper": {
|
|
279
|
-
"z-index": "601",
|
|
280
|
-
"top": "50px",
|
|
281
|
-
"left": "0px",
|
|
282
|
-
"bottom": "0px",
|
|
283
|
-
"position": "fixed",
|
|
284
|
-
"margin": "0px"
|
|
285
|
-
},
|
|
286
|
-
".instances-customPage.instances-list-mobile .instances-sidebar-overlay": {
|
|
287
|
-
"z-index": "600",
|
|
288
|
-
"position": "fixed",
|
|
289
|
-
"bottom": "0px",
|
|
290
|
-
"right": "0px",
|
|
291
|
-
"left": "0px",
|
|
292
|
-
"top": "50px",
|
|
293
|
-
"display": "none"
|
|
294
|
-
},
|
|
295
|
-
".instances-customPage.instances-list-mobile.instances-sidebar-open .instances-sidebar-overlay": {
|
|
296
|
-
"display": "block"
|
|
297
|
-
},
|
|
298
|
-
".instances-customPage .instances-sidebar-wrapper": {
|
|
299
|
-
"transition": "0.5s ease transform",
|
|
300
|
-
"will-change": "transform",
|
|
301
|
-
"transform": "translate(-100%,0)",
|
|
302
|
-
"-webkit-transform": "translate(-100%,0)",
|
|
303
|
-
"-moz-transform": "translate(-100%,0)",
|
|
304
|
-
"-ms-transform": "translate(-100%,0)",
|
|
305
|
-
"-o-transform": "translate(-100%,0)"
|
|
306
|
-
},
|
|
307
|
-
".instances-customPage.instances-sidebar-open .instances-sidebar-wrapper": {
|
|
308
|
-
"transform": "translate(0,0)",
|
|
309
|
-
"-webkit-transform": "translate(0,0)",
|
|
310
|
-
"-moz-transform": "translate(0,0)",
|
|
311
|
-
"-ms-transform": "translate(0,0)",
|
|
312
|
-
"-o-transform": "translate(0,0)"
|
|
313
|
-
},
|
|
314
|
-
".instances-customPage.instances-list-pc .instances-sidebar-wrapper": {
|
|
315
|
-
"min-width": "0px",
|
|
316
|
-
"width": "0px"
|
|
317
|
-
},
|
|
318
|
-
".instances-customPage.instances-list-pc.instances-sidebar-open .instances-sidebar-wrapper": {
|
|
319
|
-
"min-width": "240px"
|
|
320
|
-
}
|
|
321
|
-
},
|
|
322
|
-
"themeCss": {
|
|
323
|
-
"baseControlClassName": {
|
|
324
|
-
"padding-and-margin:default": {
|
|
325
|
-
"padding": "${displayAs == 'grid'?'':'0px'}"
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
"title": "Welcome to Steedos"
|
|
330
|
-
}
|