@steedos-labs/plugin-workflow 3.0.0-beta.8 → 3.0.0

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.
Files changed (72) hide show
  1. package/main/default/client/instance.client.js +6 -6
  2. package/main/default/client/object_workflows.client.js +8 -7
  3. package/main/default/manager/import.js +17 -1
  4. package/main/default/manager/push_manager.js +20 -12
  5. package/main/default/manager/uuflowManagerForInitApproval.js +794 -0
  6. package/main/default/manager/uuflow_manager.js +53 -4
  7. package/main/default/manager/workflow_manager.js +1 -1
  8. package/main/default/methods/trace_approve_cc.js +568 -0
  9. package/main/default/objectTranslations/flows.en/flows.en.objectTranslation.yml +19 -0
  10. package/main/default/objectTranslations/flows.zh-CN/flows.zh-CN.objectTranslation.yml +19 -0
  11. package/main/default/objectTranslations/instance_tasks.en/instance_tasks.en.objectTranslation.yml +211 -0
  12. package/main/default/objectTranslations/instance_tasks.zh-CN/instance_tasks.zh-CN.objectTranslation.yml +211 -0
  13. package/main/default/objectTranslations/instances.en/instances.en.objectTranslation.yml +212 -0
  14. package/main/default/objectTranslations/instances.zh-CN/instances.zh-CN.objectTranslation.yml +209 -0
  15. package/main/default/objects/categories.object.yml +1 -0
  16. package/main/default/objects/flows/buttons/del.button.yml +7 -10
  17. package/main/default/objects/flows/buttons/design_form_layout.button.js +5 -2
  18. package/main/default/objects/flows/buttons/distributeAdmin.button.yml +5 -5
  19. package/main/default/objects/flows/buttons/newexport.button.yml +1 -1
  20. package/main/default/objects/flows/buttons/newimport.button.yml +2 -1
  21. package/main/default/objects/flows/flows.object.yml +12 -4
  22. package/main/default/objects/forms/forms.object.yml +39 -0
  23. package/main/default/objects/instance_tasks/buttons/instance_new.button.yml +3 -5
  24. package/main/default/objects/instances/buttons/instance_cc.button.yml +7 -7
  25. package/main/default/objects/instances/buttons/instance_delete.button.yml +2 -2
  26. package/main/default/objects/instances/buttons/instance_delete_many.button.yml +6 -6
  27. package/main/default/objects/instances/buttons/instance_distribute.button.yml +14 -13
  28. package/main/default/objects/instances/buttons/instance_flow_chart.button.yml +1 -1
  29. package/main/default/objects/instances/buttons/instance_forward.button.yml +8 -8
  30. package/main/default/objects/instances/buttons/instance_new.button.yml +3 -5
  31. package/main/default/objects/instances/buttons/instance_reassign.button.yml +1 -16
  32. package/main/default/objects/instances/buttons/instance_related.button.yml +4 -4
  33. package/main/default/objects/instances/buttons/instance_relocate.button.yml +9 -12
  34. package/main/default/objects/instances/buttons/instance_retrieve.button.yml +106 -2
  35. package/main/default/objects/instances/buttons/instance_save.button.yml +3 -9
  36. package/main/default/objects/instances/buttons/instance_submit.button.yml +1 -1
  37. package/main/default/objects/instances/buttons/instance_terminate.button.yml +7 -10
  38. package/main/default/objects/instances/listviews/monitor.listview.yml +0 -1
  39. package/main/default/pages/flowdetail.page.amis.json +9 -9
  40. package/main/default/pages/instance_detail.page.amis.json +3 -3
  41. package/main/default/pages/instance_tasks_detail.page.amis.json +3 -3
  42. package/main/default/pages/instance_tasks_list.page.amis.json +147 -110
  43. package/main/default/pages/instances_list.page.amis.json +146 -110
  44. package/main/default/routes/am.router.js +49 -2
  45. package/main/default/routes/api_cc.router.js +5 -12
  46. package/main/default/routes/api_flow_permission.router.js +7 -2
  47. package/main/default/routes/api_get_object_workflows.router.js +79 -22
  48. package/main/default/routes/api_object_workflow_drafts.router.js +18 -19
  49. package/main/default/routes/api_workflow_chart.router.js +682 -0
  50. package/main/default/routes/api_workflow_engine.router.js +1 -1
  51. package/main/default/routes/api_workflow_instance_return.router.js +164 -167
  52. package/main/default/routes/api_workflow_next_step_users.router.js +13 -8
  53. package/main/default/routes/api_workflow_reassign.router.js +200 -196
  54. package/main/default/routes/api_workflow_relocate.router.js +2 -2
  55. package/main/default/routes/api_workflow_retrieve.router.js +246 -237
  56. package/main/default/routes/export.router.js +5 -4
  57. package/main/default/routes/flow_form_design.ejs +33 -8
  58. package/main/default/routes/flow_form_design.router.js +4 -3
  59. package/main/default/routes/import.router.js +6 -7
  60. package/main/default/services/flows.service.js +1 -1
  61. package/main/default/translations/en.translation.yml +5 -0
  62. package/main/default/translations/zh-CN.translation.yml +2 -1
  63. package/main/default/triggers/amis_form_design.trigger.js +27 -5
  64. package/main/default/triggers/instances.trigger.js +9 -7
  65. package/main/default/utils/designerManager.js +12 -5
  66. package/package.json +4 -4
  67. package/package.service.js +21 -7
  68. package/public/workflow/index.css +4 -0
  69. package/src/instance_record_queue.js +1 -3
  70. package/src/rests/api_workflow_instance_batch_remove.js +4 -3
  71. package/src/webhook_queue.js +283 -0
  72. package/main/default/manager/index.js +0 -23
