Object List
# FxObjectDetailMultiTable Component
Displays data lists from related objects.
# Attributes
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| apiName | Business main object API name (required) | String | — | - |
| dataId | Business main object data ID | String | — | - |
| compInfo | Component description information | Object | — | - |
| beforeFetch | Hook function before fetching related object data | Function | — | - |
# compInfo
| Parameter | Description | Type | Optional Values | Default |
|---|---|---|---|---|
| field_api_name | Association field name | String | — | - |
| header | Header text | String | Related object title | - |
| ref_object_api_name | Child object API name | String | — | - |
| related_list_name | Related list name | String | — | - |
This parameter can first configure a related object list, then copy the data through the view interface.
# Basic Usage
The component can be obtained via FxUI.component.get('ObjectDetailMultiTable').
<template>
<object-detail-multi-table v-bind="dTableOpts"></object-detail-multi-table>
</template>
<script>
export default {
components: {
ObjectDetailMultiTable: FxUI.component.get('ObjectDetailMultiTable')
},
data() {
return {
dTableOpts: {
apiName: 'object_VPAhX__c',
dataId: '60eea4cc282e4e00019433fb',
compInfo: {
field_api_name: "field_k9395__c",
header: "wj-regression-sub",
ref_object_api_name: "object_nlVOb__c",
related_list_name: "target_related_list_ngdm8__c"
}
}
}
}
}
</script>
#### Component Extension
To meet enterprise customization requirements, we provide developers with extension methods for rapid feature development.
##### Hooks
Before rendering the related object list page, it goes through a series of processes - such as initializing the table, requesting table configuration data, parsing table configuration data, requesting list data, parsing list data, etc. During this process, hook functions are executed, giving developers opportunities to add their own code at different stages.
# Hooks
# beforeFetch
Parameters:
params: Object:search_query_info: String: List data filter conditions, JSON string
Returns:
Must return the parameters needed for the API request.
Usage:
Called when the list page invokes the API, occurring before the API call. This allows modification of the request parameters.
export default {
beforeFetch(params) {
// Filter by field
// search_query_info - JSON string
params.search_query_info = "{\"limit\":2000,\"offset\":0,\"filters\":[{\"field_name\":\"life_status\",\"field_values\":[\"ineffective\"],\"operator\":\"EQ\"}]}";
// Process params
return params;
}
}