하석형 하석형 04-29
250429 하석형 게시판내용에서 이동 시 pageId 추출 오류 수정
@ecb1d4bc808efa8270cc856f17b3b6a28a7d364b
client/views/pages/App.vue
--- client/views/pages/App.vue
+++ client/views/pages/App.vue
@@ -36,7 +36,7 @@
   methods: {
     // 메뉴 만족도 조사 사용 여부
     menuYnCheck(yn) {
-      console.log("menuYnCheck", yn);
+      // console.log("menuYnCheck", yn);
       this.menuUse = yn;
     },
   },
client/views/pages/adm/boardManagement/template/commonTemplate/CommonSelectList.vue
--- client/views/pages/adm/boardManagement/template/commonTemplate/CommonSelectList.vue
+++ client/views/pages/adm/boardManagement/template/commonTemplate/CommonSelectList.vue
@@ -174,9 +174,20 @@
     };
   },
   created() {
-    this.fnBbsIdExtraction();
-    this.resotreQueryParams("queryParams");
-    this.findAll();
+    // this.fnBbsIdExtraction();
+    // this.resotreQueryParams("queryParams");
+    // this.findAll();
+  },
+  // 컴포넌트(페이지) 초기 진입 시
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      vm.fnInit();
+    });
+  },
+  // 동일 컴포넌트로 재진입 시
+  beforeRouteUpdate(to, from, next) {
+    this.fnInit();
+    next();
   },
   methods: {
     // 목록 조회
@@ -279,16 +290,23 @@
       this.search = { ...defaultSearchParams };
       this.findAll();
     },
+
+    // 초기 조회
+    fnInit() {
+      this.fnBbsIdExtraction();
+      this.resotreQueryParams("queryParams");
+      this.findAll();
+    }
   },
   watch: {
     $route(to, from) {
       // path가 다를 때만 조회
-      if (to.path !== from.path) {
-        this.fnBbsIdExtraction();
-        this.resotreQueryParams("queryParams");
-        this.findAll();
-        this.path = this.$store.state.path;
-      }
+      // if (to.path !== from.path) {
+      //   this.fnBbsIdExtraction();
+      //   this.resotreQueryParams("queryParams");
+      //   this.findAll();
+      //   this.path = this.$store.state.path;
+      // }
     },
   },
   computed: {},
client/views/pages/adm/boardManagement/template/faqTemplate/FaqSelectList.vue
--- client/views/pages/adm/boardManagement/template/faqTemplate/FaqSelectList.vue
+++ client/views/pages/adm/boardManagement/template/faqTemplate/FaqSelectList.vue
@@ -414,9 +414,20 @@
     };
   },
   created() {
-    this.fnBbsIdExtraction();
-    this.resotreQueryParams("queryParams");
-    this.findAll();
+    // this.fnBbsIdExtraction();
+    // this.resotreQueryParams("queryParams");
+    // this.findAll();
+  },
+  // 컴포넌트(페이지) 초기 진입 시
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      vm.fnInit();
+    });
+  },
+  // 동일 컴포넌트로 재진입 시
+  beforeRouteUpdate(to, from, next) {
+    this.fnInit();
+    next();
   },
   methods: {
     toggle(index) {
@@ -520,17 +531,24 @@
       this.search = { ...defaultSearchParams };
       this.findAll();
     },
+
+    // 초기 조회
+    fnInit() {
+      this.fnBbsIdExtraction();
+      this.resotreQueryParams("queryParams");
+      this.findAll();
+    }
   },
   watch: {
     $route(to, from) {
       // path가 다를 때만 조회
-      if (to.path !== from.path) {
-        this.fnBbsIdExtraction();
-        this.resotreQueryParams("queryParams");
-        this.findAll();
-        this.path = this.$store.state.path;
-        this.isOpen = null;
-      }
+      // if (to.path !== from.path) {
+      //   this.fnBbsIdExtraction();
+      //   this.resotreQueryParams("queryParams");
+      //   this.findAll();
+      //   this.path = this.$store.state.path;
+      //   this.isOpen = null;
+      // }
     },
   },
   computed: {},
