

241021 정다정 상세메뉴 링크 수정
@81f0934564c65eeb9840d4b7daa88d0c767a3d38
--- client/views/pages/main/MyPlan.vue
+++ client/views/pages/main/MyPlan.vue
... | ... | @@ -1,44 +1,68 @@ |
1 | 1 |
<template> |
2 |
- <div style="height: 100%;"> |
|
3 |
- <div class="myplan mypage flex" style="height: 100%; padding: 50px;"> |
|
4 |
- <div class="textbook book-purple" |
|
5 |
- style="background-color: white; width: 50%; height: 100%; text-align: center;"> |
|
2 |
+ <div style="height: 100%"> |
|
3 |
+ <div class="myplan mypage flex" style="height: 100%; padding: 50px"> |
|
4 |
+ <div |
|
5 |
+ class="textbook book-purple" |
|
6 |
+ style="background-color: white; width: 50%; height: 100%; text-align: center" |
|
7 |
+ > |
|
6 | 8 |
<div class="text"> |
7 |
- <p class="title1" style="color: #fff;">스케줄</p> |
|
9 |
+ <p class="title1" style="color: #fff">스케줄</p> |
|
8 | 10 |
</div> |
9 | 11 |
<div class="purple-scroll" style="overflow: auto; height: 85%; margin: 5px"> |
10 |
- <div style="padding: 10px 20px;"> |
|
11 |
- <p style="text-align: right;cursor: pointer;text-decoration: underline;padding-bottom: 5px;" |
|
12 |
- class="title2" @click="goToPage2('MyPlan2')">학습 일정 변경하기</p> |
|
12 |
+ <div style="padding: 10px 20px"> |
|
13 |
+ <p |
|
14 |
+ style="text-align: right; cursor: pointer; text-decoration: underline; padding-bottom: 5px" |
|
15 |
+ class="title2" |
|
16 |
+ @click="goToPage2('MyPlan2')" |
|
17 |
+ > |
|
18 |
+ 학습 일정 변경하기 |
|
19 |
+ </p> |
|
13 | 20 |
<p class="title1" v-if="!schedules || schedules.length === 0">오늘 학습할 내용이 없습니다.</p> |
14 | 21 |
|
15 |
- <div class="flex-column " style="gap: 20px" v-else v-for="(schedule, index) in schedules" |
|
16 |
- :key="index"> |
|
22 |
+ <div |
|
23 |
+ class="flex-column" |
|
24 |
+ style="gap: 20px" |
|
25 |
+ v-else |
|
26 |
+ v-for="(schedule, index) in schedules" |
|
27 |
+ :key="index" |
|
28 |
+ > |
|
17 | 29 |
<div class="flex justify-between align-center" style="gap: 70px"> |
18 |
- <div class="wrap cs-pt planBox" :class="{ 'cs-pt-clicked': isClicked }" |
|
19 |
- style="width: 100%; background-color: #f1eaff;" |
|
20 |
- @click="goToPage('Dashboard', schedule.schdl_id)"> |
|
21 |
- <div class="text-lf flex justify-between align-center" style="width: 100%;"> |
|
22 |
- <p class="title2" s>grade 3</p><button type="button" class="popup-close-btn" |
|
23 |
- @click="deleteSchedule(schedule.schdl_id)" style="flex-basis: 25px"> |
|
30 |
+ <div |
|
31 |
+ class="wrap cs-pt planBox" |
|
32 |
+ :class="{ 'cs-pt-clicked': isClicked }" |
|
33 |
+ style="width: 100%; background-color: #f1eaff" |
|
34 |
+ @click="goToPage('Dashboard', schedule.schdl_id)" |
|
35 |
+ > |
|
36 |
+ <div class="text-lf flex justify-between align-center" style="width: 100%"> |
|
37 |
+ <p class="title2" s>grade 3</p> |
|
38 |
+ <button |
|
39 |
+ type="button" |
|
40 |
+ class="popup-close-btn" |
|
41 |
+ @click="deleteSchedule(schedule.schdl_id)" |
|
42 |
+ style="flex-basis: 25px" |
|
43 |
+ > |
|
24 | 44 |
<svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
25 | 45 |
</button> |
26 | 46 |
</div> |
27 | 47 |
<div class="text-lf flex justify-between align-center"> |
28 | 48 |
<div style="flex-basis: 40rem"> |
29 |
- <div class="flex align-center mb10" style="gap: 10px;"> |
|
49 |
+ <div class="flex align-center mb10" style="gap: 10px"> |
|
30 | 50 |
<p class="title2"> |
31 |
- <em class="gray-bd" |
|
32 |
- style="background-color: #9528b7; color: white; font-size: 18px;">{{ |
|
33 |
- schedule.schdl_unit }}교시</em> |
|
51 |
+ <em |
|
52 |
+ class="gray-bd" |
|
53 |
+ style="background-color: #9528b7; color: white; font-size: 18px" |
|
54 |
+ >{{ schedule.schdl_unit }}교시</em |
|
55 |
+ > |
|
34 | 56 |
</p> |
35 | 57 |
<p class="title1">{{ schedule.schedule_time }}</p> |
36 | 58 |
</div> |
37 |
- <div class="title-box mb10" style="display: flex;"> |
|
38 |
- <span class="title" style="font-size: 28px;">{{ schedule.unit_nm |
|
39 |
- }}</span> |
|
40 |
- <p class="title2" style="margin: auto 0;margin-left: 1em;">{{ |
|
41 |
- schedule.book_nm }}</p> |
|
59 |
+ <div class="title-box mb10" style="display: flex"> |
|
60 |
+ <span class="title" style="font-size: 28px">{{ |
|
61 |
+ schedule.unit_nm |
|
62 |
+ }}</span> |
|
63 |
+ <p class="title2" style="margin: auto 0; margin-left: 1em"> |
|
64 |
+ {{ schedule.book_nm }} |
|
65 |
+ </p> |
|
42 | 66 |
</div> |
43 | 67 |
</div> |
44 | 68 |
<!-- <button v-if="schedule.finish == 'T'" type="button" title="바로가기" class="yellow-btn" |
... | ... | @@ -46,15 +70,18 @@ |
46 | 70 |
<button v-else type="button" title="바로가기" class="yellow-btn" |
47 | 71 |
@click="goToPage('Dashboard', schedule.schdl_id)" |
48 | 72 |
style="flex-basis: 18rem">바로가기</button> --> |
49 |
- <div style="flex-basis: 100px"><img src="../../../resources/img/img214_19s.png" |
|
50 |
- alt="" style="height: 100px; width: 100px" /></div> |
|
51 |
- |
|
73 |
+ <div style="flex-basis: 100px"> |
|
74 |
+ <img |
|
75 |
+ src="../../../resources/img/img214_19s.png" |
|
76 |
+ alt="" |
|
77 |
+ style="height: 100px; width: 100px" |
|
78 |
+ /> |
|
79 |
+ </div> |
|
52 | 80 |
</div> |
53 | 81 |
</div> |
54 | 82 |
</div> |
55 | 83 |
</div> |
56 | 84 |
</div> |
57 |
- |
|
58 | 85 |
</div> |
59 | 86 |
</div> |
60 | 87 |
<!-- <div class="yellow-box mt30"> |
... | ... | @@ -68,50 +95,56 @@ |
68 | 95 |
</div> |
69 | 96 |
</div> --> |
70 | 97 |
|
71 |
- <div style="width: 50%;margin-left: 3em;"> |
|
98 |
+ <div style="width: 50%; margin-left: 3em"> |
|
72 | 99 |
<div class="flex"> |
73 |
- <div style="display: flex;"> |
|
74 |
- <img src="../../../resources/img/new_img/plan/course_text.png" style="margin: auto 0;"> |
|
100 |
+ <div style="display: flex"> |
|
101 |
+ <img src="../../../resources/img/new_img/plan/course_text.png" style="margin: auto 0" /> |
|
75 | 102 |
</div> |
76 |
- <div style="justify-content: right; width: 100%; display: flex;" |
|
77 |
- v-for="(ai_learning, index) in aiLearningList" :key="index"> |
|
78 |
- <div style="margin-right: 2em;" |
|
79 |
- @click="goToPage2('AIDashboard', aiLearningList[index].unit_id); recommendLearning();"> |
|
80 |
- <img src="../../../resources/img/new_img/plan/ai_course_1.png"> |
|
103 |
+ <div |
|
104 |
+ style="justify-content: right; width: 100%; display: flex" |
|
105 |
+ v-for="(ai_learning, index) in aiLearningList" |
|
106 |
+ :key="index" |
|
107 |
+ > |
|
108 |
+ <div |
|
109 |
+ style="margin-right: 2em" |
|
110 |
+ @click=" |
|
111 |
+ goToPage2('AIDashboard', aiLearningList[index].unit_id); |
|
112 |
+ recommendLearning(); |
|
113 |
+ " |
|
114 |
+ > |
|
115 |
+ <img src="../../../resources/img/new_img/plan/ai_course_1.png" /> |
|
81 | 116 |
</div> |
82 |
- <div style="margin-right: 2em;" |
|
83 |
- @click="goToPage2('AIDashboard', aiLearningList[index].unit_id)"> |
|
84 |
- <img src="../../../resources/img/new_img/plan/ai_course_2.png"> |
|
117 |
+ <div style="margin-right: 2em" @click="goToPage2('AIDashboard', aiLearningList[index].unit_id)"> |
|
118 |
+ <img src="../../../resources/img/new_img/plan/ai_course_2.png" /> |
|
85 | 119 |
</div> |
86 | 120 |
<div @click="goToPage2('AIDashboard', aiLearningList[index].unit_id)"> |
87 |
- <img src="../../../resources/img/new_img/plan/ai_course_3.png"> |
|
121 |
+ <img src="../../../resources/img/new_img/plan/ai_course_3.png" /> |
|
88 | 122 |
</div> |
89 | 123 |
</div> |
90 |
- |
|
91 | 124 |
</div> |
92 | 125 |
|
93 |
- <div class="flex" style="margin-top: 3em;"> |
|
94 |
- <div style="display: flex;"> |
|
95 |
- <img src="../../../resources/img/new_img/plan/menu_text.png" style="margin: auto 0;"> |
|
126 |
+ <div class="flex" style="margin-top: 3em"> |
|
127 |
+ <div style="display: flex"> |
|
128 |
+ <img src="../../../resources/img/new_img/plan/menu_text.png" style="margin: auto 0" /> |
|
96 | 129 |
</div> |
97 | 130 |
<div class="mpcontainer"> |
98 |
- <div class="mpbox" @click="goToPage2('PhotoBook')" style="margin-right: 2em; cursor: pointer;"> |
|
99 |
- <img src="../../../resources/img/new_img/icon/correct_icon.png"> |
|
131 |
+ <div class="mpbox" @click="goToPage2('PreviewNote')" style="margin-right: 2em; cursor: pointer"> |
|
132 |
+ <img src="../../../resources/img/new_img/icon/correct_icon.png" /> |
|
100 | 133 |
<p>채점결과</p> |
101 | 134 |
</div> |
102 | 135 |
|
103 |
- <div class="mpbox" @click="goToPage2('PhotoBook')" style="margin-right: 2em; cursor: pointer;"> |
|
104 |
- <img src="../../../resources/img/new_img/icon/mypage_icon.png"> |
|
136 |
+ <div class="mpbox" @click="goToPage2('MyPage')" style="margin-right: 2em; cursor: pointer"> |
|
137 |
+ <img src="../../../resources/img/new_img/icon/mypage_icon.png" /> |
|
105 | 138 |
<p>생활기록부</p> |
106 | 139 |
</div> |
107 | 140 |
|
108 |
- <div class="mpbox" @click="goToPage2('PhotoBook')" style="margin-right: 2em; cursor: pointer;"> |
|
109 |
- <img src="../../../resources/img/new_img/icon/qNa_icon.png"> |
|
141 |
+ <div class="mpbox" @click="goPopupOpen" style="margin-right: 2em; cursor: pointer"> |
|
142 |
+ <img src="../../../resources/img/new_img/icon/qNa_icon.png" /> |
|
110 | 143 |
<p>내문제질문</p> |
111 | 144 |
</div> |
112 | 145 |
|
113 |
- <div class="mpbox" @click="goToPage2('PhotoBook')" style="cursor: pointer;"> |
|
114 |
- <img src="../../../resources/img/new_img/icon/photobook_icon.png"> |
|
146 |
+ <div class="mpbox" @click="goToPage2('PhotoBook')" style="cursor: pointer"> |
|
147 |
+ <img src="../../../resources/img/new_img/icon/photobook_icon.png" /> |
|
115 | 148 |
<p>포토북</p> |
116 | 149 |
</div> |
117 | 150 |
</div> |
... | ... | @@ -127,36 +160,39 @@ |
127 | 160 |
</div> |
128 | 161 |
</div> --> |
129 | 162 |
|
130 |
- |
|
131 |
- |
|
132 |
- <div class="mypage" style="display:flex;height: 50%;gap: 10px;margin-top: 4em;"> |
|
133 |
- <div class="textbook book-green" |
|
134 |
- style="background-color: white; width: 50%; height: 100%; text-align: center;"> |
|
163 |
+ <div class="mypage" style="display: flex; height: 50%; gap: 10px; margin-top: 4em"> |
|
164 |
+ <div |
|
165 |
+ class="textbook book-green" |
|
166 |
+ style="background-color: white; width: 50%; height: 100%; text-align: center" |
|
167 |
+ > |
|
135 | 168 |
<div class="text"> |
136 |
- <p class="title1" style="color: #fff;">오늘의 뉴스</p> |
|
169 |
+ <p class="title1" style="color: #fff">오늘의 뉴스</p> |
|
137 | 170 |
</div> |
138 |
- <div class="green-scroll" style="overflow: auto; height: 73%; margin: 5px;"> |
|
139 |
- <div style=" padding: 10px;"> |
|
171 |
+ <div class="green-scroll" style="overflow: auto; height: 73%; margin: 5px"> |
|
172 |
+ <div style="padding: 10px"> |
|
140 | 173 |
<div v-for="(news, index) in schedules" :key="index"> |
141 |
- <div style="display: flex;"> |
|
174 |
+ <div style="display: flex"> |
|
142 | 175 |
<div> |
143 | 176 |
<img src="../../../resources/img/img16_s.png" alt="" /> |
144 | 177 |
</div> |
145 |
- <p style="margin-left: 5px; font-size: 18px;">{{ name }}님이 {{ unit }}을 다 끝냈습니다. |
|
178 |
+ <p style="margin-left: 5px; font-size: 18px"> |
|
179 |
+ {{ name }}님이 {{ unit }}을 다 끝냈습니다. |
|
146 | 180 |
</p> |
147 | 181 |
</div> |
148 |
- <hr style="margin: 10px 0;"> |
|
182 |
+ <hr style="margin: 10px 0" /> |
|
149 | 183 |
</div> |
150 | 184 |
</div> |
151 | 185 |
</div> |
152 | 186 |
</div> |
153 | 187 |
|
154 |
- <div class="textbook book-blue" |
|
155 |
- style="background-color: white; width: 50%; height: 100%; text-align: center;"> |
|
156 |
- <div class="text "> |
|
157 |
- <p class="title1" style="color: #fff;">학습 현황</p> |
|
188 |
+ <div |
|
189 |
+ class="textbook book-blue" |
|
190 |
+ style="background-color: white; width: 50%; height: 100%; text-align: center" |
|
191 |
+ > |
|
192 |
+ <div class="text"> |
|
193 |
+ <p class="title1" style="color: #fff">학습 현황</p> |
|
158 | 194 |
</div> |
159 |
- <div style="overflow: hidden; height: 75%;"> |
|
195 |
+ <div style="overflow: hidden; height: 75%"> |
|
160 | 196 |
<div class="flex justify-center"> |
161 | 197 |
<Dounutchart /> |
162 | 198 |
</div> |
... | ... | @@ -164,17 +200,44 @@ |
164 | 200 |
</div> |
165 | 201 |
</div> |
166 | 202 |
</div> |
167 |
- |
|
203 |
+ </div> |
|
204 |
+ <!-- 질문하기 팝업 --> |
|
205 |
+ <div class="popup-wrap" v-if="this.popupOpen === true" style="z-index: 100"> |
|
206 |
+ <div class="question-popup"> |
|
207 |
+ <div class="flex justify-between align-center"> |
|
208 |
+ <p class="question-text mt20">선생님께 질문하기</p> |
|
209 |
+ <img |
|
210 |
+ class="look-btn" |
|
211 |
+ @click="goPopupClose" |
|
212 |
+ src="../../../resources/img/btn25_93t_normal.png" |
|
213 |
+ alt="" |
|
214 |
+ /> |
|
215 |
+ </div> |
|
216 |
+ <p style="color: #8c8c8c; font-size: 20px; margin: 40px 0px">선생님! 질문있어요!!</p> |
|
217 |
+ <div class="memo mt25"> |
|
218 |
+ <p class="title1 memo-text">내용</p> |
|
219 |
+ <textarea name="" id="" placeholder="궁금한 것을 적어보세요." v-model="question"></textarea> |
|
220 |
+ </div> |
|
221 |
+ <div class="questionBtn-box flex justify-end" style="gap: 15px"> |
|
222 |
+ <button style="border-color: #eaedf4; color: #8c8c8c" @click="goPopupClose">취소하기</button> |
|
223 |
+ <button |
|
224 |
+ @click="updateQuestion" |
|
225 |
+ style="border-color: #6327b9; color: white; background-color: #6327b9" |
|
226 |
+ > |
|
227 |
+ 질문하기 |
|
228 |
+ </button> |
|
229 |
+ </div> |
|
230 |
+ </div> |
|
168 | 231 |
</div> |
169 | 232 |
</div> |
170 | 233 |
</template> |
171 | 234 |
|
172 | 235 |
<script> |
173 |
-import axios from "axios"; |
|
174 |
-import SvgIcon from "@jamescoyle/vue-icon"; |
|
175 |
-import { mdiMagnify, mdiWindowClose } from "@mdi/js"; |
|
176 |
-import { mapActions } from "vuex"; |
|
177 |
-import { mapGetters } from "vuex"; |
|
236 |
+import axios from 'axios'; |
|
237 |
+import SvgIcon from '@jamescoyle/vue-icon'; |
|
238 |
+import { mdiMagnify, mdiWindowClose } from '@mdi/js'; |
|
239 |
+import { mapActions } from 'vuex'; |
|
240 |
+import { mapGetters } from 'vuex'; |
|
178 | 241 |
import Dounutchart from './chDounutchart.vue'; |
179 | 242 |
export default { |
180 | 243 |
data() { |
... | ... | @@ -184,45 +247,45 @@ |
184 | 247 |
showModal: false, |
185 | 248 |
searchOpen: false, |
186 | 249 |
schedules: [], |
187 |
- stdId: "2", |
|
250 |
+ stdId: '2', |
|
188 | 251 |
timeList: [ |
189 |
- { label: "1교시", time: "08:00 ~ 09:00", value: "1" }, |
|
190 |
- { label: "2교시", time: "09:00 ~ 10:00", value: "2" }, |
|
191 |
- { label: "3교시", time: "10:00 ~ 11:00", value: "3" }, |
|
192 |
- { label: "4교시", time: "11:00 ~ 12:00", value: "4" }, |
|
193 |
- { label: "5교시", time: "13:00 ~ 14:00", value: "5" }, |
|
194 |
- { label: "6교시", time: "14:00 ~ 15:00", value: "6" }, |
|
252 |
+ { label: '1교시', time: '08:00 ~ 09:00', value: '1' }, |
|
253 |
+ { label: '2교시', time: '09:00 ~ 10:00', value: '2' }, |
|
254 |
+ { label: '3교시', time: '10:00 ~ 11:00', value: '3' }, |
|
255 |
+ { label: '4교시', time: '11:00 ~ 12:00', value: '4' }, |
|
256 |
+ { label: '5교시', time: '13:00 ~ 14:00', value: '5' }, |
|
257 |
+ { label: '6교시', time: '14:00 ~ 15:00', value: '6' }, |
|
195 | 258 |
], |
196 | 259 |
|
197 | 260 |
aiLearningList: [], |
198 | 261 |
|
199 | 262 |
news: [], |
263 |
+ popupOpen: false, |
|
264 |
+ question: null, |
|
200 | 265 |
}; |
201 | 266 |
}, |
202 | 267 |
methods: { |
203 |
- ...mapActions(["updateSchdlId", "updateBookId", "updateUnitId"]), |
|
268 |
+ ...mapActions(['updateSchdlId', 'updateBookId', 'updateUnitId']), |
|
204 | 269 |
|
205 |
- fetchNews() { |
|
206 |
- |
|
207 |
- }, |
|
270 |
+ fetchNews() {}, |
|
208 | 271 |
goToPage(page, scheduleId) { |
209 | 272 |
const startScheduleIndex = this.schedules.findIndex((schedule) => schedule.schdl_id === scheduleId); |
210 | 273 |
|
211 | 274 |
if (startScheduleIndex === -1) { |
212 |
- console.error("해당 스케줄을 찾을 수 없습니다."); |
|
275 |
+ console.error('해당 스케줄을 찾을 수 없습니다.'); |
|
213 | 276 |
return; |
214 | 277 |
} |
215 | 278 |
|
216 | 279 |
const updates = []; |
217 | 280 |
const currentSchedule = this.schedules[startScheduleIndex]; |
218 |
- if (currentSchedule.finish === null || currentSchedule.finish === "T") { |
|
281 |
+ if (currentSchedule.finish === null || currentSchedule.finish === 'T') { |
|
219 | 282 |
updates.push( |
220 | 283 |
axios.post( |
221 |
- "/schedule/scheduleUpdate.json", |
|
222 |
- { scheduleId: currentSchedule.schdl_id, finish: "F" }, |
|
284 |
+ '/schedule/scheduleUpdate.json', |
|
285 |
+ { scheduleId: currentSchedule.schdl_id, finish: 'F' }, |
|
223 | 286 |
{ |
224 | 287 |
headers: { |
225 |
- "Content-Type": "application/json; charset=UTF-8", |
|
288 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
226 | 289 |
}, |
227 | 290 |
} |
228 | 291 |
) |
... | ... | @@ -231,14 +294,14 @@ |
231 | 294 |
|
232 | 295 |
for (let i = startScheduleIndex + 1; i < this.schedules.length; i++) { |
233 | 296 |
const nextSchedule = this.schedules[i]; |
234 |
- if (nextSchedule.finish === "T") { |
|
297 |
+ if (nextSchedule.finish === 'T') { |
|
235 | 298 |
updates.push( |
236 | 299 |
axios.post( |
237 |
- "/schedule/scheduleUpdate.json", |
|
238 |
- { scheduleId: nextSchedule.schdl_id, finish: "F" }, |
|
300 |
+ '/schedule/scheduleUpdate.json', |
|
301 |
+ { scheduleId: nextSchedule.schdl_id, finish: 'F' }, |
|
239 | 302 |
{ |
240 | 303 |
headers: { |
241 |
- "Content-Type": "application/json; charset=UTF-8", |
|
304 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
242 | 305 |
}, |
243 | 306 |
} |
244 | 307 |
) |
... | ... | @@ -252,7 +315,7 @@ |
252 | 315 |
|
253 | 316 |
// 대시보드 위치 저장 |
254 | 317 |
this.$store.dispatch('updateCurrentDashboard', 'Learning'); |
255 |
- |
|
318 |
+ |
|
256 | 319 |
// this.$router.push({ |
257 | 320 |
// name: page, |
258 | 321 |
// query: { |
... | ... | @@ -262,39 +325,44 @@ |
262 | 325 |
// } |
263 | 326 |
// }); |
264 | 327 |
// 상태 업데이트가 완료된 후 라우팅 |
265 |
- Promise.all([this.updateSchdlId(schedule.schdl_id), this.updateBookId(schedule.book_id), this.updateUnitId(schedule.unit_id)]) |
|
328 |
+ Promise.all([ |
|
329 |
+ this.updateSchdlId(schedule.schdl_id), |
|
330 |
+ this.updateBookId(schedule.book_id), |
|
331 |
+ this.updateUnitId(schedule.unit_id), |
|
332 |
+ ]) |
|
266 | 333 |
.then(() => { |
267 |
- console.log("Book ID:", this.getBookId); |
|
268 |
- console.log("Unit ID:", this.getUnitId); |
|
334 |
+ console.log('Book ID:', this.getBookId); |
|
335 |
+ console.log('Unit ID:', this.getUnitId); |
|
269 | 336 |
|
270 | 337 |
this.$router.push({ name: page }); |
271 | 338 |
}) |
272 | 339 |
.catch((error) => { |
273 |
- console.error("상태 업데이트 중 오류 발생:", error); |
|
340 |
+ console.error('상태 업데이트 중 오류 발생:', error); |
|
274 | 341 |
}); |
275 | 342 |
}) |
276 | 343 |
.catch((error) => { |
277 |
- console.error("Error updating schedules:", error); |
|
278 |
- alert("학습 계획을 업데이트하는 중 오류가 발생했습니다."); |
|
344 |
+ console.error('Error updating schedules:', error); |
|
345 |
+ alert('학습 계획을 업데이트하는 중 오류가 발생했습니다.'); |
|
279 | 346 |
}); |
280 | 347 |
}, |
281 | 348 |
|
282 | 349 |
goToPage2(page, unit_id) { |
283 | 350 |
this.$store.dispatch('updateCurrentDashboard', 'AI'); |
284 | 351 |
this.$router.push({ |
285 |
- name: page, query: { |
|
352 |
+ name: page, |
|
353 |
+ query: { |
|
286 | 354 |
unit_id: unit_id, |
287 | 355 |
}, |
288 | 356 |
}); |
289 | 357 |
}, |
290 | 358 |
showConfirm(type) { |
291 |
- let message = ""; |
|
292 |
- if (type === "cancel") { |
|
293 |
- message = "삭제하시겠습니까?"; |
|
294 |
- } else if (type === "reset") { |
|
295 |
- message = "초기화하시겠습니까?"; |
|
296 |
- } else if (type === "save") { |
|
297 |
- message = "등록하시겠습니까?"; |
|
359 |
+ let message = ''; |
|
360 |
+ if (type === 'cancel') { |
|
361 |
+ message = '삭제하시겠습니까?'; |
|
362 |
+ } else if (type === 'reset') { |
|
363 |
+ message = '초기화하시겠습니까?'; |
|
364 |
+ } else if (type === 'save') { |
|
365 |
+ message = '등록하시겠습니까?'; |
|
298 | 366 |
} |
299 | 367 |
|
300 | 368 |
if (confirm(message)) { |
... | ... | @@ -313,11 +381,11 @@ |
313 | 381 |
fetchSchedules() { |
314 | 382 |
axios |
315 | 383 |
.post( |
316 |
- "/schedule/selectSchedule.json", |
|
384 |
+ '/schedule/selectSchedule.json', |
|
317 | 385 |
{ stdId: this.stdId }, |
318 | 386 |
{ |
319 | 387 |
headers: { |
320 |
- "Content-Type": "application/json; charset=UTF-8", |
|
388 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
321 | 389 |
}, |
322 | 390 |
} |
323 | 391 |
) |
... | ... | @@ -326,89 +394,118 @@ |
326 | 394 |
const matchingTime = this.timeList.find((time) => time.value === schedule.schdl_unit); |
327 | 395 |
return { |
328 | 396 |
...schedule, |
329 |
- schedule_time: matchingTime ? matchingTime.time : "시간 정보 없음", |
|
397 |
+ schedule_time: matchingTime ? matchingTime.time : '시간 정보 없음', |
|
330 | 398 |
}; |
331 | 399 |
}); |
332 | 400 |
console.log(this.schedules); |
333 | 401 |
}) |
334 | 402 |
.catch((error) => { |
335 |
- console.error("fetchUnits - error:", error); |
|
336 |
- alert("단원 목록을 불러오는 중 오류가 발생했습니다."); |
|
403 |
+ console.error('fetchUnits - error:', error); |
|
404 |
+ alert('단원 목록을 불러오는 중 오류가 발생했습니다.'); |
|
337 | 405 |
}); |
338 | 406 |
}, |
339 | 407 |
deleteSchedule(scheduleId) { |
340 | 408 |
axios |
341 | 409 |
.post( |
342 |
- "/schedule/scheduleDelete.json", |
|
410 |
+ '/schedule/scheduleDelete.json', |
|
343 | 411 |
{ scheduleId: scheduleId }, |
344 | 412 |
{ |
345 | 413 |
headers: { |
346 |
- "Content-Type": "application/json; charset=UTF-8", |
|
414 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
347 | 415 |
}, |
348 | 416 |
} |
349 | 417 |
) |
350 | 418 |
.then((response) => { |
351 |
- alert("학습일정이 삭제되었습니다."); |
|
419 |
+ alert('학습일정이 삭제되었습니다.'); |
|
352 | 420 |
window.location.reload(); |
353 | 421 |
}) |
354 | 422 |
.catch((error) => { |
355 |
- console.error("fetchUnits - error:", error); |
|
356 |
- alert("단원 목록을 불러오는 중 오류가 발생했습니다."); |
|
423 |
+ console.error('fetchUnits - error:', error); |
|
424 |
+ alert('단원 목록을 불러오는 중 오류가 발생했습니다.'); |
|
357 | 425 |
}); |
358 | 426 |
}, |
359 | 427 |
|
360 | 428 |
selectAiLearning: function () { |
361 | 429 |
const vm = this; |
362 | 430 |
axios({ |
363 |
- url: "/aiLearning/selectAILearning.json", |
|
364 |
- method: "post", |
|
431 |
+ url: '/aiLearning/selectAILearning.json', |
|
432 |
+ method: 'post', |
|
365 | 433 |
headers: { |
366 |
- "Content-Type": "application/json; charset=UTF-8", |
|
434 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
367 | 435 |
}, |
368 | 436 |
data: { |
369 |
- user_id: "USID_000000000000002" |
|
370 |
- } |
|
437 |
+ user_id: 'USID_000000000000002', |
|
438 |
+ }, |
|
371 | 439 |
}) |
372 | 440 |
.then(function (response) { |
373 |
- console.log("aiLearningList - response : ", response.data); |
|
441 |
+ console.log('aiLearningList - response : ', response.data); |
|
374 | 442 |
vm.aiLearningList = response.data; |
375 | 443 |
}) |
376 | 444 |
.catch(function (error) { |
377 |
- console.log("aiLearningList - error : ", error); |
|
378 |
- alert("ai learning 조회에 오류가 발생했습니다."); |
|
445 |
+ console.log('aiLearningList - error : ', error); |
|
446 |
+ alert('ai learning 조회에 오류가 발생했습니다.'); |
|
379 | 447 |
}); |
380 | 448 |
}, |
381 | 449 |
|
382 | 450 |
recommendLearning() { |
383 | 451 |
axios({ |
384 |
- url: "http://165.229.169.32:35716/recommend_and_insert", |
|
385 |
- method: "post", |
|
452 |
+ url: 'http://165.229.169.32:35716/recommend_and_insert', |
|
453 |
+ method: 'post', |
|
386 | 454 |
headers: { |
387 |
- "Content-Type": "application/json; charset=UTF-8", |
|
455 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
388 | 456 |
}, |
389 | 457 |
data: { |
390 |
- "top_n": 11, |
|
391 |
- "user_id": "USID_000000000000002" |
|
458 |
+ top_n: 11, |
|
459 |
+ user_id: 'USID_000000000000002', |
|
392 | 460 |
}, |
393 | 461 |
}) |
394 |
- .then((response) => { |
|
395 |
- console.log("recommendLearning list - response : ", response.data); |
|
396 |
- }) |
|
397 |
- .catch((err) => { |
|
398 |
- console.log("추천 에러: ", err); |
|
399 |
- }); |
|
462 |
+ .then((response) => { |
|
463 |
+ console.log('recommendLearning list - response : ', response.data); |
|
464 |
+ }) |
|
465 |
+ .catch((err) => { |
|
466 |
+ console.log('추천 에러: ', err); |
|
467 |
+ }); |
|
468 |
+ }, |
|
469 |
+ // 질문 업데이트 메서드 |
|
470 |
+ updateQuestion() { |
|
471 |
+ if (this.question === null) { |
|
472 |
+ alert('질문을 입력해주세요'); |
|
473 |
+ return; |
|
474 |
+ } |
|
475 |
+ axios |
|
476 |
+ .post('/studentInfo/updateQuestion.json', { |
|
477 |
+ userId: this.userId, |
|
478 |
+ // userId: 'USID_000000000000002', |
|
479 |
+ studentQuestion: this.question, |
|
480 |
+ }) |
|
481 |
+ .then((response) => { |
|
482 |
+ console.log('질문이 성공적으로 업데이트되었습니다.'); |
|
483 |
+ alert('질문이 성공적으로 업데이트되었습니다.'); |
|
484 |
+ }) |
|
485 |
+ .catch((error) => { |
|
486 |
+ console.error('질문 업데이트 실패:', error); |
|
487 |
+ alert('질문 업데이트에 실패했습니다.'); |
|
488 |
+ }); |
|
489 |
+ this.question = null; |
|
490 |
+ }, |
|
491 |
+ goPopupOpen() { |
|
492 |
+ this.popupOpen = true; |
|
493 |
+ }, |
|
494 |
+ goPopupClose() { |
|
495 |
+ this.popupOpen = false; |
|
496 |
+ this.question = null; |
|
400 | 497 |
}, |
401 | 498 |
}, |
402 | 499 |
watch: {}, |
403 | 500 |
computed: { |
404 |
- ...mapGetters(["getBookId", "getUnitId"]), |
|
501 |
+ ...mapGetters(['getBookId', 'getUnitId']), |
|
405 | 502 |
}, |
406 | 503 |
components: { |
407 | 504 |
SvgIcon, |
408 | 505 |
Dounutchart: Dounutchart, |
409 | 506 |
}, |
410 | 507 |
mounted() { |
411 |
- console.log("Main2 mounted"); |
|
508 |
+ console.log('Main2 mounted'); |
|
412 | 509 |
this.fetchSchedules(); |
413 | 510 |
this.selectAiLearning(); |
414 | 511 |
}, |
... | ... | @@ -426,7 +523,7 @@ |
426 | 523 |
} |
427 | 524 |
|
428 | 525 |
.mypgBack { |
429 |
- background-image: url("../../../resources/img/new_img/plan/background.png"); |
|
526 |
+ background-image: url('../../../resources/img/new_img/plan/background.png'); |
|
430 | 527 |
} |
431 | 528 |
|
432 | 529 |
.mpcontainer { |
... | ... | @@ -455,4 +552,43 @@ |
455 | 552 |
font-size: 16px; |
456 | 553 |
font-family: 'ONEMobilePOPOTF'; |
457 | 554 |
} |
555 |
+ |
|
556 |
+.question-popup { |
|
557 |
+ background-color: white; |
|
558 |
+ border-radius: 10px; |
|
559 |
+ padding: 30px 40px; |
|
560 |
+ position: absolute; |
|
561 |
+ top: 15%; |
|
562 |
+ left: 25%; |
|
563 |
+ width: 100rem; |
|
564 |
+} |
|
565 |
+ |
|
566 |
+.question-text { |
|
567 |
+ font-family: 'ONEMobilePOPOTF'; |
|
568 |
+ font-size: 32px; |
|
569 |
+ color: #6327b9; |
|
570 |
+} |
|
571 |
+ |
|
572 |
+.memo-text { |
|
573 |
+ font-family: 'ONEMobilePOPOTF'; |
|
574 |
+ color: #6327b9; |
|
575 |
+} |
|
576 |
+ |
|
577 |
+.memo textarea { |
|
578 |
+ border: 2px solid #cac0e3; |
|
579 |
+ border-radius: 10px; |
|
580 |
+ width: 100%; |
|
581 |
+ padding: 20px; |
|
582 |
+ height: 30rem; |
|
583 |
+ margin: 20px 0px 40px; |
|
584 |
+} |
|
585 |
+ |
|
586 |
+.questionBtn-box button { |
|
587 |
+ font-size: 18px; |
|
588 |
+ padding: 8px 30px; |
|
589 |
+ border: 2px solid; |
|
590 |
+ border-radius: 8px; |
|
591 |
+ font-weight: bold; |
|
592 |
+ font-family: 'ONEMobileOTF-Regular'; |
|
593 |
+} |
|
458 | 594 |
</style> |
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?