
--- client/views/pages/bbsDcry/photo/PicHistoryInsert.vue
+++ client/views/pages/bbsDcry/photo/PicHistoryInsert.vue
... | ... | @@ -42,8 +42,7 @@ |
42 | 42 |
<p>카테고리</p><button type="button" class="category-add" @click="fnToggleModal">추가하기</button> |
43 | 43 |
</label> |
44 | 44 |
<ul class="category"> |
45 |
- <li v-for="(item, idx) of selectedCtgries" :key="idx">{{ item.ctgryNm }} <button type="button" |
|
46 |
- class="cancel" @click="fnDelCtgry(item.ctgryId)"><b>✕</b></button></li> |
|
45 |
+ <li v-for="(item, idx) of selectedCtgries" :key="idx">{{ item.ctgryNm }} <button type="button" class="cancel" @click="fnDelCtgry(item.ctgryId)"><b>✕</b></button></li> |
|
47 | 46 |
</ul> |
48 | 47 |
</dd> |
49 | 48 |
<div class="hr"></div> |
... | ... | @@ -56,10 +55,8 @@ |
56 | 55 |
</div> |
57 | 56 |
</li> |
58 | 57 |
<li class="file-insert"> |
59 |
- <input type="file" id="fileInput" class="file-input" multiple |
|
60 |
- accept="image/jpeg,image/png,image/gif,image/jpg" @change="handleFileSelect"> |
|
61 |
- <label for="fileInput" class="file-label mb-20" @dragover.prevent="handleDragOver" |
|
62 |
- @dragleave.prevent="handleDragLeave" @drop.prevent="handleDrop" :class="{ 'drag-over': isDragging }"> |
|
58 |
+ <input type="file" id="fileInput" class="file-input" multiple accept="image/jpeg,image/png,image/gif,image/jpg" @change="handleFileSelect"> |
|
59 |
+ <label for="fileInput" class="file-label mb-20" @dragover.prevent="handleDragOver" @dragleave.prevent="handleDragLeave" @drop.prevent="handleDrop" :class="{ 'drag-over': isDragging }"> |
|
63 | 60 |
<div class="flex-center align-center"> |
64 | 61 |
<img :src="fileicon" alt=""> |
65 | 62 |
<p>파일첨부하기</p> |
... | ... | @@ -92,15 +89,14 @@ |
92 | 89 |
</dl> |
93 | 90 |
</form> |
94 | 91 |
<div class="btn-group flex-center"> |
95 |
- <button type="button" class="cancel" @click="fnMoveTo('PicHistorySearch')">취소</button> |
|
92 |
+ <button type="button" class="cancel" @click="fnMoveTo('list')">취소</button> |
|
96 | 93 |
<button type="button" class="register" @click="submitForm"> |
97 | 94 |
<span v-if="$isEmpty(pageId)">등록</span> |
98 | 95 |
<span v-else>수정</span> |
99 | 96 |
</button> |
100 | 97 |
</div> |
101 | 98 |
</div> |
102 |
- <CategorySelectModal v-if="isModalOpen" :selectedCtgries="selectedCtgries" @toggleModal="fnToggleModal" |
|
103 |
- @addCtgries="fnAddCtgries" /> |
|
99 |
+ <CategorySelectModal v-if="isModalOpen" :selectedCtgries="selectedCtgries" @toggleModal="fnToggleModal" @addCtgries="fnAddCtgries" /> |
|
104 | 100 |
</template> |
105 | 101 |
<script> |
106 | 102 |
import { DoubleLeftOutlined, LeftOutlined, RightOutlined, DoubleRightOutlined } from '@ant-design/icons-vue'; |
... | ... | @@ -169,13 +165,13 @@ |
169 | 165 |
|
170 | 166 |
if (response.data.data.dcry.ty !== 'P') { |
171 | 167 |
alert('올바른 접근이 아닙니다.'); |
172 |
- this.fnMoveTo('VideoHistorySearch'); // 목록으로 이동 |
|
168 |
+ this.fnMoveTo('list'); // 목록으로 이동 |
|
173 | 169 |
} |
174 | 170 |
|
175 | 171 |
this.copyToDcryReqDTO(response.data.data.dcry); |
176 | 172 |
} catch (error) { |
177 | 173 |
alert('조회중 오류가 발생했습니다.'); |
178 |
- this.fnMoveTo('PicHistorySearch'); // 목록으로 이동 |
|
174 |
+ this.fnMoveTo('list'); // 목록으로 이동 |
|
179 | 175 |
|
180 | 176 |
if (error.response) { |
181 | 177 |
alert(error.response.data.message); |
... | ... | @@ -330,12 +326,11 @@ |
330 | 326 |
|
331 | 327 |
// API 통신 |
332 | 328 |
const response = this.$isEmpty(this.pageId) ? await saveDcry(formData) : await updateDcry(formData); |
333 |
- let result = response.data; |
|
334 |
- let id = result.data.dcryId; |
|
329 |
+ let id = response.data.data.dcryId; |
|
335 | 330 |
alert(this.$isEmpty(this.pageId) ? "등록되었습니다." : "수정되었습니다."); |
336 | 331 |
|
337 | 332 |
// 상세 페이지로 이동 |
338 |
- this.fnMoveTo('PicHistoryDetail', id); |
|
333 |
+ this.fnMoveTo('view', id); |
|
339 | 334 |
} catch (error) { |
340 | 335 |
if (error.response) { |
341 | 336 |
alert(error.response.data.message); |
... | ... | @@ -347,13 +342,20 @@ |
347 | 342 |
}, |
348 | 343 |
|
349 | 344 |
// 페이지 이동 |
350 |
- fnMoveTo(page, id) { |
|
351 |
- if (this.$isEmpty(id)) { |
|
352 |
- this.$router.push({ name: page }); |
|
345 |
+ fnMoveTo(type, id) { |
|
346 |
+ const routes = { |
|
347 |
+ 'list': { name: 'PicHistorySearch' }, |
|
348 |
+ 'view': { name: 'PicHistoryDetail', query: { id } }, |
|
349 |
+ 'edit': { name: 'PicHistoryInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
350 |
+ }; |
|
351 |
+ |
|
352 |
+ if (routes[type]) { |
|
353 |
+ this.$router.push(routes[type]); |
|
353 | 354 |
} else { |
354 |
- this.$router.push({ name: page, query: { id: id } }); |
|
355 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
356 |
+ this.$router.push(routes['list']); |
|
355 | 357 |
} |
356 |
- } |
|
358 |
+ }, |
|
357 | 359 |
} |
358 | 360 |
}; |
359 | 361 |
</script> |
--- client/views/pages/bbsDcry/photo/PicHistorySearch.vue
+++ client/views/pages/bbsDcry/photo/PicHistorySearch.vue
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 |
</div> |
110 | 110 |
</div> |
111 | 111 |
</div> |
112 |
- <div class="btn-group flex-end mt-40"><button class="register"> <router-link :to="{ path: '/PicHistoryInsert.page' }">등록</router-link></button></div> |
|
112 |
+ <div class="btn-group flex-end mt-40"><button type="button" class="register" @click="fnMoveTo('edit')">등록</button></div> |
|
113 | 113 |
<DefaultPagination class="mt-40" :search="searchReqDTO" @onChange="fnChangeCurrentPage" /> |
114 | 114 |
</div> |
115 | 115 |
</div> |
... | ... | @@ -308,6 +308,22 @@ |
308 | 308 |
selectTab(tabId) { |
309 | 309 |
this.selectedTabId = tabId; |
310 | 310 |
}, |
311 |
+ |
|
312 |
+ // 페이지 이동 |
|
313 |
+ fnMoveTo(type, id) { |
|
314 |
+ const routes = { |
|
315 |
+ 'list': { name: 'PicHistorySearch' }, |
|
316 |
+ 'view': { name: 'PicHistoryDetail', query: { id } }, |
|
317 |
+ 'edit': { name: 'PicHistoryInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
318 |
+ }; |
|
319 |
+ |
|
320 |
+ if (routes[type]) { |
|
321 |
+ this.$router.push(routes[type]); |
|
322 |
+ } else { |
|
323 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
324 |
+ this.$router.push(routes['list']); |
|
325 |
+ } |
|
326 |
+ }, |
|
311 | 327 |
}, |
312 | 328 |
}; |
313 | 329 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/bbsDcry/video/VideoHistoryDetail.vue
+++ client/views/pages/bbsDcry/video/VideoHistoryDetail.vue
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 |
import ViewerComponent from '../../../component/editor/ViewerComponent.vue'; |
72 | 72 |
// API |
73 | 73 |
import { findDcryProc, deleteDcryProc } from '@/resources/api/dcry'; |
74 |
-import { fileDownloadProc, multiFileDownloadProc } from '@/resources/api/file'; |
|
74 |
+import { fileDownloadProc } from '@/resources/api/file'; |
|
75 | 75 |
|
76 | 76 |
export default { |
77 | 77 |
components: { |
--- client/views/pages/bbsDcry/video/VideoHistoryInsert.vue
+++ client/views/pages/bbsDcry/video/VideoHistoryInsert.vue
... | ... | @@ -87,7 +87,7 @@ |
87 | 87 |
</dl> |
88 | 88 |
</form> |
89 | 89 |
<div class="btn-group flex-center"> |
90 |
- <button type="button" class="cancel" @click="fnMoveTo('VideoHistorySearch')">취소</button> |
|
90 |
+ <button type="button" class="cancel" @click="fnMoveTo('list')">취소</button> |
|
91 | 91 |
<button type="button" class="register" @click="submitForm"> |
92 | 92 |
<span v-if="$isEmpty(pageId)">등록</span> |
93 | 93 |
<span v-else>수정</span> |
... | ... | @@ -163,13 +163,13 @@ |
163 | 163 |
|
164 | 164 |
if (response.data.data.dcry.ty !== 'V') { |
165 | 165 |
alert('올바른 접근이 아닙니다.'); |
166 |
- this.fnMoveTo('VideoHistorySearch'); // 목록으로 이동 |
|
166 |
+ this.fnMoveTo('list'); // 목록으로 이동 |
|
167 | 167 |
} |
168 | 168 |
|
169 | 169 |
this.copyToDcryReqDTO(response.data.data.dcry); |
170 | 170 |
} catch (error) { |
171 | 171 |
alert('조회중 오류가 발생했습니다.'); |
172 |
- this.fnMoveTo('VideoHistorySearch'); // 목록으로 이동 |
|
172 |
+ this.fnMoveTo('list'); // 목록으로 이동 |
|
173 | 173 |
|
174 | 174 |
if (error.response) { |
175 | 175 |
alert(error.response.data.message); |
... | ... | @@ -330,12 +330,11 @@ |
330 | 330 |
|
331 | 331 |
// API 통신 |
332 | 332 |
const response = this.$isEmpty(this.pageId) ? await saveDcry(formData) : await updateDcry(formData); |
333 |
- let result = response.data; |
|
334 |
- let id = result.data.dcryId; |
|
333 |
+ let id = response.data.data.dcryId; |
|
335 | 334 |
alert(this.$isEmpty(this.pageId) ? "등록되었습니다." : "수정되었습니다."); |
336 | 335 |
|
337 | 336 |
// 상세 페이지로 이동 |
338 |
- this.fnMoveTo('VideoHistoryDetail', id); |
|
337 |
+ this.fnMoveTo('view', id); |
|
339 | 338 |
} catch (error) { |
340 | 339 |
if (error.response) { |
341 | 340 |
alert(error.response.data.message); |
... | ... | @@ -347,13 +346,20 @@ |
347 | 346 |
}, |
348 | 347 |
|
349 | 348 |
// 페이지 이동 |
350 |
- fnMoveTo(page, id) { |
|
351 |
- if (this.$isEmpty(id)) { |
|
352 |
- this.$router.push({ name: page }); |
|
349 |
+ fnMoveTo(type, id) { |
|
350 |
+ const routes = { |
|
351 |
+ 'list': { name: 'VideoHistorySearch' }, |
|
352 |
+ 'view': { name: 'VideoHistoryDetail', query: { id } }, |
|
353 |
+ 'edit': { name: 'VideoHistoryInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
354 |
+ }; |
|
355 |
+ |
|
356 |
+ if (routes[type]) { |
|
357 |
+ this.$router.push(routes[type]); |
|
353 | 358 |
} else { |
354 |
- this.$router.push({ name: page, query: { id: id } }); |
|
359 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
360 |
+ this.$router.push(routes['list']); |
|
355 | 361 |
} |
356 |
- } |
|
362 |
+ }, |
|
357 | 363 |
} |
358 | 364 |
}; |
359 | 365 |
</script> |
--- client/views/pages/bbsDcry/video/VideoHistorySearch.vue
+++ client/views/pages/bbsDcry/video/VideoHistorySearch.vue
... | ... | @@ -109,7 +109,7 @@ |
109 | 109 |
</div> |
110 | 110 |
</div> |
111 | 111 |
</div> |
112 |
- <div class="btn-group flex-end mt-40"><button class="register"> <router-link :to="{ path: '/VideoHistoryInsert.page' }">등록</router-link></button></div> |
|
112 |
+ <div class="btn-group flex-end mt-40"><button type="button" class="register" @click="fnMoveTo('edit')">등록</button></div> |
|
113 | 113 |
<DefaultPagination class="mt-40" :search="searchReqDTO" @onChange="fnChangeCurrentPage" /> |
114 | 114 |
</div> |
115 | 115 |
</div> |
... | ... | @@ -308,6 +308,22 @@ |
308 | 308 |
selectTab(tabId) { |
309 | 309 |
this.selectedTabId = tabId; |
310 | 310 |
}, |
311 |
+ |
|
312 |
+ // 페이지 이동 |
|
313 |
+ fnMoveTo(type, id) { |
|
314 |
+ const routes = { |
|
315 |
+ 'list': { name: 'VideoHistorySearch' }, |
|
316 |
+ 'view': { name: 'VideoHistoryDetail', query: { id } }, |
|
317 |
+ 'edit': { name: 'VideoHistoryInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
318 |
+ }; |
|
319 |
+ |
|
320 |
+ if (routes[type]) { |
|
321 |
+ this.$router.push(routes[type]); |
|
322 |
+ } else { |
|
323 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
324 |
+ this.$router.push(routes['list']); |
|
325 |
+ } |
|
326 |
+ }, |
|
311 | 327 |
}, |
312 | 328 |
}; |
313 | 329 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/bbsMediaVido/MediaVideoInsert.vue
+++ client/views/pages/bbsMediaVido/MediaVideoInsert.vue
... | ... | @@ -47,7 +47,7 @@ |
47 | 47 |
</dl> |
48 | 48 |
</form> |
49 | 49 |
<div class="btn-group flex-center"> |
50 |
- <button type="button" class="cancel" @click="fnMoveTo('MediaVideoSearch')">취소</button> |
|
50 |
+ <button type="button" class="cancel" @click="fnMoveTo('list')">취소</button> |
|
51 | 51 |
<button type="button" class="register" @click="submitForm"> |
52 | 52 |
<span v-if="$isEmpty(pageId)">등록</span> |
53 | 53 |
<span v-else>수정</span> |
... | ... | @@ -116,7 +116,7 @@ |
116 | 116 |
this.copyToMediaVidoReqDTO(response.data.data.mediaVido); |
117 | 117 |
} catch (error) { |
118 | 118 |
alert('조회중 오류가 발생했습니다.'); |
119 |
- this.fnMoveTo('MediaVideoSearch'); // 목록으로 이동 |
|
119 |
+ this.fnMoveTo('list'); // 목록으로 이동 |
|
120 | 120 |
|
121 | 121 |
if (error.response) { |
122 | 122 |
alert(error.response.data.message); |
... | ... | @@ -169,9 +169,10 @@ |
169 | 169 |
|
170 | 170 |
// API 통신 |
171 | 171 |
const response = this.$isEmpty(this.pageId) ? await saveMediaVidoProc(this.requestDTO) : await updateMediaVidoDcry(this.requestDTO); |
172 |
+ let id = response.data.data.mediaVidoId; |
|
172 | 173 |
alert(this.$isEmpty(this.pageId) ? "등록되었습니다." : "수정되었습니다."); |
173 | 174 |
|
174 |
- this.fnMoveTo('MediaVideoDetail', response.data.data.mediaVidoId); // 상세 페이지로 이동 |
|
175 |
+ this.fnMoveTo('view', id); // 상세 페이지로 이동 |
|
175 | 176 |
} catch (error) { |
176 | 177 |
if (error.response) { |
177 | 178 |
alert(error.response.data.message); |
... | ... | @@ -183,13 +184,20 @@ |
183 | 184 |
}, |
184 | 185 |
|
185 | 186 |
// 페이지 이동 |
186 |
- fnMoveTo(page, id) { |
|
187 |
- if (this.$isEmpty(id)) { |
|
188 |
- this.$router.push({ name: page }); |
|
187 |
+ fnMoveTo(type, id) { |
|
188 |
+ const routes = { |
|
189 |
+ 'list': { name: 'MediaVideoSearch' }, |
|
190 |
+ 'view': { name: 'MediaVideoDetail', query: { id } }, |
|
191 |
+ 'edit': { name: 'MediaVideoInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
192 |
+ }; |
|
193 |
+ |
|
194 |
+ if (routes[type]) { |
|
195 |
+ this.$router.push(routes[type]); |
|
189 | 196 |
} else { |
190 |
- this.$router.push({ name: page, query: { id: id } }); |
|
197 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
198 |
+ this.$router.push(routes['list']); |
|
191 | 199 |
} |
192 |
- } |
|
200 |
+ }, |
|
193 | 201 |
} |
194 | 202 |
}; |
195 | 203 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/bbsMediaVido/MediaVideoSearch.vue
+++ client/views/pages/bbsMediaVido/MediaVideoSearch.vue
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 |
</div> |
105 | 105 |
</div> |
106 | 106 |
</div> |
107 |
- <div class="btn-group flex-end mt-40"><button class="register"> <router-link :to="{ path: '/MediaVideoInsert.page' }">등록</router-link></button></div> |
|
107 |
+ <div class="btn-group flex-end mt-40"><button type="button" class="register" @click="fnMoveTo('edit')">등록</button></div> |
|
108 | 108 |
<DefaultPagination class="mt-40" :search="searchReqDTO" @onChange="fnChangeCurrentPage" /> |
109 | 109 |
</div> |
110 | 110 |
</div> |
... | ... | @@ -298,6 +298,22 @@ |
298 | 298 |
selectTab(tabId) { |
299 | 299 |
this.selectedTabId = tabId; |
300 | 300 |
}, |
301 |
+ |
|
302 |
+ // 페이지 이동 |
|
303 |
+ fnMoveTo(type, id) { |
|
304 |
+ const routes = { |
|
305 |
+ 'list': { name: 'MediaVideoSearch' }, |
|
306 |
+ 'view': { name: 'MediaVideoDetail', query: { id } }, |
|
307 |
+ 'edit': { name: 'MediaVideoInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
308 |
+ }; |
|
309 |
+ |
|
310 |
+ if (routes[type]) { |
|
311 |
+ this.$router.push(routes[type]); |
|
312 |
+ } else { |
|
313 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
314 |
+ this.$router.push(routes['list']); |
|
315 |
+ } |
|
316 |
+ }, |
|
301 | 317 |
}, |
302 | 318 |
}; |
303 | 319 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/bbsNesDta/NewsReleaseSearch.vue
+++ client/views/pages/bbsNesDta/NewsReleaseSearch.vue
... | ... | @@ -105,7 +105,7 @@ |
105 | 105 |
</div> |
106 | 106 |
</div> |
107 | 107 |
</div> |
108 |
- <div class="btn-group flex-end mt-40"><button class="register"> <router-link :to="{ path: '/NewsReleaseInsert.page' }">등록</router-link></button></div> |
|
108 |
+ <div class="btn-group flex-end mt-40"><button type="button" class="register" @click="fnMoveTo('edit')">등록</button></div> |
|
109 | 109 |
<DefaultPagination class="mt-40" :search="searchReqDTO" @onChange="fnChangeCurrentPage" /> |
110 | 110 |
</div> |
111 | 111 |
</div> |
... | ... | @@ -299,6 +299,22 @@ |
299 | 299 |
selectTab(tabId) { |
300 | 300 |
this.selectedTabId = tabId; |
301 | 301 |
}, |
302 |
+ |
|
303 |
+ // 페이지 이동 |
|
304 |
+ fnMoveTo(type, id) { |
|
305 |
+ const routes = { |
|
306 |
+ 'list': { name: 'NewsReleaseSearch' }, |
|
307 |
+ 'view': { name: 'NewsReleaseDetail', query: { id } }, |
|
308 |
+ 'edit': { name: 'NewsReleaseInsert', query: this.$isEmpty(id) ? {} : { id } }, |
|
309 |
+ }; |
|
310 |
+ |
|
311 |
+ if (routes[type]) { |
|
312 |
+ this.$router.push(routes[type]); |
|
313 |
+ } else { |
|
314 |
+ alert("올바르지 않은 경로를 요청하여 목록으로 이동합니다."); |
|
315 |
+ this.$router.push(routes['list']); |
|
316 |
+ } |
|
317 |
+ }, |
|
302 | 318 |
}, |
303 | 319 |
}; |
304 | 320 |
</script>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/main/Main.vue
+++ client/views/pages/main/Main.vue
... | ... | @@ -66,7 +66,9 @@ |
66 | 66 |
<div class="tab-content"> |
67 | 67 |
<template v-for="(tabContent, idx1) of tabContents" :key="idx1"> |
68 | 68 |
<div v-show="tabContent.id === selectedTab" class="content-wrap"> |
69 |
- <router-link :to="{ name: tabContent.search }" class="gopage">더보기</router-link> |
|
69 |
+ <div style="text-align: right;"> |
|
70 |
+ <button type="button" class="gopage" @click="fnMoveTo(tabContent.search)">더보기</button> |
|
71 |
+ </div> |
|
70 | 72 |
<div class="new-pic"> |
71 | 73 |
<div v-for="(item, idx2) in tabContent.list" :key="idx2" class="box-wrap"> |
72 | 74 |
<div class="box" @click="fnMoveTo(tabContent.view, item.dcryId)"> |
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?