Skip to content

Commit

Permalink
fix: [Bug]: 审批任务,点击行,不需要自动选中记录 #5499
Browse files Browse the repository at this point in the history
  • Loading branch information
baozhoutao committed Sep 25, 2023
1 parent 38b002a commit f6b3015
Showing 1 changed file with 1 addition and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,7 @@
"listName": "inbox",
"rowClassNameExpr": "<%=(data.is_read === false && (!data.clientIds || data.clientIds.length == 0 || !data.clientIds.includes(data._id))) ? 'unread-instance' : '' %>",
"rebuildOn": "\\${flowId || categoryId}",
"crudDataFilter": "if (data && data.flowId && (data.listName == 'inbox' || 'monitor') && window.innerWidth > 768) {\r\n var api = {\r\n url: \"${context.rootUrl}/graphql\",\r\n method: \"post\",\r\n dataType: \"json\",\r\n data: {\r\n \"query\": '{flow: flows__findOne(id:\"' + data.flowId + '\"){form__expand{current}}}'\r\n },\r\n headers: {\r\n Authorization:\r\n \"Bearer ${context.tenantId},${context.authToken}\",\r\n },\r\n };\r\n return env.fetcher(api).then((result) => {\r\n if (result.data && result.data.flow && result.data.flow.form__expand.current.fields && result.data.flow.form__expand.current.fields.length > 0) {\r\n let fields = result.data.flow.form__expand.current.fields;\r\n fields.forEach(function (field) {\r\n if (field.is_list_display) {\r\n crud.columns.push({\r\n \"name\": \"instance__expand.values.\" + field.code,\r\n \"label\": field.name || field.code,\r\n \"width\": \"unset\",\r\n \"type\": \"text\",\r\n \"className\": \" whitespace-nowrap\",\r\n \"static\": true,\r\n \"options\": null\r\n });\r\n }\r\n })\r\n let schemaApiService = SteedosUI.getRef('steedosPageObjectControl').parent.getComponentById(\"instance_tasks_list_service\");\r\n schemaApiService && schemaApiService.setData({ form_fields: fields, isFlowDataDone: true });\r\n crud.api.sendOn = \"this.isFlowDataDone\";\r\n }\r\n return crud;\r\n });\r\n} else {\r\n let schemaApiService = SteedosUI.getRef('steedosPageObjectControl').parent.getComponentById(\"instance_tasks_list_service\");\r\n schemaApiService && schemaApiService.setData({ isFlowDataDone: true });\r\n crud.api.sendOn = \"this.isFlowDataDone\";\r\n return crud;\r\n}\r\n",
"crud": {
"onEvent": {
"rowClick": {
"actions": [
{
"actionType": "custom",
"script": "const clientIds = event.data.clientIds || []; clientIds.push(event.data.item._id);doAction({actionType: 'setValue', componentId: 'service_listview_instance_tasks', args: {value: {clientIds: clientIds}}})"
}
]
}
},
"id": "u:af8bd61b2b28"
}
"crudDataFilter": "if (data && data.flowId && (data.listName == 'inbox' || 'monitor') && window.innerWidth > 768) {\r\n var api = {\r\n url: \"${context.rootUrl}/graphql\",\r\n method: \"post\",\r\n dataType: \"json\",\r\n data: {\r\n \"query\": '{flow: flows__findOne(id:\"' + data.flowId + '\"){form__expand{current}}}'\r\n },\r\n headers: {\r\n Authorization:\r\n \"Bearer ${context.tenantId},${context.authToken}\",\r\n },\r\n };\r\n return env.fetcher(api).then((result) => {\r\n if (result.data && result.data.flow && result.data.flow.form__expand.current.fields && result.data.flow.form__expand.current.fields.length > 0) {\r\n let fields = result.data.flow.form__expand.current.fields;\r\n fields.forEach(function (field) {\r\n if (field.is_list_display) {\r\n crud.columns.push({\r\n \"name\": \"instance__expand.values.\" + field.code,\r\n \"label\": field.name || field.code,\r\n \"width\": \"unset\",\r\n \"type\": \"text\",\r\n \"className\": \" whitespace-nowrap\",\r\n \"static\": true,\r\n \"options\": null\r\n });\r\n }\r\n })\r\n let schemaApiService = SteedosUI.getRef('steedosPageObjectControl').parent.getComponentById(\"instance_tasks_list_service\");\r\n schemaApiService && schemaApiService.setData({ form_fields: fields, isFlowDataDone: true });\r\n crud.api.sendOn = \"this.isFlowDataDone\";\r\n }\r\n return crud;\r\n });\r\n} else {\r\n let schemaApiService = SteedosUI.getRef('steedosPageObjectControl').parent.getComponentById(\"instance_tasks_list_service\");\r\n schemaApiService && schemaApiService.setData({ isFlowDataDone: true });\r\n crud.api.sendOn = \"this.isFlowDataDone\"; if(data.display == 'split'){Object.assign(crud, {\"onEvent\":{\"rowClick\":{\"actions\":[{\"actionType\":\"custom\",\"script\":\"const clientIds = event.data.clientIds || []; clientIds.push(event.data.item._id);doAction({actionType: 'setValue', componentId: 'service_listview_instance_tasks', args: {value: {clientIds: clientIds}}})\"}]}},\"id\":\"u:af8bd61b2b28\"});} ; \r\n return crud;\r\n}\r\n"
},
{
"type": "action",
Expand Down

0 comments on commit f6b3015

Please sign in to comment.