|
|
|
|
@ -49,7 +49,14 @@ function install() {
|
|
|
|
|
isRequesting = true;
|
|
|
|
|
// 批量获取字典
|
|
|
|
|
sysdicttypeTypesApi(requesting.map(item => item.type)).then(res => {
|
|
|
|
|
const datas = res.data || {};
|
|
|
|
|
const datas = {};
|
|
|
|
|
(res || []).forEach(item => {
|
|
|
|
|
if (datas[item.dictType]) {
|
|
|
|
|
datas[item.dictType].push(item);
|
|
|
|
|
} else {
|
|
|
|
|
datas[item.dictType] = [item];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
requesting.forEach(item => {
|
|
|
|
|
store.dispatch('dict/setDict', { key: item.type, value: datas[item.type] || [] });
|
|
|
|
|
item.resolve(datas[item.type] || []);
|
|
|
|
|
|