| | |
| | | |
| | | type UseDictionaryDataSelectOptions = { |
| | | categoryId?: MaybeRef<string>; |
| | | categoryCode?: MaybeRef<string>; |
| | | categoryCode?: MaybeRef<CategoryCode>; |
| | | }; |
| | | |
| | | export function useDictionaryDataSelect({ |
| | |
| | | categoryCode, |
| | | }: UseDictionaryDataSelectOptions) { |
| | | const { data: dictionaryDataList, refetch } = useQuery({ |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect'], |
| | | queryKey: ['dictionaryServices/getDictionaryDataSelect', categoryId, categoryCode], |
| | | queryFn: async () => { |
| | | let res = await dictionaryServices.getDictionaryDataSelect( |
| | | { |
| | |
| | | }, |
| | | placeholderData: () => |
| | | [] as API.SelectQueryResultOptionGuidGetDictionaryDataSelectQueryResultOption[], |
| | | |
| | | enabled: !!unref(categoryId) || !!unref(categoryCode), |
| | | }); |
| | | |
| | | function getDictionaryDataNameById(id: string) { |