
250429 하석형 등록,상세 페이지 새로고침 시 상단메뉴에 컨텐츠 한글명 표시, 상세 페이지 이동 시 만족도 조사 제외
@081251e40918064aae65acc5766e7333cc760ff8
--- client/views/layout/AdminHeader.vue
+++ client/views/layout/AdminHeader.vue
... | ... | @@ -34,7 +34,6 @@ |
34 | 34 |
data() { |
35 | 35 |
return { |
36 | 36 |
mbrNm: store.state.mbrNm, |
37 |
- pgNm: store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈", |
|
38 | 37 |
} |
39 | 38 |
}, |
40 | 39 |
created() { |
... | ... | @@ -63,21 +62,44 @@ |
63 | 62 |
|
64 | 63 |
}, |
65 | 64 |
watch: { |
66 |
- 'pgNm'(newValue,oldValue){ |
|
67 |
- }, |
|
68 | 65 |
'$store.state.menu'(newValue) { |
69 | 66 |
if(newValue) { |
70 | 67 |
this.pgNm = newValue.menuNm |
71 | 68 |
} |
72 | 69 |
}, |
70 |
+ 'this.$route.path'(newValue) { |
|
71 |
+ if(newValue) { |
|
72 |
+ } |
|
73 |
+ }, |
|
73 | 74 |
|
74 | 75 |
}, |
75 | 76 |
computed: { |
76 |
- |
|
77 | 77 |
pgNm() { |
78 |
- return store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈"; |
|
79 |
- } |
|
78 |
+ const route = this.$route; |
|
79 |
+ const storeMenu = store.state.menu; |
|
80 | 80 |
|
81 |
+ if (route?.meta?.korName) { |
|
82 |
+ if (route.path === '/adm/main.page') { |
|
83 |
+ return "홈"; |
|
84 |
+ } |
|
85 |
+ |
|
86 |
+ if (route.meta.typeId.includes("BBS_MNG")) { |
|
87 |
+ const matchedMenu = store.state.flatMenuList.find(menu => menu.menuTypeCtgry === route.meta.typeId); |
|
88 |
+ if (matchedMenu) { |
|
89 |
+ return matchedMenu.menuNm; |
|
90 |
+ } |
|
91 |
+ } |
|
92 |
+ |
|
93 |
+ if (storeMenu?.menuNm) { |
|
94 |
+ return storeMenu.menuNm; |
|
95 |
+ } else { |
|
96 |
+ return route.meta.korName; |
|
97 |
+ } |
|
98 |
+ } |
|
99 |
+ |
|
100 |
+ return "홈"; |
|
101 |
+ // return store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈"; |
|
102 |
+ } |
|
81 | 103 |
}, |
82 | 104 |
mounted() { |
83 | 105 |
|
--- client/views/pages/App.vue
+++ client/views/pages/App.vue
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 |
watch: { |
44 | 44 |
$route(to, from) { |
45 | 45 |
this.path = to.path; |
46 |
- if(this.path.includes('/insert.page')) { |
|
46 |
+ if(this.path.includes('/insert.page') || this.path.includes('/view.page')) { |
|
47 | 47 |
this.menuUse = "N"; |
48 | 48 |
} |
49 | 49 |
}, |
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
... | ... | @@ -10,14 +10,14 @@ |
10 | 10 |
|
11 | 11 |
const beforeRoutes = [ |
12 | 12 |
/* 메인화면 */ |
13 |
- { path: "/", name: "main", component: Main }, |
|
13 |
+ { path: "/", name: "main", korName: "홈", component: Main }, |
|
14 | 14 |
|
15 | 15 |
// 관리자 |
16 | 16 |
{ |
17 | 17 |
path: "/adm", |
18 | 18 |
children: [ |
19 |
- { path: "commonSelectListOne.page", name: "CommonSelectListOne", component: CommonSelectListOne }, |
|
20 |
- { path: "commonSelectList.page", name: "CommonSelectList", component: CommonSelectList }, |
|
19 |
+ { path: "commonSelectListOne.page", name: "CommonSelectListOne", korName: "", component: CommonSelectListOne }, |
|
20 |
+ { path: "commonSelectList.page", name: "CommonSelectList", korName: "", component: CommonSelectList }, |
|
21 | 21 |
], |
22 | 22 |
}, |
23 | 23 |
]; |
... | ... | @@ -55,8 +55,9 @@ |
55 | 55 |
const newRoutes = res.data.data.map(route => ({ |
56 | 56 |
path: route.pageCrs, |
57 | 57 |
name: route.contsEngNm, |
58 |
+ korName: route.contsKornNm, |
|
58 | 59 |
component: () => import(`${route.compnCrs}`), |
59 |
- meta: { authrt: route.authrtList, typeId: route.contsId } |
|
60 |
+ meta: { authrt: route.authrtList, typeId: route.contsId, korName: route.contsKornNm } |
|
60 | 61 |
})); |
61 | 62 |
return newRoutes; |
62 | 63 |
}else { |
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?