yjryu / KERIS star
Stormen123 2023-11-23
231123 김성훈 로그남기기 추가
@91d9aad500d9105b25985b9a366fa6925fa29013
client/views/pages/user/Data/Data.vue
--- client/views/pages/user/Data/Data.vue
+++ client/views/pages/user/Data/Data.vue
@@ -142,6 +142,7 @@
                 bbs_id: '0',
                 sort: 'dt'
             },
+            page_nm: '자료집',
             postList: [],
             postNoticeList: [],
             postListCount: 0,
@@ -259,6 +260,20 @@
                 alert("자료집 상세보기 오류, 관리자에게 문의바랍니다.");
             })
         },
+
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
+
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
+        }
     },
     watch: {
 
@@ -278,6 +293,7 @@
     },
     mounted() {
         console.log('Data mounted');
+        this.pageLogInsert();
         this.postSelectList();
     }
 }
client/views/pages/user/Data/DataOne.vue
--- client/views/pages/user/Data/DataOne.vue
+++ client/views/pages/user/Data/DataOne.vue
@@ -136,6 +136,15 @@
                 }
 
                 vm.getViewer(vm.post.post_content)
+
+                axios({
+                    url: '/statistics/postLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: vm.post
+                })
             }).catch(function (error) {
                 console.log("error - ", error)
                 alert("게시글 상세보기 조회 오류, 관리자에게 문의하세요.");
@@ -175,7 +184,6 @@
                 data: `file_path=${encodeURIComponent(path)}`
             }).then((response) => {
                 const blob = new Blob([response.data]);
-
                 const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
 
                 if (isSafari) {
@@ -191,8 +199,21 @@
                     window.URL.revokeObjectURL(url);
                 }
 
-                this.$router.go(0);
-
+                item.post_id = vm.post.post_id;
+                item.bbs_id = vm.post.bbs_id;
+                item.ctgry_nm = vm.post.ctgry_nm;
+                
+                axios({
+                    url: '/statistics/fileLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: item
+                }).then(function(response){
+                    vm.$router.go(0);
+                })
+                
             }).catch(function (error) {
                 console.log('error - ', error)
                 alert('에러발생');
client/views/pages/user/Data/Technology.vue
--- client/views/pages/user/Data/Technology.vue
+++ client/views/pages/user/Data/Technology.vue
@@ -279,6 +279,7 @@
                 bbs_id: '3',
                 sort: 'doc_dt'
             },
+            page_nm: '기술문서',
             postList: [],
             postListCount: 0,
             postIdx: 0,
@@ -347,6 +348,20 @@
         showAlert: function () {
             alert('준비중입니다.')
         },
+
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
+
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
+        }
     },
     watch: {
 
@@ -359,6 +374,7 @@
     },
     mounted() {
         console.log('Technology mounted');
+        this.pageLogInsert();
         this.postSelectList();
     }
 }
client/views/pages/user/Data/TechnologyOne.vue
--- client/views/pages/user/Data/TechnologyOne.vue
+++ client/views/pages/user/Data/TechnologyOne.vue
@@ -134,6 +134,7 @@
             thumbnailFileList: [],
             attachFileList: [],
             src: null,
+            item:{}
         }
     },
     methods: {
@@ -176,6 +177,15 @@
                     vm.src = 'http://localhost:8080' + vm.thumbnailFileList[0].file_path.replace('C:', '') + '/' + vm.thumbnailFileList[0].file_nm + '.' + vm.thumbnailFileList[0].file_extn_nm
                 }
                 vm.getViewer(vm.post.post_content)
+
+                axios({
+                    url: '/statistics/postLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: vm.post
+                })
             }).catch(function (error) {
                 console.log("error - ", error)
                 alert("게시글 상세보기 조회 오류, 관리자에게 문의하세요.");
@@ -231,7 +241,20 @@
                     window.URL.revokeObjectURL(url);
                 }
 
-                this.$router.go(0);
+                vm.item = vm.post
+                vm.item.file_id = vm.attachFileList[0].file_id;
+                vm.item.file_sn = vm.attachFileList[0].file_sn;
+                
+                axios({
+                    url: '/statistics/fileLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: vm.item
+                }).then(function(response){
+                    vm.$router.go(0);
+                })
 
             }).catch(function (error) {
                 console.log('error - ', error)
client/views/pages/user/community/News.vue
--- client/views/pages/user/community/News.vue
+++ client/views/pages/user/community/News.vue
@@ -103,6 +103,7 @@
                 bbs_id: '1',
                 sort: 'dt'
             },
+            page_nm: '홍보뉴스',
             modalItem: null,
             realContent: null,
             fileList: [],
@@ -117,7 +118,9 @@
                 { name: '제목', value: 'title' },
                 { name: '내용', value: 'content' },
                 { name: '작성자', value: 'writer' },
-            ]
+            ],
+
+            post:{}
         }
     },
     methods: {
@@ -145,6 +148,15 @@
                 vm.urlHTML(vm.videoUrl)
                 vm.modalItem = item;
                 vm.realContent = item.real_content;
+                vm.post = item;
+                axios({
+                    url: '/statistics/postLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: item
+                })
             }).catch(function (error) {
                 alert("홍보/뉴스 상세보기 오류, 관리자에게 문의바랍니다.");
             })
@@ -247,7 +259,17 @@
                     window.URL.revokeObjectURL(url);
                 }
 
