
--- client/resources/api/modeling.js
+++ client/resources/api/modeling.js
... | ... | @@ -27,3 +27,8 @@ |
27 | 27 |
} |
28 | 28 |
}); |
29 | 29 |
} |
30 |
+ |
|
31 |
+// 피드백 생성 기능 |
|
32 |
+export const saveFeedbackProc = (projectGroupId, data) => { |
|
33 |
+ return apiClient.post(`/project/${projectGroupId}/feedback/saveFeedback.json`, data); |
|
34 |
+} |
--- client/views/pages/subPage/Modeling.vue
+++ client/views/pages/subPage/Modeling.vue
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 |
<!-- 오른쪽 툴 --> |
77 | 77 |
<ul class="toolbar right layout gap10"> |
78 | 78 |
<li |
79 |
- v-for="tool in subTolls.slice(-4)" |
|
79 |
+ v-for="tool in subTolls.slice(-5)" |
|
80 | 80 |
:key="tool.id" |
81 | 81 |
:class="{ active: activeToolId === tool.id && !activeSubToolId }" |
82 | 82 |
style="position: relative;"> |
... | ... | @@ -106,10 +106,22 @@ |
106 | 106 |
<textarea class="form-control sm" v-model="localCommentData.comment"></textarea> |
107 | 107 |
</div> |
108 | 108 |
</div> |
109 |
+ <div v-else-if="activeModalTool.title === '피드백'" class="mb10"> |
|
110 |
+ <div class="input-group mb10"> |
|
111 |
+ <label for="">writer</label> |
|
112 |
+ <input type="text" class="form-control sm" :value="getMemNm" disabled> |
|
113 |
+ </div> |
|
114 |
+ <div class="input-group mb10"> |
|
115 |
+ <label for="">content</label> |
|
116 |
+ <input type="text" class="form-control sm" v-model="feedback"> |
|
117 |
+ </div> |
|
118 |
+ </div> |
|
109 | 119 |
<div class="btn-group layout center justify-center gap10"> |
110 | 120 |
<button class="btn sm black" v-if="activeModalTool.title === '참여자'" @click="closeModal">닫기</button> |
111 | 121 |
<button class="btn sm purple" v-if="activeModalTool.title === '코멘트'" @click="saveComment">저장</button> |
112 | 122 |
<button class="btn sm black" v-if="activeModalTool.title === '코멘트'" @click="closeModal">취소</button> |
123 |
+ <button class="btn sm purple" v-if="activeModalTool.title === '피드백'" @click="saveFeedback">저장</button> |
|
124 |
+ <button class="btn sm black" v-if="activeModalTool.title === '피드백'" @click="closeModal">취소</button> |
|
113 | 125 |
</div> |
114 | 126 |
</div> |
115 | 127 |
</div> |
... | ... | @@ -168,7 +180,7 @@ |
168 | 180 |
|
169 | 181 |
<script> |
170 | 182 |
import { mapGetters } from 'vuex'; |
171 |
-import { saveProjectProc, findProjectProc, updateProjectProc } from '../../../resources/api/modeling'; |
|
183 |
+import { saveProjectProc, findProjectProc, updateProjectProc, saveFeedbackProc } from '../../../resources/api/modeling'; |
|
172 | 184 |
|
173 | 185 |
export default { |
174 | 186 |
data() { |
... | ... | @@ -336,6 +348,12 @@ |
336 | 348 |
}, |
337 | 349 |
{ |
338 | 350 |
id: 700, |
351 |
+ icon: require('../../../resources/img/content/ico_comment_w.svg'), |
|
352 |
+ title: '피드백', |
|
353 |
+ type: 'modal' |
|
354 |
+ }, |
|
355 |
+ { |
|
356 |
+ id: 800, |
|
339 | 357 |
icon: require('../../../resources/img/content/ico_close_w.svg'), |
340 | 358 |
title: '닫기', |
341 | 359 |
}, |
... | ... | @@ -349,12 +367,14 @@ |
349 | 367 |
summary: '', |
350 | 368 |
comment: '' |
351 | 369 |
}, |
352 |
- localCommentData: { // 복사본 |
|
370 |
+ localCommentData: { // 주석 입력 데이터 복사본 |
|
353 | 371 |
summary: '', |
354 | 372 |
comment: '' |
355 | 373 |
}, |
356 | 374 |
projectId: null, // 프로젝트 수정 시 사용 |
375 |
+ projectGroupId: null, // 프로젝트 피드백 작성 시 사용 |
|
357 | 376 |
isReset: null, // 이미지 초기화 시 사용 |
377 |
+ feedback: '', // 피드백 내용 |
|
358 | 378 |
}; |
359 | 379 |
}, |
360 | 380 |
methods: { |
... | ... | @@ -462,8 +482,6 @@ |
462 | 482 |
}, |
463 | 483 |
saveComment() { |
464 | 484 |
this.commentData = {...this.localCommentData}; // 저장 시 반영 |
465 |
- console.log('요약: ', this.commentData.summary); |
|
466 |
- console.log('주석: ', this.commentData.comment); |
|
467 | 485 |
this.closeModal(); |
468 | 486 |
}, |
469 | 487 |
loadProjectData(projectId) { |
... | ... | @@ -475,6 +493,7 @@ |
475 | 493 |
.then(response => { |
476 | 494 |
const projectInfo = response.data.result; |
477 | 495 |
this.projectId = projectId; |
496 |
+ this.projectGroupId = projectInfo.project.projectGroupId; |
|
478 | 497 |
this.localCommentData.summary = projectInfo.projectComment.summary; |
479 | 498 |
this.localCommentData.comment = projectInfo.projectComment.comment; |
480 | 499 |
this.saveComment(); |
... | ... | @@ -485,11 +504,28 @@ |
485 | 504 |
name: member.memberName, |
486 | 505 |
isOwner: member.isOwner |
487 | 506 |
})); |
507 |
+ |
|
488 | 508 |
}) |
489 | 509 |
}, |
490 | 510 |
resetImage(){ |
491 | 511 |
this.isReset = true; |
492 | 512 |
}, |
513 |
+ saveFeedback() { |
|
514 |
+ if(this.projectGroupId == null) { |
|
515 |
+ console.error('신규 프로젝트에는 피드백을 남길 수 없습니다.'); |
|
516 |
+ return; |
|
517 |
+ } |
|
518 |
+ const data = { |
|
519 |
+ memberId : this.getMemId, |
|
520 |
+ feedbackContent : this.feedback |
|
521 |
+ }; |
|
522 |
+ saveFeedbackProc(this.projectGroupId, data) |
|
523 |
+ .then(response => { |
|
524 |
+ console.log('피드백 저장 완료'); |
|
525 |
+ }) |
|
526 |
+ .catch(error => {console.error('피드백 저장 실패');}); |
|
527 |
+ this.closeModal(); |
|
528 |
+ } |
|
493 | 529 |
}, |
494 | 530 |
watch: {}, |
495 | 531 |
computed: { |
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?