
--- client/resources/api/asset.js
+++ client/resources/api/asset.js
... | ... | @@ -21,4 +21,9 @@ |
21 | 21 |
// 자산(프로젝트) 복제 기능 |
22 | 22 |
export const duplicateProjectProc = (projectId, data) => { |
23 | 23 |
return apiClient.post(`/project/${projectId}/duplicateProject.json`, data); |
24 |
+} |
|
25 |
+ |
|
26 |
+// 자산(프로젝트) 삭제 기능 |
|
27 |
+export const deleteProjectProc = (projectGroupId, data) => { |
|
28 |
+ return apiClient.post(`/project/${projectGroupId}/deleteProject.json`, data); |
|
24 | 29 |
}(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/subPage/Asset.vue
+++ client/views/pages/subPage/Asset.vue
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 |
<div v-if="openMenuIndex === index" class="dropdown-menu" :class="dropdownDirection"> |
54 | 54 |
<button><img src="../../../resources/img/content/ico_subShare.svg" alt=""> 공유</button> |
55 | 55 |
<button><img src="../../../resources/img/content/ico_subCopy.svg" alt="" @click="duplicateProject(project.projectId)"> 복사</button> |
56 |
- <button><img src="../../../resources/img/content/ico_trashcan.svg" alt=""> 삭제</button> |
|
56 |
+ <button><img src="../../../resources/img/content/ico_trashcan.svg" alt="" @click="deleteProject(project.projectGroupId)"> 삭제</button> |
|
57 | 57 |
<button><img src="../../../resources/img/content/ico_version.svg" alt=""> 버전기록</button> |
58 | 58 |
<!-- @click="changeProjectName --> |
59 | 59 |
<button><img src="" alt="" > 이름 변경</button> |
... | ... | @@ -84,8 +84,7 @@ |
84 | 84 |
|
85 | 85 |
<script> |
86 | 86 |
import { mapGetters } from 'vuex'; |
87 |
-import { findAllProjectsProc } from '../../../resources/api/asset'; |
|
88 |
-import { duplicateProjectProc } from '../../../resources/api/asset'; |
|
87 |
+import { deleteProjectProc, findAllProjectsProc, duplicateProjectProc } from '../../../resources/api/asset'; |
|
89 | 88 |
|
90 | 89 |
export default { |
91 | 90 |
data() { |
... | ... | @@ -185,7 +184,21 @@ |
185 | 184 |
// showPopupFunc(){ |
186 | 185 |
// console.log("팝업창 열기"); |
187 | 186 |
// this.showPopup = true; |
188 |
- // } |
|
187 |
+ // }, |
|
188 |
+ deleteProject(projectGroupId) { |
|
189 |
+ const data = { |
|
190 |
+ memberId : this.getMemId |
|
191 |
+ }; |
|
192 |
+ deleteProjectProc(projectGroupId, data) |
|
193 |
+ .then((response) => { |
|
194 |
+ console.log('삭제 성공'); |
|
195 |
+ this.loadMainProjects(); |
|
196 |
+ this.openMenuIndex = null; |
|
197 |
+ }) |
|
198 |
+ .catch((error) => { |
|
199 |
+ console.error('삭제 실패: ', error); |
|
200 |
+ }) |
|
201 |
+ } |
|
189 | 202 |
|
190 | 203 |
}, |
191 | 204 |
watch: {}, |
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?