-                this.$router.go(0);
+                item.post_id = vm.post.post_id;
+                item.bbs_id = vm.post.bbs_id;
+
+                axios({
+                    url: '/statistics/fileLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: item
+                })
 
             }).catch(function (error) {
                 console.log('error - ', error)
@@ -255,6 +277,19 @@
             });
         },
 
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
+
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
+        }
     },
     watch: {
 
@@ -267,6 +302,7 @@
     },
     mounted() {
         console.log('User News mounted');
+        this.pageLogInsert();
         this.postSelectList();
     }
 }
client/views/pages/user/community/Notice.vue
--- client/views/pages/user/community/Notice.vue
+++ client/views/pages/user/community/Notice.vue
@@ -91,6 +91,7 @@
                 bbs_id: '2',
                 sort: 'dt'
             },
+            page_nm: '공지사항',
             postList: [],
             postNoticeList: [],
             postListCount: 0,
@@ -159,6 +160,20 @@
             })
 
         },
+
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
+
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
+        }
     },
     watch: {
 
@@ -171,6 +186,7 @@
     },
     mounted() {
         console.log('User Notice mounted')
+        this.pageLogInsert();
         this.postSelectList();
     }
 }
client/views/pages/user/community/NoticeOne.vue
--- client/views/pages/user/community/NoticeOne.vue
+++ client/views/pages/user/community/NoticeOne.vue
@@ -134,6 +134,15 @@
                 }
 
                 vm.getViewer(vm.post.post_content)
+
+                axios({
+                    url: '/statistics/postLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: vm.post
+                })
             }).catch(function (error) {
                 console.log("error - ", error)
                 alert("게시글 상세보기 조회 오류, 관리자에게 문의하세요.");
@@ -189,7 +198,19 @@
                     window.URL.revokeObjectURL(url);
                 }
 
-                this.$router.go(0);
+                item.post_id = vm.post.post_id;
+                item.bbs_id = vm.post.bbs_id;
+                
+                axios({
+                    url: '/statistics/fileLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: item
+                }).then(function(response){
+                    vm.$router.go(0);
+                })
 
             }).catch(function (error) {
                 console.log('error - ', error)
client/views/pages/user/community/Wgcommunity.vue
--- client/views/pages/user/community/Wgcommunity.vue
+++ client/views/pages/user/community/Wgcommunity.vue
@@ -132,6 +132,7 @@
                 bbs_id: '4',
                 ctgry_nm: null
             },
+            page_nm: '전문가협의체',
             postList: [],
             postListCount: 0,
             postIdx: 0,
@@ -201,12 +202,27 @@
             })
 
         },
+
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
+
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
+        }
     },
     components: {
         PaginationButton: PaginationButton,
     },
     mounted() {
         console.log('Data mounted');
+        this.pageLogInsert();
         this.postSelectList();
     }
 }
client/views/pages/user/community/WgcommunityOne.vue
--- client/views/pages/user/community/WgcommunityOne.vue
+++ client/views/pages/user/community/WgcommunityOne.vue
@@ -147,6 +147,15 @@
                         vm.fileList = response.data.selectFileList;
                     }
                     vm.getViewer(vm.post.post_content)
+
+                    axios({
+                        url: '/statistics/postLogInsert.json',
+                        method: 'post',
+                        hearder: {
+                            'Content-Type': "application/json; charset=UTF-8",
+                        },
+                        data: vm.post
+                    })
                 }).catch(function (error) {
                     console.log("error - ", error)
                     alert("게시글 상세보기 조회 오류, 관리자에게 문의하세요.");
@@ -203,7 +212,20 @@
                     window.URL.revokeObjectURL(url);
                 }
 
-                this.$router.go(0);
+                item.post_id = vm.post.post_id;
+                item.bbs_id = vm.post.bbs_id;
+                item.ctgry_nm = vm.post.ctgry_nm;
+
+                axios({
+                    url: '/statistics/fileLogInsert.json',
+                    method: 'post',
+                    hearder: {
+                        'Content-Type': "application/json; charset=UTF-8",
+                    },
+                    data: item
+                }).then(function(response){
+                    vm.$router.go(0);
+                })
 
             }).catch(function (error) {
                 console.log('error - ', error)
client/views/pages/user/introduction/Introduction.vue
--- client/views/pages/user/introduction/Introduction.vue
+++ client/views/pages/user/introduction/Introduction.vue
@@ -33,13 +33,28 @@
 </template>
 
 <script>
+import axios from 'axios';
+
 export default {
     data() {
         return {
+            page_nm: '통합지원센터',
         }
     },
     methods: {
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
 
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
+        }
     },
     watch: {
 
@@ -49,6 +64,7 @@
     },
     mounted() {
         console.log('Introduction mounted');
+        this.pageLogInsert();
     }
 }
 </script>
client/views/pages/user/networking/Matching.vue
--- client/views/pages/user/networking/Matching.vue
+++ client/views/pages/user/networking/Matching.vue
@@ -103,6 +103,7 @@
                 searchType: null,
                 searchText: null,
             },
+            page_nm: '기업홍보관',
             userCompanyId: null,
             bestList: [],
             companyList: [],
@@ -217,6 +218,20 @@
             }).catch(function (error) {
                 console.log("기업 상세조회 오류, 관리자에게 문의하세요.");
             })
+        },
+
+        /**페이지 접속 로그 등록 */
+        pageLogInsert: function() {
+            const vm = this;
+
+            axios({
+                url: '/statistics/pageLogInsert.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': "application/json; charset=UTF-8",
+                },
+                data: { "page_nm": vm.page_nm }
+            })
         }
     },
     watch: {
@@ -227,6 +242,7 @@
     },
     mounted() {
         console.log('Matching mounted');
+        this.pageLogInsert();
         this.companySelectList();
     }
 }
Add a comment
List