guntaek
09-13
240913 김건택 AIDashboard 및 문제 수정(수정중)
@fd960b090c86c1cf02d4afe3c6c141d3969f5e1b
--- client/views/pages/main/AIDashboard.vue
+++ client/views/pages/main/AIDashboard.vue
... | ... | @@ -1,10 +1,51 @@ |
1 | 1 |
<template> |
2 |
- <p class="title1" v-show="isHidden">오늘 공부를 다했어요! 너무 고생했어요!</p> |
|
3 |
- <div class="main" v-show="!isHidden"> |
|
2 |
+ <p |
|
3 |
+ class="title1" |
|
4 |
+ v-if="state === 'finish'" |
|
5 |
+ style="position: absolute; top: 50%; transform: translate(0, -50%)" |
|
6 |
+ > |
|
7 |
+ 오늘 공부를 다했어요! 너무 고생했어요! |
|
8 |
+ </p> |
|
9 |
+ <div |
|
10 |
+ class="title1" |
|
11 |
+ v-else-if="state === 'notRegistered'" |
|
12 |
+ style="position: absolute; top: 50%; transform: translate(0, -50%)" |
|
13 |
+ > |
|
14 |
+ <div> |
|
15 |
+ <h3> |
|
16 |
+ 지금은 학습 루트가 등록이 안됐어요! 학습 일정에서 학습루트를 |
|
17 |
+ 등록해볼까요? |
|
18 |
+ </h3> |
|
19 |
+ <button |
|
20 |
+ type="button" |
|
21 |
+ title="바로가기" |
|
22 |
+ class="yellow-btn" |
|
23 |
+ @click="goToPage2('MyPlan2')" |
|
24 |
+ > |
|
25 |
+ 바로가기 |
|
26 |
+ </button> |
|
27 |
+ </div> |
|
28 |
+ </div> |
|
29 |
+ <p |
|
30 |
+ class="title1" |
|
31 |
+ v-else-if="state === 'noProblem'" |
|
32 |
+ style="position: absolute; top: 50%; transform: translate(0, -50%)" |
|
33 |
+ > |
|
34 |
+ 교재에 등록된 문제가 없습니다. |
|
35 |
+ </p> |
|
36 |
+ <div v-else class="main"> |
|
4 | 37 |
<div class="race-wrap-ai"> |
38 |
+ <!-- <div class="title-box"> |
|
39 |
+ <p class="title" style="margin-top: 7rem">{{ titleUnitName }}</p> |
|
40 |
+ <p class="subtitle">{{ titleBookName }}</p> |
|
41 |
+ </div> --> |
|
5 | 42 |
<div class="race-box"> |
6 | 43 |
<div class="rabbit-start"> |
7 |
- <img src="../../../resources/img/new_img/rabbit.png" alt="" /> |
|
44 |
+ <img |
|
45 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
46 |
+ alt="" |
|
47 |
+ :style="{ display: rabbitPos[0] ? 'block' : 'none' }" |
|
48 |
+ /> |
|
8 | 49 |
</div> |
9 | 50 |
<!-- 1번째줄 --> |
10 | 51 |
<div |
... | ... | @@ -12,7 +53,14 @@ |
12 | 53 |
style="position: relative; top: 24px" |
13 | 54 |
> |
14 | 55 |
<!-- 1 --> |
15 |
- <div class="race-btn" @click="goToPage('Chapter1')"> |
|
56 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[0])]"> |
|
57 |
+ <div class="rabbit-running"> |
|
58 |
+ <img |
|
59 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
60 |
+ alt="" |
|
61 |
+ :style="{ display: rabbitPos[1] ? 'block' : 'none' }" |
|
62 |
+ /> |
|
63 |
+ </div> |
|
16 | 64 |
<button |
17 | 65 |
class="popTxt" |
18 | 66 |
v-for="(item, index) in items" |
... | ... | @@ -23,29 +71,36 @@ |
23 | 71 |
<div class="image-container"> |
24 | 72 |
<img |
25 | 73 |
src="../../../resources/img/new_img/ai_board/racebtn_1.png" |
74 |
+ alt="Race Button" |
|
75 |
+ class="base-img" |
|
26 | 76 |
/> |
27 | 77 |
<img |
78 |
+ v-if="rabbitCompl[1]" |
|
28 | 79 |
src="../../../resources/img/new_img/icon/clear_img.png" |
29 |
- :style="{ |
|
30 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
31 |
- }" |
|
80 |
+ alt="Clear Icon" |
|
32 | 81 |
class="clear-img" |
33 | 82 |
/> |
34 | 83 |
</div> |
35 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
36 |
- <img |
|
37 |
- v-if="item.isSecondImageVisible" |
|
38 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
39 |
- alt="Complete Icon" |
|
40 |
- class="complete-icon" |
|
41 |
- /> |
|
42 |
- 지문1 |
|
43 |
- </p> |
|
44 | 84 |
</button> |
45 |
- <!-- <p>지문1</p> --> |
|
85 |
+ <p :class="!rabbitCompl[1] ? 'before-clear' : 'clear'"> |
|
86 |
+ <img |
|
87 |
+ v-if="rabbitCompl[1]" |
|
88 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
89 |
+ alt="Complete Icon" |
|
90 |
+ class="complete-icon" |
|
91 |
+ /> |
|
92 |
+ {{ labeledItems[0].label }} |
|
93 |
+ </p> |
|
46 | 94 |
</div> |
47 | 95 |
<!-- 2 --> |
48 |
- <div class="race-btn" @click="goToPage('Chapter2')"> |
|
96 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[1])]"> |
|
97 |
+ <div class="rabbit-running"> |
|
98 |
+ <img |
|
99 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
100 |
+ alt="" |
|
101 |
+ :style="{ display: rabbitPos[2] ? 'block' : 'none' }" |
|
102 |
+ /> |
|
103 |
+ </div> |
|
49 | 104 |
<button |
50 | 105 |
class="popTxt" |
51 | 106 |
v-for="(item, index) in items" |
... | ... | @@ -56,67 +111,85 @@ |
56 | 111 |
<div class="image-container"> |
57 | 112 |
<img |
58 | 113 |
src="../../../resources/img/new_img/ai_board/racebtn_2.png" |
114 |
+ alt="Race Button" |
|
115 |
+ class="base-img" |
|
59 | 116 |
/> |
60 | 117 |
<img |
118 |
+ v-if="rabbitCompl[2]" |
|
61 | 119 |
src="../../../resources/img/new_img/icon/clear_img.png" |
62 |
- :style="{ |
|
63 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
64 |
- }" |
|
120 |
+ alt="Clear Icon" |
|
65 | 121 |
class="clear-img" |
66 | 122 |
style="position: absolute; left: 16px" |
67 | 123 |
/> |
68 | 124 |
</div> |
69 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
70 |
- <img |
|
71 |
- v-if="item.isSecondImageVisible" |
|
72 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
73 |
- alt="Complete Icon" |
|
74 |
- class="complete-icon" |
|
75 |
- /> |
|
76 |
- 단어장 |
|
77 |
- </p> |
|
78 | 125 |
</button> |
79 |
- <!-- <p>단어장</p> --> |
|
126 |
+ <p :class="!rabbitCompl[2] ? 'before-clear' : 'clear'"> |
|
127 |
+ <img |
|
128 |
+ v-if="rabbitCompl[2]" |
|
129 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
130 |
+ alt="Complete Icon" |
|
131 |
+ class="complete-icon" |
|
132 |
+ /> |
|
133 |
+ {{ labeledItems[1].label }} |
|
134 |
+ </p> |
|
80 | 135 |
</div> |
81 | 136 |
</div> |
82 |
- <!-- 2번째 줄 --> |
|
137 |
+ <!-- 2번째줄 --> |
|
83 | 138 |
<div class="lcon flex justify-between mb5"> |
84 | 139 |
<!-- 7 --> |
85 |
- <div class="race-btn" @click="goToPage('Chapter7')"> |
|
140 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[6])]"> |
|
141 |
+ <div class="rabbit-running" style="top: -71px"> |
|
142 |
+ <img |
|
143 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
144 |
+ alt="" |
|
145 |
+ :style="{ display: rabbitPos[7] ? 'block' : 'none' }" |
|
146 |
+ /> |
|
147 |
+ </div> |
|
86 | 148 |
<button |
87 | 149 |
class="popTxt" |
88 | 150 |
v-for="(item, index) in items" |
89 | 151 |
:key="index" |
90 | 152 |
@click="toggleImage(index)" |
91 | 153 |
data-num="7" |
154 |
+ style="top: -53px; position: relative" |
|
92 | 155 |
> |
93 | 156 |
<div class="image-container"> |
94 | 157 |
<img |
95 | 158 |
src="../../../resources/img/new_img/ai_board/racebtn_7.png" |
159 |
+ alt="Race Button" |
|
160 |
+ class="base-img" |
|
96 | 161 |
/> |
97 | 162 |
<img |
163 |
+ v-if="rabbitCompl[7]" |
|
98 | 164 |
src="../../../resources/img/new_img/icon/clear_img.png" |
99 |
- :style="{ |
|
100 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
101 |
- }" |
|
165 |
+ alt="Clear Icon" |
|
102 | 166 |
class="clear-img" |
103 | 167 |
style="position: absolute; top: 85px" |
104 | 168 |
/> |
105 | 169 |
</div> |
106 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
107 |
- <img |
|
108 |
- v-if="item.isSecondImageVisible" |
|
109 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
110 |
- alt="Complete Icon" |
|
111 |
- class="complete-icon" |
|
112 |
- /> |
|
113 |
- 문제1 |
|
114 |
- </p> |
|
115 | 170 |
</button> |
116 |
- <!-- <p>문제1</p> --> |
|
171 |
+ <p |
|
172 |
+ :class="!rabbitCompl[7] ? 'before-clear' : 'clear'" |
|
173 |
+ style="position: relative; top: -53px; left: -10px" |
|
174 |
+ > |
|
175 |
+ <img |
|
176 |
+ v-if="rabbitCompl[7]" |
|
177 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
178 |
+ alt="Complete Icon" |
|
179 |
+ class="complete-icon" |
|
180 |
+ /> |
|
181 |
+ {{ labeledItems[6].label }} |
|
182 |
+ </p> |
|
117 | 183 |
</div> |
118 | 184 |
<!-- 6 --> |
119 |
- <div class="race-btn" @click="goToPage('Chapter6')"> |
|
185 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[5])]"> |
|
186 |
+ <div class="rabbit-running"> |
|
187 |
+ <img |
|
188 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
189 |
+ alt="" |
|
190 |
+ :style="{ display: rabbitPos[6] ? 'block' : 'none' }" |
|
191 |
+ /> |
|
192 |
+ </div> |
|
120 | 193 |
<button |
121 | 194 |
class="popTxt" |
122 | 195 |
v-for="(item, index) in items" |
... | ... | @@ -127,67 +200,80 @@ |
127 | 200 |
<div class="image-container"> |
128 | 201 |
<img |
129 | 202 |
src="../../../resources/img/new_img/ai_board/racebtn_6.png" |
203 |
+ alt="Race Button" |
|
204 |
+ class="base-img" |
|
130 | 205 |
/> |
131 | 206 |
<img |
207 |
+ v-if="rabbitCompl[6]" |
|
132 | 208 |
src="../../../resources/img/new_img/icon/clear_img.png" |
133 |
- :style="{ |
|
134 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
135 |
- }" |
|
209 |
+ alt="Clear Icon" |
|
136 | 210 |
class="clear-img" |
137 | 211 |
/> |
138 | 212 |
</div> |
139 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
140 |
- <img |
|
141 |
- v-if="item.isSecondImageVisible" |
|
142 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
143 |
- alt="Complete Icon" |
|
144 |
- class="complete-icon" |
|
145 |
- /> |
|
146 |
- 단어장 |
|
147 |
- </p> |
|
148 | 213 |
</button> |
149 |
- <!-- <p>단어장</p> --> |
|
214 |
+ <p :class="!rabbitCompl[6] ? 'before-clear' : 'clear'"> |
|
215 |
+ <img |
|
216 |
+ v-if="rabbitCompl[6]" |
|
217 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
218 |
+ alt="Complete Icon" |
|
219 |
+ class="complete-icon" |
|
220 |
+ /> |
|
221 |
+ {{ labeledItems[5].label }} |
|
222 |
+ </p> |
|
150 | 223 |
</div> |
151 | 224 |
<!-- 5 --> |
152 | 225 |
<div |
153 | 226 |
class="race-btn" |
154 |
- @click="goToPage('Chapter5')" |
|
227 |
+ @click="[storeLearningId(labeledItems[4])]" |
|
155 | 228 |
style="position: relative; left: -31px" |
156 | 229 |
> |
230 |
+ <div class="rabbit-running"> |
|
231 |
+ <img |
|
232 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
233 |
+ alt="" |
|
234 |
+ :style="{ display: rabbitPos[5] ? 'block' : 'none' }" |
|
235 |
+ /> |
|
236 |
+ </div> |
|
157 | 237 |
<button |
158 | 238 |
class="popTxt" |
159 | 239 |
v-for="(item, index) in items" |
160 | 240 |
:key="index" |
161 | 241 |
@click="toggleImage(index)" |
162 | 242 |
data-num="5" |
163 |
- style="position: absolute; top: -77px; left: 30px" |
|
164 | 243 |
> |
165 | 244 |
<div class="image-container"> |
166 | 245 |
<img |
167 | 246 |
src="../../../resources/img/new_img/ai_board/racebtn_5.png" |
247 |
+ alt="Race Button" |
|
248 |
+ class="base-img" |
|
168 | 249 |
/> |
169 | 250 |
<img |
251 |
+ v-if="rabbitCompl[5]" |
|
170 | 252 |
src="../../../resources/img/new_img/icon/clear_img.png" |
171 |
- :style="{ |
|
172 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
173 |
- }" |
|
253 |
+ alt="Clear Icon" |
|
174 | 254 |
class="clear-img" |
175 | 255 |
/> |
176 | 256 |
</div> |
177 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
178 |
- <img |
|
179 |
- v-if="item.isSecondImageVisible" |
|
180 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
181 |
- alt="Complete Icon" |
|
182 |
- class="complete-icon" |
|
183 |
- /> |
|
184 |
- 지문2 |
|
185 |
- </p> |
|
186 | 257 |
</button> |
187 |
- <!-- <p>지문2</p> --> |
|
258 |
+ <p :class="!rabbitCompl[5] ? 'before-clear' : 'clear'"> |
|
259 |
+ <img |
|
260 |
+ v-if="rabbitCompl[5]" |
|
261 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
262 |
+ alt="Complete Icon" |
|
263 |
+ class="complete-icon" |
|
264 |
+ /> |
|
265 |
+ {{ labeledItems[4].label }} |
|
266 |
+ </p> |
|
188 | 267 |
</div> |
189 | 268 |
<!-- 4 --> |
190 |
- <div class="race-btn" @click="goToPage('Chapter4')"> |
|
269 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[3])]"> |
|
270 |
+ <div class="rabbit-running"> |
|
271 |
+ <img |
|
272 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
273 |
+ alt="" |
|
274 |
+ :style="{ display: rabbitPos[4] ? 'block' : 'none' }" |
|
275 |
+ /> |
|
276 |
+ </div> |
|
191 | 277 |
<button |
192 | 278 |
class="popTxt" |
193 | 279 |
v-for="(item, index) in items" |
... | ... | @@ -198,70 +284,83 @@ |
198 | 284 |
<div class="image-container"> |
199 | 285 |
<img |
200 | 286 |
src="../../../resources/img/new_img/ai_board/racebtn_4.png" |
287 |
+ alt="Race Button" |
|
288 |
+ class="base-img" |
|
201 | 289 |
/> |
202 | 290 |
<img |
291 |
+ v-if="rabbitCompl[4]" |
|
203 | 292 |
src="../../../resources/img/new_img/icon/clear_img.png" |
204 |
- :style="{ |
|
205 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
206 |
- }" |
|
293 |
+ alt="Clear Icon" |
|
207 | 294 |
class="clear-img" |
208 | 295 |
/> |
209 | 296 |
</div> |
210 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
211 |
- <img |
|
212 |
- v-if="item.isSecondImageVisible" |
|
213 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
214 |
- alt="Complete Icon" |
|
215 |
- class="complete-icon" |
|
216 |
- /> |
|
217 |
- 문제2 |
|
218 |
- </p> |
|
219 | 297 |
</button> |
220 |
- <!-- <p>문제2</p> --> |
|
298 |
+ <p :class="!rabbitCompl[4] ? 'before-clear' : 'clear'"> |
|
299 |
+ <img |
|
300 |
+ v-if="rabbitCompl[4]" |
|
301 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
302 |
+ alt="Complete Icon" |
|
303 |
+ class="complete-icon" |
|
304 |
+ /> |
|
305 |
+ {{ labeledItems[3].label }} |
|
306 |
+ </p> |
|
221 | 307 |
</div> |
222 | 308 |
<!-- 3 --> |
223 | 309 |
<div |
224 | 310 |
class="race-btn" |
225 |
- @click="goToPage('Chapter3')" |
|
311 |
+ @click="[storeLearningId(labeledItems[2])]" |
|
226 | 312 |
style="right: 12px" |
227 | 313 |
> |
314 |
+ <div class="rabbit-running"> |
|
315 |
+ <img |
|
316 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
317 |
+ alt="" |
|
318 |
+ :style="{ display: rabbitPos[3] ? 'block' : 'none' }" |
|
319 |
+ /> |
|
320 |
+ </div> |
|
228 | 321 |
<button |
229 | 322 |
class="popTxt" |
230 | 323 |
v-for="(item, index) in items" |
231 | 324 |
:key="index" |
232 | 325 |
@click="toggleImage(index)" |
233 | 326 |
data-num="3" |
234 |
- style="top: -46px; position: relative" |
|
235 | 327 |
> |
236 | 328 |
<div class="image-container"> |
237 | 329 |
<img |
238 | 330 |
src="../../../resources/img/new_img/ai_board/racebtn_3.png" |
331 |
+ alt="Race Button" |
|
332 |
+ class="base-img" |
|
239 | 333 |
/> |
240 | 334 |
<img |
335 |
+ v-if="rabbitCompl[3]" |
|
241 | 336 |
src="../../../resources/img/new_img/icon/clear_img.png" |
242 |
- :style="{ |
|
243 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
244 |
- }" |
|
337 |
+ alt="Clear Icon" |
|
245 | 338 |
class="clear-img" |
246 | 339 |
/> |
247 | 340 |
</div> |
248 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
249 |
- <img |
|
250 |
- v-if="item.isSecondImageVisible" |
|
251 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
252 |
- alt="Complete Icon" |
|
253 |
- class="complete-icon" |
|
254 |
- /> |
|
255 |
- 문제1 |
|
256 |
- </p> |
|
257 | 341 |
</button> |
258 |
- <!-- <p>문제1</p> --> |
|
342 |
+ <p :class="!rabbitCompl[3] ? 'before-clear' : 'clear'"> |
|
343 |
+ <img |
|
344 |
+ v-if="rabbitCompl[3]" |
|
345 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
346 |
+ alt="Complete Icon" |
|
347 |
+ class="complete-icon" |
|
348 |
+ /> |
|
349 |
+ {{ labeledItems[2].label }} |
|
350 |
+ </p> |
|
259 | 351 |
</div> |
260 | 352 |
</div> |
261 |
- <!-- 3번째 줄 --> |
|
353 |
+ <!-- 3번째줄 --> |
|
262 | 354 |
<div class="rcon flex" style="position: relative; top: -23px"> |
263 | 355 |
<!-- 8 --> |
264 |
- <div class="race-btn" @click="goToPage('Chapter8')"> |
|
356 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[7])]"> |
|
357 |
+ <div class="rabbit-running"> |
|
358 |
+ <img |
|
359 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
360 |
+ alt="" |
|
361 |
+ :style="{ display: rabbitPos[8] ? 'block' : 'none' }" |
|
362 |
+ /> |
|
363 |
+ </div> |
|
265 | 364 |
<button |
266 | 365 |
class="popTxt" |
267 | 366 |
v-for="(item, index) in items" |
... | ... | @@ -272,29 +371,36 @@ |
272 | 371 |
<div class="image-container"> |
273 | 372 |
<img |
274 | 373 |
src="../../../resources/img/new_img/ai_board/racebtn_8.png" |
374 |
+ alt="Race Button" |
|
375 |
+ class="base-img" |
|
275 | 376 |
/> |
276 | 377 |
<img |
378 |
+ v-if="rabbitCompl[8]" |
|
277 | 379 |
src="../../../resources/img/new_img/icon/clear_img.png" |
278 |
- :style="{ |
|
279 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
280 |
- }" |
|
380 |
+ alt="Clear Icon" |
|
281 | 381 |
class="clear-img" |
282 | 382 |
/> |
283 | 383 |
</div> |
284 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
285 |
- <img |
|
286 |
- v-if="item.isSecondImageVisible" |
|
287 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
288 |
- alt="Complete Icon" |
|
289 |
- class="complete-icon" |
|
290 |
- /> |
|
291 |
- 중간 평가 |
|
292 |
- </p> |
|
293 | 384 |
</button> |
294 |
- <!-- <p class="long">중간 평가</p> --> |
|
385 |
+ <p :class="!rabbitCompl[8] ? 'before-clear' : 'clear'"> |
|
386 |
+ <img |
|
387 |
+ v-if="rabbitCompl[8]" |
|
388 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
389 |
+ alt="Complete Icon" |
|
390 |
+ class="complete-icon" |
|
391 |
+ /> |
|
392 |
+ {{ labeledItems[7].label }} |
|
393 |
+ </p> |
|
295 | 394 |
</div> |
296 | 395 |
<!-- 9 --> |
297 |
- <div class="race-btn" @click="goToPage('Chapter9')"> |
|
396 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[8])]"> |
|
397 |
+ <div class="rabbit-running"> |
|
398 |
+ <img |
|
399 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
400 |
+ alt="" |
|
401 |
+ :style="{ display: rabbitPos[9] ? 'block' : 'none' }" |
|
402 |
+ /> |
|
403 |
+ </div> |
|
298 | 404 |
<button |
299 | 405 |
class="popTxt" |
300 | 406 |
v-for="(item, index) in items" |
... | ... | @@ -305,29 +411,36 @@ |
305 | 411 |
<div class="image-container"> |
306 | 412 |
<img |
307 | 413 |
src="../../../resources/img/new_img/ai_board/racebtn_9.png" |
414 |
+ alt="Race Button" |
|
415 |
+ class="base-img" |
|
308 | 416 |
/> |
309 | 417 |
<img |
418 |
+ v-if="rabbitCompl[9]" |
|
310 | 419 |
src="../../../resources/img/new_img/icon/clear_img.png" |
311 |
- :style="{ |
|
312 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
313 |
- }" |
|
420 |
+ alt="Clear Icon" |
|
314 | 421 |
class="clear-img" |
315 | 422 |
/> |
316 | 423 |
</div> |
317 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
318 |
- <img |
|
319 |
- v-if="item.isSecondImageVisible" |
|
320 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
321 |
- alt="Complete Icon" |
|
322 |
- class="complete-icon" |
|
323 |
- /> |
|
324 |
- 지문3 |
|
325 |
- </p> |
|
326 | 424 |
</button> |
327 |
- <!-- <p>지문3</p> --> |
|
425 |
+ <p :class="!rabbitCompl[9] ? 'before-clear' : 'clear'"> |
|
426 |
+ <img |
|
427 |
+ v-if="rabbitCompl[9]" |
|
428 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
429 |
+ alt="Complete Icon" |
|
430 |
+ class="complete-icon" |
|
431 |
+ /> |
|
432 |
+ {{ labeledItems[8].label }} |
|
433 |
+ </p> |
|
328 | 434 |
</div> |
329 | 435 |
<!-- 10 --> |
330 |
- <div class="race-btn" @click="goToPage('Chapter10')"> |
|
436 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[9])]"> |
|
437 |
+ <div class="rabbit-running"> |
|
438 |
+ <img |
|
439 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
440 |
+ alt="" |
|
441 |
+ :style="{ display: rabbitPos[10] ? 'block' : 'none' }" |
|
442 |
+ /> |
|
443 |
+ </div> |
|
331 | 444 |
<button |
332 | 445 |
class="popTxt" |
333 | 446 |
v-for="(item, index) in items" |
... | ... | @@ -338,63 +451,83 @@ |
338 | 451 |
<div class="image-container"> |
339 | 452 |
<img |
340 | 453 |
src="../../../resources/img/new_img/ai_board/racebtn_10.png" |
454 |
+ alt="Race Button" |
|
455 |
+ class="base-img" |
|
341 | 456 |
/> |
342 | 457 |
<img |
458 |
+ v-if="rabbitCompl[10]" |
|
343 | 459 |
src="../../../resources/img/new_img/icon/clear_img.png" |
344 |
- :style="{ |
|
345 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
346 |
- }" |
|
460 |
+ alt="Clear Icon" |
|
347 | 461 |
class="clear-img" |
348 | 462 |
/> |
349 | 463 |
</div> |
350 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
351 |
- <img |
|
352 |
- v-if="item.isSecondImageVisible" |
|
353 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
354 |
- alt="Complete Icon" |
|
355 |
- class="complete-icon" |
|
356 |
- /> |
|
357 |
- 단어장 |
|
358 |
- </p> |
|
359 | 464 |
</button> |
360 |
- <!-- <p>단어장</p> --> |
|
465 |
+ <p :class="!rabbitCompl[10] ? 'before-clear' : 'clear'"> |
|
466 |
+ <img |
|
467 |
+ v-if="rabbitCompl[10]" |
|
468 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
469 |
+ alt="Complete Icon" |
|
470 |
+ class="complete-icon" |
|
471 |
+ /> |
|
472 |
+ {{ labeledItems[9].label }} |
|
473 |
+ </p> |
|
361 | 474 |
</div> |
362 | 475 |
<!-- 11 --> |
363 |
- <div class="race-btn"> |
|
476 |
+ <div class="race-btn" @click="[storeLearningId(labeledItems[10])]"> |
|
477 |
+ <div class="rabbit-running"> |
|
478 |
+ <img |
|
479 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
480 |
+ alt="" |
|
481 |
+ :style="{ display: rabbitPos[11] ? 'block' : 'none' }" |
|
482 |
+ /> |
|
483 |
+ </div> |
|
364 | 484 |
<button |
365 | 485 |
class="popTxt" |
366 | 486 |
v-for="(item, index) in items" |
367 | 487 |
:key="index" |
368 |
- @click="toggleImage(index)" |
|
488 |
+ @click="toggleImageAndShowPopup(index, '11')" |
|
369 | 489 |
data-num="11" |
370 | 490 |
> |
371 | 491 |
<div class="image-container"> |
372 | 492 |
<img |
373 | 493 |
src="../../../resources/img/new_img/ai_board/racebtn_11.png" |
494 |
+ alt="Race Button" |
|
495 |
+ class="base-img" |
|
374 | 496 |
/> |
375 | 497 |
<img |
498 |
+ v-if="rabbitCompl[11]" |
|
376 | 499 |
src="../../../resources/img/new_img/icon/clear_img.png" |
377 |
- :style="{ |
|
378 |
- display: item.isSecondImageVisible ? 'block' : 'none', |
|
379 |
- }" |
|
500 |
+ alt="Clear Icon" |
|
380 | 501 |
class="clear-img" |
381 | 502 |
/> |
382 | 503 |
</div> |
383 |
- <p :class="!item.isSecondImageVisible ? 'before-clear' : 'clear'"> |
|
384 |
- <img |
|
385 |
- v-if="item.isSecondImageVisible" |
|
386 |
- src="../../../resources/img/new_img/icon/complete_icon.png" |
|
387 |
- alt="Complete Icon" |
|
388 |
- class="complete-icon" |
|
389 |
- /> |
|
390 |
- 최종 평가 |
|
391 |
- </p> |
|
392 | 504 |
</button> |
393 |
- <!-- <p class="long">최종 평가</p> --> |
|
505 |
+ <p :class="!rabbitCompl[11] ? 'before-clear' : 'clear'"> |
|
506 |
+ <img |
|
507 |
+ v-if="rabbitCompl[11]" |
|
508 |
+ src="../../../resources/img/new_img/icon/complete_icon.png" |
|
509 |
+ alt="Complete Icon" |
|
510 |
+ class="complete-icon" |
|
511 |
+ /> |
|
512 |
+ {{ labeledItems[10].label }} |
|
513 |
+ </p> |
|
394 | 514 |
</div> |
395 | 515 |
</div> |
396 |
- <div class="rabbit-end" @click="ShowPopup"> |
|
397 |
- <!-- <img src="../../../resources/img/img138_72s.png" alt="" /> --> |
|
516 |
+ <div class="race-btn"> |
|
517 |
+ <div class="rabbit-running" style="display: flex"> |
|
518 |
+ <img |
|
519 |
+ class="rabbit-end" |
|
520 |
+ src="../../../resources/img/new_img/rabbit.png" |
|
521 |
+ alt="" |
|
522 |
+ :style="{ display: rabbitEnd ? 'block' : 'none' }" |
|
523 |
+ /> |
|
524 |
+ <img |
|
525 |
+ class="fireworks-end" |
|
526 |
+ src="../../../resources/img/fireworks.gif" |
|
527 |
+ alt="" |
|
528 |
+ :style="{ display: rabbitEnd ? 'block' : 'none' }" |
|
529 |
+ /> |
|
530 |
+ </div> |
|
398 | 531 |
</div> |
399 | 532 |
</div> |
400 | 533 |
|
... | ... | @@ -432,7 +565,6 @@ |
432 | 565 |
</div> |
433 | 566 |
</div> |
434 | 567 |
</div> |
435 |
- |
|
436 | 568 |
<!-- 카메라 모달 --> |
437 | 569 |
<article v-show="showCameraModal" class="popup-wrap"> |
438 | 570 |
<div class="popup-box" style="top: 500px; left: 500px"> |
... | ... | @@ -472,6 +604,7 @@ |
472 | 604 |
</div> |
473 | 605 |
</article> |
474 | 606 |
</div> |
607 |
+ |
|
475 | 608 |
<div class="complete-wrap myphoto"> |
476 | 609 |
<button |
477 | 610 |
class="login-btn mt10" |
... | ... | @@ -487,6 +620,7 @@ |
487 | 620 |
<p>학습 종료하기</p> |
488 | 621 |
</button> |
489 | 622 |
<h2 class="mb40 mt10">이 단원을 끝낸 친구들</h2> |
623 |
+ |
|
490 | 624 |
<article class="flex-column"> |
491 | 625 |
<div class="flex-row"> |
492 | 626 |
<div class="flex" style="gap: 5px; flex-wrap: wrap"> |
... | ... | @@ -508,9 +642,8 @@ |
508 | 642 |
</div> |
509 | 643 |
</article> |
510 | 644 |
<article class="popup-wrap" v-show="searchOpen"> |
511 |
- <div class="popup-box"> |
|
645 |
+ <div class="popup-box" style="top: 50%"> |
|
512 | 646 |
<div class="flex mb10 justify-between"> |
513 |
- <p class="popup-title">알림</p> |
|
514 | 647 |
<button type="button" class="popup-close-btn" @click="closeModal"> |
515 | 648 |
<svg-icon |
516 | 649 |
type="mdi" |
... | ... | @@ -520,24 +653,46 @@ |
520 | 653 |
</button> |
521 | 654 |
</div> |
522 | 655 |
<div class="box"> |
523 |
- <div style="width: 910px"> |
|
524 |
- <img src="../../../resources/img/img140_747s.png" alt="" /> |
|
656 |
+ <div style="width: 910px; height: 680px"> |
|
657 |
+ <img |
|
658 |
+ :src="selectedImage.image" |
|
659 |
+ alt="Image" |
|
660 |
+ @error="onImageError" |
|
661 |
+ reloadable="true" |
|
662 |
+ /> |
|
525 | 663 |
</div> |
526 | 664 |
</div> |
527 | 665 |
<div class="flex justify-between mt20"> |
528 | 666 |
<div class="text flex"> |
529 |
- <p class="title2 date ml30">2024-08-06</p> |
|
667 |
+ <p class="title2 date ml30">{{ selectedImage.date }}</p> |
|
530 | 668 |
<span class="title1 ml30" |
531 |
- >1단원을 마친 <em class="yellow">가나다</em>친구</span |
|
669 |
+ >{{ selectedImage.unit }}을 마친 |
|
670 |
+ <em class="yellow">{{ selectedImage.name }}</em |
|
671 |
+ >친구</span |
|
532 | 672 |
> |
533 | 673 |
</div> |
534 | 674 |
<div class="title2 flex align-center" style="gap: 10px"> |
535 | 675 |
<svg-icon |
676 |
+ v-if="!isHeartFilled" |
|
677 |
+ type="mdi" |
|
678 |
+ :path="mdiHeartOutline" |
|
679 |
+ @click=" |
|
680 |
+ toggleHeart(selectedImage.heart, selectedImage.fileMngId) |
|
681 |
+ " |
|
682 |
+ style="color: #ffba08; cursor: pointer" |
|
683 |
+ ></svg-icon> |
|
684 |
+ <svg-icon |
|
685 |
+ v-if="isHeartFilled" |
|
536 | 686 |
type="mdi" |
537 | 687 |
:path="mdiHeart" |
538 |
- style="color: #ffba08" |
|
688 |
+ @click=" |
|
689 |
+ toggleHeart(selectedImage.heart, selectedImage.fileMngId) |
|
690 |
+ " |
|
691 |
+ style="color: #ffba08; cursor: pointer" |
|
539 | 692 |
></svg-icon> |
540 |
- <p><em class="yellow">1</em></p> |
|
693 |
+ <p> |
|
694 |
+ <em class="yellow">{{ selectedImage.heart }}</em> |
|
695 |
+ </p> |
|
541 | 696 |
</div> |
542 | 697 |
</div> |
543 | 698 |
</div> |
... | ... | @@ -549,9 +704,12 @@ |
549 | 704 |
<script> |
550 | 705 |
import SvgIcon from "@jamescoyle/vue-icon"; |
551 | 706 |
import { mdiMagnify, mdiHeart, mdiWindowClose } from "@mdi/js"; |
707 |
+import { mdiHeartOutline } from "@mdi/js"; |
|
552 | 708 |
import axios from "axios"; |
553 |
- |
|
554 |
-//은진 |
|
709 |
+import { call } from "file-loader"; |
|
710 |
+import { name } from "file-loader"; |
|
711 |
+import { mapGetters } from "vuex"; |
|
712 |
+import { mapActions } from "vuex"; |
|
555 | 713 |
|
556 | 714 |
export default { |
557 | 715 |
data() { |
... | ... | @@ -565,8 +723,10 @@ |
565 | 723 |
isSecondImageVisible: false, |
566 | 724 |
}, |
567 | 725 |
], |
726 |
+ mdiMagnify: mdiMagnify, |
|
568 | 727 |
mdiWindowClose: mdiWindowClose, |
569 | 728 |
mdiHeart: mdiHeart, |
729 |
+ mdiHeartOutline: mdiHeartOutline, |
|
570 | 730 |
showModal: false, |
571 | 731 |
searchOpen: false, // 사진 상세보기 모달창 |
572 | 732 |
searchOpen2: false, // 단원 마친 후, 사진 촬영 여부 선택 모달창 |
... | ... | @@ -575,11 +735,147 @@ |
575 | 735 |
photo: null, //캡쳐 사진 |
576 | 736 |
stream: null, |
577 | 737 |
|
578 |
- isHidden: false, |
|
738 |
+ roadmapData: [], |
|
739 |
+ labeledItems: [], |
|
740 |
+ |
|
741 |
+ problemCounter: 0, |
|
742 |
+ wordCounter: 0, |
|
743 |
+ textCounter: 0, |
|
744 |
+ evalCounter: 0, |
|
745 |
+ book_id: null, |
|
746 |
+ unit_id: null, |
|
747 |
+ |
|
748 |
+ schedules: [], |
|
749 |
+ nowSchedule: "", |
|
750 |
+ state: "", |
|
751 |
+ rabbitPos: [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
752 |
+ rabbitCompl: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], |
|
753 |
+ rabbitEnd: false, |
|
754 |
+ |
|
755 |
+ titleUnitName: "", |
|
756 |
+ titleBookName: "", |
|
757 |
+ |
|
579 | 758 |
images: [], |
759 |
+ |
|
760 |
+ selectedImage: [ |
|
761 |
+ { |
|
762 |
+ image: "", |
|
763 |
+ unit: "", |
|
764 |
+ date: "", |
|
765 |
+ name: "", |
|
766 |
+ heart: "", |
|
767 |
+ fileMngId: "", |
|
768 |
+ }, |
|
769 |
+ ], |
|
770 |
+ |
|
771 |
+ isHeartFilled: false, // 하트가 채워졌는지 여부 |
|
772 |
+ |
|
773 |
+ problemType: null, |
|
774 |
+ wordBookType: null, |
|
775 |
+ wordContentList: [], |
|
580 | 776 |
}; |
581 | 777 |
}, |
582 | 778 |
methods: { |
779 |
+ toggleHeart(heart, fileMngId) { |
|
780 |
+ this.isHeartFilled = !this.isHeartFilled; // 하트 상태 토글 |
|
781 |
+ |
|
782 |
+ if (this.isHeartFilled) var calHeart = heart + 1; |
|
783 |
+ else var calHeart = heart - 1; |
|
784 |
+ |
|
785 |
+ // 하트 수를 증가시키기 위한 API 요청 |
|
786 |
+ axios |
|
787 |
+ .post("/photo/likeUpdate.json", { |
|
788 |
+ likeData: calHeart, |
|
789 |
+ fileMngId: fileMngId, |
|
790 |
+ }) |
|
791 |
+ .then((response) => { |
|
792 |
+ this.selectedImage.heart = calHeart; |
|
793 |
+ }) |
|
794 |
+ .catch((error) => { |
|
795 |
+ console.error("Error updating heart:", error); |
|
796 |
+ }); |
|
797 |
+ }, |
|
798 |
+ checkAndFetchData() { |
|
799 |
+ console.log("받은 Book ID:", this.getBookId); |
|
800 |
+ console.log("받은 Unit ID:", this.getUnitId); |
|
801 |
+ const book_id = this.getBookId; |
|
802 |
+ const unit_id = this.getUnitId; |
|
803 |
+ |
|
804 |
+ if (!book_id || !unit_id) { |
|
805 |
+ console.error("book_id 또는 unit_id가 설정되지 않았습니다."); |
|
806 |
+ this.state = "notRegistered"; |
|
807 |
+ return; |
|
808 |
+ } |
|
809 |
+ this.fetchImage(unit_id); |
|
810 |
+ this.fetchSchedule(unit_id, book_id); |
|
811 |
+ this.fetchRoadmapData(unit_id, book_id); |
|
812 |
+ this.fetchRabbit(); |
|
813 |
+ |
|
814 |
+ this.unit_id = unit_id; |
|
815 |
+ this.book_id = book_id; |
|
816 |
+ |
|
817 |
+ if (this.$route.query.reCapture == "true") { |
|
818 |
+ this.openCameraModal(); |
|
819 |
+ } |
|
820 |
+ |
|
821 |
+ this.searchStdId(); |
|
822 |
+ }, |
|
823 |
+ |
|
824 |
+ //은진 |
|
825 |
+ buttonSearch(image) { |
|
826 |
+ this.isHeartFilled = false; |
|
827 |
+ this.selectedImage.name = image.stdId; |
|
828 |
+ this.selectedImage.image = image.url; |
|
829 |
+ this.selectedImage.unit = this.titleUnitName; |
|
830 |
+ this.selectedImage.date = image.fileRegDate.split(" ")[0]; |
|
831 |
+ this.selectedImage.heart = image.likeData; |
|
832 |
+ this.selectedImage.fileMngId = image.fileMngId; |
|
833 |
+ this.searchOpen = true; |
|
834 |
+ }, |
|
835 |
+ fetchImage(unit_id) { |
|
836 |
+ axios({ |
|
837 |
+ url: "/photo/photoUnitList.json", |
|
838 |
+ method: "post", |
|
839 |
+ headers: { |
|
840 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
841 |
+ }, |
|
842 |
+ data: { |
|
843 |
+ unitId: unit_id, |
|
844 |
+ sclsId: "1", |
|
845 |
+ }, |
|
846 |
+ }) |
|
847 |
+ .then((response) => { |
|
848 |
+ this.file = response.data; |
|
849 |
+ |
|
850 |
+ const findFilePromises = this.file.map((f) => |
|
851 |
+ this.findFile(f.file_mng_id) |
|
852 |
+ ); |
|
853 |
+ |
|
854 |
+ return Promise.all(findFilePromises); |
|
855 |
+ }) |
|
856 |
+ .then((fileResults) => { |
|
857 |
+ this.images = this.file |
|
858 |
+ .map((file, index) => { |
|
859 |
+ const result = fileResults[index]; |
|
860 |
+ if (result) { |
|
861 |
+ return { |
|
862 |
+ url: "http://165.229.169.113:9080/" + `${result.fileRpath}`, |
|
863 |
+ fileId: result.fileId, |
|
864 |
+ fileNm: result.fileNm, |
|
865 |
+ fileRegDate: result.regDt, |
|
866 |
+ likeData: file.like_data, |
|
867 |
+ stdId: file.user_nm, |
|
868 |
+ fileMngId: result.fileMngId, |
|
869 |
+ }; |
|
870 |
+ } |
|
871 |
+ return null; |
|
872 |
+ }) |
|
873 |
+ .filter((image) => image !== null); |
|
874 |
+ }) |
|
875 |
+ .catch((error) => { |
|
876 |
+ console.error("Error fetching images:", error); |
|
877 |
+ }); |
|
878 |
+ }, |
|
583 | 879 |
async findFile(file_mng_id) { |
584 | 880 |
try { |
585 | 881 |
const res = await axios({ |
... | ... | @@ -598,47 +894,6 @@ |
598 | 894 |
return null; |
599 | 895 |
} |
600 | 896 |
}, |
601 |
- fetchImage() { |
|
602 |
- axios({ |
|
603 |
- url: "/photo/photoUnitList.json", |
|
604 |
- method: "post", |
|
605 |
- headers: { |
|
606 |
- "Content-Type": "application/json; charset=UTF-8", |
|
607 |
- }, |
|
608 |
- data: { |
|
609 |
- unitId: "UNIT_000000000000001", // 수정해야함 |
|
610 |
- sclsId: "1", |
|
611 |
- }, |
|
612 |
- }) |
|
613 |
- .then((response) => { |
|
614 |
- this.file_mng_id = response.data; |
|
615 |
- |
|
616 |
- const findFilePromises = this.file_mng_id.map((id) => |
|
617 |
- this.findFile(id.file_mng_id) |
|
618 |
- ); |
|
619 |
- |
|
620 |
- return Promise.all(findFilePromises); |
|
621 |
- }) |
|
622 |
- .then((fileResults) => { |
|
623 |
- // Format file results to include image URL |
|
624 |
- this.images = fileResults |
|
625 |
- .map((file) => { |
|
626 |
- if (file) { |
|
627 |
- return { |
|
628 |
- url: "http://165.229.169.113:9080/" + `${file.fileRpath}`, |
|
629 |
- fileId: file.fileId, |
|
630 |
- fileNm: file.fileNm, |
|
631 |
- // Add any other properties you need here |
|
632 |
- }; |
|
633 |
- } |
|
634 |
- return null; |
|
635 |
- }) |
|
636 |
- .filter((image) => image !== null); |
|
637 |
- }) |
|
638 |
- .catch((error) => { |
|
639 |
- console.error("Error fetching images:", error); |
|
640 |
- }); |
|
641 |
- }, |
|
642 | 897 |
goToPageImg(page) { |
643 | 898 |
const canvas = document.querySelector("canvas"); |
644 | 899 |
const dataURL = canvas.toDataURL("image/png"); |
... | ... | @@ -648,18 +903,248 @@ |
648 | 903 |
query: { image: encodeURIComponent(dataURL) }, |
649 | 904 |
}); |
650 | 905 |
}, |
906 |
+ |
|
907 |
+ fetchRabbit() { |
|
908 |
+ for (var i = 0; i < 12; i++) { |
|
909 |
+ this.rabbitPos[i] = false; |
|
910 |
+ } |
|
911 |
+ |
|
912 |
+ if (this.$route.query.value) { |
|
913 |
+ this.rabbitPos[parseInt(this.$route.query.value, 10) + 1] = true; |
|
914 |
+ for (var i = 0; i < this.$route.query.value; i++) { |
|
915 |
+ this.rabbitCompl[i + 1] = true; |
|
916 |
+ } |
|
917 |
+ |
|
918 |
+ if (this.$route.query.value === "11") { |
|
919 |
+ this.rabbitEnd = true; |
|
920 |
+ setTimeout(() => { |
|
921 |
+ this.searchOpen2 = true; |
|
922 |
+ }, 1000); |
|
923 |
+ } |
|
924 |
+ } else this.rabbitPos[0] = true; |
|
925 |
+ }, |
|
926 |
+ fetchSchedule(unit_id, book_id) { |
|
927 |
+ axios({ |
|
928 |
+ url: "/schedule/selectSchedule.json", |
|
929 |
+ method: "post", |
|
930 |
+ headers: { |
|
931 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
932 |
+ }, |
|
933 |
+ data: { |
|
934 |
+ stdId: "2", |
|
935 |
+ }, |
|
936 |
+ }) |
|
937 |
+ .then((response) => { |
|
938 |
+ this.schedules = response.data; |
|
939 |
+ |
|
940 |
+ if (this.schedules.length == 0) { |
|
941 |
+ this.state = "notRegistered"; |
|
942 |
+ } else { |
|
943 |
+ const allFinished = this.schedules.every( |
|
944 |
+ (schedule) => schedule.finish === "T" |
|
945 |
+ ); |
|
946 |
+ if (allFinished) { |
|
947 |
+ this.state = "finish"; |
|
948 |
+ } else { |
|
949 |
+ this.nowSchedule = this.schedules.find( |
|
950 |
+ (schedule) => |
|
951 |
+ schedule.finish === null || schedule.finish === "F" |
|
952 |
+ ); |
|
953 |
+ if (this.nowSchedule) { |
|
954 |
+ this.fetchRoadmapData(unit_id, book_id); |
|
955 |
+ this.state = "studying"; |
|
956 |
+ } else { |
|
957 |
+ this.state = "notRegistered"; |
|
958 |
+ } |
|
959 |
+ } |
|
960 |
+ } |
|
961 |
+ }) |
|
962 |
+ .catch((error) => { |
|
963 |
+ console.error("Error fetching roadmap data:", error); |
|
964 |
+ }); |
|
965 |
+ }, |
|
651 | 966 |
finishSchedule() { |
652 |
- this.isHidden = true; |
|
967 |
+ axios({ |
|
968 |
+ url: "/schedule/scheduleUpdate.json", |
|
969 |
+ method: "post", |
|
970 |
+ headers: { |
|
971 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
972 |
+ }, |
|
973 |
+ data: { |
|
974 |
+ scheduleId: this.nowSchedule.schdl_id, |
|
975 |
+ finish: "T", |
|
976 |
+ }, |
|
977 |
+ }) |
|
978 |
+ .then((response) => { |
|
979 |
+ const nextSchedule = this.schedules.find( |
|
980 |
+ (schedule) => schedule.schdl_id > this.nowSchedule.schdl_id |
|
981 |
+ ); |
|
982 |
+ alert("학습을 완료했습니다!"); |
|
983 |
+ |
|
984 |
+ if (nextSchedule) { |
|
985 |
+ this.nowSchedule = nextSchedule; |
|
986 |
+ this.fetchSchedule(nextSchedule.unit_id, nextSchedule.book_id); |
|
987 |
+ this.fetchRoadmapData(nextSchedule.unit_id, nextSchedule.book_id); |
|
988 |
+ this.$router.push({ |
|
989 |
+ name: "Dashboard", |
|
990 |
+ query: { |
|
991 |
+ unit_id: nextSchedule.unit_id, |
|
992 |
+ book_id: nextSchedule.book_id, |
|
993 |
+ }, |
|
994 |
+ }); |
|
995 |
+ } else { |
|
996 |
+ alert("모든 학습을 완료했습니다!"); |
|
997 |
+ this.state = "finish"; |
|
998 |
+ } |
|
999 |
+ }) |
|
1000 |
+ .catch((error) => { |
|
1001 |
+ console.error("Error updating schedule:", error); |
|
1002 |
+ }); |
|
1003 |
+ }, |
|
1004 |
+ fetchRoadmapData(unit_id, book_id) { |
|
1005 |
+ axios({ |
|
1006 |
+ url: "/aiLearning/aiLearningDetail.json", |
|
1007 |
+ method: "post", |
|
1008 |
+ headers: { |
|
1009 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
1010 |
+ }, |
|
1011 |
+ data: { |
|
1012 |
+ unit_id: "UNIT_0000000000000301", |
|
1013 |
+ user_id: "USID_000000000000002" |
|
1014 |
+ }, |
|
1015 |
+ }) |
|
1016 |
+ .then((response) => { |
|
1017 |
+ if (response.data.length != 0) { |
|
1018 |
+ this.roadmapData = response.data; |
|
1019 |
+ this.titleUnitName = this.roadmapData[0].unit_nm; |
|
1020 |
+ this.titleBookName = this.roadmapData[0].book_nm; |
|
1021 |
+ this.labeledItems = this.processedRoadmap; |
|
1022 |
+ console.log(this.roadmapData, this.labeledItems); |
|
1023 |
+ } else { |
|
1024 |
+ this.state = "noProblem"; |
|
1025 |
+ } |
|
1026 |
+ }) |
|
1027 |
+ .catch((error) => { |
|
1028 |
+ this.state = "noProblem"; |
|
1029 |
+ console.error("Error fetching roadmap data:", error); |
|
1030 |
+ }); |
|
653 | 1031 |
}, |
654 | 1032 |
toggleImage(index) { |
655 | 1033 |
this.items[index].isSecondImageVisible = |
656 | 1034 |
!this.items[index].isSecondImageVisible; |
657 | 1035 |
}, |
658 | 1036 |
ShowPopup() { |
659 |
- this.searchOpen2 = true; |
|
1037 |
+ this.searchOpen2 = true; // 촬영 여부 묻는 모달창 열기 |
|
660 | 1038 |
}, |
661 | 1039 |
goToPage(page) { |
1040 |
+ // const { unit_id, book_id } = this.$route.query; |
|
1041 |
+ // this.$router.push({ name: page, query: { unit_id, book_id } }); |
|
662 | 1042 |
this.$router.push({ name: page }); |
1043 |
+ }, |
|
1044 |
+ goToPage2(page, unit_id) { |
|
1045 |
+ this.$router.push({ |
|
1046 |
+ name: page, |
|
1047 |
+ query: { |
|
1048 |
+ unit_id: unit_id, |
|
1049 |
+ }, |
|
1050 |
+ }); |
|
1051 |
+ }, |
|
1052 |
+ |
|
1053 |
+ storeLearningId(labeledItems) { |
|
1054 |
+ this.$store.dispatch("updateLearningData", labeledItems); |
|
1055 |
+ this.$store.dispatch("updateLearningId", labeledItems.learning_id); // 단어장에 사용중.. |
|
1056 |
+ |
|
1057 |
+ console.log("레이블된 아이템: ", labeledItems); |
|
1058 |
+ console.log(labeledItems.prblm_type_id) |
|
1059 |
+ if (labeledItems.label.startsWith("문제")) { |
|
1060 |
+ // this.handleProblemDetail(this.$store.getters.currentLearningId); |
|
1061 |
+ this.handleProblemDetail(labeledItems); |
|
1062 |
+ this.goToPage(this.problemType); |
|
1063 |
+ } |
|
1064 |
+ }, |
|
1065 |
+ |
|
1066 |
+ // 평가 정보를 통해서 관련 문제 가져오기 |
|
1067 |
+ fetchEvalData(evaldata) { |
|
1068 |
+ axios({ |
|
1069 |
+ url: "/evalProblem/selectEvalProblem.json", |
|
1070 |
+ method: "post", |
|
1071 |
+ headers: { |
|
1072 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
1073 |
+ }, |
|
1074 |
+ data: { |
|
1075 |
+ evalId: evaldata.learning_id, |
|
1076 |
+ }, |
|
1077 |
+ }) |
|
1078 |
+ .then((response) => { |
|
1079 |
+ const payload = { |
|
1080 |
+ learning_id: response.data, |
|
1081 |
+ label: evaldata.label, |
|
1082 |
+ seqNum: evaldata.seqNum, |
|
1083 |
+ }; |
|
1084 |
+ |
|
1085 |
+ // Vuex 뮤테이션 호출 |
|
1086 |
+ this.$store.commit("setLearningData", payload); |
|
1087 |
+ this.handleProblemDetail(response.data[0]); |
|
1088 |
+ this.goToPage(this.problemType); |
|
1089 |
+ }) |
|
1090 |
+ .catch((error) => { |
|
1091 |
+ console.error("fetchData - error: ", error); |
|
1092 |
+ return []; |
|
1093 |
+ }); |
|
1094 |
+ }, |
|
1095 |
+ |
|
1096 |
+ handleProblemDetail(item) { |
|
1097 |
+ console.log('item ', item); |
|
1098 |
+ if (item.prblm_type_id === "prblm_type_001") { |
|
1099 |
+ this.problemType = "Chapter3"; |
|
1100 |
+ } else if (item.prblm_type_id === "prblm_type_002") { |
|
1101 |
+ this.problemType = "Chapter3_1"; |
|
1102 |
+ } else if (item.prblm_type_id === "prblm_type_003") { |
|
1103 |
+ this.problemType = "Chapter3_2"; |
|
1104 |
+ } else if (item.prblm_type_id === "prblm_type_004") { |
|
1105 |
+ this.problemType = "Chapter3_3"; |
|
1106 |
+ } else if (item.prblm_type_id === "prblm_type_005") { |
|
1107 |
+ this.problemType = "Chapter3_3_1"; |
|
1108 |
+ } else if (item.prblm_type_id === "prblm_type_006") { |
|
1109 |
+ console.log(item); |
|
1110 |
+ this.problemType = "Chapter3_4"; |
|
1111 |
+ } else if (item.prblm_type_id === "prblm_type_007") { |
|
1112 |
+ this.problemType = "Chapter3_5"; |
|
1113 |
+ } else if (item.prblm_type_id === "prblm_type_008") { |
|
1114 |
+ this.problemType = "Chapter3_6"; |
|
1115 |
+ } else if (item.prblm_type_id === "prblm_type_009") { |
|
1116 |
+ this.problemType = "Chapter3_7"; |
|
1117 |
+ } else if (item.prblm_type_id === "prblm_type_010") { |
|
1118 |
+ this.problemType = "Chapter3_8"; |
|
1119 |
+ } else if (item.prblm_type_id === "prblm_type_011") { |
|
1120 |
+ this.problemType = "Chapter3_9"; |
|
1121 |
+ } else if (item.prblm_type_id === "prblm_type_012") { |
|
1122 |
+ this.problemType = "Chapter3_10"; |
|
1123 |
+ } else if (item.prblm_type_id === "prblm_type_013") { |
|
1124 |
+ this.problemType = "Chapter3_11"; |
|
1125 |
+ } else if (item.prblm_type_id === "prblm_type_014") { |
|
1126 |
+ this.problemType = "Chapter3_12"; |
|
1127 |
+ } else if (item.prblm_type_id === "prblm_type_015") { |
|
1128 |
+ this.problemType = "Chapter3_13"; |
|
1129 |
+ } else if (item.prblm_type_id === "prblm_type_016") { |
|
1130 |
+ this.problemType = "Chapter3_14"; |
|
1131 |
+ } else if (item.prblm_type_id === "prblm_type_017") { |
|
1132 |
+ this.problemType = "Chapter3_15"; |
|
1133 |
+ } else if (item.prblm_type_id === "prblm_type_018") { |
|
1134 |
+ this.problemType = "Chapter2_8"; |
|
1135 |
+ } else if (item.prblm_type_id === "prblm_type_019") { |
|
1136 |
+ this.problemType = "Chapter2_7"; |
|
1137 |
+ } else if (item.prblm_type_id === "prblm_type_020") { |
|
1138 |
+ this.problemType = "Chapter2_5"; |
|
1139 |
+ } else if (item.prblm_type_id === "prblm_type_021") { |
|
1140 |
+ this.problemType = "Chapter2_6"; |
|
1141 |
+ } else if (item.prblm_type_id === "prblm_type_022") { |
|
1142 |
+ this.problemType = "Chapter2_10"; |
|
1143 |
+ } else if (item.prblm_type_id === "prblm_type_023") { |
|
1144 |
+ this.problemType = "Chapter2_11"; |
|
1145 |
+ } else if (item.prblm_type_id === "prblm_type_024") { |
|
1146 |
+ this.problemType = "Chapter2_13"; |
|
1147 |
+ } |
|
663 | 1148 |
}, |
664 | 1149 |
openCameraModal() { |
665 | 1150 |
this.closeModal(); |
... | ... | @@ -674,11 +1159,11 @@ |
674 | 1159 |
}) |
675 | 1160 |
.catch((error) => { |
676 | 1161 |
console.log("error>>>>>>>>", error); |
1162 |
+ alert("웹캠이 필요한 기능입니다!"); |
|
1163 |
+ this.closeModal(); // 모달창을 닫음 |
|
677 | 1164 |
}); |
678 | 1165 |
}, |
679 | 1166 |
closeModal() { |
680 |
- //웹캠 및 모든 팝업 닫기 |
|
681 |
- // this.showModal = false; |
|
682 | 1167 |
this.searchOpen = false; |
683 | 1168 |
this.searchOpen2 = false; |
684 | 1169 |
this.showCameraModal = false; |
... | ... | @@ -693,7 +1178,6 @@ |
693 | 1178 |
} |
694 | 1179 |
}, |
695 | 1180 |
|
696 |
- //은진 |
|
697 | 1181 |
onVideoLoaded() { |
698 | 1182 |
const video = this.$refs.modalVideoElement; |
699 | 1183 |
const canvas = this.$refs.canvas; |
... | ... | @@ -734,23 +1218,45 @@ |
734 | 1218 |
); |
735 | 1219 |
|
736 | 1220 |
// 사진 저장 함수 호출 |
737 |
- // this.savePhoto('PhotoEdit'); |
|
738 | 1221 |
const dataURL = canvas.toDataURL("image/png"); |
739 | 1222 |
this.$router.push({ |
740 | 1223 |
name: "PhotoEdit", |
741 |
- query: { image: encodeURIComponent(dataURL) }, |
|
1224 |
+ query: { |
|
1225 |
+ image: encodeURIComponent(dataURL), |
|
1226 |
+ unit_id: this.unit_id, |
|
1227 |
+ book_id: this.book_id, |
|
1228 |
+ }, |
|
742 | 1229 |
}); |
743 | 1230 |
}; |
744 | 1231 |
}, |
745 | 1232 |
|
746 |
- buttonSearch() { |
|
747 |
- this.searchOpen = true; |
|
748 |
- }, |
|
749 | 1233 |
buttonSearch2() { |
750 | 1234 |
this.searchOpen2 = true; |
751 | 1235 |
}, |
752 | 1236 |
closeBtn() { |
753 | 1237 |
this.searchOpen = false; |
1238 |
+ }, |
|
1239 |
+ |
|
1240 |
+ // 유저 아이디를 unit 아이디를 통해 가져오기 |
|
1241 |
+ searchStdId() { |
|
1242 |
+ const userInfo = this.$store.getters.getUserInfo; |
|
1243 |
+ axios({ |
|
1244 |
+ url: "/userclass/searchStdId.json", |
|
1245 |
+ method: "post", |
|
1246 |
+ headers: { |
|
1247 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
1248 |
+ }, |
|
1249 |
+ data: { |
|
1250 |
+ userId: userInfo.userId, |
|
1251 |
+ unitId: this.unit_id, |
|
1252 |
+ }, |
|
1253 |
+ }) |
|
1254 |
+ .then((response) => { |
|
1255 |
+ this.$store.commit("setStdId", response.data); |
|
1256 |
+ }) |
|
1257 |
+ .catch((err) => { |
|
1258 |
+ console.log("지문 에러 : ", err); |
|
1259 |
+ }); |
|
754 | 1260 |
}, |
755 | 1261 |
}, |
756 | 1262 |
components: { |
... | ... | @@ -758,19 +1264,47 @@ |
758 | 1264 |
}, |
759 | 1265 |
mounted() { |
760 | 1266 |
console.log("main mounted"); |
761 |
- |
|
762 |
- this.onVideoLoaded(); |
|
763 |
- this.fetchImage(); |
|
764 |
- |
|
765 |
- if (this.$route.query.reCapture == "true") { |
|
766 |
- this.openCameraModal(); |
|
767 |
- } |
|
1267 |
+ this.checkAndFetchData(); |
|
1268 |
+ // const { book_id, unit_id } = this.$route.query; |
|
768 | 1269 |
}, |
769 |
- computed() {}, |
|
1270 |
+ watch: { |
|
1271 |
+ getBookId(newBookId) { |
|
1272 |
+ this.checkAndFetchData(); |
|
1273 |
+ }, |
|
1274 |
+ getUnitId(newUnitId) { |
|
1275 |
+ this.checkAndFetchData(); |
|
1276 |
+ }, |
|
1277 |
+ }, |
|
1278 |
+ computed: { |
|
1279 |
+ ...mapGetters(["getBookId", "getUnitId"]), |
|
1280 |
+ |
|
1281 |
+ processedRoadmap() { |
|
1282 |
+ let problemCounter = 0; |
|
1283 |
+ |
|
1284 |
+ return this.roadmapData.map((item) => { |
|
1285 |
+ problemCounter++; |
|
1286 |
+ return { |
|
1287 |
+ label: `문제${problemCounter}`, |
|
1288 |
+ learning_id: item.prblm_id, |
|
1289 |
+ seqNum: item.seq, |
|
1290 |
+ prblm_type_id: item.prblm_type_id, |
|
1291 |
+ }; |
|
1292 |
+ |
|
1293 |
+ }); |
|
1294 |
+ }, |
|
1295 |
+ }, |
|
1296 |
+ beforeDestroy() { |
|
1297 |
+ // 컴포넌트가 파괴되기 전에 리스너 제거 |
|
1298 |
+ window.removeEventListener("resize", this.updateCanvasRect); |
|
1299 |
+ this.$refs.canvas.removeEventListener("click", this.handleCanvasClick); |
|
1300 |
+ }, |
|
770 | 1301 |
}; |
771 | 1302 |
</script> |
772 | 1303 |
|
773 |
-<style> |
|
1304 |
+<style scoped> |
|
1305 |
+.complete-wrap img { |
|
1306 |
+ width: auto; |
|
1307 |
+} |
|
774 | 1308 |
.body { |
775 | 1309 |
width: 1435px; |
776 | 1310 |
height: auto; |
... | ... | @@ -789,7 +1323,7 @@ |
789 | 1323 |
|
790 | 1324 |
video { |
791 | 1325 |
width: 100%; |
792 |
- height: 100%; |
|
1326 |
+ height: auto; |
|
793 | 1327 |
background-color: #666; |
794 | 1328 |
} |
795 | 1329 |
|
... | ... | @@ -801,16 +1335,6 @@ |
801 | 1335 |
background-color: #fff3d7; |
802 | 1336 |
cursor: not-allowed; |
803 | 1337 |
} |
804 |
- |
|
805 |
-/* button { |
|
806 |
- margin: auto; |
|
807 |
- padding: 5px 10px; |
|
808 |
- font-size: 13px; |
|
809 |
- cursor: pointer; |
|
810 |
- display: flex; |
|
811 |
- justify-content: center; |
|
812 |
- text-align: center; |
|
813 |
-} */ |
|
814 | 1338 |
|
815 | 1339 |
.sticker { |
816 | 1340 |
position: absolute; |
... | ... | @@ -858,6 +1382,28 @@ |
858 | 1382 |
|
859 | 1383 |
.rabbit-end { |
860 | 1384 |
cursor: pointer; |
1385 |
+ display: block; |
|
1386 |
+ position: absolute; |
|
1387 |
+ bottom: 0px; |
|
1388 |
+ left: -15px; |
|
1389 |
+ z-index: 10000; |
|
1390 |
+} |
|
1391 |
+ |
|
1392 |
+.rabbit-running { |
|
1393 |
+ position: absolute; |
|
1394 |
+ /* bottom: 40px; */ |
|
1395 |
+ /* right: 110px; */ |
|
1396 |
+ top: -118px; |
|
1397 |
+ z-index: 10000; |
|
1398 |
+ transform: scaleX(-1); |
|
1399 |
+ transition: all 0.5s ease-in-out; |
|
1400 |
+} |
|
1401 |
+ |
|
1402 |
+.fireworks-end { |
|
1403 |
+ position: absolute; |
|
1404 |
+ bottom: 70px; |
|
1405 |
+ left: -40px; |
|
1406 |
+ width: 20rem; |
|
861 | 1407 |
} |
862 | 1408 |
|
863 | 1409 |
.camera-rabbit { |
... | ... | @@ -865,38 +1411,6 @@ |
865 | 1411 |
right: 0; |
866 | 1412 |
bottom: 0; |
867 | 1413 |
width: 40%; |
868 |
-} |
|
869 |
- |
|
870 |
-.rabbit-start img { |
|
871 |
- transform: scaleX(-1); |
|
872 |
-} |
|
873 |
- |
|
874 |
-.image-container { |
|
875 |
- position: relative; |
|
876 |
- display: inline-block; |
|
877 |
-} |
|
878 |
- |
|
879 |
-.clear-img { |
|
880 |
- position: absolute; |
|
881 |
- top: -27px; |
|
882 |
- left: 0; |
|
883 |
- width: 100px; |
|
884 |
- height: 100px; |
|
885 |
- z-index: 1; |
|
886 |
-} |
|
887 |
- |
|
888 |
-.race-btn p.before-clear { |
|
889 |
- /* width: auto; */ |
|
890 |
- font-size: 20px; |
|
891 |
- line-height: 1.6; |
|
892 |
- color: #ffffff; |
|
893 |
- background-color: rgba(48, 48, 48, 0.562); |
|
894 |
- padding: 6px; |
|
895 |
- border-radius: 8px; |
|
896 |
- /* border: 1px solid rgba(255, 255, 255, 0.2); */ |
|
897 |
- margin-bottom: 20px; |
|
898 |
- /* box-shadow: none; */ |
|
899 |
- position: static; |
|
900 | 1414 |
} |
901 | 1415 |
|
902 | 1416 |
.race-btn p.clear { |
... | ... | @@ -915,12 +1429,43 @@ |
915 | 1429 |
gap: 0.5rem; |
916 | 1430 |
} |
917 | 1431 |
|
1432 |
+.race-btn p.before-clear { |
|
1433 |
+ /* width: auto; */ |
|
1434 |
+ font-size: 20px; |
|
1435 |
+ line-height: 1.6; |
|
1436 |
+ color: #ffffff; |
|
1437 |
+ background-color: rgba(119, 119, 119, 0.815); |
|
1438 |
+ padding: 6px; |
|
1439 |
+ border-radius: 8px; |
|
1440 |
+ /* border: 1px solid rgba(255, 255, 255, 0.2); */ |
|
1441 |
+ margin-bottom: 20px; |
|
1442 |
+ /* box-shadow: none; */ |
|
1443 |
+ position: static; |
|
1444 |
+} |
|
1445 |
+ |
|
918 | 1446 |
.race-box .lcon { |
919 | 1447 |
display: flex; |
920 | 1448 |
align-items: center; |
921 | 1449 |
} |
1450 |
+.lcon .race-btn .rabbit-running { |
|
1451 |
+ transform: scaleX(1); |
|
1452 |
+} |
|
922 | 1453 |
|
923 |
-.complete-wrap img { |
|
924 |
- width: auto; |
|
1454 |
+.rabbit-start img { |
|
1455 |
+ transform: scaleX(-1); |
|
1456 |
+} |
|
1457 |
+ |
|
1458 |
+.image-container { |
|
1459 |
+ position: relative; |
|
1460 |
+ display: inline-block; |
|
1461 |
+} |
|
1462 |
+ |
|
1463 |
+.clear-img { |
|
1464 |
+ position: absolute; |
|
1465 |
+ top: -27px; |
|
1466 |
+ left: 0; |
|
1467 |
+ width: 100px; |
|
1468 |
+ height: 100px; |
|
1469 |
+ z-index: 1; |
|
925 | 1470 |
} |
926 | 1471 |
</style> |
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
... | ... | @@ -1057,6 +1057,7 @@ |
1057 | 1057 |
console.log("레이블된 아이템: ", labeledItems); |
1058 | 1058 |
if (labeledItems.label.startsWith("문제")) { |
1059 | 1059 |
this.handleProblemDetail(this.$store.getters.currentLearningId); |
1060 |
+ console.log(">>>>>>>>>>", this.$store.getters.currentLearningId) |
|
1060 | 1061 |
this.goToPage(this.problemType); |
1061 | 1062 |
} else if (labeledItems.label.startsWith("단어장")) { |
1062 | 1063 |
this.handleWordBookContent(this.$store.getters.getLearningId); |
--- client/views/pages/main/MyPlan.vue
+++ client/views/pages/main/MyPlan.vue
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 |
<div style="justify-content: right; width: 100%; display: flex;" |
77 | 77 |
v-for="(ai_learning, index) in aiLearningList" :key="index"> |
78 | 78 |
<div style="margin-right: 2em;" |
79 |
- @click="goToPage2('AIDashboard', aiLearningList[index].unit_id)"> |
|
79 |
+ @click="goToPage2('AIDashboard', aiLearningList[index].unit_id); recommendLearning();"> |
|
80 | 80 |
<img src="../../../resources/img/new_img/plan/ai_course_1.png"> |
81 | 81 |
</div> |
82 | 82 |
<div style="margin-right: 2em;" |
... | ... | @@ -360,7 +360,7 @@ |
360 | 360 |
"Content-Type": "application/json; charset=UTF-8", |
361 | 361 |
}, |
362 | 362 |
data: { |
363 |
- std_id: this.stdId |
|
363 |
+ user_id: "USID_000000000000002" |
|
364 | 364 |
} |
365 | 365 |
}) |
366 | 366 |
.then(function (response) { |
... | ... | @@ -373,6 +373,25 @@ |
373 | 373 |
}); |
374 | 374 |
}, |
375 | 375 |
|
376 |
+ recommendLearning() { |
|
377 |
+ axios({ |
|
378 |
+ url: "http://165.229.169.32:35716/recommend_and_insert", |
|
379 |
+ method: "post", |
|
380 |
+ headers: { |
|
381 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
382 |
+ }, |
|
383 |
+ data: { |
|
384 |
+ "top_n": 11, |
|
385 |
+ "user_id": "USID_000000000000002" |
|
386 |
+ }, |
|
387 |
+ }) |
|
388 |
+ .then((response) => { |
|
389 |
+ console.log("recommendLearning list - response : ", response.data); |
|
390 |
+ }) |
|
391 |
+ .catch((err) => { |
|
392 |
+ console.log("추천 에러: ", err); |
|
393 |
+ }); |
|
394 |
+ }, |
|
376 | 395 |
}, |
377 | 396 |
watch: {}, |
378 | 397 |
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?