yjryu / KERIS star
이세현 이세현 2023-11-12
231112 이세현 페이징
@a1cac513b7ca2742cae3470bb27faae394552892
client/views/pages/admin/login/Login.vue
--- client/views/pages/admin/login/Login.vue
+++ client/views/pages/admin/login/Login.vue
@@ -41,6 +41,7 @@
     methods: {
         //로그인
         login: function () {
+            let vm = this;
             var iv = this.store.state.key.iv;
             var salt = this.store.state.key.salt;
             var passPhrase = this.store.state.key.ENC_KEY;
@@ -49,9 +50,15 @@
             var key128Bits100Iterations = crypto.PBKDF2(passPhrase, crypto.enc.Hex.parse(salt), { keySize: keySize / 32, iterations: iterationCount });
 
             // var encrypted = CryptoJS.AES.encrypt(
-            this.mngrLogin.mngr_id = crypto.AES.encrypt(this.mngrLogin.mngr_id, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
-            this.mngrLogin.mngr_pw = crypto.AES.encrypt(this.mngrLogin.mngr_pw, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
-            let vm = this;
+            // this.mngrLogin.mngr_id = crypto.AES.encrypt(this.mngrLogin.mngr_id, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+            // this.mngrLogin.mngr_pw = crypto.AES.encrypt(this.mngrLogin.mngr_pw, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+            let encryptedMngrId = crypto.AES.encrypt(this.mngrLogin.mngr_id, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+            let encryptedMngrPw = crypto.AES.encrypt(this.mngrLogin.mngr_pw, key128Bits100Iterations, { iv: crypto.enc.Hex.parse(iv) }).toString();
+            
+            var loginData = {
+                mngr_id: encryptedMngrId,
+                mngr_pw: encryptedMngrPw
+            };
 
             axios({
                 url: '/managerLogin.json',
@@ -63,7 +70,7 @@
                     'Content-Type': 'application/json; charset=UTF-8'
                 },
 
-                data: vm.mngrLogin
+                data: loginData
             }).then(function (response) {
                 if (response.data == true) {
                     vm.$emit("updateIsLogin", true);
client/views/pages/admin/notice/NoticeSelectList.vue
--- client/views/pages/admin/notice/NoticeSelectList.vue
+++ client/views/pages/admin/notice/NoticeSelectList.vue
@@ -49,12 +49,18 @@
                     <button class="blue-btn" @click="postInsertPage()">글쓰기</button>
                 </div>
             </div>
+            <div class="bottom-wrap">
+                    <PaginationButton v-model:currentPage="postListSearch.currentPage"
+                    :perpage="postListSearch.perPage" :total-count="postListCount" :max-range="5"
+                    :click="postSelectList" />
+                </div>
         </div>
     </div>
 </template>
 <script>
 import axios from 'axios';
 import COMMON_UTIL from '../../../../resources/js/commonUtil.js';
+import PaginationButton from '../../../component/pagination/PaginationButton.vue';
 
 export default {
 
@@ -106,7 +112,9 @@
     },
     watch: {},
     computed: {},
-    components: {},
+    components: {
+        PaginationButton: PaginationButton,
+    },
     mounted() {
         console.log('Notice mounted')
         this.postSelectList();
client/views/pages/user/community/Notice.vue
--- client/views/pages/user/community/Notice.vue
+++ client/views/pages/user/community/Notice.vue
@@ -10,8 +10,8 @@
                     <select v-model="postListSearch.searchType" name="data-table-sild" id="data-table-sild">
                         <option :value=null selected>전체</option>
                         <option value="title">제목</option>
-                        <option value="user">작성자</option>
-                        <option value="조회순">조회순</option>
+                        <option value="content">내용</option>
+                        <option value="writer">작성자</option>
                     </select>
                     <div class="input-group">
                         <input type="text" class="input" placeholder="검색어를 입력해주세요." v-model="postListSearch.searchText"
@@ -41,6 +41,11 @@
                         </table>
                     </div>
                 </div>
+                <div class="bottom-wrap">
+                    <PaginationButton v-model:currentPage="postListSearch.currentPage"
+                    :perpage="postListSearch.perPage" :total-count="postListCount" :max-range="5"
+                    :click="postSelectList" />
+                </div>
             </div>
         </div>
     </div>
@@ -49,7 +54,7 @@
 <script>
 import axios from 'axios';
 import COMMON_UTIL from '../../../../resources/js/commonUtil.js';
-
+import PaginationButton from '../../../component/pagination/PaginationButton.vue';
 export default {
     data() {
         return {
@@ -101,6 +106,9 @@
     computed: {
 
     },
+    components: {
+        PaginationButton: PaginationButton,
+    },
     mounted() {
         console.log('User Notice mounted')
         this.postSelectList();
Add a comment
List