@steedos-labs/plugin-workflow 3.0.12 → 3.0.13

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.
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  .instance-box-tree .antd-TreeControl{
54
- padding: 15px 0;
54
+ padding: 0;
55
55
  }
56
56
  /* .instance-box-tree .antd-TreeControl{
57
57
  padding: 0;
@@ -372,10 +372,10 @@ tbody .color-priority-muted *{
372
372
  z-index: 900;
373
373
  }
374
374
 
375
- .instances-sidebar-wrapper{
375
+ /* .instances-sidebar-wrapper{
376
376
  overflow-y: auto;
377
377
  height: calc(100vh - 50px);
378
- }
378
+ } */
379
379
 
380
380
  .steedos-instance-related-view-wrapper{
381
381
  .antd-Page-header{
@@ -400,4 +400,12 @@ tbody .color-priority-muted *{
400
400
  .steedos-amis-instance-view-body{
401
401
  margin: 20px 0 0 0 !important;
402
402
  }
403
- }
403
+
404
+ a[href]:after {
405
+ content: none !important;
406
+ }
407
+
408
+ .font-normal{
409
+ border: none !important;
410
+ }
411
+ }
@@ -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
- }
@@ -1,12 +0,0 @@
1
- name: instance_tasks_list
2
- is_active: true
3
- label: 审批任务列表
4
- object_name: instance_tasks
5
- pageAssignments:
6
- - type: orgDefault
7
- page: instance_tasks_list
8
- desktop: true
9
- mobile: true
10
- render_engine: amis
11
- type: list
12
- widgets: []