|
@ -5,6 +5,7 @@ import { DictDataVO } from '@/api/system/dict/types' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
import { CACHE_KEY, useCache } from '@/hooks/web/useCache' |
|
|
const { wsCache } = useCache('sessionStorage') |
|
|
const { wsCache } = useCache('sessionStorage') |
|
|
import { listSimpleDictData } from '@/api/system/dict/dict.data' |
|
|
import { listSimpleDictData } from '@/api/system/dict/dict.data' |
|
|
|
|
|
import { getAccessToken } from '@/utils/auth' |
|
|
|
|
|
|
|
|
export interface DictValueType { |
|
|
export interface DictValueType { |
|
|
value: any |
|
|
value: any |
|
@ -45,6 +46,9 @@ export const useDictStore = defineStore('dict', { |
|
|
this.dictMap = dictMap |
|
|
this.dictMap = dictMap |
|
|
this.isSetDict = true |
|
|
this.isSetDict = true |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
if(!getAccessToken()){ |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
const res = await listSimpleDictData() |
|
|
const res = await listSimpleDictData() |
|
|
// 设置数据
|
|
|
// 设置数据
|
|
|
const dictDataMap = new Map<string, any>() |
|
|
const dictDataMap = new Map<string, any>() |
|
|