
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<template>
<div class="main myplan">
<div class="yellow-box mt30">
<div class="title-box flex justify-between align-center">
<div class="flex justify-between align-center" style="gap: 20px;">
<p class="title">단원</p>
<div class="row-bd"></div>
<div>
<p class="title mr40 mb10">{{ unitData.unit_nm }}</p>
<p class="subtitle">my name is dd</p>
</div>
</div>
</div>
</div>
<div class="title-box flex justify-between mb20 mt30">
<p class="title">오답노트</p>
</div>
<div class="wrap" style="border-radius: 0;">
<div class="table-wrap">
<span class="flex align-center title2 gray mb20">
이 단원에서 틀린 문제가 총 <p class="title1 black"> {{ wrongAnswerNotes.length }} </p> 개 있습니다!
</span>
<table>
<colgroup>
<col style="width: 10%;">
<col style="width: 70%;">
<col style="width: 15%;">
</colgroup>
<tr v-for="note in wrongAnswerNotes" :key="note.prblmLogId">
<td><img src="../../../resources/img/img214_19s.png" alt=""></td>
<td class="text-lf">
<p class="title1">{{ note.evalType }}</p>
<p class="title2">{{ note.prblmExpln }}</p>
</td>
<td>
<button type="button" title="" class="new-btn" @click="viewDetail(note.prblmId)">
View Detail
</button>
</td>
</tr>
</table>
<div class="flex justify-end">
<button type="button" title="선택하기" class="yellow-btn mt30">
선택하기
</button>
</div>
</div>
</div>
</div>
</template>
<script>
import axios from 'axios';
export default {
data() {
return {
currentStdId: "1", // 임시 학생 아이디
currentUnitId: "1", // 임시 유닛 아이디
wrongAnswerNotes: [], // 오답 노트 목록 데이터
unitData: {}, // 단원 정보 데이터
}
},
methods: {
// 오답노트 상세 보기 버튼 클릭
viewDetail(prblmId) {
// 상세 보기 페이지로 이동하는 로직을 추가 할 예정
console.log('링크될 문제 ID:', prblmId);
},
// 단원 정보를 불러오는 API 호출
fetchUnitDetail() {
axios.post('/unit/unitDetail.json', {
unitId: this.currentUnitId
})
.then(response => {
console.log(response.data[0]);
if (response.data.length > 0) {
this.unitData = response.data[0];
}
})
.catch(error => {
console.error('단원 정보를 불러오는 중 오류 발생:', error);
})
},
// 오답노트 목록을 가져오는 API 호출
fetchWrongAnswerNotes() {
axios.post('/problemLog/getPreviewNoteList.json', {
stdId: this.currentStdId,
unitId: this.currentUnitId
})
.then(response => {
console.log(response.data);
this.wrongAnswerNotes = response.data;
})
.catch(error => {
console.error('오답노트를 불러오는 중 오류 발생:', error);
});
}
},
watch: {
},
computed: {
},
components: {
},
mounted() {
console.log('PreviewNote mounted');
this.fetchUnitDetail();
this.fetchWrongAnswerNotes();
}
}
</script>
<style scoped>
.textbox {
height: 60px;
}
.textbox p {
font-size: 28px;
font-weight: bold;
line-height: 65px;
}
.dropGroup button {
position: relative;
}
.dropGroup button p {
font-size: 48px;
}
.dragGroup button p {
font-size: 48px;
}
</style>