jichoi / lms_front star
dajenog 08-14
240814 정다정 포토북 css 수정
@22eceafff11fd1fb574b9b424b6bc5867e183f20
client/views/pages/main/PhotoBook.vue
--- client/views/pages/main/PhotoBook.vue
+++ client/views/pages/main/PhotoBook.vue
@@ -3,27 +3,48 @@
         <p class="title">내 사진첩</p>
     </div>
     <div class="myphoto mb30">
-       <div>
+        <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="currentPage = 1; 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" 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="">
+            <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': currentPage === n }">{{ n }}</p>
                 </button>
             </div>
             <div v-if="selectedTab === 'tab1'" class="tab-box">
                 <div class="flex justify-between">
-                    <div v-for="(photo, index) in (photoList?.result || []).slice(0, 3)" :key="index" class="photo" :style="{ transform: getRotation(index) }" @click="buttonSearch(photo)">
+                    <div
+                        v-for="(photo, index) in (photoList?.result || []).slice(0, 3)"
+                        :key="index"
+                        class="photo"
+                        :style="{ transform: getRotation(index) }"
+                        @click="buttonSearch(photo)"
+                    >
                         <div class="class">
                             <div class="box">
-                                <div><img src="../../../resources/img/img213_15s.png" alt=""></div>
+                                <div><img src="../../../resources/img/img213_15s.png" alt="" /></div>
                             </div>
                             <div class="text flex justify-between mt20">
                                 <span class="member ml30">{{ photo.likeData }}</span>
@@ -33,10 +54,16 @@
                     </div>
                 </div>
                 <div class="flex justify-between mt50">
-                    <div v-for="(photo, index) in (photoList?.result || []).slice(3, 6)" :key="index + 3" class="photo" :style="{ transform: getRotation(index + 3) }" @click="buttonSearch(photo)">
+                    <div
+                        v-for="(photo, index) in (photoList?.result || []).slice(3, 6)"
+                        :key="index + 3"
+                        class="photo"
+                        :style="{ transform: getRotation(index + 3) }"
+                        @click="buttonSearch(photo)"
+                    >
                         <div class="class">
                             <div class="box">
-                                <div><img src="../../../resources/img/img213_15s.png" alt=""></div>
+                                <div><img src="../../../resources/img/img213_15s.png" alt="" /></div>
                             </div>
                             <div class="text flex justify-between mt20">
                                 <span class="member ml30">{{ photo.likeData }}</span>
@@ -55,10 +82,13 @@
                         </button>
                     </div>
                     <div class="box">
-                        <div><img src="../../../resources/img/img184_91t.png" alt=""></div>
+                        <div><img src="../../../resources/img/img184_91t.png" alt="" /></div>
                     </div>
                     <div class="text flex justify-between mt20" v-if="photoData.length > 0">
-                        <span class="title1">{{ photoData[0].unitName }}을 마친 <em class="yellow">{{ photoData[0].stdName }}</em>친구</span>
+                        <span class="title1"
+                            >{{ photoData[0].unitName }}을 마친 <em class="yellow">{{ photoData[0].stdName }}</em
+                            >친구</span
+                        >
                         <p class="title2 date">{{ photoData[0].photoDate }}</p>
                     </div>
                     <div class="text flex justify-between mt20" v-else>
@@ -66,8 +96,7 @@
                     </div>
                 </div>
             </div>
-
-       </div>
+        </div>
     </div>
 </template>
 
@@ -76,8 +105,7 @@
 import { mdiMagnify, mdiHeart, mdiWindowClose } from '@mdi/js';
 import { mdilArrowRight } from '@mdi/light-js';
 import ProgressBar from '../../component/ProgressBar.vue';
