
--- client/views/component/Breadcrumb/Breadcrumb.vue
+++ client/views/component/Breadcrumb/Breadcrumb.vue
... | ... | @@ -73,14 +73,29 @@ |
73 | 73 |
return [...trail, findCurrent]; |
74 | 74 |
}; |
75 | 75 |
|
76 |
+ // 메뉴 리스트 펼치기 |
|
77 |
+ const flattenMenus = (menus) => { |
|
78 |
+ const result = []; |
|
79 |
+ |
|
80 |
+ for (const menu of menus) { |
|
81 |
+ result.push(menu); |
|
82 |
+ if (menu.childList?.length) { |
|
83 |
+ result.push(...flattenMenus(menu.childList)); |
|
84 |
+ } |
|
85 |
+ } |
|
86 |
+ |
|
87 |
+ return result; |
|
88 |
+ } |
|
89 |
+ |
|
76 | 90 |
let breadcrumb = []; |
77 | 91 |
|
78 | 92 |
// 구조 판단 |
79 | 93 |
if (menuState.menuList?.length) { |
80 | 94 |
// 사용자용 |
81 |
- const flatMenus = menuState.menuList.flatMap(menu => |
|
82 |
- [menu, ...(menu.childList || [])] |
|
83 |
- ); |
|
95 |
+ // const flatMenus = menuState.menuList.flatMap(menu => |
|
96 |
+ // [menu, ...(menu.childList || [])] |
|
97 |
+ // ); |
|
98 |
+ const flatMenus = flattenMenus(menuState.menuList); |
|
84 | 99 |
breadcrumb = findFromFlat(flatMenus, currentPath); |
85 | 100 |
} else if (menuState.menu?.childList?.length) { |
86 | 101 |
// 관리자용 |
... | ... | @@ -92,7 +107,7 @@ |
92 | 107 |
|
93 | 108 |
}, |
94 | 109 |
mounted(){ |
95 |
- this.generateBreadcrumb(); |
|
110 |
+ // this.generateBreadcrumb(); |
|
96 | 111 |
} |
97 | 112 |
}; |
98 | 113 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
... | ... | @@ -173,7 +173,7 @@ |
173 | 173 |
|
174 | 174 |
// 로그인 모드 확인 (JWT 또는 SESSION) |
175 | 175 |
const loginMode = store.state.loginMode || 'J'; // 기본값으로 JWT 설정 |
176 |
- console.log('loginMode', loginMode) |
|
176 |
+ // console.log('loginMode', loginMode) |
|
177 | 177 |
// 로그인 상태 확인 (JWT 또는 SESSION) |
178 | 178 |
const isLogin = loginMode === 'J' ? store.state.authorization : store.state.mbrId; |
179 | 179 |
if (!isLogin && to.path !== filters.ctxPath('/login.page')) { |
... | ... | @@ -203,7 +203,6 @@ |
203 | 203 |
} |
204 | 204 |
const mbrAuth = store.state.roles.map(auth => auth.authority); // 사용자 권한 정보 |
205 | 205 |
const pageAuth = mergeAuth(mbrAuth, to.meta); |
206 |
- console.log("권한확인", to.meta); |
|
207 | 206 |
sessionStorage.setItem("redirect", to.fullPath); |
208 | 207 |
|
209 | 208 |
// 메인 페이지 or 로그인 페이지 |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?