박정하 박정하 03-27
250327 박정하 사진기록물 목록 조회 수정
@c2d5d7e958dfa51cd2637b6f8cea9b6b066f318e
client/views/component/CardViewList.vue
--- client/views/component/CardViewList.vue
+++ client/views/component/CardViewList.vue
@@ -7,8 +7,8 @@
       </div>
       <button type="button" class="gopage" @click="fnMoveTo(routeName, null)">모두보기</button>
     </div>
-    <div v-if="searchResult.length > 0">
-      <CardStyleComponent :name="name" :list="searchResult" />
+    <div v-if="list.length > 0">
+      <CardStyleComponent :name="name" :list="list" />
     </div>
     <div v-else class="no-results">
       <p>등록된 게시물이 없습니다.</p>
@@ -16,9 +16,15 @@
   </div>
 </template>
 <script>
+// COMPONENT
+import CardStyleComponent from '@/views/component/listLayout/CardStyleComponent.vue';
 export default {
   name: "CardViewList",
 
+  components: {
+    CardStyleComponent,
+  },
+
   props: {
     name: {
       type: String,
client/views/pages/user/PicHistoryDetail.vue
--- client/views/pages/user/PicHistoryDetail.vue
+++ client/views/pages/user/PicHistoryDetail.vue
@@ -172,7 +172,7 @@
     // 파일 다운로드
     async fnDownload(type) {
       // 유효성 검사
-      if (this.selectedFiles.length === 1) {
+      if (type === 'selected' && this.selectedFiles.length === 0) {
         alert("파일을 1개 이상 선택하거나 전체 다운로드를 클릭해주세요.");
         return;
       }
@@ -182,10 +182,8 @@
 
       try {
         // 파일 ID 수집
-        let fileIds = null;
-        if (type === 'selected') {
-          fileIds = this.selectedFiles[0];
-        } else if (type === 'all') {
+        let fileIds = this.selectedFiles[0];
+        if (type === 'all' && this.dcry.files.length > 1) {
           fileIds = this.dcry.files.map(file => file.fileId).join(',');
         }
 
client/views/pages/user/PicHistorySearch.vue
--- client/views/pages/user/PicHistorySearch.vue
+++ client/views/pages/user/PicHistorySearch.vue
@@ -50,8 +50,8 @@
           <p>카테고리</p>
           <ul>
             <li v-for="(category, idx) of categorys" :key="idx">
-              <input type="checkbox" :id="category.ctgryId" name="categorys" :value="category.ctgryId" v-model="searchReqDTO.searchCtgries" />
-              <label :for="category.ctgryId">{{ category.ctgryNm }}</label>
+              <input type="checkbox" :id="'ctgry_' + idx" name="categorys" :value="category.ctgryId" v-model="searchReqDTO.searchCtgries" />
+              <label :for="'ctgry_' + idx">{{ category.ctgryNm }}</label>
             </li>
           </ul>
         </dd>
client/views/pages/user/TotalSearch.vue
--- client/views/pages/user/TotalSearch.vue
+++ client/views/pages/user/TotalSearch.vue
@@ -75,8 +75,8 @@
           <p>카테고리</p>
           <ul>
             <li v-for="(category, idx) of categorys" :key="idx">
-              <input type="checkbox" :id="category.ctgryId" name="categorys" :value="category.ctgryId" v-model="searchReqDTO.searchCtgries" />
-              <label :for="category.ctgryId">{{ category.ctgryNm }}</label>
+              <input type="checkbox" :id="'ctgry_' + idx" name="categorys" :value="category.ctgryId" v-model="searchReqDTO.searchCtgries" />
+              <label :for="'ctgry_' + idx">{{ category.ctgryNm }}</label>
             </li>
           </ul>
         </dd>
Add a comment
List