jichoi / lms_front star
guntaek 2024-08-12
240812 김건택 PhotoBook 수정
@186c1934c68a501064c5481c903be05f5504442a
client/resources/css/style.css
--- client/resources/css/style.css
+++ client/resources/css/style.css
@@ -336,7 +336,7 @@
   width: max-content; 
     position: absolute;
     right: 45px;
-    z-index: -1;
+    z-index: 10000;
 }
 .myphoto .class{border-radius: 0px; padding: 10px;}
 .myphoto .class .box {
client/views/pages/main/PhotoBook.vue
--- client/views/pages/main/PhotoBook.vue
+++ client/views/pages/main/PhotoBook.vue
@@ -6,21 +6,16 @@
        <div>
             <div class="title-box flex justify-end mb40">
                 <select name="" id="">
-                    <option v-for="classItem in classList" :key="classItem.sclsId" :value="classItem.sclsId" @click="stdPhotoSelectList(classItem.sclsId)">
+                    <option v-for="classItem in classList" :key="classItem.sclsId" :value="classItem.sclsId" @click="currentPage = 1; stdPhotoSelectList(classItem.sclsId)">
                         {{ classItem.sclsNm }}
                     </option>
                 </select>
             </div>
-            <div class="btnGroup">
-                <button @click="selectedTab = 'tab1'" type="button" title="글쓰기" class="tab-btn">
-                    <img v-if="selectedTab !== 'tab1'" src="../../../resources/img/btn49_15s_normal.png" alt="">
+            <div class="btnGroup" style="display: flex; flex-direction: column;">
+                <button v-for="n in totalPages" :key="n" @click="changePage(n)" type="button" title="페이지 버튼" class="tab-btn">
+                    <img v-if="currentPage !== n" src="../../../resources/img/btn49_15s_normal.png" alt="">
                     <img v-else src="../../../resources/img/btn49_15s_click.png" alt="">
-                    <p :class="{ 'custom-style': selectedTab === 'tab1' }">1</p>
-                </button>
-                <button @click="selectedTab = 'tab2'" type="button" title="글쓰기" class="tab-btn">
-                    <img v-if="selectedTab !== 'tab2'" src="../../../resources/img/btn49_15s_normal.png" alt="">
-                    <img v-else src="../../../resources/img/btn49_15s_click.png" alt="">
-                    <p :class="{ 'custom-style': selectedTab === 'tab2' }">2</p>
+                    <p :class="{ 'custom-style': currentPage === n }">{{ n }}</p>
                 </button>
             </div>
             <div v-if="selectedTab === 'tab1'" class="tab-box">
@@ -94,7 +89,7 @@
 
             currentPage: 1,
             pageSize: 6,
-            totalPages: 2,
+            totalPages: 1,
 
             mdiWindowClose: mdiWindowClose,
             selectedTab: 'tab1',
@@ -117,7 +112,7 @@
                     "Content-Type": "application/json; charset=UTF-8",
                 },
                 data: {
-                    userId:"2"
+                    userId:"1"
                 }
             })
             .then(function (response) {
@@ -149,7 +144,7 @@
             .then(function (response) {
                 console.log("photoList - response : ", response.data);
                 vm.photoList = response.data;
-                vm.totalPages = Math.ceil(response.data.length / vm.pageSize);
+                vm.totalPages = Math.ceil(response.data.photoCount / vm.pageSize);
             })
             .catch(function (error) {
                 console.log("photoList - error : ", error);
@@ -242,4 +237,11 @@
         this.stdPhotoSelectList();
     }
 }
-</script>
(No newline at end of file)
+</script>
+
+<style>
+.btnGroup button {
+    cursor: pointer;
+    z-index: 100000;
+}
+</style>
(No newline at end of file)
Add a comment
List