From 20459fe59f680031bfc7c1012be860e0727cb016 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 05 八月 2025 17:47:09 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/flexJobAdmin

---
 src/hooks/dic.ts |   51 ++-------------------------------------------------
 1 files changed, 2 insertions(+), 49 deletions(-)

diff --git a/src/hooks/dic.ts b/src/hooks/dic.ts
index d55c72f..25dd1c8 100644
--- a/src/hooks/dic.ts
+++ b/src/hooks/dic.ts
@@ -1,55 +1,8 @@
-import * as searchSettingServices from '@/services/api/SearchSetting';
-import { useQuery } from '@tanstack/vue-query';
-import { useQueryClient } from '@tanstack/vue-query';
+import { useQuery, useQueryClient } from '@tanstack/vue-query';
 import { SearchType } from '@/constants';
 
 type UseSearchSettingTypeOptions = {
   searchType: number;
   belongType?: number;
-  onSuccess?: (data: API.GetTypeSearchSettingList[]) => any;
+  onSuccess?: (data: any[]) => any;
 };
-
-export function useSearchSettingType({
-  searchType,
-  belongType = null,
-  onSuccess,
-}: UseSearchSettingTypeOptions) {
-  const { data, refetch } = useQuery({
-    queryKey: ['searchSettingServices/getTypeSearchSettingList', { searchType, belongType }],
-    queryFn: async () => {
-      return await searchSettingServices.getTypeSearchSettingList(
-        {
-          searchType: searchType,
-          belongType: belongType,
-        },
-        { showLoading: false }
-      );
-    },
-    placeholderData: () => [] as API.GetTypeSearchSettingList[],
-    onSuccess(data) {
-      onSuccess?.(data);
-    },
-  });
-
-  const queryClient = useQueryClient();
-
-  async function ensureSearchSettingType() {
-    return await queryClient.ensureQueryData({
-      queryKey: [
-        'searchSettingServices/getTypeSearchSettingList',
-        { searchType: searchType, belongType: belongType },
-      ],
-    });
-  }
-
-  function getSearchSettingTypeNameById(id: string) {
-    return data.value.find((x) => x.id === id)?.name ?? '';
-  }
-
-  return {
-    searchSettingTypeList: data,
-    ensureSearchSettingType,
-    refetchSearchSettingType: refetch,
-    getSearchSettingTypeNameById,
-  };
-}

--
Gitblit v1.9.1