|
|
|
@ -4,6 +4,8 @@ import DataDict from '@/utils/dict'
|
|
|
|
|
import { getDicts as getDicts } from '@/api/system/dict/data'
|
|
|
|
|
|
|
|
|
|
function searchDictByKey(dict, key) {
|
|
|
|
|
// console.log(dict,'dict')
|
|
|
|
|
// console.log(key,'key')
|
|
|
|
|
if (key == null && key == "") {
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
@ -31,6 +33,8 @@ function install() {
|
|
|
|
|
} else {
|
|
|
|
|
return new Promise((resolve, reject) => {
|
|
|
|
|
getDicts(dictMeta.type).then(res => {
|
|
|
|
|
// console.log(res,'字典数据')
|
|
|
|
|
// console.log(dictMeta,'dictMeta')
|
|
|
|
|
store.dispatch('dict/setDict', { key: dictMeta.type, value: res.data })
|
|
|
|
|
resolve(res.data)
|
|
|
|
|
}).catch(error => {
|
|
|
|
|