@@ -72,7 +72,7 @@
72
72
  "actionType": "dialog",
73
73
  "dialog": {
74
74
  "type": "dialog",
75
- "title": "编辑表单",
75
+ "title": "${'flows_page_record_action_edit_dialog_title' | t}",
76
76
  "body": [
77
77
  {
78
78
  "type": "form",
@@ -80,13 +80,13 @@
80
80
  "body": [
81
81
  {
82
82
  "type": "input-text",
83
- "label": "表单名称",
83
+ "label": "${'flows_page_record_field_form_name' | t}",
84
84
  "name": "name",
85
85
  "id": "u:84af37d53da42"
86
86
  },
87
87
  {
88
88
  "type": "textarea",
89
- "label": "表单描述",
89
+ "label": "${'flows_page_record_field_form_description' | t}",
90
90
  "name": "description",
91
91
  "id": "u:84af37d53da4",
92
92
  "minRows": 3,
@@ -94,7 +94,7 @@
94
94
  },
95
95
  {
96
96
  "type": "textarea",
97
- "label": "标题公式",
97
+ "label": "${'flows_page_record_field_form_name_forumla' | t}",
98
98
  "name": "name_forumla",
99
99
  "id": "u:69b6536e9fd8",
100
100
  "minRows": 3,
@@ -102,7 +102,7 @@
102
102
  },
103
103
  {
104
104
  "type": "editor",
105
- "label": "表单脚本",
105
+ "label": "${'flows_page_record_field_form_script' | t}",
106
106
  "name": "form_script",
107
107
  "id": "u:025f8c4f09b6",
108
108
  "minRows": 3,
@@ -163,13 +163,13 @@
163
163
  "body": [
164
164
  {
165
165
  "type": "input-text",
166
- "label": "表单名称",
166
+ "label": "${'flows_page_record_field_form_name' | t}",
167
167
  "name": "name",
168
168
  "id": "u:84af37d53da42"
169
169
  },
170
170
  {
171
171
  "type": "textarea",
172
- "label": "表单描述",
172
+ "label": "${'flows_page_record_field_form_description' | t}",
173
173
  "name": "description",
174
174
  "id": "u:84af37d53da4",
175
175
  "minRows": 3,
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "type": "textarea",
180
- "label": "标题公式",
180
+ "label": "${'flows_page_record_field_form_name_forumla' | t}",
181
181
  "name": "name_forumla",
182
182
  "id": "u:69b6536e9fd8",
183
183
  "minRows": 3,
@@ -185,7 +185,7 @@
185
185
  },
186
186
  {
187
187
  "type": "editor",
188
- "label": "表单脚本",
188
+ "label": "${'flows_page_record_field_form_script' | t}",
189
189
  "name": "form_script",
190
190
  "id": "u:025f8c4f09b6",
191
191
  "minRows": 3,
@@ -3,7 +3,7 @@
3
3
  "body": [{
4
4
  "type": "wrapper",
5
5
  "visibleOn": "${AND(display != 'split', ${window:innerWidth > 768},!!!_inDrawer)}",
6
- "className": "bg-white m-0 p-0 flex-shrink-0 min-w-[240px] lg:order-first lg:flex lg:flex-col border-r border-gray-300",
6
+ "className": "bg-white p-0 flex-shrink-0 min-w-[240px] lg:order-first lg:flex lg:flex-col rounded shadow my-4 ml-4 mr-1 my-4 sm:rounded",
7
7
  "body": [{
8
8
  "type": "service",
9
9
  "className": "w-full h-full",
@@ -18,7 +18,7 @@
18
18
  "type": "input-tree",
19
19
  "treeContainerClassName": "h-full",
20
20
  "name": "tree",
21
- "className": "instance-box-tree bg-white w-full",
21
+ "className": "instance-box-tree w-full",
22
22
  "id": "u:9f3dd961ca12",
23
23
  "stacked": true,
24
24
  "multiple": false,
@@ -87,7 +87,7 @@
87
87
  },
88
88
  {
89
89
  "type": "wrapper",
90
- "className": "steedos-instance-detail-wrapper m-0 p-0 flex-1 focus:outline-none lg:order-last sm:pt-3 sm:px-3",
90
+ "className": "steedos-instance-detail-wrapper m-0 p-0 flex-1 focus:outline-none lg:order-last sm:m-4 shadow sm:rounded",
91
91
  "body": [{
92
92
  "type": "service",
93
93
  "id": "u:d6db0c84f150",
@@ -4,7 +4,7 @@
4
4
  {
5
5
  "type": "wrapper",
6
6
  "visibleOn": "${AND(display != 'split', ${window:innerWidth > 768})}",
7
- "className": "bg-white m-0 p-0 flex-shrink-0 min-w-[240px] lg:order-first lg:flex lg:flex-col border-r border-gray-300",
7
+ "className": "bg-white p-0 flex-shrink-0 min-w-[240px] lg:order-first lg:flex lg:flex-col rounded shadow my-4 ml-4 mr-1 my-4 sm:rounded",
8
8
  "body": [
9
9
  {
10
10
  "type": "service",
@@ -23,7 +23,7 @@
23
23
  "type": "input-tree",
24
24
  "treeContainerClassName": "h-full",
25
25
  "name": "tree",
26
- "className": "instance-box-tree bg-white w-full",
26
+ "className": "instance-box-tree w-full",
27
27
  "id": "u:9f3dd961ca12",
28
28
  "stacked": true,
29
29
  "multiple": false,
@@ -90,7 +90,7 @@
90
90
  },
91
91
  {
92
92
  "type": "wrapper",
93
- "className": "steedos-instance-detail-wrapper m-0 p-0 flex-1 focus:outline-none lg:order-last sm:pt-3 sm:px-3",
93
+ "className": "steedos-instance-detail-wrapper m-0 p-0 flex-1 focus:outline-none lg:order-last sm:m-4 shadow sm:rounded",
94
94
  "body": [
95
95
  {
96
96
  "type": "service",
@@ -1,77 +1,23 @@
1
1
  {
2
2
  "type": "page",
3
- "title": "Welcome to Steedos",
4
3
  "body": [
5
4
  {
6
5
  "type": "service",
7
- "id": "instance_tasks_list_service",
8
- "className": "h-full w-full p-0 m-0",
9
- "pageGridClassName": "h-full m-0",
6
+ "className": "h-full",
10
7
  "body": [
11
8
  {
12
- "type": "steedos-object-listview",
13
- "objectApiName": "instance_tasks",
14
- "columnsTogglable": false,
15
- "filterVisible": true,
16
- "visibleOn": "${!!!flowId}",
17
- "showHeader": true,
18
- "id": "u:d29cef0d1007",
19
- "showDisplayAs": true,
20
- "className": "h-full w-full bg-white instance-tasks-list",
21
- "hiddenColumnOperation": true,
22
- "formFactor": "LARGE",
23
- "headerToolbarItems": [
24
- {
25
- "type": "button",
26
- "label": "",
27
- "icon": "fa fa-bars",
28
- "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
29
- "align": "right",
30
- "onEvent": {
31
- "click": {
32
- "actions": [
33
- {
34
- "actionType": "custom",
35
- "script": "console.log(event.target);document.querySelector('.instances-customPage').classList.toggle('instances-sidebar-open');if(window.innerWidth < 768){document.querySelector('.isInset').classList.toggle('inset-0')}"
36
- }
37
- ]
38
- }
39
- },
40
- "id": "u:115e270cae4d"
41
- }
42
- ],
43
- "listName": "inbox",
44
- "rowClassNameExpr": "<%=(data.is_read === false && (!data.clientIds || data.clientIds.length == 0 || !data.clientIds.includes(data._id))) ? 'unread-instance' : '' %>",
45
- "rebuildOn": "\\${flowId || categoryId}",
46
- "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"
47
- },
48
- {
49
- "type": "service",
50
- "visibleOn": "${!!flowId}",
51
- "schemaApi": {
52
- "url": "/graphql?flowId=${flowId}&categoryId=${categoryId}",
53
- "method": "post",
54
- "data": {
55
- "query": "{flow: flows__findOne(id:\"${flowId}\"){form__expand{current}}}"
56
- },
57
- "adaptor": "const schema = window.SteedosWorkflow.InstanceTask.getListViewSchema(payload.data.flow); return schema;"
58
- }
59
- },
60
- {
61
- "type": "action",
9
+ "type": "wrapper",
10
+ "size": "none",
11
+ "className": "flex flex-1 overflow-hidden h-full",
62
12
  "body": [
63
13
  {
64
- "type": "action",
65
- "className": {
66
- "mobileCss": "${window:innerWidth < 768}",
67
- "pcCss": "${window:innerWidth > 768}",
68
- "instances-sidebar-wrapper px-0 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col overflow-y-auto bg-white block -translate-x-0 py-0": "true"
69
- },
14
+ "type": "wrapper",
15
+ "size": "none",
16
+ "className": "instances-sidebar-wrapper flex-shrink-0 min-w-[240px] overflow-y-auto sm:rounded shadow bg-white my-4 ml-4 mr-1 lg:order-first lg:flex lg:flex-col ",
70
17
  "body": [
71
18
  {
72
19
  "type": "service",
73
- "id": "u:aa4f4dc5f439",
74
- "className": "w-full h-full border-r",
20
+ "className": "bg-none",
75
21
  "onEvent": {
76
22
  "@data.changed.instance_tasks": {
77
23
  "actions": [
@@ -87,14 +33,13 @@
87
33
  "name": "tree",
88
34
  "treeContainerClassName": "h-full",
89
35
  "className": "instance-box-tree bg-white h-full w-full p-0",
90
- "id": "u:9f3dd961ca12",
91
36
  "stacked": true,
92
37
  "multiple": false,
93
38
  "enableNodePath": false,
94
39
  "hideRoot": true,
95
40
  "showIcon": true,
96
41
  "initiallyOpen": false,
97
- "value": "${CONCATENATE('/app/', appId, '/', objectName, '/grid/', listViewId, '?additionalFilters=', additionalFilters,'&flowId=',flowId,'&categoryId=',categoryId)}",
42
+ "value": "${value}",
98
43
  "size": "md",
99
44
  "onEvent": {
100
45
  "change": {
@@ -110,7 +55,7 @@
110
55
  },
111
56
  {
112
57
  "actionType": "custom",
113
- "script": "if (window.innerWidth < 768) { document.querySelector('.instances-customPage').classList.remove('instances-sidebar-open'); document.querySelector('.isInset').classList.remove('inset-0') }\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"
58
+ "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"
114
59
  },
115
60
  {
116
61
  "actionType": "setValue",
@@ -166,7 +111,8 @@
166
111
  "id": "u:74a18fd2df0b"
167
112
  },
168
113
  "unfoldedLevel": 2,
169
- "source": "${options}"
114
+ "source": "${options}",
115
+ "id": "u:09e092ab054a"
170
116
  }
171
117
  ],
172
118
  "api": {
@@ -175,33 +121,100 @@
175
121
  "headers": {
176
122
  "Authorization": "Bearer ${context.tenantId},${context.authToken}"
177
123
  },
178
- "messages": {
179
- },
180
- "trackExpression": "${_reloadKey}"
124
+ "messages": {},
125
+ "trackExpression": "${_reloadKey}",
126
+ "adaptor": "payload.data.value = window.location.pathname + decodeURIComponent(window.location.search); return payload;"
181
127
  },
182
- "messages": {
183
- }
128
+ "messages": {},
129
+ "dsType": "api",
130
+ "id": "u:b22ab9089a5e"
184
131
  }
185
132
  ],
186
- "id": "u:5d1f5d7c38d2"
187
- }
188
- ],
189
- "onEvent": {
190
- "click": {
191
- "actions": [
133
+ "id": "u:fd659f5c3657",
134
+ "isFixedHeight": false,
135
+ "isFixedWidth": false
136
+ },
137
+ {
138
+ "type": "button",
139
+ "className": "instances-sidebar-overlay",
140
+ "id": "u:773b1d00aab2",
141
+ "visibleOn": "${isMobile}",
142
+ "body": [],
143
+ "onEvent": {
144
+ "click": {
145
+ "actions": [
146
+ {
147
+ "actionType": "custom",
148
+ "script": "document.querySelector('.instances-customPage').classList.toggle('instances-sidebar-open');"
149
+ }
150
+ ]
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "type": "wrapper",
156
+ "size": "none",
157
+ "className": "flex-1 focus:outline-none lg:order-last w-96",
158
+ "body": [
159
+ {
160
+ "type": "steedos-object-listview",
161
+ "objectApiName": "instance_tasks",
162
+ "columnsTogglable": false,
163
+ "filterVisible": true,
164
+ "visibleOn": "${!!!flowId}",
165
+ "showHeader": true,
166
+ "id": "u:d29cef0d1007",
167
+ "showDisplayAs": true,
168
+ "className": "h-full w-full instance-tasks-list",
169
+ "hiddenColumnOperation": true,
170
+ "formFactor": "LARGE",
171
+ "headerToolbarItems": [
172
+ {
173
+ "type": "button",
174
+ "label": "",
175
+ "align": "left",
176
+ "icon": "fa fa-bars",
177
+ "className": "bg-white p-2 rounded border-gray-300 text-gray-500",
178
+ "onEvent": {
179
+ "click": {
180
+ "actions": [
181
+ {
182
+ "actionType": "custom",
183
+ "script": "document.querySelector('.instances-customPage').classList.toggle('instances-sidebar-open');"
184
+ }
185
+ ]
186
+ }
187
+ },
188
+ "id": "u:5f2ce9ca2de6"
189
+ }
190
+ ],
191
+ "listName": "inbox",
192
+ "rowClassNameExpr": "<%=(data.is_read === false && (!data.clientIds || data.clientIds.length == 0 || !data.clientIds.includes(data._id))) ? 'unread-instance' : '' %>",
193
+ "rebuildOn": "\\${flowId || categoryId}",
194
+ "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"
195
+ },
192
196
  {
193
- "actionType": "custom",
194
- "script": "if(window.innerWidth < 768){document.querySelector('.instances-customPage').classList.remove('instances-sidebar-open');document.querySelector('.isInset').classList.remove('inset-0') }"
197
+ "type": "service",
198
+ "visibleOn": "${!!flowId && listName == 'inbox'}",
199
+ "schemaApi": {
200
+ "url": "/graphql?flowId=${flowId}&categoryId=${categoryId}",
201
+ "method": "post",
202
+ "data": {
203
+ "query": "{flow: flows__findOne(id:\"${flowId}\"){form__expand{current}}}"
204
+ },
205
+ "adaptor": "const schema = window.SteedosWorkflow.InstanceTask.getListViewSchema(payload.data.flow); return schema;"
206
+ },
207
+ "id": "u:dbe8ed1cab9d",
208
+ "dsType": "api"
195
209
  }
196
- ]
210
+ ],
211
+ "id": "u:a3a1e6aa0e2f"
197
212
  }
198
- },
199
- "className": {
200
- "absolute isInset": "true"
201
- },
202
- "id": "u:c8fc09ce5d6b"
213
+ ],
214
+ "id": "u:e0bc37818327"
203
215
  }
204
216
  ],
217
+ "id": "instance_tasks_list_service",
205
218
  "onEvent": {
206
219
  "@data.changed.steedos_keyvalues": {
207
220
  "actions": [
@@ -219,8 +232,10 @@
219
232
  }
220
233
  },
221
234
  "data": {
235
+ "isMobile": "${window:innerWidth <= 768}",
222
236
  "isFlowDataDone": false
223
- }
237
+ },
238
+ "dsType": "api"
224
239
  }
225
240
  ],
226
241
  "regions": [
@@ -229,30 +244,52 @@
229
244
  "data": {
230
245
  "objectName": "instance_tasks",
231
246
  "initialValues": {},
232
- "title": ""
247
+ "title": "",
248
+ "context": {}
233
249
  },
234
- "id": "u:7e20ab64163e",
250
+ "id": "u:b7167e2fcaf0",
251
+ "name": "page_instances_list",
252
+ "bodyClassName": "p-0",
235
253
  "asideResizor": false,
236
254
  "pullRefresh": {
237
255
  "disabled": true
238
256
  },
239
- "bodyClassName": {
240
- "p-0 instances-customPage instances-sidebar": "true",
241
- "pc instances-sidebar-open instances-minwidth": "${window:innerWidth > 768}"
257
+ "className": {
258
+ "instances-customPage h-full": true,
259
+ "instances-list-mobile": "${window:innerWidth < 768}",
260
+ "instances-list-pc instances-sidebar-open": "${window:innerWidth > 768}"
242
261
  },
262
+ "style": {},
263
+ "dsType": "api",
243
264
  "css": {
244
- ".instances-customPage.instances-sidebar.instances-sidebar-open.pc": {
245
- "margin-left": "240px"
265
+ ".instances-customPage.instances-list-mobile .instances-sidebar-wrapper": {
266
+ "z-index": "601",
267
+ "top": "50px",
268
+ "left": "0px",
269
+ "bottom": "0px",
270
+ "position": "fixed",
271
+ "margin": "0px"
272
+ },
273
+ ".instances-customPage.instances-list-mobile .instances-sidebar-overlay": {
274
+ "z-index": "600",
275
+ "position": "fixed",
276
+ "bottom": "0px",
277
+ "right": "0px",
278
+ "left": "0px",
279
+ "top": "50px",
280
+ "display": "none"
281
+ },
282
+ ".instances-customPage.instances-list-mobile.instances-sidebar-open .instances-sidebar-overlay": {
283
+ "display": "block"
246
284
  },
247
- ".instances-sidebar-wrapper": {
285
+ ".instances-customPage .instances-sidebar-wrapper": {
248
286
  "transition": "0.5s ease transform",
249
287
  "will-change": "transform",
250
288
  "transform": "translate(-100%,0)",
251
289
  "-webkit-transform": "translate(-100%,0)",
252
290
  "-moz-transform": "translate(-100%,0)",
253
291
  "-ms-transform": "translate(-100%,0)",
254
- "-o-transform": "translate(-100%,0)",
255
- "width": "240px"
292
+ "-o-transform": "translate(-100%,0)"
256
293
  },
257
294
  ".instances-customPage.instances-sidebar-open .instances-sidebar-wrapper": {
258
295
  "transform": "translate(0,0)",
@@ -261,20 +298,20 @@
261
298
  "-ms-transform": "translate(0,0)",
262
299
  "-o-transform": "translate(0,0)"
263
300
  },
264
- ".pcCss": {
265
- "top": "90px",
266
- "left": "0px"
301
+ ".instances-customPage.instances-list-pc .instances-sidebar-wrapper": {
302
+ "min-width": "0px",
303
+ "width": "0px"
267
304
  },
268
- ".sidebar .pcCss": {
269
- "left": "220px"
270
- },
271
- ".mobileCss": {
272
- "top": "50px",
273
- "left": "0px",
274
- "padding-bottom": "65px"
275
- },
276
- ".instances-minwidth": {
277
- "min-width": "388px"
305
+ ".instances-customPage.instances-list-pc.instances-sidebar-open .instances-sidebar-wrapper": {
306
+ "min-width": "240px"
278
307
  }
279
- }
308
+ },
309
+ "themeCss": {
310
+ "baseControlClassName": {
311
+ "padding-and-margin:default": {
312
+ "padding": "${displayAs == 'grid'?'':'0px'}"
313
+ }
314
+ }
315
+ },
316
+ "title": "Welcome to Steedos"
280
317
  }