Skip to content

Commit

Permalink
[Bug]: 流程在关联文件时,列表显示的字段需作调整 #5918
Browse files Browse the repository at this point in the history
  • Loading branch information
tujiajun committed Dec 7, 2023
1 parent 6fc0805 commit 9efc132
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ amis_schema: |-
{
"type": "form",
"data": {
"initApiFinished": false
"initApiFinished": false,
"appId": "${app_id}"
},
"body": [
{
Expand All @@ -44,7 +45,7 @@ amis_schema: |-
"source": {
"method": "post",
"url": "${context.rootUrl}/graphql",
"requestAdaptor": "debugger; var searchableFilter = SteedosUI.getSearchFilter(api.data.$self) || []; const { pageNo, pageSize, keywords = '' } = api.data;\nvar keywordsFilters = SteedosUI.getKeywordsSearchFilter(api.data.$self.__keywords_lookup, [\"name\", \"flow\",\"submitter\"]);\nif (keywordsFilters && keywordsFilters.length > 0) {\n searchableFilter.push(keywordsFilters);\n}\nconsole.log(\"===\", JSON.stringify(api.data));\napi.data = {\n query: `\n query{\n rows: instances__getRelatedInstances(keywords: \"${keywords}\", top: ${pageSize || 20}, skip: ${(pageNo - 1) * pageSize}, filters: ${JSON.stringify(searchableFilter)}){\n _id,\n name,\n flow,\n form,\n submit_date,\n submitter\n _display:_ui{\n flow,\n form,\n submit_date,\n submitter\n }\n },\n count: instances__getRelatedInstances__count(filters: ${JSON.stringify(searchableFilter)}, keywords: \"${keywords}\")\n }\n `\n};\nreturn api;",
"requestAdaptor": "var searchableFilter = SteedosUI.getSearchFilter(api.data.$self) || []; const { pageNo, pageSize, keywords = '' } = api.data;\nvar keywordsFilters = SteedosUI.getKeywordsSearchFilter(api.data.$self.__keywords_lookup, [\"name\", \"flow_name\",\"submitter\"]);\nif (keywordsFilters && keywordsFilters.length > 0) {\n searchableFilter.push(keywordsFilters);\n}\nconsole.log(\"===\", JSON.stringify(api.data));\napi.data = {\n query: `\n query{\n rows: instances__getRelatedInstances(keywords: \"${keywords}\", top: ${pageSize || 20}, skip: ${(pageNo - 1) * pageSize}, filters: ${JSON.stringify(searchableFilter)}){\n _id,\n name,\n flow_name,\n submit_date,\n submitter\n _display:_ui{\n submit_date,\n submitter\n }\n },\n count: instances__getRelatedInstances__count(filters: ${JSON.stringify(searchableFilter)}, keywords: \"${keywords}\")\n }\n `\n};\nreturn api;",
"headers": {
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: lookup
label: lookup
columns:
- name
- flow_name
- submitter
- submit_date
filter_scope: space
filters: !!js/function |
function(filters, data){
console.log('draft ===filters ===> ',data, `/api/workflow/v2/\${data.listName}/filter?app=\${data.appId}`);
var result = Steedos.authRequest(`/api/workflow/v2/\${data.listName}/filter?app=\${data.appId}`, {
type: 'get', async: false
});
return result.filter;
}
sort: [['modified','desc']]
searchable_fields:
- field: name
- field: submitter
- field: flow_name
- field: submit_date

0 comments on commit 9efc132

Please sign in to comment.