diff --git a/src/hooks/useRecordSelection.ts b/src/hooks/useRecordSelection.ts index 1b79555..d31b5da 100644 --- a/src/hooks/useRecordSelection.ts +++ b/src/hooks/useRecordSelection.ts @@ -3,6 +3,7 @@ import { bitable } from '@lark-base-open/js-sdk'; import { RecordDetail, SelectedLabels } from '../types'; import { TABLE_CONFIG } from '../constants/config'; import { buildFieldNameToIdMap, extractLabelsFromRecord } from '../utils/dataUtils'; +import { executePricingQuery, executeSecondaryProcessQuery, executePricingDetailsQuery } from '../services/apiService'; export const useRecordSelection = () => { const [selectedRecords, setSelectedRecords] = useState([]); @@ -47,7 +48,8 @@ export const useRecordSelection = () => { ...extractedLabels })); - + // 自动执行查询 + await executeAllQueries(recordValList[0]); } } else { setRecordDetails([]); @@ -66,7 +68,9 @@ export const useRecordSelection = () => { setSelectedLabels({}); }, []); - + const executeAllQueries = async (record: RecordDetail) => { + // 实现查询逻辑 + }; return { selectedRecords, @@ -77,4 +81,4 @@ export const useRecordSelection = () => { handleSelectRecords, handleClearRecords, }; -}; +}; \ No newline at end of file