하석형 하석형 04-29
250429 하석형 등록,상세 페이지 새로고침 시 상단메뉴에 컨텐츠 한글명 표시, 상세 페이지 이동 시 만족도 조사 제외
@081251e40918064aae65acc5766e7333cc760ff8
client/views/layout/AdminHeader.vue
--- client/views/layout/AdminHeader.vue
+++ client/views/layout/AdminHeader.vue
@@ -34,7 +34,6 @@
     data() {
         return {
             mbrNm: store.state.mbrNm,
-            pgNm: store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈",
         }
     },
     created() {
@@ -63,21 +62,44 @@
 
     },
     watch: {
-        'pgNm'(newValue,oldValue){
-        },
         '$store.state.menu'(newValue) {
             if(newValue) {
                 this.pgNm = newValue.menuNm
             }
         },
+        'this.$route.path'(newValue) {
+            if(newValue) {
+            }
+        },
 
     },
     computed: {
-
         pgNm() {
-            return store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈";
-        }
+            const route = this.$route;
+            const storeMenu = store.state.menu;
 
+            if (route?.meta?.korName) {
+                if (route.path === '/adm/main.page') {
+                    return "홈";
+                }
+
+                if (route.meta.typeId.includes("BBS_MNG")) {
+                    const matchedMenu = store.state.flatMenuList.find(menu => menu.menuTypeCtgry === route.meta.typeId);
+                    if (matchedMenu) {
+                        return matchedMenu.menuNm;
+                    }
+                }
+
+                if (storeMenu?.menuNm) {
+                    return storeMenu.menuNm;
+                } else {
+                    return route.meta.korName;
+                }
+            }
+
+            return "홈";
+            // return store.state.menu && store.state.menu.menuNm ? store.state.menu.menuNm : "홈";
+        }
     },
     mounted() {
 
client/views/layout/menuSatisfaction.vue
--- client/views/layout/menuSatisfaction.vue
+++ client/views/layout/menuSatisfaction.vue
@@ -149,10 +149,12 @@
         $route: {
             immediate: true,
             handler(to) {
-                if (this.$store.state.menu && to.path !== this.$filters.ctxPath('/adm/main.page')) {
+                if (this.$store.state.menu && to.path !== this.$filters.ctxPath('/adm/main.page') && !to.path.includes('/view.page') && !to.path.includes('/insert.page')) {
                     this.pgNm = this.$store.state.menu.menuNm;
                     this.menuId = this.$store.state.menu.menuId;
                     this.fnView();
+                } else {
+                    this.dgstfnExmnUseYn = 'N'; // 초기화
                 }
             }
         },
client/views/pages/App.vue
--- client/views/pages/App.vue
+++ client/views/pages/App.vue
@@ -43,7 +43,7 @@
   watch: {
     $route(to, from) {
       this.path = to.path;
-      if(this.path.includes('/insert.page')) {
+      if(this.path.includes('/insert.page') || this.path.includes('/view.page')) {
         this.menuUse = "N";
       }
     },
client/views/pages/AppRouter.js
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
@@ -10,14 +10,14 @@
 
 const beforeRoutes = [
   /* 메인화면 */
-  { path: "/", name: "main", component: Main },
+  { path: "/", name: "main", korName: "홈", component: Main },
 
   // 관리자
   {
     path: "/adm",
     children: [
-      { path: "commonSelectListOne.page", name: "CommonSelectListOne", component: CommonSelectListOne },
-      { path: "commonSelectList.page", name: "CommonSelectList", component: CommonSelectList },
+      { path: "commonSelectListOne.page", name: "CommonSelectListOne", korName: "", component: CommonSelectListOne },
+      { path: "commonSelectList.page", name: "CommonSelectList", korName: "", component: CommonSelectList },
     ],
   },
 ];
@@ -55,8 +55,9 @@
       const newRoutes = res.data.data.map(route => ({
         path: route.pageCrs,
         name: route.contsEngNm,
+        korName: route.contsKornNm,
         component: () => import(`${route.compnCrs}`),
-        meta: { authrt: route.authrtList, typeId: route.contsId }
+        meta: { authrt: route.authrtList, typeId: route.contsId, korName: route.contsKornNm }
       }));
       return newRoutes;
     }else {
Add a comment
List