--- client/views/Join.vue
+++ client/views/Join.vue
... | ... | @@ -31,20 +31,41 @@ |
31 | 31 |
<p class="title" for="username">아이디</p> |
32 | 32 |
<input type="text" id="username" v-model="userId" placeholder="아이디를 입력하세요."> |
33 | 33 |
</div> |
34 |
- <p class="title2 flex align-center mb20 help" for="username"><img src="../resources/img/img193_78p.png" |
|
35 |
- alt=""><em class="green ml10">사용 가능한 아이디입니다.</em></p> |
|
34 |
+ <p class="title2 flex align-center mb20 help" for="username" v-if="!isUserIdValid"> |
|
35 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
36 |
+ <em class="gray ml10">영문, 숫자를 조합하여 주세요 (6자리 이상)</em> |
|
37 |
+ </p> |
|
38 |
+ <p class="title2 flex align-center mb20 help" for="username" v-else> |
|
39 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
40 |
+ <em class="green ml10">사용 가능한 아이디입니다.</em> |
|
41 |
+ </p> |
|
42 |
+ |
|
36 | 43 |
<div class="flex justify-between align-center mb10"> |
37 | 44 |
<p class="title" for="password">비밀번호</p> |
38 | 45 |
<input type="password" id="password" v-model="password" placeholder="비밀번호를 입력하세요."> |
39 | 46 |
</div> |
40 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
41 |
- alt=""><em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em></p> |
|
47 |
+ <p class="title2 mb20 flex align-center help" for="password" v-if="!isPasswordValid"> |
|
48 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
49 |
+ <em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em> |
|
50 |
+ </p> |
|
51 |
+ <p class="title2 mb20 flex align-center help" for="password" v-else> |
|
52 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
53 |
+ <em class="green ml10">비밀번호가 유효합니다.</em> |
|
54 |
+ </p> |
|
55 |
+ |
|
42 | 56 |
<div class="flex justify-between align-center mb10"> |
43 |
- <p class="title" for="password">비밀번호 확인</p> |
|
44 |
- <input type="password" id="password" v-model="passwordCheck" placeholder="비밀번호를 입력하세요."> |
|
57 |
+ <p class="title" for="passwordCheck">비밀번호 확인</p> |
|
58 |
+ <input type="password" id="passwordCheck" v-model="passwordCheck" placeholder="비밀번호를 입력하세요."> |
|
45 | 59 |
</div> |
46 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
47 |
- alt=""><em class="green ml10">비밀번호가 일치 합니다.</em></p> |
|
60 |
+ <p class="title2 mb20 flex align-center help" for="passwordCheck" |
|
61 |
+ v-if="!isPasswordMatched || !isPasswordValid"> |
|
62 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
63 |
+ <em class="gray ml10">비밀번호가 일치하지 않습니다.</em> |
|
64 |
+ </p> |
|
65 |
+ <p class="title2 mb20 flex align-center help" for="passwordCheck" v-else> |
|
66 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
67 |
+ <em class="green ml10">비밀번호가 일치합니다.</em> |
|
68 |
+ </p> |
|
48 | 69 |
<div class="mb30 flex justify-between align-center"> |
49 | 70 |
<p class="title" for="username">이름</p> |
50 | 71 |
<input type="text" id="username" v-model="username" placeholder="이름을 입력하세요."> |
... | ... | @@ -59,17 +80,21 @@ |
59 | 80 |
</div> |
60 | 81 |
<div class="mb30 flex justify-between align-center"> |
61 | 82 |
<p class="title" for="username">학교</p> |
62 |
- <div class="search-wrap flex justify-end mb20" style="width: 100%;"> |
|
63 |
- <select name="" id="" class="mr10 data-wrap"> |
|
64 |
- <option value="">학년</option> |
|
65 |
- </select> |
|
66 |
- <select name="" id="" class="mr10 data-wrap"> |
|
67 |
- <option value="">반</option> |
|
68 |
- </select> |
|
69 |
- <select name="" id="" class="data-wrap"> |
|
70 |
- <option value="">번호</option> |
|
71 |
- </select> |
|
72 |
- |
|
83 |
+ <div class="search-wrap" style="width: 100%;"> |
|
84 |
+ <input type="text" placeholder="검색하세요." disabled v-model="userIns"> |
|
85 |
+ <button @click="buttonSearch" type="button" title="위원회 검색"> |
|
86 |
+ <img src="../resources/img/look_t.png" alt=""> |
|
87 |
+ </button> |
|
88 |
+ </div> |
|
89 |
+ </div> |
|
90 |
+ <div class="mb30 flex justify-between align-center"> |
|
91 |
+ <div class="flex justify-between align-center" style="width: 100%;"> |
|
92 |
+ <p class="title" for="username"></p> |
|
93 |
+ <input style="width: 12rem;" type="text" id="username" v-model="userGrade" placeholder="학년"> |
|
94 |
+ <p class="title2">-</p><input style="width: 14rem;" type="text" id="username" v-model="userClass" |
|
95 |
+ placeholder="반"> |
|
96 |
+ <p class="title2">-</p><input style="width: 14rem;" type="text" id="username" v-model="userNumber" |
|
97 |
+ placeholder="번호"> |
|
73 | 98 |
</div> |
74 | 99 |
</div> |
75 | 100 |
<div class="flex justify-end align-center mb10"> |
... | ... | @@ -87,20 +112,41 @@ |
87 | 112 |
<p class="title" for="username">아이디</p> |
88 | 113 |
<input type="text" id="username" v-model="userId" placeholder="아이디를 입력하세요."> |
89 | 114 |
</div> |
90 |
- <p class="title2 flex align-center mb20 help" for="username"><img src="../resources/img/img193_78p.png" |
|
91 |
- alt=""><em class="green ml10">사용 가능한 아이디입니다.</em></p> |
|
115 |
+ <p class="title2 flex align-center mb20 help" for="username" v-if="!isUserIdValid"> |
|
116 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
117 |
+ <em class="gray ml10">영문, 숫자를 조합하여 주세요 (6자리 이상)</em> |
|
118 |
+ </p> |
|
119 |
+ <p class="title2 flex align-center mb20 help" for="username" v-else> |
|
120 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
121 |
+ <em class="green ml10">사용 가능한 아이디입니다.</em> |
|
122 |
+ </p> |
|
123 |
+ |
|
92 | 124 |
<div class="flex justify-between align-center mb10"> |
93 | 125 |
<p class="title" for="password">비밀번호</p> |
94 | 126 |
<input type="password" id="password" v-model="password" placeholder="비밀번호를 입력하세요."> |
95 | 127 |
</div> |
96 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
97 |
- alt=""><em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em></p> |
|
128 |
+ <p class="title2 mb20 flex align-center help" for="password" v-if="!isPasswordValid"> |
|
129 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
130 |
+ <em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em> |
|
131 |
+ </p> |
|
132 |
+ <p class="title2 mb20 flex align-center help" for="password" v-else> |
|
133 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
134 |
+ <em class="green ml10">비밀번호가 유효합니다.</em> |
|
135 |
+ </p> |
|
136 |
+ |
|
98 | 137 |
<div class="flex justify-between align-center mb10"> |
99 |
- <p class="title" for="password">비밀번호 확인</p> |
|
100 |
- <input type="password" id="password" v-model="passwordCheck" placeholder="비밀번호를 입력하세요."> |
|
138 |
+ <p class="title" for="passwordCheck">비밀번호 확인</p> |
|
139 |
+ <input type="password" id="passwordCheck" v-model="passwordCheck" placeholder="비밀번호를 입력하세요."> |
|
101 | 140 |
</div> |
102 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
103 |
- alt=""><em class="green ml10">비밀번호가 일치 합니다.</em></p> |
|
141 |
+ <p class="title2 mb20 flex align-center help" for="passwordCheck" |
|
142 |
+ v-if="!isPasswordMatched || !isPasswordValid"> |
|
143 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
144 |
+ <em class="gray ml10">비밀번호가 일치하지 않습니다.</em> |
|
145 |
+ </p> |
|
146 |
+ <p class="title2 mb20 flex align-center help" for="passwordCheck" v-else> |
|
147 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
148 |
+ <em class="green ml10">비밀번호가 일치합니다.</em> |
|
149 |
+ </p> |
|
104 | 150 |
<div class="mb30 flex justify-between align-center"> |
105 | 151 |
<p class="title" for="username">이름</p> |
106 | 152 |
<input type="text" id="username" v-model="username" placeholder="이름을 입력하세요."> |
... | ... | @@ -116,32 +162,33 @@ |
116 | 162 |
<div class="flex justify-between mb20"> |
117 | 163 |
<p class="title " for="username"><em class="yellow">학생 정보</em></p> |
118 | 164 |
<div class="flex justify-end align-center mb10"> |
119 |
- <img src="../resources/img/img192_78p.png" alt=""> |
|
165 |
+ <img src="../resources/img/img192_78p.png" alt="" @click="openModal"> |
|
120 | 166 |
<p class="title2 ml10" for="password">자녀 추가하기</p> |
121 | 167 |
</div> |
168 |
+ </div> |
|
169 |
+ <div v-if="students.length > 0" class="flex justify-between mb20"> |
|
170 |
+ <table class="table-wrap"> |
|
171 |
+ <thead style="text-align: center; "> |
|
172 |
+ <tr> |
|
173 |
+ <th>자녀 이름</th> |
|
174 |
+ <th>자녀 아이디</th> |
|
175 |
+ </tr> |
|
176 |
+ </thead> |
|
177 |
+ <tbody> |
|
178 |
+ <tr v-for="(student, index) in students"> |
|
179 |
+ <td>{{ student.userNm }}</td> |
|
180 |
+ <td>{{ student.loginId }}</td> |
|
181 |
+ </tr> |
|
182 |
+ </tbody> |
|
183 |
+ </table> |
|
122 | 184 |
</div> |
123 | 185 |
<div class="mb30 flex justify-between align-center"> |
124 | 186 |
<p class="title" for="username">학교</p> |
125 | 187 |
<div class="search-wrap" style="width: 100%;"> |
126 |
- <input type="text" placeholder="검색하세요."> |
|
188 |
+ <input type="text" placeholder="검색하세요." disabled v-model="userIns"> |
|
127 | 189 |
<button @click="buttonSearch" type="button" title="위원회 검색"> |
128 | 190 |
<img src="../resources/img/look_t.png" alt=""> |
129 | 191 |
</button> |
130 |
- </div> |
|
131 |
- </div> |
|
132 |
- <div class="mb30 flex justify-between align-center"> |
|
133 |
- <p class="title" for="username">학생 정보</p> |
|
134 |
- <div class="search-wrap flex justify-end mb20" style="width: 100%;"> |
|
135 |
- <select name="" id="" class="mr10 data-wrap"> |
|
136 |
- <option value="">학년</option> |
|
137 |
- </select> |
|
138 |
- <select name="" id="" class="mr10 data-wrap"> |
|
139 |
- <option value="">반</option> |
|
140 |
- </select> |
|
141 |
- <select name="" id="" class=" data-wrap"> |
|
142 |
- <option value="">번호</option> |
|
143 |
- </select> |
|
144 |
- |
|
145 | 192 |
</div> |
146 | 193 |
</div> |
147 | 194 |
<div class="flex justify-end align-center mb10"> |
... | ... | @@ -159,20 +206,41 @@ |
159 | 206 |
<p class="title" for="username">아이디</p> |
160 | 207 |
<input type="text" id="username" v-model="userId" placeholder="아이디를 입력하세요."> |
161 | 208 |
</div> |
162 |
- <p class="title2 flex align-center mb20 help" for="username"><img src="../resources/img/img193_78p.png" |
|
163 |
- alt=""><em class="green ml10">사용 가능한 아이디입니다.</em></p> |
|
209 |
+ <p class="title2 flex align-center mb20 help" for="username" v-if="!isUserIdValid"> |
|
210 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
211 |
+ <em class="gray ml10">영문, 숫자를 조합하여 주세요 (6자리 이상)</em> |
|
212 |
+ </p> |
|
213 |
+ <p class="title2 flex align-center mb20 help" for="username" v-else> |
|
214 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
215 |
+ <em class="green ml10">사용 가능한 아이디입니다.</em> |
|
216 |
+ </p> |
|
217 |
+ |
|
164 | 218 |
<div class="flex justify-between align-center mb10"> |
165 | 219 |
<p class="title" for="password">비밀번호</p> |
166 | 220 |
<input type="password" id="password" v-model="password" placeholder="비밀번호를 입력하세요."> |
167 | 221 |
</div> |
168 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
169 |
- alt=""><em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em></p> |
|
222 |
+ <p class="title2 mb20 flex align-center help" for="password" v-if="!isPasswordValid"> |
|
223 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
224 |
+ <em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em> |
|
225 |
+ </p> |
|
226 |
+ <p class="title2 mb20 flex align-center help" for="password" v-else> |
|
227 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
228 |
+ <em class="green ml10">비밀번호가 유효합니다.</em> |
|
229 |
+ </p> |
|
230 |
+ |
|
170 | 231 |
<div class="flex justify-between align-center mb10"> |
171 |
- <p class="title" for="password">비밀번호 확인</p> |
|
172 |
- <input type="password" id="password" v-model="passwordCheck" placeholder="비밀번호를 입력하세요."> |
|
232 |
+ <p class="title" for="passwordCheck">비밀번호 확인</p> |
|
233 |
+ <input type="password" id="passwordCheck" v-model="passwordCheck" placeholder="비밀번호를 입력하세요."> |
|
173 | 234 |
</div> |
174 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
175 |
- alt=""><em class="green ml10">비밀번호가 일치 합니다.</em></p> |
|
235 |
+ <p class="title2 mb20 flex align-center help" for="passwordCheck" |
|
236 |
+ v-if="!isPasswordMatched || !isPasswordValid"> |
|
237 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
238 |
+ <em class="gray ml10">비밀번호가 일치하지 않습니다.</em> |
|
239 |
+ </p> |
|
240 |
+ <p class="title2 mb20 flex align-center help" for="passwordCheck" v-else> |
|
241 |
+ <img src="../resources/img/img193_78p.png" alt=""> |
|
242 |
+ <em class="green ml10">비밀번호가 일치합니다.</em> |
|
243 |
+ </p> |
|
176 | 244 |
<div class="mb30 flex justify-between align-center"> |
177 | 245 |
<p class="title" for="username">이름</p> |
178 | 246 |
<input type="text" id="username" v-model="username" placeholder="이름을 입력하세요."> |
... | ... | @@ -188,26 +256,15 @@ |
188 | 256 |
<div class="mb30 flex justify-between align-center"> |
189 | 257 |
<p class="title" for="username">학교</p> |
190 | 258 |
<div class="search-wrap" style="width: 100%;"> |
191 |
- <input type="text" placeholder="검색하세요."> |
|
259 |
+ <input type="text" placeholder="검색하세요." disabled v-model="userIns"> |
|
192 | 260 |
<button @click="buttonSearch" type="button" title="위원회 검색"> |
193 | 261 |
<img src="../resources/img/look_t.png" alt=""> |
194 | 262 |
</button> |
195 | 263 |
</div> |
196 | 264 |
</div> |
197 | 265 |
<div class="mb30 flex justify-between align-center"> |
198 |
- <p class="title" for="username">학교</p> |
|
199 |
- <div class="search-wrap flex justify-end mb20" style="width: 100%;"> |
|
200 |
- <select name="" id="" class="mr10 data-wrap"> |
|
201 |
- <option value="">학년</option> |
|
202 |
- </select> |
|
203 |
- <select name="" id="" class="mr10 data-wrap"> |
|
204 |
- <option value="">반</option> |
|
205 |
- </select> |
|
206 |
- <select name="" id="" class="data-wrap"> |
|
207 |
- <option value="">번호</option> |
|
208 |
- </select> |
|
209 |
- |
|
210 |
- </div> |
|
266 |
+ <p class="title" for="username">이메일</p> |
|
267 |
+ <input type="text" id="username" v-model="email" placeholder="이메일을 입력하세요."> |
|
211 | 268 |
</div> |
212 | 269 |
<div class="flex justify-end align-center mb10"> |
213 | 270 |
<input type="checkbox" class="ui-checkbox mr10"> |
... | ... | @@ -222,7 +279,7 @@ |
222 | 279 |
</div> |
223 | 280 |
</div> |
224 | 281 |
<div v-show="searchOpen" class="popup-wrap"> |
225 |
- <div class="popup-box "> |
|
282 |
+ <div class="popup-box" style="width: 70rem; margin: 0 auto;"> |
|
226 | 283 |
<div class="flex justify-between mb30"> |
227 | 284 |
<p class="popup-title">학교 검색</p> |
228 | 285 |
<button type="button" class="popup-close-btn" @click="closeBtn"> |
... | ... | @@ -233,32 +290,113 @@ |
233 | 290 |
<div class="mb30 flex justify-between align-center"> |
234 | 291 |
<p class="title1" for="username" style="width: 12rem;">시/도</p> |
235 | 292 |
<div class="search-wrap flex justify-end" style="width: 100%;"> |
236 |
- <select name="" id="" class="mr10 data-wrap"> |
|
237 |
- <option value="">시</option> |
|
238 |
- </select> |
|
239 |
- <select name="" id="" class=" data-wrap"> |
|
240 |
- <option value="">도</option> |
|
293 |
+ <input type="text" placeholder="시도명을 정확하게 입력하세요. (EX : 서울특별시, 경기도)" v-model="searchCity"> |
|
294 |
+ </div> |
|
295 |
+ </div> |
|
296 |
+ <div class="mb10 flex justify-between align-center"> |
|
297 |
+ <p class="title1" for="username" style="width: 12rem;">학교급</p> |
|
298 |
+ <div class="search-wrap" style="width: 100%;"> |
|
299 |
+ <select name="" id="" class="mr10 data-wrap" v-model="searchLevel"> |
|
300 |
+ <option value="초등학교">초등학교</option> |
|
301 |
+ <option value="중학교">중학교</option> |
|
302 |
+ <option value="고등학교">고등학교</option> |
|
241 | 303 |
</select> |
242 | 304 |
</div> |
243 | 305 |
</div> |
244 | 306 |
<div class="mb10 flex justify-between align-center"> |
245 | 307 |
<p class="title1" for="username" style="width: 12rem;">학교명</p> |
246 | 308 |
<div class="search-wrap" style="width: 100%;"> |
247 |
- <input type="text" placeholder="검색하세요."> |
|
248 |
- <button @click="buttonSearch" type="button" title="위원회 검색"> |
|
309 |
+ <input type="text" placeholder="학교명을 입력하세요." v-model="searchSchoolName"> |
|
310 |
+ <button @click="searchSchool" type="button" title="위원회 검색"> |
|
249 | 311 |
<img src="../resources/img/look_t.png" alt=""> |
250 | 312 |
</button> |
251 | 313 |
</div> |
252 | 314 |
</div> |
253 |
- <p class="title2 mb20 flex align-center help" for="username" style="margin-left: 10rem;"><img |
|
254 |
- src="../resources/img/img194_78p.png" alt=""><em class="gray ml10">학교명을 입력 후 찾기 버튼을 클릭하십시오.</em></p> |
|
315 |
+ <div v-if="schools.length > 0" style="max-height: 400px; overflow-y: auto;"> |
|
316 |
+ <table class="table-wrap"> |
|
317 |
+ <thead style="text-align: center; "> |
|
318 |
+ <tr> |
|
319 |
+ <th>선택</th> |
|
320 |
+ <th>학교명</th> |
|
321 |
+ <th>학교종류</th> |
|
322 |
+ <th>시도명</th> |
|
323 |
+ </tr> |
|
324 |
+ </thead> |
|
325 |
+ <tbody> |
|
326 |
+ <tr v-for="(school, index) in schools" :key="school.SD_SCHUL_CODE"> |
|
327 |
+ <td> |
|
328 |
+ <input type="radio" name="selectedSchool" :value="school" v-model="selectedSchool"> |
|
329 |
+ </td> |
|
330 |
+ <td>{{ school.SCHUL_NM }}</td> |
|
331 |
+ <td>{{ school.SCHUL_KND_SC_NM }}</td> |
|
332 |
+ <td>{{ school.LCTN_SC_NM }}</td> |
|
333 |
+ </tr> |
|
334 |
+ </tbody> |
|
335 |
+ </table> |
|
336 |
+ </div> |
|
337 |
+ <p class="title2 mb20 flex align-center help" for="username" style="margin-left: 10rem;" |
|
338 |
+ v-if="schools.length === 0"> |
|
339 |
+ <img src="../resources/img/img194_78p.png" alt=""> |
|
340 |
+ <em class="gray ml10">학교명을 입력 후 찾기 버튼을 클릭하십시오.</em> |
|
341 |
+ </p> |
|
255 | 342 |
<div class="flex justify-center "> |
256 |
- <button type="button" title="글쓰기" class="new-btn mr10"> |
|
343 |
+ <button type="button" title="글쓰기" class="new-btn mr10" @click="closeBtn"> |
|
257 | 344 |
취소 |
258 | 345 |
</button> |
259 |
- <button type="button" title="글쓰기" class="new-btn"> |
|
260 |
- 등록 |
|
346 |
+ <button type="button" title="글쓰기" class="new-btn" @click="selectSchool"> |
|
347 |
+ 학교선택 / Select School |
|
261 | 348 |
</button> |
349 |
+ </div> |
|
350 |
+ </div> |
|
351 |
+ </div> |
|
352 |
+ <div v-show="showModal" class="popup-wrap"> |
|
353 |
+ <div class="popup-box" style="width: 70rem; margin: 0 auto;"> |
|
354 |
+ <div class="find-form mt30"> |
|
355 |
+ <div v-if="!searchResult"> |
|
356 |
+ <div class="mb20 flex justify-between align-center"> |
|
357 |
+ <p class="title2" for="username" style="width: 12rem;">자녀 이름</p> |
|
358 |
+ <input class="data-wrap" type="text" id="username" v-model="findUserNm" placeholder="이름을 입력하세요." |
|
359 |
+ style="width: 45rem;"> |
|
360 |
+ </div> |
|
361 |
+ <div class="mb30 flex justify-between align-center"> |
|
362 |
+ <p class="title2" for="username" style="width: 12rem;">자녀 전화번호</p> |
|
363 |
+ <div class="flex justify-between align-center"><input class="data-wrap" style="width: 14rem;" |
|
364 |
+ type="text" id="username" v-model="findTel1"> |
|
365 |
+ <p class="title2">-</p><input class="data-wrap" style="width: 14rem;" type="text" id="username" |
|
366 |
+ v-model="findTel2"> |
|
367 |
+ <p class="title2">-</p><input class="data-wrap" style="width: 14rem;" type="text" id="username" |
|
368 |
+ v-model="findTel3"> |
|
369 |
+ </div> |
|
370 |
+ </div> |
|
371 |
+ <div class="flex justify-center "> |
|
372 |
+ <button type="button" title="글쓰기" class="new-btn mr10" @click="closeModal"> |
|
373 |
+ 취소 |
|
374 |
+ </button> |
|
375 |
+ <button @click="findId" type="button" title="글쓰기" class="new-btn"> |
|
376 |
+ 찾기 |
|
377 |
+ </button> |
|
378 |
+ </div> |
|
379 |
+ </div> |
|
380 |
+ <div v-else> |
|
381 |
+ <div class="flex justify-center mt30"> |
|
382 |
+ <p class="title2">자녀 찾기가 완료 되었습니다.</p> |
|
383 |
+ </div> |
|
384 |
+ <table class="table-wrap mt30 mb30"> |
|
385 |
+ <tr> |
|
386 |
+ <td class="thead">이름</td> |
|
387 |
+ <td>{{ findUserInfo.userNm }}</td> |
|
388 |
+ </tr> |
|
389 |
+ <tr> |
|
390 |
+ <td class="thead">아이디</td> |
|
391 |
+ <td>{{ findUserInfo.loginId }}</td> |
|
392 |
+ </tr> |
|
393 |
+ </table> |
|
394 |
+ <div class="flex justify-center "> |
|
395 |
+ <button @click="closeModal" type="button" title="글쓰기" class="new-btn"> |
|
396 |
+ 추가하기 |
|
397 |
+ </button> |
|
398 |
+ </div> |
|
399 |
+ </div> |
|
262 | 400 |
</div> |
263 | 401 |
</div> |
264 | 402 |
</div> |
... | ... | @@ -280,10 +418,26 @@ |
280 | 418 |
tel1: '', |
281 | 419 |
tel2: '', |
282 | 420 |
tel3: '', |
421 |
+ findUserNm: '', |
|
422 |
+ findTel1: '', |
|
423 |
+ findTel2: '', |
|
424 |
+ findTel3: '', |
|
425 |
+ userGrade: '', |
|
426 |
+ userClass: '', |
|
427 |
+ userNumber: '', |
|
428 |
+ userIns: '', |
|
283 | 429 |
email: null, |
284 | 430 |
selectedTab: 'tab1', // 초기 선택 탭 |
285 | 431 |
showModal: false, |
286 | 432 |
searchOpen: false, |
433 |
+ searchCity: '', |
|
434 |
+ searchLevel: '초등학교', // 기본값 설정 |
|
435 |
+ searchSchoolName: '', |
|
436 |
+ schools: [], |
|
437 |
+ students: [], |
|
438 |
+ selectedSchool: null, // 선택된 학교 |
|
439 |
+ searchResult: false, |
|
440 |
+ findUserInfo: {}, |
|
287 | 441 |
} |
288 | 442 |
}, |
289 | 443 |
methods: { |
... | ... | @@ -333,7 +487,7 @@ |
333 | 487 |
} else if (vm.selectedTab === 'tab3') { |
334 | 488 |
auth = 'TEACHER' |
335 | 489 |
} |
336 |
- |
|
490 |
+ |
|
337 | 491 |
axios({ |
338 | 492 |
url: "/auth/insertUser.json", |
339 | 493 |
method: "post", |
... | ... | @@ -347,7 +501,7 @@ |
347 | 501 |
authcd: auth |
348 | 502 |
}, |
349 | 503 |
}).then(function (response) { |
350 |
- if(response.data.status === 'success'){ |
|
504 |
+ if (response.data.status === 'success') { |
|
351 | 505 |
alert("회원가입에 성공했습니다!") |
352 | 506 |
vm.goToApp(); |
353 | 507 |
} else { |
... | ... | @@ -355,12 +509,87 @@ |
355 | 509 |
} |
356 | 510 |
}).catch(function (error) { |
357 | 511 |
}); |
358 |
- |
|
512 |
+ |
|
359 | 513 |
}, |
514 |
+ // 학교 찾기 |
|
515 |
+ searchSchool() { |
|
516 |
+ if (!this.searchSchoolName) { |
|
517 |
+ alert("학교명을 입력해주세요!"); |
|
518 |
+ return; |
|
519 |
+ } |
|
520 |
+ |
|
521 |
+ axios({ |
|
522 |
+ url: "https://open.neis.go.kr/hub/schoolInfo", |
|
523 |
+ method: "get", |
|
524 |
+ params: { |
|
525 |
+ KEY: "51f16da8aa344339a49812c23bcedb24", // 인증키를 넣어주세요 |
|
526 |
+ Type: "json", |
|
527 |
+ pIndex: 1, |
|
528 |
+ pSize: 100, |
|
529 |
+ SCHUL_NM: this.searchSchoolName, |
|
530 |
+ LCTN_SC_NM: this.searchCity, |
|
531 |
+ SCHUL_KND_SC_NM: this.searchLevel |
|
532 |
+ }, |
|
533 |
+ }).then(response => { |
|
534 |
+ const data = response.data.schoolInfo; |
|
535 |
+ if (data && data[1] && data[1].row) { |
|
536 |
+ this.schools = data[1].row; // 학교 정보를 schools에 저장 |
|
537 |
+ } else { |
|
538 |
+ alert("검색된 학교가 없습니다"); |
|
539 |
+ this.schools = []; // 결과가 없을 경우 빈 배열로 초기화 |
|
540 |
+ } |
|
541 |
+ }).catch(error => { |
|
542 |
+ console.error(error); |
|
543 |
+ }); |
|
544 |
+ }, |
|
545 |
+ selectSchool() { |
|
546 |
+ if (this.selectedSchool) { |
|
547 |
+ this.userIns = this.selectedSchool.SCHUL_NM; // 선택된 학교 이름 정보를 userIns에 저장 |
|
548 |
+ this.closeBtn(); // 팝업 닫기 |
|
549 |
+ } else { |
|
550 |
+ alert("학교를 선택해 주세요."); |
|
551 |
+ } |
|
552 |
+ }, |
|
553 |
+ // 자녀 찾기 |
|
554 |
+ findId() { |
|
555 |
+ const vm = this; |
|
556 |
+ |
|
557 |
+ const telno = vm.findTel1 + '-' + vm.findTel2 + '-' + vm.findTel3; |
|
558 |
+ |
|
559 |
+ axios({ |
|
560 |
+ url: "/auth/findId.json", |
|
561 |
+ method: "post", |
|
562 |
+ data: { |
|
563 |
+ telno: telno, |
|
564 |
+ userNm: vm.findUserNm, |
|
565 |
+ }, |
|
566 |
+ }).then(function (response) { |
|
567 |
+ vm.findUserInfo = response.data; |
|
568 |
+ vm.searchResult = true; |
|
569 |
+ }).catch(function (error) { |
|
570 |
+ alert("등록되지 않은 자녀입니다!"); |
|
571 |
+ console.log(error); |
|
572 |
+ }); |
|
573 |
+ }, |
|
574 |
+ |
|
360 | 575 |
goToApp() { |
361 | 576 |
this.$router.push('/Login.page'); |
362 | 577 |
}, |
578 |
+ openModal() { |
|
579 |
+ this.showModal = true; |
|
580 |
+ }, |
|
363 | 581 |
closeModal() { |
582 |
+ if (Object.keys(this.findUserInfo).length > 0) { |
|
583 |
+ const isDuplicate = this.students.some(student => student.loginId === this.findUserInfo.loginId); |
|
584 |
+ |
|
585 |
+ if (!isDuplicate) { |
|
586 |
+ this.students.push(this.findUserInfo); |
|
587 |
+ } else { |
|
588 |
+ alert("이미 추가된 학생입니다."); |
|
589 |
+ } |
|
590 |
+ } |
|
591 |
+ this.searchResult = false; |
|
592 |
+ this.findUserInfo = null; |
|
364 | 593 |
this.showModal = false; |
365 | 594 |
}, |
366 | 595 |
buttonSearch() { |
... | ... | @@ -371,6 +600,23 @@ |
371 | 600 |
|
372 | 601 |
}, |
373 | 602 |
}, |
603 |
+ computed: { |
|
604 |
+ isUserIdValid() { |
|
605 |
+ // 사용자 아이디 유효성 검사 (예: 6자 이상, 영어와 숫자) |
|
606 |
+ const regex = /^[a-zA-Z0-9]{6,}$/; |
|
607 |
+ return regex.test(this.userId); |
|
608 |
+ }, |
|
609 |
+ isPasswordValid() { |
|
610 |
+ // 비밀번호 유효성 검사 (예: 6자 이상, 영문, 숫자, 특수문자 포함) |
|
611 |
+ const regex = /^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[!@#$%^&*])[A-Za-z\d!@#$%^&*]{6,}$/; |
|
612 |
+ return regex.test(this.password); |
|
613 |
+ }, |
|
614 |
+ isPasswordMatched() { |
|
615 |
+ // 비밀번호 확인 일치 여부 |
|
616 |
+ return this.password === this.passwordCheck; |
|
617 |
+ } |
|
618 |
+ }, |
|
619 |
+ |
|
374 | 620 |
components: { |
375 | 621 |
SvgIcon |
376 | 622 |
}, |
--- client/views/Login.vue
+++ client/views/Login.vue
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 |
<img src="../resources/img/icon1.png" alt="" class="mr20"> |
10 | 10 |
<h2> 로그인 하기</h2> |
11 | 11 |
</div> |
12 |
- <form @submit.prevent="submitForm" class="login-form "> |
|
12 |
+ <div class="login-form "> |
|
13 | 13 |
<div class="mb30"> |
14 | 14 |
<p class="mb15 title" for="username">아이디</p> |
15 | 15 |
<input type="text" id="username" v-model="username" placeholder="아이디를 입력하세요."> |
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 |
<p class="mb15 title" for="password">비밀번호</p> |
19 | 19 |
<input type="password" id="password" v-model="password" placeholder="비밀번호를 입력하세요."> |
20 | 20 |
</div> |
21 |
- <button class="login-btn mt50" type="submit" @click="goToApp"><img src="../resources/img/button.png" |
|
21 |
+ <button class="login-btn mt50" type="submit" @click="submitForm"><img src="../resources/img/button.png" |
|
22 | 22 |
alt=""> |
23 | 23 |
<p>로그인</p> |
24 | 24 |
</button> |
... | ... | @@ -30,12 +30,12 @@ |
30 | 30 |
<p class="underline title2" @click="goToPage('Join')">회원가입</p> |
31 | 31 |
</button> |
32 | 32 |
</div> |
33 |
- </form> |
|
33 |
+ </div> |
|
34 | 34 |
</div> |
35 | 35 |
</div> |
36 | 36 |
</div> |
37 | 37 |
<div v-show="searchOpen" class="popup-wrap"> |
38 |
- <div class="popup-box "> |
|
38 |
+ <div class="popup-box" style="width: 70rem; margin: 0 auto;"> |
|
39 | 39 |
<div class="flex justify-end mb10"> |
40 | 40 |
<!-- <p class="popup-title">학교 검색</p> --> |
41 | 41 |
<button type="button" class="popup-close-btn" @click="closeBtn"> |
... | ... | @@ -50,19 +50,19 @@ |
50 | 50 |
</label> |
51 | 51 |
<label class="mr20 title1"> |
52 | 52 |
<input type="radio" v-model="selectedTab" value="tab2" /> |
53 |
- 비밀번호 찾기 |
|
53 |
+ 비밀번호 변경 |
|
54 | 54 |
</label> |
55 | 55 |
</div> |
56 | 56 |
<!-- 아이디 찾기 --> |
57 | 57 |
<div class="find-form mt30" v-if="selectedTab === 'tab1'"> |
58 | 58 |
<div class="mb20 flex justify-between align-center"> |
59 | 59 |
<p class="title2" for="username" style="width: 12rem;">이름</p> |
60 |
- <input class="data-wrap" type="text" id="username" v-model="findUserNm" placeholder="이름을 입력하세요."> |
|
60 |
+ <input class="data-wrap" type="text" id="username" v-model="findUserNm" placeholder="이름을 입력하세요." style="width: 45rem;" > |
|
61 | 61 |
</div> |
62 | 62 |
<div class="mb30 flex justify-between align-center"> |
63 | 63 |
<p class="title2" for="username" style="width: 12rem;">전화번호</p> |
64 |
- <div class="flex justify-between align-center" style="width: 100%;"><input class="data-wrap" |
|
65 |
- style="width: 12rem;" type="text" id="username" v-model="findTel1"> |
|
64 |
+ <div class="flex justify-between align-center"><input class="data-wrap" |
|
65 |
+ style="width: 14rem;" type="text" id="username" v-model="findTel1"> |
|
66 | 66 |
<p class="title2">-</p><input class="data-wrap" style="width: 14rem;" type="text" id="username" |
67 | 67 |
v-model="findTel2"> |
68 | 68 |
<p class="title2">-</p><input class="data-wrap" style="width: 14rem;" type="text" id="username" |
... | ... | @@ -78,21 +78,19 @@ |
78 | 78 |
</button> |
79 | 79 |
</div> |
80 | 80 |
</div> |
81 |
- <!-- 비밀번호 찾기 --> |
|
81 |
+ <!-- 비밀번호 변경 --> |
|
82 | 82 |
<div class="find-form mt30" v-else-if="selectedTab === 'tab2'"> |
83 | 83 |
<div class="mb20 flex justify-between align-center"> |
84 | 84 |
<p class="title2" for="username" style="width: 12rem;">아이디</p> |
85 |
- <input class="data-wrap" type="text" id="username" v-model="changeUserNm" placeholder="아이디를 입력하세요."> |
|
85 |
+ <input class="data-wrap" type="text" id="username" v-model="changeLoginId" placeholder="아이디를 입력하세요." style="width: 45rem;" > |
|
86 | 86 |
</div> |
87 | 87 |
<div class="mb20 flex justify-between align-center"> |
88 |
- <p class="title2" for="username" style="width: 12rem;">변경할 비밀번호</p> |
|
89 |
- <input class="data-wrap" type="text" id="username" v-model="changeUserPw" placeholder="변경할 비밀번호를 입력하세요."> |
|
88 |
+ <p class="title2" for="username" style="width: 14rem;">변경할 비밀번호</p> |
|
89 |
+ <input class="data-wrap" type="password" id="username" v-model="changeUserPw" placeholder="변경할 비밀번호를 입력하세요." style="width: 45rem;" > |
|
90 | 90 |
</div> |
91 |
- <p class="title2 mb20 flex align-center help" for="username"><img src="../resources/img/img193_78p.png" |
|
92 |
- alt=""><em class="gray ml10">영문, 숫자, 특수문자 3가지를 조합하여 주세요.(6자리 이상)</em></p> |
|
93 | 91 |
<div class="mb20 flex justify-between align-center"> |
94 | 92 |
<p class="title2" for="username" style="width: 12rem;">비밀번호 확인</p> |
95 |
- <input class="data-wrap" type="text" id="username" v-model="changeUserPwCheck" placeholder="변경할 비밀번호를 입력하세요."> |
|
93 |
+ <input class="data-wrap" type="password" id="username" v-model="changeUserPwCheck" placeholder="변경할 비밀번호를 입력하세요." style="width: 45rem;" > |
|
96 | 94 |
</div> |
97 | 95 |
<div class="flex justify-center "> |
98 | 96 |
<button type="button" title="글쓰기" class="new-btn mr10" @click="closeBtn"> |
... | ... | @@ -164,6 +162,9 @@ |
164 | 162 |
findTel2: '', |
165 | 163 |
findTel3: '', |
166 | 164 |
findUserInfo : {}, |
165 |
+ changeLoginId:'', |
|
166 |
+ changeUserPw: '', |
|
167 |
+ changeUserPwCheck: '', |
|
167 | 168 |
} |
168 | 169 |
}, |
169 | 170 |
methods: { |
... | ... | @@ -264,7 +265,53 @@ |
264 | 265 |
}); |
265 | 266 |
}, |
266 | 267 |
|
267 |
- // 비밀번호 확인하기 |
|
268 |
+ // 비밀번호 재설정하기 |
|
269 |
+ changePw() { |
|
270 |
+ const vm = this; |
|
271 |
+ |
|
272 |
+ const passwordPattern = /^(?=.*[a-zA-Z])(?=.*\d)(?=.*[!@#$%^&*])[A-Za-z\d!@#$%^&*]{6,}$/; |
|
273 |
+ |
|
274 |
+ if (!vm.changeLoginId) { |
|
275 |
+ alert("아이디가 비어 있습니다!"); |
|
276 |
+ return; |
|
277 |
+ } |
|
278 |
+ |
|
279 |
+ if (!vm.changeUserPw) { |
|
280 |
+ alert("비밀번호가 비어 있습니다!"); |
|
281 |
+ return; |
|
282 |
+ } |
|
283 |
+ |
|
284 |
+ if (vm.changeUserPw !== vm.changeUserPwCheck) { |
|
285 |
+ alert("비밀번호가 일치하지 않습니다."); |
|
286 |
+ return; |
|
287 |
+ } |
|
288 |
+ |
|
289 |
+ if (!passwordPattern.test(vm.changeUserPw)) { |
|
290 |
+ alert("비밀번호는 영문, 숫자, 특수문자를 조합하여 6자리 이상이어야 합니다."); |
|
291 |
+ return; |
|
292 |
+ } |
|
293 |
+ |
|
294 |
+ |
|
295 |
+ axios({ |
|
296 |
+ url: "/auth/resetPassword.json", |
|
297 |
+ method: "post", |
|
298 |
+ data: { |
|
299 |
+ loginId: vm.changeLoginId, |
|
300 |
+ newPassword: vm.changeUserPw, |
|
301 |
+ }, |
|
302 |
+ }).then(function (response) { |
|
303 |
+ if (response.data.status === 'success') { |
|
304 |
+ alert("비밀번호 변경에 성공했습니다!") |
|
305 |
+ vm.selectedTab = 'tab4'; |
|
306 |
+ } else { |
|
307 |
+ alter(response.data.message); |
|
308 |
+ } |
|
309 |
+ |
|
310 |
+ }).catch(function (error) { |
|
311 |
+ alert("비밀번호 변경에 오류가 발생했습니다!"); |
|
312 |
+ console.log(error); |
|
313 |
+ }); |
|
314 |
+ }, |
|
268 | 315 |
|
269 | 316 |
closeModal() { |
270 | 317 |
this.showModal = false; |
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
... | ... | @@ -1,11 +1,14 @@ |
1 | 1 |
<template> |
2 |
- <p class="title1" v-if="state === 'finish'"> |
|
2 |
+ <p class="title1" v-if="state === 'finish'" style="position: absolute; top: 50%; transform: translate(0, -50%);"> |
|
3 | 3 |
오늘 공부를 다했어요! 너무 고생했어요! |
4 | 4 |
</p> |
5 |
- <p class="title1" v-else-if="state === 'notRegistered'"> |
|
6 |
- 지금은 학습 루트가 등록이 안됐어요! 학습 일정에서 학습루트를 등록해볼까요? |
|
7 |
- </p> |
|
8 |
- <p class="title1" v-else-if="state === 'noProblem'"> |
|
5 |
+ <div class="title1" v-else-if="state === 'notRegistered'" style="position: absolute; top: 50%; transform: translate(0, -50%);"> |
|
6 |
+ <div> |
|
7 |
+ <h3>지금은 학습 루트가 등록이 안됐어요! 학습 일정에서 학습루트를 등록해볼까요?</h3> |
|
8 |
+ <button type="button" title="바로가기" class="yellow-btn" @click="goToPage2('MyPlan2')">바로가기</button> |
|
9 |
+ </div> |
|
10 |
+ </div> |
|
11 |
+ <p class="title1" v-else-if="state === 'noProblem'" style="position: absolute; top: 50%; transform: translate(0, -50%);"> |
|
9 | 12 |
교재에 등록된 문제가 없습니다. |
10 | 13 |
</p> |
11 | 14 |
<div v-else class="main"> |
... | ... | @@ -26,12 +29,12 @@ |
26 | 29 |
</div> |
27 | 30 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="1"> |
28 | 31 |
<img :src="labeledItems[0].label.length >= 4 |
29 |
- ? item.imgSrc3 |
|
30 |
- : item.imgSrc1 |
|
32 |
+ ? item.imgSrc3 |
|
33 |
+ : item.imgSrc1 |
|
31 | 34 |
" :style="{ display: !rabbitCompl[1] ? 'block' : 'none' }" /> |
32 | 35 |
<img :src="labeledItems[0].label.length >= 4 |
33 |
- ? item.imgSrc4 |
|
34 |
- : item.imgSrc2 |
|
36 |
+ ? item.imgSrc4 |
|
37 |
+ : item.imgSrc2 |
|
35 | 38 |
" :style="{ display: rabbitCompl[1] ? 'block' : 'none' }" /> |
36 | 39 |
</button> |
37 | 40 |
<p>{{ labeledItems[0].label }}</p> |
... | ... | @@ -43,12 +46,12 @@ |
43 | 46 |
</div> |
44 | 47 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="2"> |
45 | 48 |
<img :src="labeledItems[1].label.length >= 4 |
46 |
- ? item.imgSrc3 |
|
47 |
- : item.imgSrc1 |
|
49 |
+ ? item.imgSrc3 |
|
50 |
+ : item.imgSrc1 |
|
48 | 51 |
" :style="{ display: !rabbitCompl[2] ? 'block' : 'none' }" /> |
49 | 52 |
<img :src="labeledItems[1].label.length >= 4 |
50 |
- ? item.imgSrc4 |
|
51 |
- : item.imgSrc2 |
|
53 |
+ ? item.imgSrc4 |
|
54 |
+ : item.imgSrc2 |
|
52 | 55 |
" :style="{ display: rabbitCompl[2] ? 'block' : 'none' }" /> |
53 | 56 |
</button> |
54 | 57 |
<p>{{ labeledItems[1].label }}</p> |
... | ... | @@ -62,12 +65,12 @@ |
62 | 65 |
</div> |
63 | 66 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="7"> |
64 | 67 |
<img :src="labeledItems[6].label.length >= 4 |
65 |
- ? item.imgSrc3 |
|
66 |
- : item.imgSrc1 |
|
68 |
+ ? item.imgSrc3 |
|
69 |
+ : item.imgSrc1 |
|
67 | 70 |
" :style="{ display: !rabbitCompl[7] ? 'block' : 'none' }" /> |
68 | 71 |
<img :src="labeledItems[6].label.length >= 4 |
69 |
- ? item.imgSrc4 |
|
70 |
- : item.imgSrc2 |
|
72 |
+ ? item.imgSrc4 |
|
73 |
+ : item.imgSrc2 |
|
71 | 74 |
" :style="{ display: rabbitCompl[7] ? 'block' : 'none' }" /> |
72 | 75 |
</button> |
73 | 76 |
<p>{{ labeledItems[6].label }}</p> |
... | ... | @@ -79,12 +82,12 @@ |
79 | 82 |
</div> |
80 | 83 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="6"> |
81 | 84 |
<img :src="labeledItems[5].label.length >= 4 |
82 |
- ? item.imgSrc3 |
|
83 |
- : item.imgSrc1 |
|
85 |
+ ? item.imgSrc3 |
|
86 |
+ : item.imgSrc1 |
|
84 | 87 |
" :style="{ display: !rabbitCompl[6] ? 'block' : 'none' }" /> |
85 | 88 |
<img :src="labeledItems[5].label.length >= 4 |
86 |
- ? item.imgSrc4 |
|
87 |
- : item.imgSrc2 |
|
89 |
+ ? item.imgSrc4 |
|
90 |
+ : item.imgSrc2 |
|
88 | 91 |
" :style="{ display: rabbitCompl[6] ? 'block' : 'none' }" /> |
89 | 92 |
</button> |
90 | 93 |
<p>{{ labeledItems[5].label }}</p> |
... | ... | @@ -96,12 +99,12 @@ |
96 | 99 |
</div> |
97 | 100 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="5"> |
98 | 101 |
<img :src="labeledItems[4].label.length >= 4 |
99 |
- ? item.imgSrc3 |
|
100 |
- : item.imgSrc1 |
|
102 |
+ ? item.imgSrc3 |
|
103 |
+ : item.imgSrc1 |
|
101 | 104 |
" :style="{ display: !rabbitCompl[5] ? 'block' : 'none' }" /> |
102 | 105 |
<img :src="labeledItems[4].label.length >= 4 |
103 |
- ? item.imgSrc4 |
|
104 |
- : item.imgSrc2 |
|
106 |
+ ? item.imgSrc4 |
|
107 |
+ : item.imgSrc2 |
|
105 | 108 |
" :style="{ display: rabbitCompl[5] ? 'block' : 'none' }" /> |
106 | 109 |
</button> |
107 | 110 |
<p>{{ labeledItems[4].label }}</p> |
... | ... | @@ -113,12 +116,12 @@ |
113 | 116 |
</div> |
114 | 117 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="4"> |
115 | 118 |
<img :src="labeledItems[3].label.length >= 4 |
116 |
- ? item.imgSrc3 |
|
117 |
- : item.imgSrc1 |
|
119 |
+ ? item.imgSrc3 |
|
120 |
+ : item.imgSrc1 |
|
118 | 121 |
" :style="{ display: !rabbitCompl[4] ? 'block' : 'none' }" /> |
119 | 122 |
<img :src="labeledItems[3].label.length >= 4 |
120 |
- ? item.imgSrc4 |
|
121 |
- : item.imgSrc2 |
|
123 |
+ ? item.imgSrc4 |
|
124 |
+ : item.imgSrc2 |
|
122 | 125 |
" :style="{ display: rabbitCompl[4] ? 'block' : 'none' }" /> |
123 | 126 |
</button> |
124 | 127 |
<p>{{ labeledItems[3].label }}</p> |
... | ... | @@ -130,12 +133,12 @@ |
130 | 133 |
</div> |
131 | 134 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="3"> |
132 | 135 |
<img :src="labeledItems[2].label.length >= 4 |
133 |
- ? item.imgSrc3 |
|
134 |
- : item.imgSrc1 |
|
136 |
+ ? item.imgSrc3 |
|
137 |
+ : item.imgSrc1 |
|
135 | 138 |
" :style="{ display: !rabbitCompl[3] ? 'block' : 'none' }" /> |
136 | 139 |
<img :src="labeledItems[2].label.length >= 4 |
137 |
- ? item.imgSrc4 |
|
138 |
- : item.imgSrc2 |
|
140 |
+ ? item.imgSrc4 |
|
141 |
+ : item.imgSrc2 |
|
139 | 142 |
" :style="{ display: rabbitCompl[3] ? 'block' : 'none' }" /> |
140 | 143 |
</button> |
141 | 144 |
<p>{{ labeledItems[2].label }}</p> |
... | ... | @@ -151,12 +154,12 @@ |
151 | 154 |
</div> |
152 | 155 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="8"> |
153 | 156 |
<img :src="labeledItems[7].label.length >= 4 |
154 |
- ? item.imgSrc3 |
|
155 |
- : item.imgSrc1 |
|
157 |
+ ? item.imgSrc3 |
|
158 |
+ : item.imgSrc1 |
|
156 | 159 |
" :style="{ display: !rabbitCompl[8] ? 'block' : 'none' }" /> |
157 | 160 |
<img :src="labeledItems[7].label.length >= 4 |
158 |
- ? item.imgSrc4 |
|
159 |
- : item.imgSrc2 |
|
161 |
+ ? item.imgSrc4 |
|
162 |
+ : item.imgSrc2 |
|
160 | 163 |
" :style="{ display: rabbitCompl[8] ? 'block' : 'none' }" /> |
161 | 164 |
</button> |
162 | 165 |
<p class="long">{{ labeledItems[7].label }}</p> |
... | ... | @@ -168,12 +171,12 @@ |
168 | 171 |
</div> |
169 | 172 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="9"> |
170 | 173 |
<img :src="labeledItems[8].label.length >= 4 |
171 |
- ? item.imgSrc3 |
|
172 |
- : item.imgSrc1 |
|
174 |
+ ? item.imgSrc3 |
|
175 |
+ : item.imgSrc1 |
|
173 | 176 |
" :style="{ display: !rabbitCompl[9] ? 'block' : 'none' }" /> |
174 | 177 |
<img :src="labeledItems[8].label.length >= 4 |
175 |
- ? item.imgSrc4 |
|
176 |
- : item.imgSrc2 |
|
178 |
+ ? item.imgSrc4 |
|
179 |
+ : item.imgSrc2 |
|
177 | 180 |
" :style="{ display: rabbitCompl[9] ? 'block' : 'none' }" /> |
178 | 181 |
</button> |
179 | 182 |
<p>{{ labeledItems[8].label }}</p> |
... | ... | @@ -186,12 +189,12 @@ |
186 | 189 |
<button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
187 | 190 |
data-num="10"> |
188 | 191 |
<img :src="labeledItems[9].label.length >= 4 |
189 |
- ? item.imgSrc3 |
|
190 |
- : item.imgSrc1 |
|
192 |
+ ? item.imgSrc3 |
|
193 |
+ : item.imgSrc1 |
|
191 | 194 |
" :style="{ display: !rabbitCompl[10] ? 'block' : 'none' }" /> |
192 | 195 |
<img :src="labeledItems[9].label.length >= 4 |
193 |
- ? item.imgSrc4 |
|
194 |
- : item.imgSrc2 |
|
196 |
+ ? item.imgSrc4 |
|
197 |
+ : item.imgSrc2 |
|
195 | 198 |
" :style="{ display: rabbitCompl[10] ? 'block' : 'none' }" /> |
196 | 199 |
</button> |
197 | 200 |
<p>{{ labeledItems[9].label }}</p> |
... | ... | @@ -207,12 +210,12 @@ |
207 | 210 |
<button class="popTxt" v-for="(item, index) in items" :key="index" |
208 | 211 |
@click="toggleImageAndShowPopup(index, '11')" data-num="11"> |
209 | 212 |
<img :src="labeledItems[10].label.length >= 4 |
210 |
- ? item.imgSrc3 |
|
211 |
- : item.imgSrc1 |
|
213 |
+ ? item.imgSrc3 |
|
214 |
+ : item.imgSrc1 |
|
212 | 215 |
" :style="{ display: !rabbitCompl[11] ? 'block' : 'none' }" /> |
213 | 216 |
<img :src="labeledItems[10].label.length >= 4 |
214 |
- ? item.imgSrc4 |
|
215 |
- : item.imgSrc2 |
|
217 |
+ ? item.imgSrc4 |
|
218 |
+ : item.imgSrc2 |
|
216 | 219 |
" :style="{ display: rabbitCompl[11] ? 'block' : 'none' }" /> |
217 | 220 |
</button> |
218 | 221 |
<p class="long">{{ labeledItems[10].label }}</p> |
... | ... | @@ -430,6 +433,7 @@ |
430 | 433 |
|
431 | 434 |
if (!book_id || !unit_id) { |
432 | 435 |
console.error("book_id 또는 unit_id가 설정되지 않았습니다."); |
436 |
+ this.state = "notRegistered"; |
|
433 | 437 |
return; |
434 | 438 |
} |
435 | 439 |
this.fetchImage(unit_id); |
... | ... | @@ -667,6 +671,14 @@ |
667 | 671 |
// this.$router.push({ name: page, query: { unit_id, book_id } }); |
668 | 672 |
this.$router.push({ name: page }); |
669 | 673 |
}, |
674 |
+ goToPage2(page, unit_id) { |
|
675 |
+ this.$router.push({ |
|
676 |
+ name: page, query: { |
|
677 |
+ unit_id: unit_id, |
|
678 |
+ }, |
|
679 |
+ }); |
|
680 |
+ }, |
|
681 |
+ |
|
670 | 682 |
storeLearningId(labeledItems) { |
671 | 683 |
this.$store.dispatch("updateLearningData", labeledItems); |
672 | 684 |
this.$store.dispatch("updateLearningId", labeledItems.learning_id); // 단어장에 사용중.. |
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?