|
|
@@ -5,7 +5,7 @@ import { formatMenus, toTreeData, formatTreeData } from 'ele-admin';
|
|
|
import { USER_MENUS } from '@/config/setting';
|
|
|
import { getResourcesTree } from '@/api/layout';
|
|
|
import { getCurrentUserAuthorityDeptAPI } from '@/api/system/organization';
|
|
|
-import { getCurrentUser,setCurrentUser } from '@/utils/token-util';
|
|
|
+import { getCurrentUser, setCurrentUser } from '@/utils/token-util';
|
|
|
|
|
|
const formatRouter = (list) => {
|
|
|
let menuList = []; // menuType
|
|
|
@@ -90,7 +90,7 @@ export default {
|
|
|
},
|
|
|
actions: {
|
|
|
async getCurrentUserAuthorityDept({ commit }) {
|
|
|
- return []
|
|
|
+ return [];
|
|
|
const info = await getCurrentUserAuthorityDeptAPI();
|
|
|
commit('setAuthorityDept', info);
|
|
|
},
|
|
|
@@ -129,7 +129,7 @@ export default {
|
|
|
// },
|
|
|
//动态路由
|
|
|
async fetchUserInfo({ commit, state }) {
|
|
|
- let currentUser = getCurrentUser()
|
|
|
+ let currentUser = getCurrentUser();
|
|
|
const result = await getResourcesTree({
|
|
|
groupId: currentUser.currentGroupId,
|
|
|
roleId: currentUser.currentRoleId
|
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
parentIdField: 'parentId'
|
|
|
})
|
|
|
);
|
|
|
- console.log('menus--', menus);
|
|
|
+ console.log('menus--', homePath, menus);
|
|
|
commit('setMenus', menus);
|
|
|
commit('setAuthoritiesRouter', authoritiesRouter);
|
|
|
// const menus = result;
|