adtec-core-package 2.8.6 → 2.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/hooks/useDictHooks.ts +10 -3
package/package.json
CHANGED
|
@@ -78,12 +78,19 @@ export default function useDictHooks(dictTypes?: string[], orgId?: string) {
|
|
|
78
78
|
return value
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
const getDictData = (
|
|
81
|
+
const getDictData = (
|
|
82
|
+
value: string,
|
|
83
|
+
dictType: string,
|
|
84
|
+
orgId?: string,
|
|
85
|
+
): ISysDictDataCacheVo | {} => {
|
|
82
86
|
//此处需要支持多租户
|
|
83
87
|
let key = orgId ? `${orgId}:${dictType}` : dictType
|
|
84
|
-
if (dictDataMap.value[key!] && dictDataMap.value[key!][value!])
|
|
88
|
+
if (dictDataMap.value[key!] && dictDataMap.value[key!][value!])
|
|
89
|
+
return dictDataMap.value[key!][value!]
|
|
85
90
|
key = `${userInfo.getUserInfo.orgId}:${dictType}`
|
|
86
|
-
|
|
91
|
+
if (dictDataMap.value[key!] && dictDataMap.value[key!][value!])
|
|
92
|
+
return dictDataMap.value[key!][value!]
|
|
93
|
+
return {}
|
|
87
94
|
}
|
|
88
95
|
const getDictDefaultValue = (
|
|
89
96
|
dictType: string,
|