
--- client/views/component/listLayout/CardStyleComponent.vue
+++ client/views/component/listLayout/CardStyleComponent.vue
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 |
<ul> |
22 | 22 |
<li>생산연도 <b>{{ item.prdctnYear ? item.prdctnYear : '-' }}</b></li> |
23 | 23 |
<li>|</li> |
24 |
- <li>등록 <b>{{ item.rgsde }}</b></li> |
|
24 |
+ <li>등록 <b>{{ $dotFormatDate(item.rgsde) }}</b></li> |
|
25 | 25 |
</ul> |
26 | 26 |
</div> |
27 | 27 |
</div> |
--- client/views/component/listLayout/ListStyleComponent.vue
+++ client/views/component/listLayout/ListStyleComponent.vue
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 |
<ul> |
15 | 15 |
<li>생산연도 <b>{{ item.prdctnYear ? item.prdctnYear : '-' }}</b></li> |
16 | 16 |
<li>|</li> |
17 |
- <li>등록 <b>{{ item.rgsde }}</b></li> |
|
17 |
+ <li>등록 <b>{{ $dotFormatDate(item.rgsde) }}</b></li> |
|
18 | 18 |
</ul> |
19 | 19 |
</div> |
20 | 20 |
</div> |
--- client/views/pages/user/VideoHistoryDetail.vue
+++ client/views/pages/user/VideoHistoryDetail.vue
... | ... | @@ -1,80 +1,70 @@ |
1 | 1 |
<template> |
2 |
- <div class="content"> |
|
3 |
- <div class="sub-title-area mb-30"> |
|
4 |
- <h2>영상 기록물</h2> |
|
5 |
- <div class="breadcrumb-list"> |
|
6 |
- <ul> |
|
7 |
- <li><img :src="homeicon" alt="Home Icon"> |
|
8 |
- <p>기록물</p> |
|
9 |
- </li> |
|
10 |
- <li><img :src="righticon" alt=""></li> |
|
11 |
- <li>영상 기록물</li> |
|
12 |
- </ul> |
|
13 |
- </div> |
|
14 |
- </div> |
|
15 |
- <form action="" class="gallery-form mb-40"> |
|
16 |
- <dl class="mb-20"> |
|
17 |
- <dd> |
|
18 |
- <p>영상 기록물 제목1 |
|
19 |
- </p> |
|
20 |
- <div class="date flex align-center"> |
|
21 |
- <img :src="calendaricon" alt=""> |
|
22 |
- <span>2025.02.28</span> |
|
23 |
- </div> |
|
24 |
- </dd> |
|
25 |
- |
|
26 |
- </dl> |
|
27 |
- <div class="gallery video"> |
|
28 |
- <img :src="eximg" alt=""> |
|
29 |
- </div> |
|
30 |
- </form> |
|
31 |
- |
|
32 |
- <h3>내용</h3> |
|
33 |
- <form action="" class=" info-form mb-50"> |
|
34 |
- <dl> |
|
35 |
- <dd> |
|
36 |
- <p> 대한민국 최대의 내륙 산업단지를 보유하고, 서울로부터 277km, 부산으로부터 167km 거리에 있으며, 면적은 615㎢로 경상북도 전체 면적의 3.2%에 달합니다. 인구는 |
|
37 |
- 41만 명이고, 선산읍, 고아읍, 산동읍을 비롯한 3읍, 5면, 17개 동으로 구성되어 있습니다.</p> |
|
38 |
- |
|
39 |
- </dd> |
|
40 |
- </dl> |
|
41 |
- </form> |
|
42 |
- |
|
43 |
- <h3>기본정보</h3> |
|
44 |
- <form action="" class="info-form mb-50"> |
|
45 |
- <dl> |
|
46 |
- <dd class="mb-20"> |
|
47 |
- <img :src="addressicon" alt=""> |
|
48 |
- <span>주소</span> |
|
49 |
- <p>경상북도 구미시 송정대로 55</p> |
|
50 |
- </dd> |
|
51 |
- <dd class="mb-20"> |
|
52 |
- <img :src="yearicon" alt=""> |
|
53 |
- <span>생산연도</span> |
|
54 |
- <p>2017</p> |
|
55 |
- |
|
56 |
- </dd> |
|
57 |
- <dd> |
|
58 |
- <img :src="categoryicon" alt=""> |
|
59 |
- <span>카테고리</span> |
|
60 |
- <ul class="category"> |
|
61 |
- <li v-if="resultitem.category1" class="category1">카테고리1</li> |
|
62 |
- <li v-if="resultitem.category2" class="category2">카테고리2</li> |
|
63 |
- </ul> |
|
64 |
- |
|
65 |
- </dd> |
|
66 |
- |
|
67 |
- </dl> |
|
68 |
- </form> |
|
69 |
- <div class="btn-group flex-center"> |
|
70 |
- <button class="red-line " type="button" @click="fnDeleteUser">삭제</button> |
|
71 |
- <button class="blue-line " type="button" @click="fnUpdateUser">수정</button> |
|
72 |
- <button class="gray-line-bg " type="button" @click="fnUpdateUser">목록</button> |
|
73 |
- <button class="gradient ">다운로드</button> |
|
74 |
- </div> |
|
2 |
+ <div class="content"> |
|
3 |
+ <div class="sub-title-area mb-30"> |
|
4 |
+ <h2>영상 기록물</h2> |
|
5 |
+ <div class="breadcrumb-list"> |
|
6 |
+ <ul> |
|
7 |
+ <li><img :src="homeicon" alt="Home Icon"> |
|
8 |
+ <p>기록물</p> |
|
9 |
+ </li> |
|
10 |
+ <li><img :src="righticon" alt=""></li> |
|
11 |
+ <li>영상 기록물</li> |
|
12 |
+ </ul> |
|
13 |
+ </div> |
|
75 | 14 |
</div> |
15 |
+ <form action="" class="gallery-form mb-40"> |
|
16 |
+ <dl class="mb-20"> |
|
17 |
+ <dd> |
|
18 |
+ <p>영상 기록물 제목1 </p> |
|
19 |
+ <div class="date flex align-center"> |
|
20 |
+ <img :src="calendaricon" alt=""> |
|
21 |
+ <span>2025.02.28</span> |
|
22 |
+ </div> |
|
23 |
+ </dd> |
|
24 |
+ </dl> |
|
25 |
+ <div class="gallery video"> |
|
26 |
+ <img :src="eximg" alt=""> |
|
27 |
+ </div> |
|
28 |
+ </form> |
|
29 |
+ <h3>내용</h3> |
|
30 |
+ <form action="" class=" info-form mb-50"> |
|
31 |
+ <dl> |
|
32 |
+ <dd> |
|
33 |
+ <p> 대한민국 최대의 내륙 산업단지를 보유하고, 서울로부터 277km, 부산으로부터 167km 거리에 있으며, 면적은 615㎢로 경상북도 전체 면적의 3.2%에 달합니다. 인구는 41만 명이고, 선산읍, 고아읍, 산동읍을 비롯한 3읍, 5면, 17개 동으로 구성되어 있습니다.</p> |
|
34 |
+ </dd> |
|
35 |
+ </dl> |
|
36 |
+ </form> |
|
37 |
+ <h3>기본정보</h3> |
|
38 |
+ <form action="" class="info-form mb-50"> |
|
39 |
+ <dl> |
|
40 |
+ <dd class="mb-20"> |
|
41 |
+ <img :src="addressicon" alt=""> |
|
42 |
+ <span>주소</span> |
|
43 |
+ <p>경상북도 구미시 송정대로 55</p> |
|
44 |
+ </dd> |
|
45 |
+ <dd class="mb-20"> |
|
46 |
+ <img :src="yearicon" alt=""> |
|
47 |
+ <span>생산연도</span> |
|
48 |
+ <p>2017</p> |
|
49 |
+ </dd> |
|
50 |
+ <dd> |
|
51 |
+ <img :src="categoryicon" alt=""> |
|
52 |
+ <span>카테고리</span> |
|
53 |
+ <ul class="category"> |
|
54 |
+ <li v-if="resultitem.category1" class="category1">카테고리1</li> |
|
55 |
+ <li v-if="resultitem.category2" class="category2">카테고리2</li> |
|
56 |
+ </ul> |
|
57 |
+ </dd> |
|
58 |
+ </dl> |
|
59 |
+ </form> |
|
60 |
+ <div class="btn-group flex-center"> |
|
61 |
+ <button class="red-line " type="button" @click="fnDeleteUser">삭제</button> |
|
62 |
+ <button class="blue-line " type="button" @click="fnUpdateUser">수정</button> |
|
63 |
+ <button class="gray-line-bg " type="button" @click="fnUpdateUser">목록</button> |
|
64 |
+ <button class="gradient ">다운로드</button> |
|
65 |
+ </div> |
|
66 |
+ </div> |
|
76 | 67 |
</template> |
77 |
- |
|
78 | 68 |
<script> |
79 | 69 |
import axios from "axios"; |
80 | 70 |
import { ref } from 'vue'; |
... | ... | @@ -94,56 +84,56 @@ |
94 | 84 |
import { FreeMode, Navigation, Thumbs } from 'swiper/modules'; |
95 | 85 |
|
96 | 86 |
export default { |
97 |
- components: { |
|
98 |
- PauseOutlined, |
|
99 |
- CaretRightOutlined, |
|
100 |
- Swiper, |
|
101 |
- SwiperSlide, |
|
102 |
- }, |
|
103 |
- setup() { |
|
104 |
- const thumbsSwiper = ref(null); |
|
87 |
+ components: { |
|
88 |
+ PauseOutlined, |
|
89 |
+ CaretRightOutlined, |
|
90 |
+ Swiper, |
|
91 |
+ SwiperSlide, |
|
92 |
+ }, |
|
93 |
+ setup() { |
|
94 |
+ const thumbsSwiper = ref(null); |
|
105 | 95 |
|
106 |
- const setThumbsSwiper = (swiper) => { |
|
107 |
- thumbsSwiper.value = swiper; |
|
108 |
- }; |
|
96 |
+ const setThumbsSwiper = (swiper) => { |
|
97 |
+ thumbsSwiper.value = swiper; |
|
98 |
+ }; |
|
109 | 99 |
|
110 |
- return { |
|
111 |
- thumbsSwiper, |
|
112 |
- setThumbsSwiper, |
|
113 |
- modules: [FreeMode, Navigation, Thumbs], |
|
114 |
- }; |
|
115 |
- }, |
|
116 |
- data() { |
|
117 |
- return { |
|
118 |
- resultitem: { |
|
119 |
- category1: true, |
|
120 |
- category2: true, |
|
121 |
- }, |
|
122 |
- calendaricon: 'client/resources/images/icon/calendaricon.png', |
|
123 |
- homeicon: 'client/resources/images/icon/home.png', |
|
124 |
- erroricon: 'client/resources/images/icon/error.png', |
|
125 |
- righticon: 'client/resources/images/icon/right.png', |
|
126 |
- addressicon: 'client/resources/images/icon/addressicon.png', |
|
127 |
- yearicon: 'client/resources/images/icon/yearicon.png', |
|
128 |
- categoryicon: 'client/resources/images/icon/categoryicon.png', |
|
129 |
- eximg: 'client/resources/images/img8.png', |
|
130 |
- slides: [ |
|
131 |
- { img: 'client/resources/images/visual.png', alt: 'Slide 1' }, |
|
132 |
- { img: 'client/resources/images/visual.png', alt: 'Slide 2' }, |
|
133 |
- { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
134 |
- { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
135 |
- { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
136 |
- { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
137 |
- // Add more slides as needed |
|
138 |
- ], |
|
100 |
+ return { |
|
101 |
+ thumbsSwiper, |
|
102 |
+ setThumbsSwiper, |
|
103 |
+ modules: [FreeMode, Navigation, Thumbs], |
|
104 |
+ }; |
|
105 |
+ }, |
|
106 |
+ data() { |
|
107 |
+ return { |
|
108 |
+ resultitem: { |
|
109 |
+ category1: true, |
|
110 |
+ category2: true, |
|
111 |
+ }, |
|
112 |
+ calendaricon: 'client/resources/images/icon/calendaricon.png', |
|
113 |
+ homeicon: 'client/resources/images/icon/home.png', |
|
114 |
+ erroricon: 'client/resources/images/icon/error.png', |
|
115 |
+ righticon: 'client/resources/images/icon/right.png', |
|
116 |
+ addressicon: 'client/resources/images/icon/addressicon.png', |
|
117 |
+ yearicon: 'client/resources/images/icon/yearicon.png', |
|
118 |
+ categoryicon: 'client/resources/images/icon/categoryicon.png', |
|
119 |
+ eximg: 'client/resources/images/img8.png', |
|
120 |
+ slides: [ |
|
121 |
+ { img: 'client/resources/images/visual.png', alt: 'Slide 1' }, |
|
122 |
+ { img: 'client/resources/images/visual.png', alt: 'Slide 2' }, |
|
123 |
+ { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
124 |
+ { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
125 |
+ { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
126 |
+ { img: 'client/resources/images/visual.png', alt: 'Slide 3' }, |
|
127 |
+ // Add more slides as needed |
|
128 |
+ ], |
|
139 | 129 |
|
140 |
- }; |
|
141 |
- }, |
|
142 |
- methods: { |
|
143 |
- }, |
|
144 |
- watch: {}, |
|
145 |
- computed: { |
|
146 |
- }, |
|
147 |
- mounted() { }, |
|
130 |
+ }; |
|
131 |
+ }, |
|
132 |
+ methods: { |
|
133 |
+ }, |
|
134 |
+ watch: {}, |
|
135 |
+ computed: { |
|
136 |
+ }, |
|
137 |
+ mounted() { }, |
|
148 | 138 |
}; |
149 | 139 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/user/VideoHistorySearch.vue
+++ client/views/pages/user/VideoHistorySearch.vue
... | ... | @@ -1,412 +1,390 @@ |
1 | 1 |
<template> |
2 |
- <div class="content"> |
|
3 |
- <div class="sub-title-area mb-30"> |
|
4 |
- <h2>영상 기록물</h2> |
|
5 |
- <div class="breadcrumb-list"> |
|
6 |
- <ul> |
|
7 |
- <!-- Bind the image source dynamically for homeicon --> |
|
8 |
- <li><img :src="homeicon" alt="Home Icon"> |
|
9 |
- <p>기록물</p> |
|
10 |
- </li> |
|
11 |
- <li><img :src="righticon" alt=""></li> |
|
12 |
- <li>영상 기록물</li> |
|
13 |
- </ul> |
|
14 |
- </div> |
|
15 |
- </div> |
|
16 |
- <div action="search" class="search-form form "> |
|
17 |
- <dl> |
|
18 |
- <dd class="mb-15"> |
|
19 |
- <p>검색범위</p> |
|
20 |
- <ul> |
|
21 |
- <li> |
|
22 |
- <input type="checkbox" id="allScope" v-model="isChkAllScope" |
|
23 |
- @change="fnChkAllOptions('scope')" /> |
|
24 |
- <label for="allScope">전체</label> |
|
25 |
- </li> |
|
26 |
- <li v-for="(scope, idx) in searchType" :key="idx"> |
|
27 |
- <input type="checkbox" :id="idx" :name="searchType" :value="scope.key" |
|
28 |
- v-model="searchReqDTO.searchType" @change="fnChkOption('scope')" /> |
|
29 |
- <label :for="idx">{{ scope.value }}</label> |
|
30 |
- </li> |
|
31 |
- </ul> |
|
32 |
- </dd> |
|
33 |
- <dd class="mb-15"> |
|
34 |
- <p>검색어</p> |
|
35 |
- <div class="wfull"><input type="text" v-model="searchReqDTO.searchText"></div> |
|
36 |
- </dd> |
|
37 |
- <dd class="mb-15"> |
|
38 |
- <p>생산연도</p> |
|
39 |
- <input type="date" v-model="searchReqDTO.startYear"> |
|
40 |
- <p class="mark">~</p> |
|
41 |
- <input type="date" v-model="searchReqDTO.endYear"> |
|
42 |
- </dd> |
|
43 |
- <dd class="mb-20"> |
|
44 |
- <p>카테고리</p> |
|
45 |
- <ul> |
|
46 |
- <li v-for="(category, idx) of categorys" :key="idx"> |
|
47 |
- <input type="checkbox" :id="category.ctgryId" name="categorys" :value="category.ctgryId" |
|
48 |
- v-model="searchReqDTO.searchCtgry" /> |
|
49 |
- <label :for="category.ctgryId">{{ category.ctgryNm }}</label> |
|
50 |
- </li> |
|
51 |
- </ul> |
|
52 |
- </dd> |
|
53 |
- <dd class="mb-15"> |
|
54 |
- <p>정렬</p> |
|
55 |
- <ul> |
|
56 |
- <li v-for="(order, idx) of orders" :key="idx"> |
|
57 |
- <input type="radio" :id="order.key" name="orders" :value="order.key" |
|
58 |
- v-model="searchReqDTO.order" /> |
|
59 |
- <label :for="order.key">{{ order.value }}</label> |
|
60 |
- </li> |
|
61 |
- </ul> |
|
62 |
- </dd> |
|
63 |
- <div class="btn-group"> |
|
64 |
- <button class="reset"><img :src="reseticon" alt=""> |
|
65 |
- <p>초기화</p> |
|
66 |
- </button> |
|
67 |
- <button class="search"><img :src="searchicon" alt=""> |
|
68 |
- <p>검색</p> |
|
69 |
- </button> |
|
70 |
- </div> |
|
71 |
- |
|
72 |
- </dl> |
|
73 |
- |
|
74 |
- </div> |
|
75 |
- <div class="search-result"> |
|
76 |
- <div class="tabs"> |
|
77 |
- <div class="flex-sp-bw mb-20 align-center"> |
|
78 |
- <div class="resultext "> |
|
79 |
- <img :src="resulticon" alt=""> |
|
80 |
- <p>총 <b>{{ count }}개</b>의 영상 기록물이 검색되었습니다. </p> |
|
81 |
- </div> |
|
82 |
- <div class="flex "> |
|
83 |
- <ul class="tab-box mb-20"> |
|
84 |
- <li v-for="(tab, index) in tabs" :key="index" class="tab-title" |
|
85 |
- :class="{ active: selectedTab === tab.id }" @click="selectTab(tab.id)"> |
|
86 |
- <img :src="selectedTab === tab.id ? tab.activeImage : tab.inactiveImage" |
|
87 |
- :alt="tab.title" class="tab-icon" /> |
|
88 |
- <p><b>{{ tab.title }}</b></p> |
|
89 |
- </li> |
|
90 |
- </ul> |
|
91 |
- <div class="select-box"> |
|
92 |
- <select v-model="itemsPerPage" @change="changeItemsPerPage"> |
|
93 |
- <option :value="5" selected>5개</option> |
|
94 |
- <option :value="10">10개</option> |
|
95 |
- <option :value="15">15개</option> |
|
96 |
- </select> |
|
97 |
- </div> |
|
98 |
- </div> |
|
99 |
- |
|
100 |
- </div> |
|
101 |
- |
|
102 |
- <div class="tab-content"> |
|
103 |
- <!-- Loop through tabContents, and only display content that matches selectedTab --> |
|
104 |
- <div v-for="(tabContent, idx) in tabContents" :key="idx"> |
|
105 |
- <!-- Display content only if the tab's ID matches the selectedTab --> |
|
106 |
- <div v-show="tabContent.id === selectedTab"> |
|
107 |
- <!-- 카드형 Section (Card Layout) --> |
|
108 |
- <div v-if="tabContent.viewType === 'card'"> |
|
109 |
- <ul class="card-wrap"> |
|
110 |
- <li v-for="(resultitem, index) in paginatedItems" :key="index" class="mb-30"> |
|
111 |
- <div class="result-box"> |
|
112 |
- <!-- Main Image Section --> |
|
113 |
- <div class="main-img"> |
|
114 |
- <img :src="resultitem.img" alt="" class="tab-image" /> |
|
115 |
- </div> |
|
116 |
- <!-- Text Section --> |
|
117 |
- <div class="text-box"> |
|
118 |
- <router-link :to="{ path: '/VideoHistoryDetail.page' }"> |
|
119 |
- <h5>{{ resultitem.title }}</h5> |
|
120 |
- </router-link> |
|
121 |
- |
|
122 |
- <p class="address">{{ resultitem.address }}</p> |
|
123 |
- <p class="text">{{ resultitem.content }}</p> |
|
124 |
- |
|
125 |
- <div class="mb-20"> |
|
126 |
- <ul class="category"> |
|
127 |
- <li v-if="resultitem.category1" class="category1">카테고리1</li> |
|
128 |
- <li v-if="resultitem.category2" class="category2">카테고리2</li> |
|
129 |
- </ul> |
|
130 |
- </div> |
|
131 |
- |
|
132 |
- <div class="date"> |
|
133 |
- <ul> |
|
134 |
- <li>생산연도 <b>{{ resultitem.year }}</b></li> |
|
135 |
- <li>|</li> |
|
136 |
- <li>등록 <b>{{ resultitem.date }}</b></li> |
|
137 |
- </ul> |
|
138 |
- </div> |
|
139 |
- </div> |
|
140 |
- </div> |
|
141 |
- </li> |
|
142 |
- </ul> |
|
143 |
- |
|
144 |
- <!-- Empty State if no results in paginatedItems --> |
|
145 |
- <div v-if="paginatedItems.length === 0" class="no-results"> |
|
146 |
- <p>등록된 게시물이 없습니다.</p> |
|
147 |
- </div> |
|
148 |
- </div> |
|
149 |
- |
|
150 |
- <!-- 리스트형 Section (List Layout) --> |
|
151 |
- <div v-if="tabContent.viewType === 'list'"> |
|
152 |
- <ul class="list-wrap"> |
|
153 |
- <li v-for="(resultitem, index) in paginatedItems" :key="index" class="mb-30"> |
|
154 |
- <div class="text-box"> |
|
155 |
- <router-link :to="{ path: '/VideoHistoryDetail.page' }"> |
|
156 |
- <h5>{{ resultitem.title }}</h5> |
|
157 |
- </router-link> |
|
158 |
- <p class="address">{{ resultitem.address }}</p> |
|
159 |
- |
|
160 |
- <div class="flex-sp-bw"> |
|
161 |
- <div class="mb-20"> |
|
162 |
- <ul class="category"> |
|
163 |
- <li v-if="resultitem.category1" class="category1">카테고리1</li> |
|
164 |
- <li v-if="resultitem.category2" class="category2">카테고리2</li> |
|
165 |
- </ul> |
|
166 |
- </div> |
|
167 |
- |
|
168 |
- <div class="date "> |
|
169 |
- <ul> |
|
170 |
- <li>생산연도 <b>{{ resultitem.year }}</b></li> |
|
171 |
- <li>|</li> |
|
172 |
- <li>등록 <b>{{ resultitem.date }}</b></li> |
|
173 |
- </ul> |
|
174 |
- </div> |
|
175 |
- </div> |
|
176 |
- </div> |
|
177 |
- </li> |
|
178 |
- </ul> |
|
179 |
- |
|
180 |
- <!-- Empty State if no results in paginatedItems --> |
|
181 |
- <div v-if="paginatedItems.length === 0" class="no-results"> |
|
182 |
- <p>등록된 게시물이 없습니다.</p> |
|
183 |
- </div> |
|
184 |
- </div> |
|
185 |
- </div> |
|
186 |
- </div> |
|
187 |
- </div> |
|
188 |
- </div> |
|
189 |
- |
|
190 |
- <div class="btn-group flex-end mt-40"><button class="register"> <router-link |
|
191 |
- :to="{ path: '/VideoHistoryInsert.page' }">등록</router-link></button></div> |
|
192 |
- <div class="pagination flex-center mt-40"> |
|
193 |
- |
|
194 |
- <!-- Previous and Next Page Buttons --> |
|
195 |
- <button> |
|
196 |
- <DoubleLeftOutlined /> |
|
197 |
- </button> |
|
198 |
- <button @click="previousPage" :disabled="currentPage === 1"> |
|
199 |
- <LeftOutlined /> |
|
200 |
- </button> |
|
201 |
- <button class="page-number clicked">1</button> |
|
202 |
- <button @click="nextPage" :disabled="currentPage === totalPages"> |
|
203 |
- <RightOutlined /> |
|
204 |
- </button> |
|
205 |
- <button> |
|
206 |
- <DoubleRightOutlined /> |
|
207 |
- </button> |
|
208 |
- </div> |
|
209 |
- </div> |
|
2 |
+ <div class="content"> |
|
3 |
+ <div class="sub-title-area mb-30"> |
|
4 |
+ <h2>영상 기록물</h2> |
|
5 |
+ <div class="breadcrumb-list"> |
|
6 |
+ <ul> |
|
7 |
+ <!-- Bind the image source dynamically for homeicon --> |
|
8 |
+ <li><img :src="homeicon" alt="Home Icon"> |
|
9 |
+ <p>기록물</p> |
|
10 |
+ </li> |
|
11 |
+ <li><img :src="righticon" alt=""></li> |
|
12 |
+ <li>영상 기록물</li> |
|
13 |
+ </ul> |
|
14 |
+ </div> |
|
210 | 15 |
</div> |
211 |
- |
|
16 |
+ <div action="search" class="search-form form "> |
|
17 |
+ <dl> |
|
18 |
+ <dd class="mb-15"> |
|
19 |
+ <p>검색범위</p> |
|
20 |
+ <ul> |
|
21 |
+ <li> |
|
22 |
+ <input type="checkbox" id="allScope" v-model="isChkAllScope" @change="fnChkAllOptions('scope')" /> |
|
23 |
+ <label for="allScope">전체</label> |
|
24 |
+ </li> |
|
25 |
+ <li v-for="(scope, idx) in searchType" :key="idx"> |
|
26 |
+ <input type="checkbox" :id="idx" :name="searchType" :value="scope.key" v-model="searchReqDTO.searchType" @change="fnChkOption('scope')" /> |
|
27 |
+ <label :for="idx">{{ scope.value }}</label> |
|
28 |
+ </li> |
|
29 |
+ </ul> |
|
30 |
+ </dd> |
|
31 |
+ <dd class="mb-15"> |
|
32 |
+ <p>검색어</p> |
|
33 |
+ <div class="wfull"><input type="text" v-model="searchReqDTO.searchText"></div> |
|
34 |
+ </dd> |
|
35 |
+ <dd class="mb-15"> |
|
36 |
+ <p>생산연도</p> |
|
37 |
+ <input type="date" v-model="searchReqDTO.startYear"> |
|
38 |
+ <p class="mark">~</p> |
|
39 |
+ <input type="date" v-model="searchReqDTO.endYear"> |
|
40 |
+ </dd> |
|
41 |
+ <dd class="mb-20"> |
|
42 |
+ <p>카테고리</p> |
|
43 |
+ <ul> |
|
44 |
+ <li v-for="(category, idx) of categorys" :key="idx"> |
|
45 |
+ <input type="checkbox" :id="category.ctgryId" name="categorys" :value="category.ctgryId" v-model="searchReqDTO.searchCtgry" /> |
|
46 |
+ <label :for="category.ctgryId">{{ category.ctgryNm }}</label> |
|
47 |
+ </li> |
|
48 |
+ </ul> |
|
49 |
+ </dd> |
|
50 |
+ <dd class="mb-15"> |
|
51 |
+ <p>정렬</p> |
|
52 |
+ <ul> |
|
53 |
+ <li v-for="(order, idx) of orders" :key="idx"> |
|
54 |
+ <input type="radio" :id="order.key" name="orders" :value="order.key" v-model="searchReqDTO.order" /> |
|
55 |
+ <label :for="order.key">{{ order.value }}</label> |
|
56 |
+ </li> |
|
57 |
+ </ul> |
|
58 |
+ </dd> |
|
59 |
+ <div class="btn-group"> |
|
60 |
+ <button class="reset"><img :src="reseticon" alt=""> |
|
61 |
+ <p>초기화</p> |
|
62 |
+ </button> |
|
63 |
+ <button class="search"><img :src="searchicon" alt=""> |
|
64 |
+ <p>검색</p> |
|
65 |
+ </button> |
|
66 |
+ </div> |
|
67 |
+ </dl> |
|
68 |
+ </div> |
|
69 |
+ <div class="search-result"> |
|
70 |
+ <div class="tabs"> |
|
71 |
+ <div class="flex-sp-bw mb-20 align-center"> |
|
72 |
+ <div class="resultext "> |
|
73 |
+ <img :src="resulticon" alt=""> |
|
74 |
+ <p>총 <b>{{ count }}개</b>의 영상 기록물이 검색되었습니다. </p> |
|
75 |
+ </div> |
|
76 |
+ <div class="flex "> |
|
77 |
+ <ul class="tab-box mb-20"> |
|
78 |
+ <li v-for="(tab, index) in tabs" :key="index" class="tab-title" :class="{ active: selectedTab === tab.id }" @click="selectTab(tab.id)"> |
|
79 |
+ <img :src="selectedTab === tab.id ? tab.activeImage : tab.inactiveImage" :alt="tab.title" class="tab-icon" /> |
|
80 |
+ <p><b>{{ tab.title }}</b></p> |
|
81 |
+ </li> |
|
82 |
+ </ul> |
|
83 |
+ <div class="select-box"> |
|
84 |
+ <select v-model="itemsPerPage" @change="changeItemsPerPage"> |
|
85 |
+ <option :value="5" selected>5개</option> |
|
86 |
+ <option :value="10">10개</option> |
|
87 |
+ <option :value="15">15개</option> |
|
88 |
+ </select> |
|
89 |
+ </div> |
|
90 |
+ </div> |
|
91 |
+ </div> |
|
92 |
+ <div class="tab-content"> |
|
93 |
+ <!-- Loop through tabContents, and only display content that matches selectedTab --> |
|
94 |
+ <div v-for="(tabContent, idx) in tabContents" :key="idx"> |
|
95 |
+ <!-- Display content only if the tab's ID matches the selectedTab --> |
|
96 |
+ <div v-show="tabContent.id === selectedTab"> |
|
97 |
+ <!-- 카드형 Section (Card Layout) --> |
|
98 |
+ <div v-if="tabContent.viewType === 'card'"> |
|
99 |
+ <ul class="card-wrap"> |
|
100 |
+ <li v-for="(resultitem, index) in paginatedItems" :key="index" class="mb-30"> |
|
101 |
+ <div class="result-box"> |
|
102 |
+ <!-- Main Image Section --> |
|
103 |
+ <div class="main-img"> |
|
104 |
+ <img :src="resultitem.img" alt="" class="tab-image" /> |
|
105 |
+ </div> |
|
106 |
+ <!-- Text Section --> |
|
107 |
+ <div class="text-box"> |
|
108 |
+ <router-link :to="{ path: '/VideoHistoryDetail.page' }"> |
|
109 |
+ <h5>{{ resultitem.title }}</h5> |
|
110 |
+ </router-link> |
|
111 |
+ <p class="address">{{ resultitem.address }}</p> |
|
112 |
+ <p class="text">{{ resultitem.content }}</p> |
|
113 |
+ <div class="mb-20"> |
|
114 |
+ <ul class="category"> |
|
115 |
+ <li v-if="resultitem.category1" class="category1">카테고리1</li> |
|
116 |
+ <li v-if="resultitem.category2" class="category2">카테고리2</li> |
|
117 |
+ </ul> |
|
118 |
+ </div> |
|
119 |
+ <div class="date"> |
|
120 |
+ <ul> |
|
121 |
+ <li>생산연도 <b>{{ resultitem.year }}</b></li> |
|
122 |
+ <li>|</li> |
|
123 |
+ <li>등록 <b>{{ resultitem.date }}</b></li> |
|
124 |
+ </ul> |
|
125 |
+ </div> |
|
126 |
+ </div> |
|
127 |
+ </div> |
|
128 |
+ </li> |
|
129 |
+ </ul> |
|
130 |
+ <!-- Empty State if no results in paginatedItems --> |
|
131 |
+ <div v-if="paginatedItems.length === 0" class="no-results"> |
|
132 |
+ <p>등록된 게시물이 없습니다.</p> |
|
133 |
+ </div> |
|
134 |
+ </div> |
|
135 |
+ <!-- 리스트형 Section (List Layout) --> |
|
136 |
+ <div v-if="tabContent.viewType === 'list'"> |
|
137 |
+ <ul class="list-wrap"> |
|
138 |
+ <li v-for="(resultitem, index) in paginatedItems" :key="index" class="mb-30"> |
|
139 |
+ <div class="text-box"> |
|
140 |
+ <router-link :to="{ path: '/VideoHistoryDetail.page' }"> |
|
141 |
+ <h5>{{ resultitem.title }}</h5> |
|
142 |
+ </router-link> |
|
143 |
+ <p class="address">{{ resultitem.address }}</p> |
|
144 |
+ <div class="flex-sp-bw"> |
|
145 |
+ <div class="mb-20"> |
|
146 |
+ <ul class="category"> |
|
147 |
+ <li v-if="resultitem.category1" class="category1">카테고리1</li> |
|
148 |
+ <li v-if="resultitem.category2" class="category2">카테고리2</li> |
|
149 |
+ </ul> |
|
150 |
+ </div> |
|
151 |
+ <div class="date "> |
|
152 |
+ <ul> |
|
153 |
+ <li>생산연도 <b>{{ resultitem.year }}</b></li> |
|
154 |
+ <li>|</li> |
|
155 |
+ <li>등록 <b>{{ resultitem.date }}</b></li> |
|
156 |
+ </ul> |
|
157 |
+ </div> |
|
158 |
+ </div> |
|
159 |
+ </div> |
|
160 |
+ </li> |
|
161 |
+ </ul> |
|
162 |
+ <!-- Empty State if no results in paginatedItems --> |
|
163 |
+ <div v-if="paginatedItems.length === 0" class="no-results"> |
|
164 |
+ <p>등록된 게시물이 없습니다.</p> |
|
165 |
+ </div> |
|
166 |
+ </div> |
|
167 |
+ </div> |
|
168 |
+ </div> |
|
169 |
+ </div> |
|
170 |
+ </div> |
|
171 |
+ <div class="btn-group flex-end mt-40"><button class="register"> <router-link :to="{ path: '/VideoHistoryInsert.page' }">등록</router-link></button></div> |
|
172 |
+ <div class="pagination flex-center mt-40"> |
|
173 |
+ <!-- Previous and Next Page Buttons --> |
|
174 |
+ <button> |
|
175 |
+ <DoubleLeftOutlined /> |
|
176 |
+ </button> |
|
177 |
+ <button @click="previousPage" :disabled="currentPage === 1"> |
|
178 |
+ <LeftOutlined /> |
|
179 |
+ </button> |
|
180 |
+ <button class="page-number clicked">1</button> |
|
181 |
+ <button @click="nextPage" :disabled="currentPage === totalPages"> |
|
182 |
+ <RightOutlined /> |
|
183 |
+ </button> |
|
184 |
+ <button> |
|
185 |
+ <DoubleRightOutlined /> |
|
186 |
+ </button> |
|
187 |
+ </div> |
|
188 |
+ </div> |
|
189 |
+ </div> |
|
212 | 190 |
</template> |
213 | 191 |
<script> |
214 | 192 |
import { DoubleLeftOutlined, LeftOutlined, RightOutlined, DoubleRightOutlined } from '@ant-design/icons-vue'; |
215 | 193 |
import { findAllCategoryProc } from "../../../resources/api/category"; // 카테고리 목록 검색 |
216 | 194 |
|
217 | 195 |
export default { |
218 |
- components: { |
|
219 |
- DoubleLeftOutlined, |
|
220 |
- LeftOutlined, |
|
221 |
- RightOutlined, |
|
222 |
- DoubleRightOutlined, |
|
196 |
+ components: { |
|
197 |
+ DoubleLeftOutlined, |
|
198 |
+ LeftOutlined, |
|
199 |
+ RightOutlined, |
|
200 |
+ DoubleRightOutlined, |
|
201 |
+ }, |
|
202 |
+ data() { |
|
203 |
+ return { |
|
204 |
+ selectedTab: 1, |
|
205 |
+ // 검색용 객체 |
|
206 |
+ searchReqDTO: { |
|
207 |
+ searchType: [], |
|
208 |
+ searchText: null, |
|
209 |
+ startYear: null, |
|
210 |
+ endYear: null, |
|
211 |
+ searchTy: null, |
|
212 |
+ searchCtgry: [], |
|
213 |
+ order: "rgsde", |
|
214 |
+ }, |
|
215 |
+ tabs: [ |
|
216 |
+ |
|
217 |
+ { |
|
218 |
+ id: 1, |
|
219 |
+ title: "카드형", |
|
220 |
+ activeImage: "client/resources/images/list_icon01_on.png", // Active tab image |
|
221 |
+ inactiveImage: "client/resources/images/list_icon01_off.png", |
|
222 |
+ }, |
|
223 |
+ { |
|
224 |
+ id: 2, |
|
225 |
+ title: "리스트형", |
|
226 |
+ activeImage: "client/resources/images/list_icon02_on.png", // Active tab image |
|
227 |
+ inactiveImage: "client/resources/images/list_icon02_off.png", |
|
228 |
+ }, |
|
229 |
+ ], |
|
230 |
+ tabContents: [ |
|
231 |
+ { id: 1, viewType: 'card', list: [{ sj: 'Item 1', rgsde: '2025-03-01', files: [{ filePath: 'image1.png' }] }] }, |
|
232 |
+ { id: 2, viewType: 'list', list: [{ sj: 'Item 2', rgsde: '2025-03-02', files: [{ filePath: 'image2.png' }] }] }, |
|
233 |
+ ], |
|
234 |
+ paginatedItems: [], |
|
235 |
+ resultitems: [ |
|
236 |
+ { |
|
237 |
+ img: 'client/resources/images/img6.png', |
|
238 |
+ title: '영상 기록물 제목', |
|
239 |
+ address: '경상북도 구미시 송정대로 55', |
|
240 |
+ content: '대한민국 최대의 내륙 산업단지를 보유하고, 서울로부터 277km, 부산으로부터 167km 거리에 있으며, 면적은 615㎢로 경상북도 전체 면적의 3.2%에 달합니다. 인구는 41만 명이고, 선산읍, 고아읍, 산동읍을 비롯한 3읍, 5면, 17개 동으로 구성되어…', |
|
241 |
+ category1: true, |
|
242 |
+ category2: true, |
|
243 |
+ year: 2020, |
|
244 |
+ date: '2021-01-01' |
|
245 |
+ }, |
|
246 |
+ |
|
247 |
+ ], |
|
248 |
+ currentPage: 1, // Current page number |
|
249 |
+ itemsPerPage: 5, |
|
250 |
+ resulticon: "client/resources/images/icon/r-check.png", |
|
251 |
+ homeicon: 'client/resources/images/icon/home.png', |
|
252 |
+ searchicon: 'client/resources/images/icon/search.png', |
|
253 |
+ reseticon: 'client/resources/images/icon/reset.png', |
|
254 |
+ righticon: 'client/resources/images/icon/right.png', |
|
255 |
+ count: 23, |
|
256 |
+ checkOptions: [ |
|
257 |
+ '전체', |
|
258 |
+ '사진', |
|
259 |
+ '영상', |
|
260 |
+ '미디어 영상', |
|
261 |
+ '보도자료', |
|
262 |
+ ], |
|
263 |
+ checkOptions2: [ |
|
264 |
+ '전체', |
|
265 |
+ '제목', |
|
266 |
+ '내용', |
|
267 |
+ '주소', |
|
268 |
+ ], |
|
269 |
+ checkOptions3: [ |
|
270 |
+ '카테고리1', |
|
271 |
+ '카테고리2', |
|
272 |
+ '카테고리3', |
|
273 |
+ '카테고리4', |
|
274 |
+ '카테고리5', |
|
275 |
+ ], |
|
276 |
+ checkOptions4: [ |
|
277 |
+ '최신', |
|
278 |
+ '인기', |
|
279 |
+ ], |
|
280 |
+ isChkAllScope: false, // 검색범위 전체 체크 여부 |
|
281 |
+ searchType: [ |
|
282 |
+ { key: "sj", value: "제목" }, |
|
283 |
+ { key: "cn", value: "내용" }, |
|
284 |
+ { key: "adres", value: "주소" }, |
|
285 |
+ ], // 검색범위 목록 |
|
286 |
+ categorys: [], // 카테고리 목록 |
|
287 |
+ orders: [ |
|
288 |
+ { key: "rgsde", value: "최신" }, |
|
289 |
+ { key: "rdcnt", value: "인기" }, |
|
290 |
+ ], // 정렬 목록 |
|
291 |
+ }; |
|
292 |
+ }, |
|
293 |
+ computed: { |
|
294 |
+ // Total number of pages |
|
295 |
+ totalPages() { |
|
296 |
+ return Math.ceil(this.resultitems.length / this.itemsPerPage); |
|
223 | 297 |
}, |
224 |
- data() { |
|
225 |
- return { |
|
226 |
- selectedTab: 1, |
|
227 |
- // 검색용 객체 |
|
228 |
- searchReqDTO: { |
|
229 |
- searchType: [], |
|
230 |
- searchText: null, |
|
231 |
- startYear: null, |
|
232 |
- endYear: null, |
|
233 |
- searchTy: null, |
|
234 |
- searchCtgry: [], |
|
235 |
- order: "rgsde", |
|
236 |
- }, |
|
237 |
- tabs: [ |
|
238 | 298 |
|
239 |
- { |
|
240 |
- id: 1, |
|
241 |
- title: "카드형", |
|
242 |
- activeImage: "client/resources/images/list_icon01_on.png", // Active tab image |
|
243 |
- inactiveImage: "client/resources/images/list_icon01_off.png", |
|
244 |
- }, |
|
245 |
- { |
|
246 |
- id: 2, |
|
247 |
- title: "리스트형", |
|
248 |
- activeImage: "client/resources/images/list_icon02_on.png", // Active tab image |
|
249 |
- inactiveImage: "client/resources/images/list_icon02_off.png", |
|
250 |
- }, |
|
251 |
- ], |
|
252 |
- tabContents: [ |
|
253 |
- { id: 1, viewType: 'card', list: [{ sj: 'Item 1', rgsde: '2025-03-01', files: [{ filePath: 'image1.png' }] }] }, |
|
254 |
- { id: 2, viewType: 'list', list: [{ sj: 'Item 2', rgsde: '2025-03-02', files: [{ filePath: 'image2.png' }] }] }, |
|
255 |
- ], |
|
256 |
- paginatedItems: [], |
|
257 |
- resultitems: [ |
|
258 |
- { |
|
259 |
- img: 'client/resources/images/img6.png', |
|
260 |
- title: '영상 기록물 제목', |
|
261 |
- address: '경상북도 구미시 송정대로 55', |
|
262 |
- content: '대한민국 최대의 내륙 산업단지를 보유하고, 서울로부터 277km, 부산으로부터 167km 거리에 있으며, 면적은 615㎢로 경상북도 전체 면적의 3.2%에 달합니다. 인구는 41만 명이고, 선산읍, 고아읍, 산동읍을 비롯한 3읍, 5면, 17개 동으로 구성되어…', |
|
263 |
- category1: true, |
|
264 |
- category2: true, |
|
265 |
- year: 2020, |
|
266 |
- date: '2021-01-01' |
|
267 |
- }, |
|
268 |
- |
|
269 |
- ], |
|
270 |
- currentPage: 1, // Current page number |
|
271 |
- itemsPerPage: 5, |
|
272 |
- resulticon: "client/resources/images/icon/r-check.png", |
|
273 |
- homeicon: 'client/resources/images/icon/home.png', |
|
274 |
- searchicon: 'client/resources/images/icon/search.png', |
|
275 |
- reseticon: 'client/resources/images/icon/reset.png', |
|
276 |
- righticon: 'client/resources/images/icon/right.png', |
|
277 |
- count: 23, |
|
278 |
- checkOptions: [ |
|
279 |
- '전체', |
|
280 |
- '사진', |
|
281 |
- '영상', |
|
282 |
- '미디어 영상', |
|
283 |
- '보도자료', |
|
284 |
- ], |
|
285 |
- checkOptions2: [ |
|
286 |
- '전체', |
|
287 |
- '제목', |
|
288 |
- '내용', |
|
289 |
- '주소', |
|
290 |
- ], |
|
291 |
- checkOptions3: [ |
|
292 |
- '카테고리1', |
|
293 |
- '카테고리2', |
|
294 |
- '카테고리3', |
|
295 |
- '카테고리4', |
|
296 |
- '카테고리5', |
|
297 |
- ], |
|
298 |
- checkOptions4: [ |
|
299 |
- '최신', |
|
300 |
- '인기', |
|
301 |
- ], |
|
302 |
- isChkAllScope: false, // 검색범위 전체 체크 여부 |
|
303 |
- searchType: [ |
|
304 |
- { key: "sj", value: "제목" }, |
|
305 |
- { key: "cn", value: "내용" }, |
|
306 |
- { key: "adres", value: "주소" }, |
|
307 |
- ], // 검색범위 목록 |
|
308 |
- categorys: [], // 카테고리 목록 |
|
309 |
- orders: [ |
|
310 |
- { key: "rgsde", value: "최신" }, |
|
311 |
- { key: "rdcnt", value: "인기" }, |
|
312 |
- ], // 정렬 목록 |
|
313 |
- }; |
|
299 |
+ // Paginated items based on current page and items per page |
|
300 |
+ paginatedItems() { |
|
301 |
+ const start = (this.currentPage - 1) * this.itemsPerPage; |
|
302 |
+ const end = start + this.itemsPerPage; |
|
303 |
+ return this.resultitems.slice(start, end); |
|
314 | 304 |
}, |
315 |
- computed: { |
|
316 |
- // Total number of pages |
|
317 |
- totalPages() { |
|
318 |
- return Math.ceil(this.resultitems.length / this.itemsPerPage); |
|
319 |
- }, |
|
305 |
+ }, |
|
306 |
+ created() { |
|
307 |
+ // 초기 데이터 세팅 |
|
308 |
+ this.isChkAllScope = true; |
|
309 |
+ this.searchReqDTO.searchType = this.searchType.map(item => item.key); |
|
310 |
+ this.searchReqDTO.order = this.orders[0].key |
|
320 | 311 |
|
321 |
- // Paginated items based on current page and items per page |
|
322 |
- paginatedItems() { |
|
323 |
- const start = (this.currentPage - 1) * this.itemsPerPage; |
|
324 |
- const end = start + this.itemsPerPage; |
|
325 |
- return this.resultitems.slice(start, end); |
|
326 |
- }, |
|
312 |
+ this.fnFindCategorys(); // 카테고리 목록 조회 (검색조건 없음) |
|
313 |
+ }, |
|
314 |
+ methods: { |
|
315 |
+ selectTab(tabId) { |
|
316 |
+ this.selectedTab = tabId; // Update the selected tab index |
|
327 | 317 |
}, |
328 |
- created() { |
|
329 |
- // 초기 데이터 세팅 |
|
330 |
- this.isChkAllScope = true; |
|
331 |
- this.searchReqDTO.searchType = this.searchType.map(item => item.key); |
|
332 |
- this.searchReqDTO.order = this.orders[0].key |
|
333 |
- |
|
334 |
- this.fnFindCategorys(); // 카테고리 목록 조회 (검색조건 없음) |
|
318 |
+ // Change the number of items displayed per page |
|
319 |
+ changeItemsPerPage() { |
|
320 |
+ this.currentPage = 1; // Reset to first page when changing items per page |
|
335 | 321 |
}, |
336 |
- methods: { |
|
337 |
- selectTab(tabId) { |
|
338 |
- this.selectedTab = tabId; // Update the selected tab index |
|
339 |
- }, |
|
340 |
- // Change the number of items displayed per page |
|
341 |
- changeItemsPerPage() { |
|
342 |
- this.currentPage = 1; // Reset to first page when changing items per page |
|
343 |
- }, |
|
344 |
- previousPage() { |
|
345 |
- if (this.currentPage > 1) { |
|
346 |
- this.currentPage--; |
|
347 |
- } |
|
348 |
- }, |
|
349 |
- |
|
350 |
- // Go to the next page |
|
351 |
- nextPage() { |
|
352 |
- if (this.currentPage < this.totalPages) { |
|
353 |
- this.currentPage++; |
|
354 |
- } |
|
355 |
- }, |
|
356 |
- isChkAllScope: false, // 검색범위 전체 체크 여부 |
|
357 |
- searchType: [ |
|
358 |
- { key: "sj", value: "제목" }, |
|
359 |
- { key: "cn", value: "내용" }, |
|
360 |
- { key: "adres", value: "주소" }, |
|
361 |
- ], // 검색범위 목록 |
|
362 |
- categorys: [], // 카테고리 목록 |
|
363 |
- orders: [ |
|
364 |
- { key: "rgsde", value: "최신" }, |
|
365 |
- { key: "rdcnt", value: "인기" }, |
|
366 |
- ], // 정렬 목록 |
|
367 |
- |
|
368 |
- async fnFindCategorys() { |
|
369 |
- try { |
|
370 |
- const response = await findAllCategoryProc(); |
|
371 |
- this.categorys = response.data.data.ctgry; |
|
372 |
- } catch (error) { |
|
373 |
- if (error.response) { |
|
374 |
- console.log("에러 응답:", error.response.data); |
|
375 |
- } |
|
376 |
- console.error("Error:", error); |
|
377 |
- } |
|
378 |
- }, |
|
379 |
- |
|
380 |
- // 통합검색 |
|
381 |
- async fnFindAllDatas() { |
|
382 |
- try { |
|
383 |
- let params = {}; |
|
384 |
- if (this.searchReqDTO.searchRecord.length > 0) { |
|
385 |
- params.searchRecords = this.searchReqDTO.searchRecord.join(','); |
|
386 |
- } |
|
387 |
- if (this.searchReqDTO.searchType.length > 0) { |
|
388 |
- params.searchTypes = this.searchReqDTO.searchType.join(','); |
|
389 |
- } |
|
390 |
- if (this.searchReqDTO.searchCtgry.length > 0) { |
|
391 |
- params.searchCtgries = this.searchReqDTO.searchCtgry.join(','); |
|
392 |
- } |
|
393 |
- params.searchText = this.searchReqDTO.searchText; |
|
394 |
- params.startYear = this.searchReqDTO.startYear; |
|
395 |
- params.endYear = this.searchReqDTO.endYear; |
|
396 |
- params.order = this.searchReqDTO.order; |
|
397 |
- |
|
398 |
- // API 호출 |
|
399 |
- const response = await findAllDatas(params); |
|
400 |
- this.searchResult = response.data.data.searchResult; |
|
401 |
- } catch (error) { |
|
402 |
- if (error.response) { |
|
403 |
- console.log("에러 응답:", error.response.data); |
|
404 |
- } |
|
405 |
- console.error("Error:", error); |
|
406 |
- } |
|
407 |
- }, |
|
322 |
+ previousPage() { |
|
323 |
+ if (this.currentPage > 1) { |
|
324 |
+ this.currentPage--; |
|
325 |
+ } |
|
408 | 326 |
}, |
409 | 327 |
|
328 |
+ // Go to the next page |
|
329 |
+ nextPage() { |
|
330 |
+ if (this.currentPage < this.totalPages) { |
|
331 |
+ this.currentPage++; |
|
332 |
+ } |
|
333 |
+ }, |
|
334 |
+ isChkAllScope: false, // 검색범위 전체 체크 여부 |
|
335 |
+ searchType: [ |
|
336 |
+ { key: "sj", value: "제목" }, |
|
337 |
+ { key: "cn", value: "내용" }, |
|
338 |
+ { key: "adres", value: "주소" }, |
|
339 |
+ ], // 검색범위 목록 |
|
340 |
+ categorys: [], // 카테고리 목록 |
|
341 |
+ orders: [ |
|
342 |
+ { key: "rgsde", value: "최신" }, |
|
343 |
+ { key: "rdcnt", value: "인기" }, |
|
344 |
+ ], // 정렬 목록 |
|
345 |
+ |
|
346 |
+ async fnFindCategorys() { |
|
347 |
+ try { |
|
348 |
+ const response = await findAllCategoryProc(); |
|
349 |
+ this.categorys = response.data.data.ctgry; |
|
350 |
+ } catch (error) { |
|
351 |
+ if (error.response) { |
|
352 |
+ console.log("에러 응답:", error.response.data); |
|
353 |
+ } |
|
354 |
+ console.error("Error:", error); |
|
355 |
+ } |
|
356 |
+ }, |
|
357 |
+ |
|
358 |
+ // 통합검색 |
|
359 |
+ async fnFindAllDatas() { |
|
360 |
+ try { |
|
361 |
+ let params = {}; |
|
362 |
+ if (this.searchReqDTO.searchRecord.length > 0) { |
|
363 |
+ params.searchRecords = this.searchReqDTO.searchRecord.join(','); |
|
364 |
+ } |
|
365 |
+ if (this.searchReqDTO.searchType.length > 0) { |
|
366 |
+ params.searchTypes = this.searchReqDTO.searchType.join(','); |
|
367 |
+ } |
|
368 |
+ if (this.searchReqDTO.searchCtgry.length > 0) { |
|
369 |
+ params.searchCtgries = this.searchReqDTO.searchCtgry.join(','); |
|
370 |
+ } |
|
371 |
+ params.searchText = this.searchReqDTO.searchText; |
|
372 |
+ params.startYear = this.searchReqDTO.startYear; |
|
373 |
+ params.endYear = this.searchReqDTO.endYear; |
|
374 |
+ params.order = this.searchReqDTO.order; |
|
375 |
+ |
|
376 |
+ // API 호출 |
|
377 |
+ const response = await findAllDatas(params); |
|
378 |
+ this.searchResult = response.data.data.searchResult; |
|
379 |
+ } catch (error) { |
|
380 |
+ if (error.response) { |
|
381 |
+ console.log("에러 응답:", error.response.data); |
|
382 |
+ } |
|
383 |
+ console.error("Error:", error); |
|
384 |
+ } |
|
385 |
+ }, |
|
386 |
+ }, |
|
387 |
+ |
|
410 | 388 |
|
411 | 389 |
|
412 | 390 |
}; |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?