
--- client/views/pages/subPage/Asset.vue
+++ client/views/pages/subPage/Asset.vue
... | ... | @@ -54,7 +54,7 @@ |
54 | 54 |
<!-- 드롭다운 메뉴 표시 --> |
55 | 55 |
<div v-if="openMenuIndex === index" class="dropdown-menu" :class="dropdownDirection"> |
56 | 56 |
<button><img src="../../../resources/img/content/ico_subShare.svg" alt=""> 공유</button> |
57 |
- <button @click="duplicateProject(project.projectId)"><img src="../../../resources/img/content/ico_subCopy.svg" alt=""> 복사</button> |
|
57 |
+ <button @click="duplicateProject(project.id)"><img src="../../../resources/img/content/ico_subCopy.svg" alt=""> 복사</button> |
|
58 | 58 |
<button @click="deleteProject(project.projectGroupId)"><img src="../../../resources/img/content/ico_trashcan.svg" alt=""> 삭제</button> |
59 | 59 |
<button @click="openPopup('versions', project)"><img src="../../../resources/img/content/ico_version.svg" alt=""> 버전기록</button> |
60 | 60 |
<button @click="openPopup('rename', project)"><img src="" alt=""> 이름 변경</button> |
... | ... | @@ -66,12 +66,16 @@ |
66 | 66 |
<div v-if="activePopup === 'versions'" class="popup-overlay" @click.self="closePopup()"> |
67 | 67 |
<div class="popup"> |
68 | 68 |
<button class="close-btn" @click="closePopup()">X</button> |
69 |
- <!-- 여기에 내용 넣기 --> |
|
70 | 69 |
<h3>작업내역</h3> |
71 | 70 |
<img src="../../../resources/img/content/ico_digital_asset.svg" alt="작업 이미지" /> |
72 | 71 |
<div class="versions"> |
73 | 72 |
<p>버전 목록</p> |
74 |
- <ul> |
|
73 |
+ <ul v-if="oldProjects && oldProjects.length > 0"> |
|
74 |
+ <li v-for="project in oldProjects" :key="project.id"> |
|
75 |
+ {{ project.date }} |
|
76 |
+ </li> |
|
77 |
+ </ul> |
|
78 |
+ <ul v-if="!oldProjects"> |
|
75 | 79 |
<li>5월 3일 오후 2:50</li> |
76 | 80 |
<li>5월 3일 오후 1:14</li> |
77 | 81 |
<li>5월 1일 오전 11:50</li> |
... | ... | @@ -102,6 +106,7 @@ |
102 | 106 |
<script> |
103 | 107 |
import { mapGetters } from 'vuex'; |
104 | 108 |
import { deleteProjectProc, findAllProjectsProc, duplicateProjectProc, updateProjectFavoriteProc, renameProjectProc } from '../../../resources/api/asset'; |
109 |
+import dayjs from 'dayjs'; |
|
105 | 110 |
|
106 | 111 |
export default { |
107 | 112 |
data() { |
... | ... | @@ -113,6 +118,7 @@ |
113 | 118 |
// { name: '프로젝트D', date: '2025.05.12', img: require('../../../resources/img/content/sample1.png'),isFavorite: true }, |
114 | 119 |
// { name: '프로젝트E', date: '2025.05.12', img: require('../../../resources/img/content/sample1.png'),isFavorite: false }, |
115 | 120 |
], |
121 |
+ oldProjects:[], // 이전 버전 목록 |
|
116 | 122 |
members: [], |
117 | 123 |
openMenuIndex: null, |
118 | 124 |
dropdownDirection: 'right', // 또는 'left' |
... | ... | @@ -207,9 +213,10 @@ |
207 | 213 |
.then(response => { |
208 | 214 |
const projectList = response.data.result.projects; |
209 | 215 |
|
210 |
- this.projects = projectList.map(project => ({ |
|
216 |
+ this.oldProjects = projectList.map(project => ({ |
|
217 |
+ id: project.projectId, |
|
211 | 218 |
name: project.projectName, |
212 |
- date: project.createdAt, |
|
219 |
+ date: dayjs(project.createdAt).format('M월 D일 A h:mm'), |
|
213 | 220 |
img: require('../../../resources/img/content/sample1.png'), // 백엔드 - 썸네일 기능 추가 후 수정 |
214 | 221 |
})); |
215 | 222 |
}) |
... | ... | @@ -243,6 +250,7 @@ |
243 | 250 |
this.activePopup = popupType; |
244 | 251 |
this.newProjectName = project.name; |
245 | 252 |
this.selectedProject = project; |
253 |
+ this.loadOldProjects(project.groupId); |
|
246 | 254 |
}, |
247 | 255 |
// 팝업창 닫기 |
248 | 256 |
closePopup(){ |
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?