--- client/resources/css/style.css
+++ client/resources/css/style.css
... | ... | @@ -875,7 +875,7 @@ |
875 | 875 |
details > summary::-webkit-details-marker { background:#444; color:#fff; background-size:contain; transform:rotate3d(0, 0, 1, 90deg); transition:transform 0.25s;} |
876 | 876 |
details[open] > summary::-webkit-details-marker { transform:rotate3d(0, 0, 1, 180deg);} |
877 | 877 |
details[open] > summary ~ * { animation:reveal 0.5s;} |
878 |
-.tpt {font-family: 'Pretendard-SemiBold'; font-size: 20px;padding:10px; line-height:25px; cursor: pointer;} |
|
878 |
+.tpt {font-family: 'Pretendard-SemiBold'; font-size: 20px;padding:5px; line-height:25px; cursor: pointer;} |
|
879 | 879 |
.side_t .tpt{ margin:5px 0 10px 30px; } |
880 | 880 |
.side_t .tpt:hover{background-color: #fff; border: 1px solid #FFBA08; border-radius: 5px; text-decoration: underline; text-decoration-color: #FFBA08; |
881 | 881 |
text-decoration-thickness: 3px;} |
--- client/views/layout/Side_t.vue
+++ client/views/layout/Side_t.vue
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 |
<router-link to="/Home.page" class="tpt">홈</router-link> |
27 | 27 |
<router-link to="/Board.page" class="tpt">게시판</router-link> |
28 | 28 |
<router-link to="/StudentList.page" class="tpt">학생목록</router-link> |
29 |
- <router-link to="/C_Textbook.page" class="tpt">교재</router-link> |
|
29 |
+ <router-link to="/textbook.page" class="tpt">교재</router-link> |
|
30 | 30 |
</details> |
31 | 31 |
</div> |
32 | 32 |
<div> |
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
... | ... | @@ -458,9 +458,12 @@ |
458 | 458 |
next(); |
459 | 459 |
} |
460 | 460 |
} else if (userInfo.author[0].authority === 'PARENT') { |
461 |
- if (to.name !== 'Main_p') { |
|
461 |
+ if(to.name === 'PhotoBook'){ |
|
462 |
+ next(); |
|
463 |
+ } |
|
464 |
+ if (to.name !== 'Main_p' ) { |
|
462 | 465 |
next({ name: 'Main_p' }); |
463 |
- } else { |
|
466 |
+ } else { |
|
464 | 467 |
next(); |
465 | 468 |
} |
466 | 469 |
} else { |
--- client/views/pages/main/PhotoBook.vue
+++ client/views/pages/main/PhotoBook.vue
... | ... | @@ -5,11 +5,8 @@ |
5 | 5 |
<div class="myphoto mb30"> |
6 | 6 |
<div> |
7 | 7 |
<div class="title-box flex justify-end mb40"> |
8 |
- <select name="" id=""> |
|
9 |
- <option v-for="classItem in classList" :key="classItem.sclsId" :value="classItem.sclsId" @click=" |
|
10 |
- currentPage = 1; |
|
11 |
- stdPhotoSelectList(classItem.sclsId); |
|
12 |
- "> |
|
8 |
+ <select @change="handleClassChange"> |
|
9 |
+ <option v-for="classItem in classList" :key="classItem.sclsId" :value="classItem.sclsId"> |
|
13 | 10 |
{{ classItem.sclsNm }} |
14 | 11 |
</option> |
15 | 12 |
</select> |
... | ... | @@ -116,6 +113,7 @@ |
116 | 113 |
showModal: false, |
117 | 114 |
searchOpen: false, |
118 | 115 |
searchOpen2: false, |
116 |
+ selectedSclsId: null, |
|
119 | 117 |
}; |
120 | 118 |
}, |
121 | 119 |
methods: { |
... | ... | @@ -135,6 +133,9 @@ |
135 | 133 |
console.log("classList - response : ", response.data); |
136 | 134 |
vm.classList = response.data.data; |
137 | 135 |
vm.currentPage = 1; |
136 |
+ vm.selectedSclsId= vm.classList[0].sclsId; |
|
137 |
+ vm.stdPhotoSelectList(); |
|
138 |
+ |
|
138 | 139 |
}) |
139 | 140 |
.catch(function (error) { |
140 | 141 |
console.log("classList - error : ", error); |
... | ... | @@ -142,32 +143,36 @@ |
142 | 143 |
}); |
143 | 144 |
}, |
144 | 145 |
|
145 |
- stdPhotoSelectList: function (sclsId) { |
|
146 |
- const vm = this; |
|
147 |
- axios({ |
|
148 |
- url: "/photo/stdPhotoList.json", |
|
149 |
- method: "post", |
|
150 |
- headers: { |
|
151 |
- "Content-Type": "application/json; charset=UTF-8", |
|
152 |
- }, |
|
153 |
- data: { |
|
154 |
- stdId: "1", |
|
155 |
- sclsId: "1", // 여기에 sclsId들어가야함 |
|
156 |
- page: vm.currentPage, |
|
157 |
- pageSize: vm.pageSize, |
|
158 |
- }, |
|
146 |
+ handleClassChange(event) { |
|
147 |
+ this.selectedSclsId = event.target.value; // 선택된 sclsId 가져오기 |
|
148 |
+ this.currentPage = 1; // 페이지 초기화 |
|
149 |
+ this.stdPhotoSelectList(); // 함수 호출 |
|
150 |
+ }, |
|
151 |
+ stdPhotoSelectList: function (scsId) { |
|
152 |
+ const vm = this; |
|
153 |
+ axios({ |
|
154 |
+ url: "/photo/stdPhotoList.json", |
|
155 |
+ method: "post", |
|
156 |
+ headers: { |
|
157 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
158 |
+ }, |
|
159 |
+ data: { |
|
160 |
+ stdId: "1", |
|
161 |
+ sclsId: vm.selectedSclsId, // 여기에 sclsId 들어가야 함 |
|
162 |
+ page: vm.currentPage, |
|
163 |
+ pageSize: vm.pageSize, |
|
164 |
+ }, |
|
165 |
+ }) |
|
166 |
+ .then(function (response) { |
|
167 |
+ console.log("photoList - response : ", response.data); |
|
168 |
+ vm.photoList = response.data; |
|
169 |
+ vm.totalPages = Math.ceil(response.data.photoCount / vm.pageSize); |
|
159 | 170 |
}) |
160 |
- .then(function (response) { |
|
161 |
- console.log("photoList - response : ", response.data); |
|
162 |
- vm.photoList = response.data; |
|
163 |
- vm.totalPages = Math.ceil(response.data.photoCount / vm.pageSize); |
|
164 |
- }) |
|
165 |
- .catch(function (error) { |
|
166 |
- console.log("photoList - error : ", error); |
|
167 |
- alert("반별 내 사진 조회에 오류가 발생했습니다."); |
|
168 |
- }); |
|
169 |
- }, |
|
170 |
- |
|
171 |
+ .catch(function (error) { |
|
172 |
+ console.log("photoList - error : ", error); |
|
173 |
+ alert("반별 내 사진 조회에 오류가 발생했습니다."); |
|
174 |
+ }); |
|
175 |
+ }, |
|
171 | 176 |
getRotation(index) { |
172 | 177 |
const rotations = [2, -1, 1, -2, 1, -1]; |
173 | 178 |
return `rotate(${rotations[index]}deg)`; |
... | ... | @@ -277,7 +282,6 @@ |
277 | 282 |
mounted() { |
278 | 283 |
console.log("Main2 mounted"); |
279 | 284 |
this.stdClassesSelectList(); |
280 |
- this.stdPhotoSelectList(); |
|
281 | 285 |
}, |
282 | 286 |
}; |
283 | 287 |
</script> |
--- client/views/pages/parents/Main_p.vue
+++ client/views/pages/parents/Main_p.vue
... | ... | @@ -25,10 +25,7 @@ |
25 | 25 |
<hr> |
26 | 26 |
<p class="title2 mb25">최근 학습 히스토리</p> |
27 | 27 |
<ul class="flex justify-between ml30"> |
28 |
- <li |
|
29 |
- v-for="historyItem in studentInfo.history" |
|
30 |
- :key="historyItem.unitId" |
|
31 |
- > |
|
28 |
+ <li v-for="historyItem in studentInfo.history" :key="historyItem.unitId"> |
|
32 | 29 |
[{{ historyItem.bookName }}] {{ historyItem.unitName }} |
33 | 30 |
</li> |
34 | 31 |
</ul> |
... | ... | @@ -44,7 +41,8 @@ |
44 | 41 |
<p class="title1" style="color: #fff;">포토북 랭킹</p> |
45 | 42 |
</div> |
46 | 43 |
<div class="box"> |
47 |
- <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="red">{{ photo_rank }}등</em>입니다.</P> |
|
44 |
+ <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="red">{{ photo_rank |
|
45 |
+ }}등</em>입니다.</P> |
|
48 | 46 |
</div> |
49 | 47 |
</div> |
50 | 48 |
<div class="textbook "> |
... | ... | @@ -52,7 +50,8 @@ |
52 | 50 |
<p class="title1" style="color: #fff;">진도율 랭킹</p> |
53 | 51 |
</div> |
54 | 52 |
<div class="box"> |
55 |
- <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="yellow">{{ problem_rank }}등</em>입니다.</P> |
|
53 |
+ <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="yellow">{{ problem_rank |
|
54 |
+ }}등</em>입니다.</P> |
|
56 | 55 |
</div> |
57 | 56 |
</div> |
58 | 57 |
<div class="textbook book-blue"> |
... | ... | @@ -60,7 +59,8 @@ |
60 | 59 |
<p class="title1" style="color: #fff;">점수 랭킹</p> |
61 | 60 |
</div> |
62 | 61 |
<div class="box"> |
63 |
- <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="blue">{{ score_rank }}등</em>입니다.</P> |
|
62 |
+ <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="blue">{{ score_rank |
|
63 |
+ }}등</em>입니다.</P> |
|
64 | 64 |
</div> |
65 | 65 |
</div> |
66 | 66 |
<div class="textbook book-navy"> |
... | ... | @@ -68,7 +68,8 @@ |
68 | 68 |
<p class="title1" style="color: #fff;">학습시간 랭킹</p> |
69 | 69 |
</div> |
70 | 70 |
<div class="box"> |
71 |
- <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="navy">{{ time_rank }}등</em>입니다.</P> |
|
71 |
+ <P class="title2 mt10">현재 {{ stdCount }}명 중 <em class="navy">{{ time_rank |
|
72 |
+ }}등</em>입니다.</P> |
|
72 | 73 |
</div> |
73 | 74 |
</div> |
74 | 75 |
</div> |
... | ... | @@ -85,7 +86,7 @@ |
85 | 86 |
</div> |
86 | 87 |
<div class="text mt10"> |
87 | 88 |
<p class="title1 mb10">나의 사진첩</p> |
88 |
- <button @click="selectedTab = 'tab4'; goToPage('PhotoBook')" type="button" |
|
89 |
+ <button @click="goToPage('PhotoBook')" type="button" |
|
89 | 90 |
title="글쓰기" class="new-btn"> |
90 | 91 |
바로가기 |
91 | 92 |
</button> |
... | ... | @@ -104,14 +105,17 @@ |
104 | 105 |
<div class="flex"> |
105 | 106 |
<div class="wrap" style="flex: 1;"> |
106 | 107 |
<p class="name">학습 현황</p> |
107 |
- <div class="flex justify-center"><Dounutchart/></div> |
|
108 |
+ <div class="flex justify-center"> |
|
109 |
+ <Dounutchart /> |
|
110 |
+ </div> |
|
108 | 111 |
<div class="textbox"> |
109 | 112 |
<p class="title2">오늘의 학습현황</p> |
110 | 113 |
<!-- 안전하게 진도율을 소수점 한자리 수까지 표시 --> |
111 |
- <p class="name"> |
|
112 |
- {{ donutChartData.clearUnitNum && donutChartData.totalScheduleUnitNum |
|
113 |
- ? (donutChartData.clearUnitNum / donutChartData.totalScheduleUnitNum * 100).toFixed(1) |
|
114 |
- : 0 }} % |
|
114 |
+ <p class="name"> |
|
115 |
+ {{ donutChartData.clearUnitNum && donutChartData.totalScheduleUnitNum |
|
116 |
+ ? (donutChartData.clearUnitNum / donutChartData.totalScheduleUnitNum * |
|
117 |
+ 100).toFixed(1) |
|
118 |
+ : 0 }} % |
|
115 | 119 |
</p> |
116 | 120 |
</div> |
117 | 121 |
<p class="title2">학습시간</p> |
... | ... | @@ -120,7 +124,7 @@ |
120 | 124 |
<div class="wrap" style="flex: 1;"> |
121 | 125 |
<p class="name">이해/표현 점수</p> |
122 | 126 |
<div class="flex justify-center mt50"> |
123 |
- <ColumnLineChart/> |
|
127 |
+ <ColumnLineChart /> |
|
124 | 128 |
</div> |
125 | 129 |
</div> |
126 | 130 |
</div> |
... | ... | @@ -160,12 +164,16 @@ |
160 | 164 |
<div class="flex-column" style="flex: 1;"> |
161 | 165 |
<div class="wrap"> |
162 | 166 |
<p class="name">교재별 오답률</p> |
163 |
- <div class="flex justify-center"><Barchart /></div> |
|
167 |
+ <div class="flex justify-center"> |
|
168 |
+ <Barchart /> |
|
169 |
+ </div> |
|
164 | 170 |
</div> |
165 | 171 |
|
166 | 172 |
<div class="wrap"> |
167 | 173 |
<p class="name">문제 카테고리별 세부 점수</p> |
168 |
- <div class="flex justify-center"><CategoryBarChart /></div> |
|
174 |
+ <div class="flex justify-center"> |
|
175 |
+ <CategoryBarChart /> |
|
176 |
+ </div> |
|
169 | 177 |
</div> |
170 | 178 |
|
171 | 179 |
</div> |
... | ... | @@ -216,6 +224,10 @@ |
216 | 224 |
}, |
217 | 225 |
|
218 | 226 |
methods: { |
227 |
+ goToPage(page) { |
|
228 |
+ this.$router.push({ name: page }); |
|
229 |
+ }, |
|
230 |
+ |
|
219 | 231 |
classStdCount: function () { |
220 | 232 |
const vm = this; |
221 | 233 |
axios({ |
... | ... | @@ -274,7 +286,7 @@ |
274 | 286 |
}) |
275 | 287 |
.then(function (response) { |
276 | 288 |
console.log("User Rank - response : ", response.data); |
277 |
- vm.score_rank = response.data; |
|
289 |
+ vm.score_rank = response.data; |
|
278 | 290 |
}) |
279 | 291 |
.catch(function (error) { |
280 | 292 |
console.log("User Rank - error : ", error); |
... | ... | @@ -295,7 +307,7 @@ |
295 | 307 |
}) |
296 | 308 |
.then(function (response) { |
297 | 309 |
console.log("User Rank - response : ", response.data); |
298 |
- vm.time_rank = response.data; |
|
310 |
+ vm.time_rank = response.data; |
|
299 | 311 |
}) |
300 | 312 |
.catch(function (error) { |
301 | 313 |
console.log("User Rank - error : ", error); |
... | ... | @@ -328,15 +340,15 @@ |
328 | 340 |
// 학생 데이터 가져오기 |
329 | 341 |
fetchStudentInfo() { |
330 | 342 |
axios.post("/studentInfo/getInfo.json", { userId: this.currentStdId }) |
331 |
- .then((response) => { |
|
332 |
- console.log(response.data); |
|
333 |
- this.studentInfo = response.data; |
|
334 |
- }) |
|
335 |
- .catch((error) => { |
|
336 |
- console.error("학생 정보 가져오기 실패:", error); |
|
337 |
- }); |
|
338 |
- }, |
|
339 |
- |
|
343 |
+ .then((response) => { |
|
344 |
+ console.log(response.data); |
|
345 |
+ this.studentInfo = response.data; |
|
346 |
+ }) |
|
347 |
+ .catch((error) => { |
|
348 |
+ console.error("학생 정보 가져오기 실패:", error); |
|
349 |
+ }); |
|
350 |
+ }, |
|
351 |
+ |
|
340 | 352 |
// 현재 날짜의 학생 학습률 데이터 가져오기 |
341 | 353 |
getStdProgressData() { |
342 | 354 |
const vm = this; |
... | ... | @@ -344,13 +356,13 @@ |
344 | 356 |
std_id: vm.currentStdId, |
345 | 357 |
current_date: vm.currentDate |
346 | 358 |
}) |
347 |
- .then(response => { |
|
348 |
- vm.donutChartData = response.data; |
|
349 |
- console.log(vm.donutChartData); |
|
350 |
- }) |
|
351 |
- .catch(error => { |
|
352 |
- console.error('오늘의 학생 학습 현황 데이터를 가져오는 중 오류 발생:', error); |
|
353 |
- }) |
|
359 |
+ .then(response => { |
|
360 |
+ vm.donutChartData = response.data; |
|
361 |
+ console.log(vm.donutChartData); |
|
362 |
+ }) |
|
363 |
+ .catch(error => { |
|
364 |
+ console.error('오늘의 학생 학습 현황 데이터를 가져오는 중 오류 발생:', error); |
|
365 |
+ }) |
|
354 | 366 |
}, |
355 | 367 |
|
356 | 368 |
}, |
--- client/views/pages/teacher/ClassDetail.vue
+++ client/views/pages/teacher/ClassDetail.vue
... | ... | @@ -40,7 +40,7 @@ |
40 | 40 |
<div class="wrap mb30"> |
41 | 41 |
<div class="flex justify-between mb30 align-center"> |
42 | 42 |
<label for="" class="title1">학생 목록</label> |
43 |
- <div class="look-btn align-center flex"> |
|
43 |
+ <div class="look-btn align-center flex" @click="goToPage('StudentList')"> |
|
44 | 44 |
<p>자세히 보기</p> |
45 | 45 |
<svg-icon type="mdi" :path="mdilArrowRight" class="ml10"></svg-icon> |
46 | 46 |
</div> |
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 |
<div class="wrap mb30"> |
68 | 68 |
<div class="flex justify-between mb30 align-center"> |
69 | 69 |
<label for="" class="title1">책 </label> |
70 |
- <div class="align-center flex look-btn"> |
|
70 |
+ <div class="align-center flex look-btn" @click="goToPage('textbook')"> |
|
71 | 71 |
<p>자세히 보기</p> |
72 | 72 |
<svg-icon type="mdi" :path="mdilArrowRight" class="ml10"></svg-icon> |
73 | 73 |
</div> |
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?