|
|
|
@ -17,6 +17,7 @@ const mutations = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 同时更新dictData对象,方便快速查找
|
|
|
|
// 同时更新dictData对象,方便快速查找
|
|
|
|
state.dictData[key] = value;
|
|
|
|
state.dictData[key] = value;
|
|
|
|
|
|
|
|
state.dictData = { ...state.dictData };
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
REMOVE_DICT: (state, key) => {
|
|
|
|
REMOVE_DICT: (state, key) => {
|
|
|
|
@ -76,7 +77,7 @@ const actions = {
|
|
|
|
|
|
|
|
|
|
|
|
// 处理返回的数据
|
|
|
|
// 处理返回的数据
|
|
|
|
const fetchedDicts = {};
|
|
|
|
const fetchedDicts = {};
|
|
|
|
(res || []).forEach(item => {
|
|
|
|
(res.data || []).forEach(item => {
|
|
|
|
if (fetchedDicts[item.dictType]) {
|
|
|
|
if (fetchedDicts[item.dictType]) {
|
|
|
|
fetchedDicts[item.dictType].push(item);
|
|
|
|
fetchedDicts[item.dictType].push(item);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|