1
1
This commit is contained in:
@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user