
--- client/views/pages/main/AIDashboard.vue
+++ client/views/pages/main/AIDashboard.vue
... | ... | @@ -1,9 +1,9 @@ |
1 | 1 |
<template> |
2 |
- <div class="main"> |
|
2 |
+ <p class="title1" v-show="isHidden">오늘 공부를 다했어요! 너무 고생했어요!</p> |
|
3 |
+ <div class="main" v-show="!isHidden"> |
|
3 | 4 |
<div class="race-wrap"> |
4 | 5 |
<div class="title-box"> |
5 | 6 |
<p class="title">AI 학습 보드</p> |
6 |
- <p class="subtitle">hi my name is dd!</p> |
|
7 | 7 |
</div> |
8 | 8 |
<div class="race-box"> |
9 | 9 |
<div class="rabbit-start"><img src="../../../resources/img/img09_s.png" alt=""></div> |
... | ... | @@ -95,14 +95,15 @@ |
95 | 95 |
|
96 | 96 |
<div class="race-btn"> |
97 | 97 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
98 |
- data-num="11"> |
|
98 |
+ data-num="11"> |
|
99 | 99 |
<img :src="item.imgSrc3"> |
100 | 100 |
<img :src="item.imgSrc4" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
101 | 101 |
</button> |
102 | 102 |
<p class="long">최종 평가</p> |
103 | 103 |
</div> |
104 | 104 |
</div> |
105 |
- <div class="rabbit-end" @click="ShowPopup"><img src="../../../resources/img/img138_72s.png" alt=""></div> |
|
105 |
+ <div class="rabbit-end" @click="ShowPopup"><img src="../../../resources/img/img138_72s.png" alt=""> |
|
106 |
+ </div> |
|
106 | 107 |
</div> |
107 | 108 |
|
108 | 109 |
<!-- 팝업 --> |
... | ... | @@ -185,7 +186,8 @@ |
185 | 186 |
<input type="range" id="brushSize" min="1" max="10" v-model="brushSize" |
186 | 187 |
@input="updateBrushSize" style="width: 100px; margin-left: 5px;" /> |
187 | 188 |
<button class="new-btn" style="font-size: 9px;" @click="setTool('draw')">펜</button> |
188 |
- <button class="new-btn" style="font-size: 9px;" @click="setTool('eraser')">지우개</button> |
|
189 |
+ <button class="new-btn" style="font-size: 9px;" |
|
190 |
+ @click="setTool('eraser')">지우개</button> |
|
189 | 191 |
<button class="new-btn" style="font-size: 9px;" @click="clearAll">전체 지우개</button> |
190 | 192 |
</div> |
191 | 193 |
</div> |
... | ... | @@ -258,13 +260,18 @@ |
258 | 260 |
</div> |
259 | 261 |
</article> |
260 | 262 |
</div> |
261 |
- <div class="complete-wrap myphoto"> |
|
262 |
- <button class="login-btn mt10" type="submit" style="width: 100%;" @click="goToPage('MyPlan')"><img src="../../../resources/img/btn07_s.png" alt="" style="width: 100%; height: 100px;"> <p>학습 종료하기</p></button> |
|
263 |
+ <div class="complete-wrap myphoto"> |
|
264 |
+ <button class="login-btn mt10" type="submit" style="width: 100%;" @click="finishSchedule"><img |
|
265 |
+ src="../../../resources/img/btn07_s.png" alt="" style="width: 100%; height: 100px;"> |
|
266 |
+ <p>학습 종료하기</p> |
|
267 |
+ </button> |
|
263 | 268 |
<h2 class="mb40 mt10">이 단원을 끝낸 친구들</h2> |
264 | 269 |
<article class=" flex-column" style="gap: 5px;"> |
265 | 270 |
<div class="flex" style="gap: 5px;"> |
266 |
- <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
267 |
- <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
271 |
+ <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""> |
|
272 |
+ </div> |
|
273 |
+ <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""> |
|
274 |
+ </div> |
|
268 | 275 |
</div> |
269 | 276 |
</article> |
270 | 277 |
<article class="popup-wrap" v-show="searchOpen"> |
... | ... | @@ -290,7 +297,7 @@ |
290 | 297 |
</div> |
291 | 298 |
</div> |
292 | 299 |
</article> |
293 |
- </div> |
|
300 |
+ </div> |
|
294 | 301 |
|
295 | 302 |
</div> |
296 | 303 |
</template> |
... | ... | @@ -353,11 +360,18 @@ |
353 | 360 |
canvasRect: { |
354 | 361 |
topLeft: { x: 0, y: 0 }, |
355 | 362 |
bottomRight: { x: 0, y: 0 } |
356 |
- } |
|
363 |
+ }, |
|
364 |
+ |
|
365 |
+ |
|
366 |
+ isHidden: false, |
|
357 | 367 |
|
358 | 368 |
} |
359 | 369 |
}, |
360 | 370 |
methods: { |
371 |
+ |
|
372 |
+ finishSchedule() { |
|
373 |
+ this.isHidden = true; |
|
374 |
+ }, |
|
361 | 375 |
toggleImage(index) { |
362 | 376 |
this.items[index].isSecondImageVisible = !this.items[index].isSecondImageVisible; |
363 | 377 |
}, |
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
... | ... | @@ -1,14 +1,14 @@ |
1 | 1 |
<template> |
2 |
- <div> |
|
3 |
- <div v-if="roadViewTF"> |
|
4 |
- <!-- 1번 템플릿 --> |
|
5 |
- <div class="main"> |
|
6 |
- <div class="race-wrap"> |
|
7 |
- <div class="title-box"> |
|
8 |
- <p class="title" style="margin-top: 67px;">hello world!</p> |
|
9 |
- <p class="subtitle">hi my name is dd!</p> |
|
10 |
- </div> |
|
11 |
- <!-- |
|
2 |
+ <p class="title1" v-if="state === 'finish'">오늘 공부를 다했어요! 너무 고생했어요!</p> |
|
3 |
+ <p class="title1" v-else-if="state === ''">지금은 학습 루트가 등록이 안됐어요! 학습 일정에서 학습루트를 등록해볼까요?</p> |
|
4 |
+ <!-- 1번 템플릿 --> |
|
5 |
+ <div v-else class="main"> |
|
6 |
+ <div class="race-wrap"> |
|
7 |
+ <div class="title-box"> |
|
8 |
+ <p class="title">{{ roadmapData[0].unit_nm }}</p> |
|
9 |
+ <p class="subtitle">{{ roadmapData[0].book_nm }}</p> |
|
10 |
+ </div> |
|
11 |
+ <!-- |
|
12 | 12 |
<div class="race-box"> |
13 | 13 |
<div class="rabbit-start"><img src="../../../resources/img/img09_s.png" alt=""></div> |
14 | 14 |
<div class="rcon flex justify-between mb5"> |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 |
</div> |
23 | 23 |
</div> |
24 | 24 |
--> |
25 |
- <div class="race-box"> |
|
25 |
+ <div class="race-box"> |
|
26 | 26 |
<div class="rabbit-start"><img src="../../../resources/img/img09_s.png" alt=""></div> |
27 | 27 |
<div class="rcon flex justify-end mb5"> |
28 | 28 |
<div class="race-btn" @click="goToPage('Chapter1')"> |
... | ... | @@ -112,7 +112,7 @@ |
112 | 112 |
|
113 | 113 |
<div class="race-btn"> |
114 | 114 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
115 |
- data-num="11"> |
|
115 |
+ data-num="11"> |
|
116 | 116 |
<img :src="item.imgSrc3"> |
117 | 117 |
<img :src="item.imgSrc4" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
118 | 118 |
</button> |
... | ... | @@ -120,7 +120,37 @@ |
120 | 120 |
</div> |
121 | 121 |
|
122 | 122 |
</div> |
123 |
+ |
|
124 |
+ <button class="login-btn mt50" type="submit" style="width: 100%;" @click="finishSchedule"><img |
|
125 |
+ src="../../../resources/img/btn07_s.png" alt="" style="width: 100%; height: 100px;"> |
|
126 |
+ <p>학습 종료하기</p> |
|
127 |
+ </button> |
|
128 |
+ <div class="complete-wrap smt50 myphoto"> |
|
129 |
+ <h2 class="mb40">이 단원을 끝낸 친구들</h2> |
|
130 |
+ <article class=" flex-column" style="gap: 5px;"> |
|
131 |
+ <div class="flex" style="gap: 5px;"> |
|
132 |
+ <div @click="buttonSearch2" class="photo"><img src="../../../resources/img/img143_75s.png" |
|
133 |
+ alt=""> |
|
134 |
+ </div> |
|
135 |
+ <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" |
|
136 |
+ alt=""> |
|
137 |
+ </div> |
|
138 |
+ </div> |
|
139 |
+ </article> |
|
140 |
+ <!-- 팝업 --> |
|
141 |
+ <article class="popup-wrap" v-show="searchOpen"> |
|
142 |
+ <div class="popup-box "> |
|
143 |
+ <div class="flex mb10 justify-between"> |
|
144 |
+ <p class="popup-title">알림</p> |
|
145 |
+ <button type="button" class="popup-close-btn" @click="closeBtn2"> |
|
146 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
147 |
+ </button> |
|
148 |
+ </div> |
|
149 |
+ </div> |
|
150 |
+ </article> |
|
151 |
+ </div> |
|
123 | 152 |
</div> |
153 |
+ |
|
124 | 154 |
<!-- 팝업 --> |
125 | 155 |
<div v-show="searchOpen2" class="popup-wrap"> |
126 | 156 |
<div class="popup-box"> |
... | ... | @@ -129,162 +159,144 @@ |
129 | 159 |
<svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
130 | 160 |
</button> |
131 | 161 |
|
132 |
- <div class="mb30 text-ct"> |
|
133 |
- <p class="title1 mb20">1단원이 끝났습니다!</p> |
|
134 |
- <p class="title1"><em class="yellow">기념사진</em>을 촬영하러 가요</p> |
|
135 |
- </div> |
|
136 |
- <div class="flex justify-center"> |
|
137 |
- <button type="button" title="사진촬영" class="new-btn" @click="openCameraModal"> |
|
138 |
- 사진 촬영 |
|
139 |
- </button> |
|
140 |
- </div> |
|
162 |
+ <div class="mb30 text-ct"> |
|
163 |
+ <p class="title1 mb20">1단원이 끝났습니다!</p> |
|
164 |
+ <p class="title1"><em class="yellow">기념사진</em>을 촬영하러 가요</p> |
|
165 |
+ </div> |
|
166 |
+ <div class="flex justify-center"> |
|
167 |
+ <button type="button" title="사진촬영" class="new-btn" @click="openCameraModal"> |
|
168 |
+ 사진 촬영 |
|
169 |
+ </button> |
|
141 | 170 |
</div> |
142 | 171 |
</div> |
172 |
+ </div> |
|
143 | 173 |
|
144 |
- <!-- 카메라 모달 --> |
|
145 |
- <article v-show="showCameraModal" class="popup-wrap"> |
|
146 |
- <div class="popup-box" style="top: 500px; left:500px"> |
|
147 |
- <div class="flex mb10 justify-between"> |
|
148 |
- <p class="popup-title">사진 촬영</p> |
|
149 |
- <button type="button" class="popup-close-btn" @click="closeModal"> |
|
150 |
- <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
151 |
- </button> |
|
152 |
- </div> |
|
153 |
- <div class="box"> |
|
154 |
- <div style="width: 100%;"> |
|
155 |
- <div id="container" ref="container"> |
|
156 |
- <video v-if="!photoTaken" autoplay="true" ref="modalVideoElement" class="mirrored" |
|
157 |
- @canplay="onVideoLoaded"></video> |
|
158 |
- </div> |
|
174 |
+ <!-- 카메라 모달 --> |
|
175 |
+ <article v-show="showCameraModal" class="popup-wrap"> |
|
176 |
+ <div class="popup-box" style="top: 500px; left:500px"> |
|
177 |
+ <div class="flex mb10 justify-between"> |
|
178 |
+ <p class="popup-title">사진 촬영</p> |
|
179 |
+ <button type="button" class="popup-close-btn" @click="closeModal"> |
|
180 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
181 |
+ </button> |
|
182 |
+ </div> |
|
183 |
+ <div class="box"> |
|
184 |
+ <div style="width: 100%;"> |
|
185 |
+ <div id="container" ref="container"> |
|
186 |
+ <video v-if="!photoTaken" autoplay="true" ref="modalVideoElement" class="mirrored" |
|
187 |
+ @canplay="onVideoLoaded"></video> |
|
159 | 188 |
</div> |
160 |
- </div> |
|
161 |
- <div class="flex justify-center mt20"> |
|
162 |
- <button type="button" class="new-btn" v-if="!photoTaken" @click="capturePhoto" |
|
163 |
- :disabled="!videoReady"> |
|
164 |
- 사진 촬영 |
|
165 |
- </button> |
|
166 | 189 |
</div> |
167 | 190 |
</div> |
168 |
- </article> |
|
191 |
+ <div class="flex justify-center mt20"> |
|
192 |
+ <button type="button" class="new-btn" v-if="!photoTaken" @click="capturePhoto" |
|
193 |
+ :disabled="!videoReady"> |
|
194 |
+ 사진 촬영 |
|
195 |
+ </button> |
|
196 |
+ </div> |
|
197 |
+ </div> |
|
198 |
+ </article> |
|
169 | 199 |
|
170 |
- <!-- 사진 모달 --> |
|
171 |
- <article v-show="showPhotoModal" class="popup-wrap"> |
|
172 |
- <div class="popup-box" style="top: 500px; left: auto"> |
|
173 |
- <div class="flex mb10 justify-between"> |
|
174 |
- <p class="popup-title">사진 꾸미기</p> |
|
175 |
- <button type="button" class="popup-close-btn" @click="closePhotoModal"> |
|
176 |
- <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
177 |
- </button> |
|
178 |
- </div> |
|
179 |
- <div class="flex justify-between align-center" style="gap: 40px;"> |
|
180 |
- <div class="content" style="padding: 30px; min-width: 401px; min-height: 710px;"> |
|
181 |
- <div class="tool"> |
|
182 |
- <div class="flex justify-center mb20" style="gap: 20px;"> |
|
183 |
- <button class="popTxt" style="width: 101px;" v-for="(item, index) in items_photo" |
|
184 |
- :key="index" @click="updateContent(index)" |
|
185 |
- :class="{ active: selectedIndex === index }"> |
|
186 |
- <img :src="item.imgSrc1" style="display: block;"> |
|
187 |
- <img :src="item.imgSrc2" v-if="selectedIndex === index" style="display: block;"> |
|
188 |
- </button> |
|
189 |
- </div> |
|
190 |
- </div> |
|
191 |
- |
|
192 |
- <div class="stickers" v-show="!stickersVisible"> |
|
193 |
- <div class="toolbar"> |
|
194 |
- <label for="brushSize" style="font-size: 9px;">펜 굵기</label> |
|
195 |
- <input type="color" v-model="color" /> |
|
196 |
- <input type="range" id="brushSize" min="1" max="10" v-model="brushSize" |
|
197 |
- @input="updateBrushSize" style="width: 100px; margin-left: 5px;" /> |
|
198 |
- <button class="new-btn" style="font-size: 9px;" @click="setTool('draw')">펜</button> |
|
199 |
- <button class="new-btn" style="font-size: 9px;" @click="setTool('eraser')">지우개</button> |
|
200 |
- <button class="new-btn" style="font-size: 9px;" @click="clearAll">전체 지우개</button> |
|
201 |
- </div> |
|
202 |
- </div> |
|
203 |
- |
|
204 |
- <div class="stickers" v-show="stickersVisible"> |
|
205 |
- <button><img src="../../../resources/img/img146_75s.png" alt=""></button> |
|
206 |
- <button><img src="../../../resources/img/img147_75s.png" alt=""></button> |
|
207 |
- <button><img src="../../../resources/img/img148_75s.png" alt=""></button> |
|
208 |
- <button><img src="../../../resources/img/img149_75s.png" alt=""></button> |
|
209 |
- <button><img src="../../../resources/img/img150_75s.png" alt=""></button> |
|
210 |
- <button><img src="../../../resources/img/img151_75s.png" alt=""></button> |
|
211 |
- <button><img src="../../../resources/img/img152_75s.png" alt=""></button> |
|
212 |
- <button><img src="../../../resources/img/img153_75s.png" alt=""></button> |
|
213 |
- <button><img src="../../../resources/img/img154_75s.png" alt=""></button> |
|
214 |
- <button><img src="../../../resources/img/img155_75s.png" alt=""></button> |
|
215 |
- <button><img src="../../../resources/img/img156_75s.png" alt=""></button> |
|
216 |
- <button><img src="../../../resources/img/img157_75s.png" alt=""></button> |
|
217 |
- <button><img src="../../../resources/img/img158_75s.png" alt=""></button> |
|
200 |
+ <!-- 사진 모달 --> |
|
201 |
+ <article v-show="showPhotoModal" class="popup-wrap"> |
|
202 |
+ <div class="popup-box" style="top: 500px; left: auto"> |
|
203 |
+ <div class="flex mb10 justify-between"> |
|
204 |
+ <p class="popup-title">사진 꾸미기</p> |
|
205 |
+ <button type="button" class="popup-close-btn" @click="closePhotoModal"> |
|
206 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
207 |
+ </button> |
|
208 |
+ </div> |
|
209 |
+ <div class="flex justify-between align-center" style="gap: 40px;"> |
|
210 |
+ <div class="content" style="padding: 30px; min-width: 401px; min-height: 710px;"> |
|
211 |
+ <div class="tool"> |
|
212 |
+ <div class="flex justify-center mb20" style="gap: 20px;"> |
|
213 |
+ <button class="popTxt" style="width: 101px;" v-for="(item, index) in items_photo" |
|
214 |
+ :key="index" @click="updateContent(index)" |
|
215 |
+ :class="{ active: selectedIndex === index }"> |
|
216 |
+ <img :src="item.imgSrc1" style="display: block;"> |
|
217 |
+ <img :src="item.imgSrc2" v-if="selectedIndex === index" style="display: block;"> |
|
218 |
+ </button> |
|
218 | 219 |
</div> |
219 | 220 |
</div> |
220 |
- <div> |
|
221 |
- <div class="content" style="height: 549px; |
|
221 |
+ |
|
222 |
+ <div class="stickers" v-show="!stickersVisible"> |
|
223 |
+ <div class="toolbar"> |
|
224 |
+ <label for="brushSize" style="font-size: 9px;">펜 굵기</label> |
|
225 |
+ <input type="color" v-model="color" /> |
|
226 |
+ <input type="range" id="brushSize" min="1" max="10" v-model="brushSize" |
|
227 |
+ @input="updateBrushSize" style="width: 100px; margin-left: 5px;" /> |
|
228 |
+ <button class="new-btn" style="font-size: 9px;" @click="setTool('draw')">펜</button> |
|
229 |
+ <button class="new-btn" style="font-size: 9px;" |
|
230 |
+ @click="setTool('eraser')">지우개</button> |
|
231 |
+ <button class="new-btn" style="font-size: 9px;" @click="clearAll">전체 |
|
232 |
+ 지우개</button> |
|
233 |
+ </div> |
|
234 |
+ </div> |
|
235 |
+ |
|
236 |
+ <div class="stickers" v-show="stickersVisible"> |
|
237 |
+ <button><img src="../../../resources/img/img146_75s.png" alt=""></button> |
|
238 |
+ <button><img src="../../../resources/img/img147_75s.png" alt=""></button> |
|
239 |
+ <button><img src="../../../resources/img/img148_75s.png" alt=""></button> |
|
240 |
+ <button><img src="../../../resources/img/img149_75s.png" alt=""></button> |
|
241 |
+ <button><img src="../../../resources/img/img150_75s.png" alt=""></button> |
|
242 |
+ <button><img src="../../../resources/img/img151_75s.png" alt=""></button> |
|
243 |
+ <button><img src="../../../resources/img/img152_75s.png" alt=""></button> |
|
244 |
+ <button><img src="../../../resources/img/img153_75s.png" alt=""></button> |
|
245 |
+ <button><img src="../../../resources/img/img154_75s.png" alt=""></button> |
|
246 |
+ <button><img src="../../../resources/img/img155_75s.png" alt=""></button> |
|
247 |
+ <button><img src="../../../resources/img/img156_75s.png" alt=""></button> |
|
248 |
+ <button><img src="../../../resources/img/img157_75s.png" alt=""></button> |
|
249 |
+ <button><img src="../../../resources/img/img158_75s.png" alt=""></button> |
|
250 |
+ </div> |
|
251 |
+ </div> |
|
252 |
+ <div> |
|
253 |
+ <div class="content" style="height: 549px; |
|
222 | 254 |
position: relative; |
223 | 255 |
width: 973px; |
224 | 256 |
display: flex; |
225 | 257 |
justify-content: center; |
226 | 258 |
align-items: center;"> |
227 |
- <canvas ref="canvas" style="position: absolute;"></canvas> |
|
228 |
- </div> |
|
229 |
- <div class="btn-wrap flex justify-center mt40" style="gap: 40px;"> |
|
230 |
- <button class="login-btn" @click="openCameraModal"> |
|
231 |
- <img src="../../../resources/img/btn07_s.png" alt=""> |
|
232 |
- <p>재촬영</p> |
|
233 |
- </button> |
|
234 |
- |
|
235 |
- <button class="login-btn" type="submit" @click="goToPage('PhotoEdit')"> |
|
236 |
- <img src="../../../resources/img/btn07_s.png" alt=""> |
|
237 |
- <p>완성</p> |
|
238 |
- </button> |
|
239 |
- </div> |
|
259 |
+ <canvas ref="canvas" style="position: absolute;"></canvas> |
|
240 | 260 |
</div> |
241 |
- <div class="content" style="padding: 30px; min-width: 401px; min-height: 710px;"> |
|
242 |
- <div class="mb20"> |
|
243 |
- <p class="popup-title" style="font-size: 32px">랜덤 단어</p> |
|
244 |
- </div> |
|
245 |
- <div class="flex-column" style="gap: 10px;"> |
|
246 |
- <button class="login-btn"><img src="../../../resources/img/img141_75s.png" alt=""> |
|
247 |
- <p class="title">a</p> |
|
248 |
- </button> |
|
249 |
- <button class="login-btn"><img src="../../../resources/img/img152_75s_01.png" alt=""> |
|
250 |
- <p class="title">a</p> |
|
251 |
- </button> |
|
252 |
- <button class="login-btn"><img src="../../../resources/img/img144_75s.png" alt=""> |
|
253 |
- <p class="title" style="color: #fff;">a</p> |
|
254 |
- </button> |
|
255 |
- <button class="login-btn"><img src="../../../resources/img/img145_75s.png" alt=""> |
|
256 |
- <p class="title mt20" style="color: #fff;">a</p> |
|
257 |
- </button> |
|
258 |
- </div> |
|
261 |
+ <div class="btn-wrap flex justify-center mt40" style="gap: 40px;"> |
|
262 |
+ <button class="login-btn" @click="openCameraModal"> |
|
263 |
+ <img src="../../../resources/img/btn07_s.png" alt=""> |
|
264 |
+ <p>재촬영</p> |
|
265 |
+ </button> |
|
266 |
+ |
|
267 |
+ <button class="login-btn" type="submit" @click="goToPage('PhotoEdit')"> |
|
268 |
+ <img src="../../../resources/img/btn07_s.png" alt=""> |
|
269 |
+ <p>완성</p> |
|
270 |
+ </button> |
|
271 |
+ </div> |
|
272 |
+ </div> |
|
273 |
+ <div class="content" style="padding: 30px; min-width: 401px; min-height: 710px;"> |
|
274 |
+ <div class="mb20"> |
|
275 |
+ <p class="popup-title" style="font-size: 32px">랜덤 단어</p> |
|
276 |
+ </div> |
|
277 |
+ <div class="flex-column" style="gap: 10px;"> |
|
278 |
+ <button class="login-btn"><img src="../../../resources/img/img141_75s.png" alt=""> |
|
279 |
+ <p class="title">a</p> |
|
280 |
+ </button> |
|
281 |
+ <button class="login-btn"><img src="../../../resources/img/img152_75s_01.png" alt=""> |
|
282 |
+ <p class="title">a</p> |
|
283 |
+ </button> |
|
284 |
+ <button class="login-btn"><img src="../../../resources/img/img144_75s.png" alt=""> |
|
285 |
+ <p class="title" style="color: #fff;">a</p> |
|
286 |
+ </button> |
|
287 |
+ <button class="login-btn"><img src="../../../resources/img/img145_75s.png" alt=""> |
|
288 |
+ <p class="title mt20" style="color: #fff;">a</p> |
|
289 |
+ </button> |
|
259 | 290 |
</div> |
260 | 291 |
</div> |
261 | 292 |
</div> |
262 |
- </article> |
|
263 |
- </div> |
|
264 |
- </div> |
|
293 |
+ </div> |
|
294 |
+ </article> |
|
265 | 295 |
|
266 | 296 |
</div> |
267 |
- <div class="complete-wrap mt90 myphoto"> |
|
268 |
- <h2 class="mb40">이 단원을 끝낸 친구들</h2> |
|
269 |
- <article class=" flex-column" style="gap: 5px;"> |
|
270 |
- <div class="flex" style="gap: 5px;"> |
|
271 |
- <div @click="buttonSearch2" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
272 |
- <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
273 |
- </div> |
|
274 |
- </article> |
|
275 |
- <!-- 팝업 --> |
|
276 |
- <article class="popup-wrap" v-show="searchOpen"> |
|
277 |
- <div class="popup-box "> |
|
278 |
- <div class="flex mb10 justify-between"> |
|
279 |
- <p class="popup-title">알림</p> |
|
280 |
- <button type="button" class="popup-close-btn" @click="closeBtn2"> |
|
281 |
- <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
282 |
- </button> |
|
283 |
- </div> |
|
284 |
- </div> |
|
285 |
- </article> |
|
286 |
- </div> |
|
297 |
+ |
|
287 | 298 |
</div> |
299 |
+ |
|
288 | 300 |
</template> |
289 | 301 |
|
290 | 302 |
<script> |
... | ... | @@ -350,11 +362,65 @@ |
350 | 362 |
}, |
351 | 363 |
|
352 | 364 |
|
353 |
- roadViewTF : false, |
|
365 |
+ roadViewTF: false, |
|
354 | 366 |
roadmapData: [], |
367 |
+ |
|
368 |
+ schedules: [], |
|
369 |
+ nowSchedule: "", |
|
370 |
+ state: '' |
|
355 | 371 |
} |
356 | 372 |
}, |
357 | 373 |
methods: { |
374 |
+ //은진 |
|
375 |
+ fetchSchedule() { |
|
376 |
+ axios({ |
|
377 |
+ url: "/schedule/selectSchedule.json", |
|
378 |
+ method: "post", |
|
379 |
+ headers: { |
|
380 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
381 |
+ }, |
|
382 |
+ data: { |
|
383 |
+ stdId: "2", |
|
384 |
+ } |
|
385 |
+ }).then(response => { |
|
386 |
+ this.schedules = response.data; |
|
387 |
+ |
|
388 |
+ if (this.schedules.length == 0) { |
|
389 |
+ this.state = '' |
|
390 |
+ } else { |
|
391 |
+ this.nowSchedule = this.schedules.find(schedule => schedule.finish === null || schedule.finish === ""); |
|
392 |
+ if (this.nowSchedule) { |
|
393 |
+ this.fetchRoadmapData(); // 진행 중인 스케줄이 있을 때 데이터를 가져오는 함수 호출 |
|
394 |
+ this.state = 'studying' |
|
395 |
+ } else { |
|
396 |
+ this.state = 'finish' |
|
397 |
+ } |
|
398 |
+ } |
|
399 |
+ }) |
|
400 |
+ .catch(error => { |
|
401 |
+ console.error("Error fetching roadmap data:", error); |
|
402 |
+ }); |
|
403 |
+ }, |
|
404 |
+ finishSchedule() { |
|
405 |
+ axios({ |
|
406 |
+ url: "/schedule/scheduleUpdate.json", |
|
407 |
+ method: "post", |
|
408 |
+ headers: { |
|
409 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
410 |
+ }, |
|
411 |
+ data: { |
|
412 |
+ scheduleId: this.nowSchedule.schdl_id, |
|
413 |
+ finish: "T" |
|
414 |
+ } |
|
415 |
+ }) |
|
416 |
+ .then(response => { |
|
417 |
+ window.location.reload(); |
|
418 |
+ }) |
|
419 |
+ .catch(error => { |
|
420 |
+ console.error("Error fetching roadmap data:", error); |
|
421 |
+ }); |
|
422 |
+ }, |
|
423 |
+ |
|
358 | 424 |
fetchRoadmapData() { |
359 | 425 |
const vm = this; |
360 | 426 |
axios({ |
... | ... | @@ -364,25 +430,25 @@ |
364 | 430 |
"Content-Type": "application/json; charset=UTF-8", |
365 | 431 |
}, |
366 | 432 |
data: { |
367 |
- unit_id: "UNIT_000000000000001", |
|
368 |
- book_id: "BOOK_000000000000004" |
|
433 |
+ unit_id: this.schedules[0].unit_id, |
|
434 |
+ book_id: this.schedules[0].book_id |
|
369 | 435 |
} |
370 | 436 |
}) |
371 |
- .then(response => { |
|
372 |
- console.log("roadmap - response : ", response.data); |
|
373 |
- vm.roadmapData = response.data; |
|
374 |
- vm.roadViewTF = vm.roadmapData.length > 0; |
|
375 |
- }) |
|
376 |
- .catch(error => { |
|
377 |
- console.error("Error fetching roadmap data:", error); |
|
378 |
- }); |
|
437 |
+ .then(response => { |
|
438 |
+ this.roadmapData = response.data; |
|
439 |
+ console.log(this.roadmapData) |
|
440 |
+ this.roadViewTF = vm.roadmapData.length > 0; |
|
441 |
+ }) |
|
442 |
+ .catch(error => { |
|
443 |
+ console.error("Error fetching roadmap data:", error); |
|
444 |
+ }); |
|
379 | 445 |
}, |
380 | 446 |
getNonNullColumn(item) { |
381 | 447 |
if (item.prblm_id !== null) return '문제'; |
382 | 448 |
if (item.wd_book_id !== null) return '단어장'; |
383 | 449 |
if (item.text_id !== null) return '지문'; |
384 | 450 |
if (item.eval_id !== null) return '평가'; |
385 |
- return ''; |
|
451 |
+ return ''; |
|
386 | 452 |
}, |
387 | 453 |
toggleImage(index) { |
388 | 454 |
this.items[index].isSecondImageVisible = !this.items[index].isSecondImageVisible; |
... | ... | @@ -769,7 +835,7 @@ |
769 | 835 |
if (item.wd_book_id !== null) return '단어장'; |
770 | 836 |
if (item.text_id !== null) return '지문'; |
771 | 837 |
if (item.eval_id !== null) return '평가'; |
772 |
- return ''; |
|
838 |
+ return ''; |
|
773 | 839 |
}, |
774 | 840 |
showConfirm(type) { |
775 | 841 |
let message = ''; |
... | ... | @@ -791,7 +857,7 @@ |
791 | 857 |
}, |
792 | 858 |
mounted() { |
793 | 859 |
console.log('main mounted'); |
794 |
- this.fetchRoadmapData(); |
|
860 |
+ this.fetchSchedule(); |
|
795 | 861 |
}, |
796 | 862 |
computed() { |
797 | 863 |
|
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?