yjryu / KERIS star
김하영 김하영 2023-12-06
231206 김하영
@79c7e41bcc94254c53e46ce02493c5ba9e41e99f
client/views/pages/user/mypage/MatchingManager.vue
--- client/views/pages/user/mypage/MatchingManager.vue
+++ client/views/pages/user/mypage/MatchingManager.vue
@@ -78,7 +78,7 @@
                             </div>
                             <div v-if="pickDispatchList.length === 0" class="matching-box-text"> 발신된 Pick이 없습니다.</div>
                             <div v-else class="inbox-sub">
-                                <div class="inbox-img" v-for="(item, idx) in pickDispatchList" :key="idx">
+                                <div class="inbox-img" v-for="(item, idx) in displayedItems2" :key="idx">
                                     <h4>{{ item.company_nm }}</h4>
                                     <div class="img-wrap">
 
@@ -94,6 +94,15 @@
                                     </div>
                                 </div>
                             </div>
+                            <div class="mat-user-button">
+                                <button v-if="pickDispatchList.length > 4 && !showMore2" @click="showMore2 = true"
+                                    class=" small-btn">
+                                    더보기
+                                </button>
+                                <button v-if="showMore2" @click="showMore2 = false" class="small-btn">
+                                    숨기기
+                                </button>
+                            </div>
                         </section>
 
                         <section class="matching-section-box">
@@ -101,7 +110,7 @@
                             <h2>완료</h2>
                             <div v-if="pickCompleteList.length === 0" class="matching-box-text"> 완료된 Pick이 없습니다.</div>
                             <div v-else class="inbox-sub">
-                                <div class="inbox-img" v-for="(item, idx) in pickCompleteList" :key="idx">
+                                <div class="inbox-img" v-for="(item, idx) in displayedItems3" :key="idx">
                                     <h4>{{ item.company_nm }}</h4>
                                     <div class="img-wrap">
                                         <img :src="'http://localhost:8080' + item.file_path + '/' + item.file_nm + '.' + item.file_extn_nm"
@@ -114,6 +123,15 @@
                                         <button @click="cardView(item)" class="red-border-btn small-btn">명함 보기</button>
                                     </div>
                                 </div>
+                            </div>
+                            <div class="mat-user-button">
+                                <button v-if="pickCompleteList.length > 4 && !showMore3" @click="showMore3 = true"
+                                    class=" small-btn">
+                                    더보기
+                                </button>
+                                <button v-if="showMore3" @click="showMore3 = false" class="small-btn">
+                                    숨기기
+                                </button>
                             </div>
                         </section>
                     </div>
@@ -129,7 +147,7 @@
                             <div v-if="matchingReceptionList.length === 0" class="matching-box-text"> 수신된 Macthing이 없습니다.
                             </div>
                             <div v-else class="inbox-sub">
-                                <div class="inbox-img" v-for="(item, idx) in matchingReceptionList" :key="idx">
+                                <div class="inbox-img" v-for="(item, idx) in displayedItems4" :key="idx">
                                     <h4>{{ item.company_nm }}</h4>
                                     <div class="img-wrap">
                                         <img :src="'http://localhost:8080' + item.file_path + '/' + item.file_nm + '.' + item.file_extn_nm"
@@ -144,6 +162,15 @@
                                     </div>
                                 </div>
                             </div>
+                            <div class="mat-user-button">
+                                <button v-if="matchingReceptionList.length > 4 && !showMore4" @click="showMore4 = true"
+                                    class=" small-btn">
+                                    더보기
+                                </button>
+                                <button v-if="showMore4" @click="showMore4 = false" class="small-btn">
+                                    숨기기
+                                </button>
+                            </div>
                         </section>
                         <section class="matching-section-box">
                             <div>
@@ -152,7 +179,7 @@
                             <div v-if="matchingDispatchList.length === 0" class="matching-box-text"> 발신된 Macthing이 없습니다.
                             </div>
                             <div v-else class="inbox-sub">
-                                <div class="inbox-img" v-for="(item, idx) in matchingDispatchList" :key="idx">
+                                <div class="inbox-img" v-for="(item, idx) in displayedItems5" :key="idx">
                                     <h4>{{ item.company_nm }}</h4>
                                     <div class="img-wrap">
                                         <img :src="'http://localhost:8080' + item.file_path + '/' + item.file_nm + '.' + item.file_extn_nm"
@@ -167,13 +194,22 @@
                                     </div>
                                 </div>
                             </div>
+                            <div class="mat-user-button">
+                                <button v-if="matchingDispatchList.length > 4 && !showMore5" @click="showMore5 = true"
+                                    class=" small-btn">
+                                    더보기
+                                </button>
+                                <button v-if="showMore5" @click="showMore5 = false" class="small-btn">
+                                    숨기기
+                                </button>
+                            </div>
                         </section>
                         <section class="matching-section-box">
                             <h2>완료</h2>
                             <div v-if="matchingCompleteList.length === 0" class="matching-box-text"> 완료된 Macthing이 없습니다.
                             </div>
                             <div v-else class="inbox-sub">
-                                <div class="inbox-img inbox-img-logo" v-for="(item, idx) in matchingCompleteList"
+                                <div class="inbox-img inbox-img-logo" v-for="(item, idx) in displayedItems6"
                                     :key="idx">
                                     <h4>{{ item.company_nm }}</h4>
                                     <div class="img-wrap">
@@ -188,6 +224,15 @@
                                         <button class="dark-gray-btn">매칭취소됨</button>
                                     </div>
                                 </div>
+                            </div>
+                            <div class="mat-user-button">
+                                <button v-if="matchingCompleteList.length > 4 && !showMore6" @click="showMore6 = true"
+                                    class=" small-btn">
+                                    더보기
+                                </button>
+                                <button v-if="showMore6" @click="showMore6 = false" class="small-btn">
+                                    숨기기
+                                </button>
                             </div>
                         </section>
                     </div>
@@ -297,7 +342,12 @@
             isVisible: false,
             company_nm: null,
             cardFullPath: null,
-            showMore: false
+            showMore: false,
+            showMore2:false,
+            showMore3:false,
+            showMore4:false,
+            showMore5:false,
+            showMore6:false
         }
     },
     methods: {
@@ -669,6 +719,41 @@
             } else {
                 return this.pickReceptionList.slice(0, 4);
             }
+        },
+        displayedItems2() {
+            if (this.showMore2) {
+                return this.pickDispatchList;
+            } else {
+                return this.pickDispatchList.slice(0, 4);
+            }
+        },
+        displayedItems3() {
+            if (this.showMore3) {
+                return this.pickCompleteList;
+            } else {
+                return this.pickCompleteList.slice(0, 4);
+            }
+        },
+        displayedItems4() {
+            if (this.showMore4) {
+                return this.matchingReceptionList;
+            } else {
+                return this.matchingReceptionList.slice(0, 4);
+            }
+        },
+        displayedItems5() {
+            if (this.showMore5) {
+                return this.matchingDispatchList;
+            } else {
+                return this.matchingDispatchList.slice(0, 4);
+            }
+        },
+        displayedItems6() {
+            if (this.showMore6) {
+                return this.matchingCompleteList;
+            } else {
+                return this.matchingCompleteList.slice(0, 4);
+            }
         }
     }
 }
Add a comment
List