-import axios from "axios";
-
+import axios from 'axios';
 
 export default {
     data() {
@@ -95,61 +123,61 @@
             selectedTab: 'tab1',
             mdiMagnify: mdiMagnify,
             mdilArrowRight: mdilArrowRight,
-            timer: "00:00",
+            timer: '00:00',
             progress: 20,
             showModal: false,
             searchOpen: false,
             searchOpen2: false,
-        }
+        };
     },
     methods: {
         stdClassesSelectList: function () {
             const vm = this;
             axios({
-                url: "/classes/selectClass.json",
-                method: "post",
-                headers:{
-                    "Content-Type": "application/json; charset=UTF-8",
+                url: '/classes/selectClass.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': 'application/json; charset=UTF-8',
                 },
                 data: {
-                    userId:"1"
-                }
+                    userId: '1',
+                },
             })
-            .then(function (response) {
-                console.log("classList - response : ", response.data);
-                vm.classList = response.data.data;
-                vm.currentPage = 1;
-            })
-            .catch(function (error) {
-                console.log("classList - error : ", error);
-                alert("학생 반 조회에 오류가 발생했습니다.");
-            });
+                .then(function (response) {
+                    console.log('classList - response : ', response.data);
+                    vm.classList = response.data.data;
+                    vm.currentPage = 1;
+                })
+                .catch(function (error) {
+                    console.log('classList - error : ', error);
+                    alert('학생 반 조회에 오류가 발생했습니다.');
+                });
         },
 
         stdPhotoSelectList: function (sclsId) {
             const vm = this;
             axios({
-                url: "/photo/stdPhotoList.json",
-                method: "post",
-                headers:{
-                    "Content-Type": "application/json; charset=UTF-8",
+                url: '/photo/stdPhotoList.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': 'application/json; charset=UTF-8',
                 },
                 data: {
-                        "stdId":"1",
-                        "sclsId":"1", // 여기에 sclsId들어가야함
-                        page: vm.currentPage,
-                        pageSize: vm.pageSize
-                }
+                    stdId: '1',
+                    sclsId: '1', // 여기에 sclsId들어가야함
+                    page: vm.currentPage,
+                    pageSize: vm.pageSize,
+                },
             })
-            .then(function (response) {
-                console.log("photoList - response : ", response.data);
-                vm.photoList = response.data;
-                vm.totalPages = Math.ceil(response.data.photoCount / vm.pageSize);
-            })
-            .catch(function (error) {
-                console.log("photoList - error : ", error);
-                alert("반별 내 사진 조회에 오류가 발생했습니다.");
-            });
+                .then(function (response) {
+                    console.log('photoList - response : ', response.data);
+                    vm.photoList = response.data;
+                    vm.totalPages = Math.ceil(response.data.photoCount / vm.pageSize);
+                })
+                .catch(function (error) {
+                    console.log('photoList - error : ', error);
+                    alert('반별 내 사진 조회에 오류가 발생했습니다.');
+                });
         },
 
         getRotation(index) {
@@ -166,28 +194,28 @@
             this.showModal = false;
         },
         buttonSearch(photo) {
-            if(!photo) return;
+            if (!photo) return;
 
             const vm = this;
             this.searchOpen = true;
             axios({
-                url: "/photo/photoDetail.json",
-                method: "post",
-                headers:{
-                    "Content-Type": "application/json; charset=UTF-8",
+                url: '/photo/photoDetail.json',
+                method: 'post',
+                headers: {
+                    'Content-Type': 'application/json; charset=UTF-8',
                 },
                 data: {
-                        "photoId":photo.photoId
-                }
+                    photoId: photo.photoId,
+                },
             })
-            .then(function (response) {
-                console.log("photoData - response : ", response.data);
-                vm.photoData = response.data;
-            })
-            .catch(function (error) {
-                console.log("photoData - error : ", error);
-                alert("사진 조회에 오류가 발생했습니다.");
-            });
+                .then(function (response) {
+                    console.log('photoData - response : ', response.data);
+                    vm.photoData = response.data;
+                })
+                .catch(function (error) {
+                    console.log('photoData - error : ', error);
+                    alert('사진 조회에 오류가 발생했습니다.');
+                });
         },
 
         closeBtn() {
@@ -216,27 +244,25 @@
             }
         },
     },
-    watch: {
-
-    },
+    watch: {},
     computed: {
         currentPhotos() {
             // 현재 페이지에 해당하는 사진들만 반환
             const start = (this.currentPage - 1) * this.pageSize;
             const end = start + this.pageSize;
             return this.photoList.result.slice(start, end);
-        }
+        },
     },
     components: {
         SvgIcon,
-        ProgressBar
+        ProgressBar,
     },
     mounted() {
         console.log('Main2 mounted');
         this.stdClassesSelectList();
         this.stdPhotoSelectList();
-    }
-}
+    },
+};
 </script>
 
 <style>
@@ -244,4 +270,10 @@
     cursor: pointer;
     z-index: 100000;
 }
-</style>
(파일 끝에 줄바꿈 문자 없음)
+.popup-wrap {
+    z-index: 10000000;
+}
+.popup-box {
+    top: 500px;
+}
+</style>
Add a comment
List