From 65fdfc6dd82f0bcf6c6826fe1ab645b309f6045c Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 23 十月 2025 19:37:06 +0800
Subject: [PATCH] fix: bug
---
src/hooks/dic.ts | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/hooks/dic.ts b/src/hooks/dic.ts
index 48489a0..fe72501 100644
--- a/src/hooks/dic.ts
+++ b/src/hooks/dic.ts
@@ -36,11 +36,24 @@
return insureProduct?.id ?? '';
}
+ const queryClient = useQueryClient();
+
+ function ensureUserInsureProductSetting() {
+ return queryClient.ensureQueryData<API.InsureProductSettingDto[]>({
+ queryKey: ['dictionaryServices/getUserInsureProductSetting'],
+ });
+ }
+
+ /**鏄惁鏄敓鐓庝繚璐﹀彿 */
+ const isSjbAccount = computed(() => allUserInsureProductSettingList.value.length > 0);
+
return {
allUserInsureProductSettingList,
getInsureProductByIdNumber,
getInsureProductIdByIdNumber,
refetch,
+ ensureUserInsureProductSetting,
+ isSjbAccount,
};
}
@@ -67,8 +80,17 @@
staleTime: Infinity,
});
+ function getInsureProductSchemeByCode(code: string) {
+ return allInsureProductSchemeList.value.find((x) => x.code === code);
+ }
+ function getInsureProductSchemeByIdNumber(idNumber: string) {
+ return allInsureProductSchemeList.value.find((x) => x.idNumber === idNumber);
+ }
+
return {
allInsureProductSchemeList,
refetch,
+ getInsureProductSchemeByCode,
+ getInsureProductSchemeByIdNumber,
};
}
--
Gitblit v1.9.1