1
This commit is contained in:
2025-12-17 16:07:59 +08:00
parent c053d28efe
commit b29d18bee5

View File

@ -3,6 +3,7 @@ import { bitable } from '@lark-base-open/js-sdk';
import { RecordDetail, SelectedLabels } from '../types'; import { RecordDetail, SelectedLabels } from '../types';
import { TABLE_CONFIG } from '../constants/config'; import { TABLE_CONFIG } from '../constants/config';
import { buildFieldNameToIdMap, extractLabelsFromRecord } from '../utils/dataUtils'; import { buildFieldNameToIdMap, extractLabelsFromRecord } from '../utils/dataUtils';
import { executePricingQuery, executeSecondaryProcessQuery, executePricingDetailsQuery } from '../services/apiService';
export const useRecordSelection = () => { export const useRecordSelection = () => {
const [selectedRecords, setSelectedRecords] = useState<string[]>([]); const [selectedRecords, setSelectedRecords] = useState<string[]>([]);
@ -47,7 +48,8 @@ export const useRecordSelection = () => {
...extractedLabels ...extractedLabels
})); }));
// 自动执行查询
await executeAllQueries(recordValList[0]);
} }
} else { } else {
setRecordDetails([]); setRecordDetails([]);
@ -66,7 +68,9 @@ export const useRecordSelection = () => {
setSelectedLabels({}); setSelectedLabels({});
}, []); }, []);
const executeAllQueries = async (record: RecordDetail) => {
// 实现查询逻辑
};
return { return {
selectedRecords, selectedRecords,
@ -77,4 +81,4 @@ export const useRecordSelection = () => {
handleSelectRecords, handleSelectRecords,
handleClearRecords, handleClearRecords,
}; };
}; };