client/views/pages/adm/boardManagement/template/galleryTemplate/GallerySelectList.vue
--- client/views/pages/adm/boardManagement/template/galleryTemplate/GallerySelectList.vue
+++ client/views/pages/adm/boardManagement/template/galleryTemplate/GallerySelectList.vue
@@ -200,9 +200,20 @@
         }
     },
     created() {
-        this.fnBbsIdExtraction();
-        this.resotreQueryParams('queryParams');
-        this.findAll();
+        // this.fnBbsIdExtraction();
+        // this.resotreQueryParams('queryParams');
+        // this.findAll();
+    },
+    // 컴포넌트(페이지) 초기 진입 시
+    beforeRouteEnter(to, from, next) {
+        next(vm => {
+            vm.fnInit();
+        });
+    },
+    // 동일 컴포넌트로 재진입 시
+    beforeRouteUpdate(to, from, next) {
+        this.fnInit();
+        next();
     },
     methods: {
         // 목록 조회
@@ -246,18 +257,24 @@
         fnSearchReset() {
             this.search = { ...defaultSearchParams };
             this.findAll();
-        }
+        },
 
+        // 초기 조회
+        fnInit() {
+            this.fnBbsIdExtraction();
+            this.resotreQueryParams("queryParams");
+            this.findAll();
+        }
     },
     watch: {
         $route(to, from) {
             // path가 다를 때만 조회
-            if (to.path !== from.path) {
-                this.fnBbsIdExtraction();
-                this.resotreQueryParams('queryParams');
-                this.findAll();
-                this.path = this.$store.state.path;
-            }
+            // if (to.path !== from.path) {
+            //     this.fnBbsIdExtraction();
+            //     this.resotreQueryParams('queryParams');
+            //     this.findAll();
+            //     this.path = this.$store.state.path;
+            // }
         }
 
     },
client/views/pages/adm/boardManagement/template/videoTemplate/VideoSelectList.vue
--- client/views/pages/adm/boardManagement/template/videoTemplate/VideoSelectList.vue
+++ client/views/pages/adm/boardManagement/template/videoTemplate/VideoSelectList.vue
@@ -155,9 +155,20 @@
         }
     },
     created() {
-        this.fnBbsIdExtraction();
-        this.resotreQueryParams('queryParams');
-        this.findAll();
+        // this.fnBbsIdExtraction();
+        // this.resotreQueryParams('queryParams');
+        // this.findAll();
+    },
+    // 컴포넌트(페이지) 초기 진입 시
+    beforeRouteEnter(to, from, next) {
+        next(vm => {
+            vm.fnInit();
+        });
+    },
+    // 동일 컴포넌트로 재진입 시
+    beforeRouteUpdate(to, from, next) {
+        this.fnInit();
+        next();
     },
     methods: {
         // 목록 조회
@@ -207,17 +218,24 @@
         fnSearchReset() {
             this.search = { ...defaultSearchParams };
             this.findAll();
+        },
+
+        // 초기 조회
+        fnInit() {
+            this.fnBbsIdExtraction();
+            this.resotreQueryParams("queryParams");
+            this.findAll();
         }
     },
     watch: {
         $route(to, from) {
             // path가 다를 때만 조회
-            if (to.path !== from.path) {
-                this.fnBbsIdExtraction();
-                this.resotreQueryParams('queryParams');
-                this.findAll();
-                this.path = this.$store.state.path;
-            }
+            // if (to.path !== from.path) {
+            //     this.fnBbsIdExtraction();
+            //     this.resotreQueryParams('queryParams');
+            //     this.findAll();
+            //     this.path = this.$store.state.path;
+            // }
         }
     },
     computed: {
Add a comment
List