![](/assets/images/project_default_logo.png)
![](/assets/images/default-avatar-128.png)
240812 권지수 문제 목록 및 조회
@1f754d57b4ed6af71dd7c333c9ebf60c1c7324da
--- client/resources/css/reset.css
+++ client/resources/css/reset.css
... | ... | @@ -80,20 +80,20 @@ |
80 | 80 |
|
81 | 81 |
} |
82 | 82 |
html, |
83 |
-body{height: 100%; background-color: #eaedf4;} |
|
83 |
+body{ background-color: #eaedf4;} |
|
84 | 84 |
body{position:relative;text-align: left; overflow-x: hidden; width: 1920px;} |
85 | 85 |
::-webkit-scrollbar {width: 10px; height: 10px;} |
86 | 86 |
::-webkit-scrollbar-track {border-radius: 5px;background-color: #EAEDF4;} |
87 | 87 |
::-webkit-scrollbar-thumb { border-radius: 5px; background-color: #FFBA08;} |
88 | 88 |
#root, #app{ |
89 |
- height: 100%; |
|
89 |
+ /* height: 100%; */ |
|
90 | 90 |
} |
91 | 91 |
input, select, span,p, label { |
92 | 92 |
font-size: 16px; |
93 | 93 |
} |
94 | 94 |
input::placeholder{color: #8C8E92;} |
95 | 95 |
input[type="text"]{ padding:10px 20px; width: 100%; } |
96 |
- |
|
96 |
+input#file-upload-button{padding: 10px ;} |
|
97 | 97 |
|
98 | 98 |
button{ |
99 | 99 |
border: none; |
... | ... | @@ -112,4 +112,24 @@ |
112 | 112 |
border: 0;} |
113 | 113 |
thead{background-color: #eaedf4;} |
114 | 114 |
tbody tr{border-bottom: #eaedf4 1px solid; cursor: pointer;} |
115 |
-td{padding: 10px ; text-align: center;}(No newline at end of file) |
|
115 |
+td{padding: 10px ; text-align: center;} |
|
116 |
+ |
|
117 |
+/* .btn-upload { |
|
118 |
+ width: 100px; |
|
119 |
+ height: 40px; |
|
120 |
+ background: #f0f0f0; |
|
121 |
+ border: 1px solid rgb(77,77,77); |
|
122 |
+ font-weight: 500; |
|
123 |
+ cursor: pointer; |
|
124 |
+ display: flex; |
|
125 |
+ align-items: center; |
|
126 |
+ justify-content: center; |
|
127 |
+ &:hover { |
|
128 |
+ background: rgb(77,77,77); |
|
129 |
+ color: #fff; |
|
130 |
+ } |
|
131 |
+ } |
|
132 |
+ |
|
133 |
+ #file { |
|
134 |
+ display: none; |
|
135 |
+ } */(No newline at end of file) |
--- client/resources/css/style.css
+++ client/resources/css/style.css
... | ... | @@ -277,7 +277,7 @@ |
277 | 277 |
background-image: url('../img/img199_12p.png'); |
278 | 278 |
width: 367px; |
279 | 279 |
height: 182px; |
280 |
- padding: 20px 60px 20px 50px; |
|
280 |
+ padding: 20px 50px 20px 40px; |
|
281 | 281 |
color: #fff; |
282 | 282 |
} |
283 | 283 |
.mypage .textbook{font-family: 'ONEMobilePOPOTF';} |
... | ... | @@ -336,7 +336,7 @@ |
336 | 336 |
width: max-content; |
337 | 337 |
position: absolute; |
338 | 338 |
right: 45px; |
339 |
- z-index: -1; |
|
339 |
+ z-index: 10000; |
|
340 | 340 |
} |
341 | 341 |
.myphoto .class{border-radius: 0px; padding: 10px;} |
342 | 342 |
.myphoto .class .box { |
... | ... | @@ -441,10 +441,15 @@ |
441 | 441 |
width: 1063px; |
442 | 442 |
} |
443 | 443 |
|
444 |
-.rabbit { |
|
444 |
+.rabbit-start { |
|
445 | 445 |
position: absolute; |
446 | 446 |
top: -45px; |
447 | 447 |
left: 393px; |
448 |
+} |
|
449 |
+.rabbit-end { |
|
450 |
+ position: absolute; |
|
451 |
+ bottom: 24px; |
|
452 |
+ right: 40px; |
|
448 | 453 |
} |
449 | 454 |
|
450 | 455 |
.rabbit img { |
... | ... | @@ -470,6 +475,13 @@ |
470 | 475 |
.race-btn p.long { |
471 | 476 |
width: fit-content; |
472 | 477 |
} |
478 |
+/* .popup-yellow{ |
|
479 |
+ background-image: url('../img/img139_72s.png'); |
|
480 |
+ min-width: 439px !important; |
|
481 |
+ min-height: 244px !important; |
|
482 |
+ background-color: transparent !important; |
|
483 |
+ border: 0 !important; |
|
484 |
+} */ |
|
473 | 485 |
/* 사진촬영 */ |
474 | 486 |
.camera{background-color: #000;} |
475 | 487 |
.camera .header{height: 110px; background-color: #eaedf4; padding: 0 60px;} |
... | ... | @@ -500,6 +512,20 @@ |
500 | 512 |
.complete-wrap img{width: inherit;} |
501 | 513 |
.complete-wrap .photo{cursor: pointer; width: 200px; height: 130px; } |
502 | 514 |
/* 챕터 */ |
515 |
+.time-hint{ |
|
516 |
+ position: absolute; |
|
517 |
+ top: 50px; |
|
518 |
+ right: 50px; |
|
519 |
+ text-align: center; |
|
520 |
+} |
|
521 |
+.hint-btn{ |
|
522 |
+ background-image: url('../img/btn01.png'); |
|
523 |
+ width: 110px; |
|
524 |
+ height: 45px; |
|
525 |
+ padding: 5px 20px; |
|
526 |
+ font-size: 28px; |
|
527 |
+ font-family: 'ONEMobilePOP'; |
|
528 |
+} |
|
503 | 529 |
.content-wrap { |
504 | 530 |
margin: 90px 60px 0 60px; |
505 | 531 |
|
... | ... | @@ -741,9 +767,6 @@ |
741 | 767 |
width: 560px; |
742 | 768 |
} |
743 | 769 |
.time-bg{ |
744 |
- position: absolute; |
|
745 |
- top: 50px; |
|
746 |
- right: 50px; |
|
747 | 770 |
text-align: center; |
748 | 771 |
font-family: 'neodgm'; background-image: url('../img/img55_s.png'); width: 110px; height: 128px;} |
749 | 772 |
.time-bg > div{position: relative;} |
... | ... | @@ -830,7 +853,7 @@ |
830 | 853 |
.side_t{ |
831 | 854 |
background-color: #fff; |
832 | 855 |
width: 360px; |
833 |
- height: 100%; |
|
856 |
+ /* height: 100%; */ |
|
834 | 857 |
padding: 25px 40px; |
835 | 858 |
} |
836 | 859 |
|
... | ... | @@ -849,7 +872,7 @@ |
849 | 872 |
to { opacity:1; transform:translate3d(0, 0, 0); } |
850 | 873 |
} |
851 | 874 |
|
852 |
-select{min-width: 128px; border-radius: 5px; padding: 10px 20px; font-size: 18px;} |
|
875 |
+select{min-width: 128px; border-radius: 5px; padding: 10px 20px; font-size: 18px; } |
|
853 | 876 |
select option{font-size: 20px; font-weight: bold;} |
854 | 877 |
|
855 | 878 |
|
... | ... | @@ -917,7 +940,7 @@ |
917 | 940 |
font-family: 'Pretendard-Bold'; |
918 | 941 |
} |
919 | 942 |
.new-btn{ |
920 |
- padding: 5px 20px; |
|
943 |
+ padding: 10px 30px; |
|
921 | 944 |
font-size: 20px; |
922 | 945 |
font-family: 'Pretendard-Bold'; |
923 | 946 |
border-radius: 5px; |
... | ... | @@ -1046,4 +1069,22 @@ |
1046 | 1069 |
min-height: 20rem; |
1047 | 1070 |
} |
1048 | 1071 |
.dropbox p{line-height: 20rem;} |
1072 |
+ |
|
1073 |
+ |
|
1074 |
+ /* 단원 버튼 */ |
|
1075 |
+ .unit-pagination button { |
|
1076 |
+ font-size: 2rem; |
|
1077 |
+ font-family: 'Pretendard-Regular'; |
|
1078 |
+ padding: 5px 30px; |
|
1079 |
+ border: #c6c6c6 3px solid; |
|
1080 |
+ border-radius: 5px; |
|
1081 |
+ color: #331600; |
|
1082 |
+ background-color: #EAEDF4 |
|
1083 |
+} |
|
1084 |
+ |
|
1085 |
+ .unit-pagination .selected-btn { |
|
1086 |
+ background-color:#c6c6c6; |
|
1087 |
+ /* color: #fff; */ |
|
1088 |
+ font-family: 'Pretendard-ExtraBold'; |
|
1089 |
+} |
|
1049 | 1090 |
/* ------------------------선생님 --------------------- */(No newline at end of file) |
+++ client/resources/img/img222_57s.png
Binary file is not shown |
--- client/views/layout/Header.vue
+++ client/views/layout/Header.vue
... | ... | @@ -102,7 +102,7 @@ |
102 | 102 |
|
103 | 103 |
// 페이징 정보 |
104 | 104 |
page: 1, |
105 |
- pageSize: 3, |
|
105 |
+ pageSize: 2, |
|
106 | 106 |
totalpages: null, |
107 | 107 |
|
108 | 108 |
// 사용자 정보 |
--- client/views/layout/Side.vue
+++ client/views/layout/Side.vue
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 |
<div class="profile mb30"> |
5 | 5 |
<div class="flex align-start"> |
6 | 6 |
<img src="../../resources/img/img16_s.png" alt=""> |
7 |
- <div class="ml25" style="width: 100%;"> |
|
7 |
+ <div class="ml25" > |
|
8 | 8 |
<p class="name mb10">학생이름</p> |
9 | 9 |
<p class="mb5">xx중학교 3학년 x반</p> |
10 | 10 |
<progress-bar :progress="progress"></progress-bar> |
--- client/views/layout/Side_t.vue
+++ client/views/layout/Side_t.vue
... | ... | @@ -33,9 +33,10 @@ |
33 | 33 |
<details> |
34 | 34 |
<summary>교재 관리</summary> |
35 | 35 |
<router-link to="/textbook.page" class="tpt">홈</router-link> |
36 |
- <router-link to="/Board.page" class="tpt">게시판</router-link> |
|
37 |
- <router-link to="/Board.page" class="tpt">학생목록</router-link> |
|
38 |
- <router-link to="/Board.page" class="tpt">교재</router-link> |
|
36 |
+ <router-link to="/TextList.page" class="tpt">지문</router-link> |
|
37 |
+ <router-link to="/QuestionList.page" class="tpt">문제</router-link> |
|
38 |
+ <router-link to="/VocaList.page" class="tpt">단어장</router-link> |
|
39 |
+ <router-link to="/ExamList.page" class="tpt">평가</router-link> |
|
39 | 40 |
</details> |
40 | 41 |
</div> |
41 | 42 |
</div> |
--- client/views/pages/AppRouter.js
+++ client/views/pages/AppRouter.js
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 |
import Chapter3_1 from "./main/Chapter/Chapter3_1.vue"; |
36 | 36 |
import Chapter3_2 from "./main/Chapter/Chapter3_2.vue"; |
37 | 37 |
import Chapter3_3 from "./main/Chapter/Chapter3_3.vue"; |
38 |
+import Chapter3_3_1 from "./main/Chapter/Chapter3_3_1.vue"; |
|
38 | 39 |
import Chapter3_4 from "./main/Chapter/Chapter3_4.vue"; |
39 | 40 |
import Chapter3_5 from "./main/Chapter/Chapter3_5.vue"; |
40 | 41 |
import Chapter3_6 from "./main/Chapter/Chapter3_6.vue"; |
... | ... | @@ -81,12 +82,20 @@ |
81 | 82 |
import ClassDetail from "./teacher/ClassDetail.vue"; |
82 | 83 |
import TextList from "./teacher/TextList.vue"; |
83 | 84 |
import TextInsert from "./teacher/TextInsert.vue"; |
85 |
+import TextDetail from "./teacher/TextDetail.vue"; |
|
84 | 86 |
import QuestionList from "./teacher/QuestionList.vue"; |
85 | 87 |
import QuestionInsert from "./teacher/QuestionInsert.vue"; |
88 |
+<<<<<<< HEAD |
|
86 | 89 |
import QuestionDetail from "./teacher/QuestionDetail.vue"; |
90 |
+======= |
|
91 |
+import QuestionDetail from "./teacher/QuestionDetail.vue"; |
|
92 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
87 | 93 |
import VocaList from "./teacher/VocaList.vue"; |
94 |
+import VocaInsert from "./teacher/VocaInsert.vue"; |
|
95 |
+import VocaDetail from "./teacher/VocaDetail.vue"; |
|
88 | 96 |
import ExamList from "./teacher/ExamList.vue"; |
89 | 97 |
import ExamDetail from "./teacher/ExamDetail.vue"; |
98 |
+import ExamInsert from "./teacher/ExamInsert.vue"; |
|
90 | 99 |
import RoadMap from "./teacher/RoadMap.vue"; |
91 | 100 |
|
92 | 101 |
const routes = [ |
... | ... | @@ -142,6 +151,7 @@ |
142 | 151 |
{ path: '/Chapter3_1.page', name: 'Chapter3_1', component: Chapter3_1 }, |
143 | 152 |
{ path: '/Chapter3_2.page', name: 'Chapter3_2', component: Chapter3_2 }, |
144 | 153 |
{ path: '/Chapter3_3.page', name: 'Chapter3_3', component: Chapter3_3 }, |
154 |
+ { path: '/Chapter3_3_1.page', name: 'Chapter3_3_1', component: Chapter3_3_1 }, |
|
145 | 155 |
{ path: '/Chapter3_4.page', name: 'Chapter3_4', component: Chapter3_4 }, |
146 | 156 |
{ path: '/Chapter3_5.page', name: 'Chapter3_5', component: Chapter3_5 }, |
147 | 157 |
{ path: '/Chapter3_6.page', name: 'Chapter3_6', component: Chapter3_6 }, |
... | ... | @@ -185,12 +195,20 @@ |
185 | 195 |
{ path: '/C_TextBookDetail.page', name: 'C_TextBookDetail', component: C_TextBookDetail }, |
186 | 196 |
{ path: '/TextList.page', name: 'TextList', component: TextList }, |
187 | 197 |
{ path: '/TextInsert.page', name: 'TextInsert', component: TextInsert }, |
198 |
+ { path: '/TextDetail.page', name: 'TextDetail', component: TextDetail }, |
|
188 | 199 |
{ path: '/QuestionList.page', name: 'QuestionList', component: QuestionList }, |
189 | 200 |
{ path: '/QuestionInsert.page', name: 'QuestionInsert', component: QuestionInsert }, |
201 |
+<<<<<<< HEAD |
|
190 | 202 |
{ path: '/QuestionDetail.page', name: 'QuestionDetail', component: QuestionDetail }, |
203 |
+======= |
|
204 |
+ { path: '/QuestionDetail.page', name: 'QuestionDetail', component: QuestionDetail }, |
|
205 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
191 | 206 |
{ path: '/VocaList.page', name: 'VocaList', component: VocaList }, |
207 |
+ { path: '/VocaInsert.page', name: 'VocaInsert', component: VocaInsert }, |
|
208 |
+ { path: '/VocaDetail.page', name: 'VocaDetail', component: VocaDetail }, |
|
192 | 209 |
{ path: '/ExamList.page', name: 'ExamList', component: ExamList }, |
193 | 210 |
{ path: '/ExamDetail.page', name: 'ExamDetail', component: ExamDetail }, |
211 |
+ { path: '/ExamInsert.page', name: 'ExamInsert', component: ExamInsert }, |
|
194 | 212 |
{ path: '/C_TextList.page', name: 'C_TextList', component: C_TextList }, |
195 | 213 |
{ path: '/C_TextInsert.page', name: 'C_TextInsert', component: C_TextInsert }, |
196 | 214 |
{ path: '/C_QuestionList.page', name: 'C_QuestionList', component: C_QuestionList }, |
... | ... | @@ -201,6 +219,8 @@ |
201 | 219 |
{ path: '/C_ExamInsert.page', name: 'C_ExamInsert', component: C_ExamInsert }, |
202 | 220 |
|
203 | 221 |
{ path: '/RoadMap.page', name: 'RoadMap', component: RoadMap }, |
222 |
+ |
|
223 |
+ { path: '/TextDetail.page', name: 'TextDetail', component: TextDetail }, |
|
204 | 224 |
], |
205 | 225 |
}, |
206 | 226 |
]; |
--- client/views/pages/main/Camera.vue
+++ client/views/pages/main/Camera.vue
... | ... | @@ -5,20 +5,24 @@ |
5 | 5 |
<svg-icon type="mdi" :path="mdilChevronLeft" style="width: 50px; height: 50px;"></svg-icon> |
6 | 6 |
<p class="title"> 이전글</p> |
7 | 7 |
</button> |
8 |
- <button @click="goToPage('PhotoDesign')" ><img src="../../../resources/img/btn19_74s_normal.png" alt=""> |
|
8 |
+ <button @click="captureAndGoToPhotoDesign"> |
|
9 |
+ <img src="../../../resources/img/btn19_74s_normal.png" alt=""> |
|
9 | 10 |
</button> |
10 | 11 |
</div> |
11 |
- <div class="body "> |
|
12 |
-<img src="../../../resources/img/img140_747s.png" alt=""> |
|
12 |
+ <div class="body" ref="body"> |
|
13 |
+ <div id="container" ref="container"> |
|
14 |
+ <video v-if="!photoTaken" autoplay="true" ref="modalVideoElement" class="mirrored" |
|
15 |
+ @canplay="onVideoLoaded"></video> |
|
16 |
+ </div> |
|
13 | 17 |
</div> |
14 | 18 |
</div> |
15 | 19 |
</template> |
20 |
+ |
|
16 | 21 |
|
17 | 22 |
<script> |
18 | 23 |
import SvgIcon from '@jamescoyle/vue-icon'; |
19 | 24 |
import { mdiMagnify, mdiWindowClose } from '@mdi/js'; |
20 | 25 |
import { mdilChevronRight, mdilChevronLeft } from '@mdi/light-js'; |
21 |
- |
|
22 | 26 |
import axios from "axios"; |
23 | 27 |
|
24 | 28 |
export default { |
... | ... | @@ -31,26 +35,105 @@ |
31 | 35 |
mdilChevronLeft: mdilChevronLeft, |
32 | 36 |
showModal: false, |
33 | 37 |
searchOpen: false, |
38 |
+ photoTaken: false, |
|
39 |
+ stream: null, |
|
40 |
+ videoReady: false, |
|
34 | 41 |
} |
35 | 42 |
}, |
36 | 43 |
methods: { |
37 |
- |
|
38 | 44 |
goToPage(page) { |
39 | 45 |
this.$router.push({ name: page }); |
40 | 46 |
}, |
41 | 47 |
closeModal() { |
42 | 48 |
this.showModal = false; |
49 |
+ if (this.stream) { |
|
50 |
+ let tracks = this.stream.getTracks(); |
|
51 |
+ tracks.forEach(track => track.stop()); |
|
52 |
+ this.stream = null; |
|
53 |
+ } |
|
43 | 54 |
}, |
44 | 55 |
buttonSearch() { |
45 | 56 |
this.searchOpen = true; |
46 | 57 |
}, |
47 | 58 |
closeBtn() { |
48 | 59 |
this.searchOpen = false; |
49 |
- |
|
50 | 60 |
}, |
61 |
+ onVideoLoaded() { |
|
62 |
+ this.videoReady = true; |
|
63 |
+ this.adjustContainerSize(); |
|
64 |
+ }, |
|
65 |
+ adjustContainerSize() { |
|
66 |
+ const video = this.$refs.modalVideoElement; |
|
67 |
+ const container = this.$refs.container; |
|
68 |
+ const body = this.$refs.body; |
|
69 |
+ if (video && container) { |
|
70 |
+ container.style.width = `${video.videoWidth}px`; |
|
71 |
+ container.style.height = `${video.videoHeight}px`; |
|
72 |
+ body.style.height = `${video.videoHeight}px`; |
|
73 |
+ } |
|
74 |
+ }, |
|
75 |
+ captureAndGoToPhotoDesign() { |
|
76 |
+ const video = this.$refs.modalVideoElement; |
|
77 |
+ const canvas = document.createElement('canvas'); |
|
78 |
+ canvas.width = video.videoWidth; |
|
79 |
+ canvas.height = video.videoHeight; |
|
80 |
+ const ctx = canvas.getContext('2d'); |
|
81 |
+ |
|
82 |
+ // 좌우 반전 적용 |
|
83 |
+ ctx.translate(canvas.width, 0); |
|
84 |
+ ctx.scale(-1, 1); |
|
85 |
+ |
|
86 |
+ ctx.drawImage(video, 0, 0, canvas.width, canvas.height); |
|
87 |
+ const imageDataUrl = canvas.toDataURL('image/png'); |
|
88 |
+ this.$router.push({ name: 'PhotoDesign', query: { image: imageDataUrl } }); |
|
89 |
+ } |
|
90 |
+ }, |
|
91 |
+ mounted() { |
|
92 |
+ // Clear localStorage when the component is mounted |
|
93 |
+ localStorage.removeItem('capturedImage'); |
|
94 |
+ |
|
95 |
+ this.videoReady = false; |
|
96 |
+ navigator.mediaDevices.getUserMedia({ video: true }) |
|
97 |
+ .then(stream => { |
|
98 |
+ const modalVideo = this.$refs.modalVideoElement; |
|
99 |
+ modalVideo.srcObject = stream; |
|
100 |
+ this.stream = stream; |
|
101 |
+ modalVideo.addEventListener('loadedmetadata', this.adjustContainerSize); |
|
102 |
+ }) |
|
103 |
+ .catch(error => { |
|
104 |
+ console.log("error>>>>>>>>", error); |
|
105 |
+ }); |
|
51 | 106 |
}, |
52 | 107 |
components: { |
53 | 108 |
SvgIcon |
54 | 109 |
}, |
55 | 110 |
} |
56 | 111 |
</script> |
112 |
+ |
|
113 |
+ |
|
114 |
+<style> |
|
115 |
+.body { |
|
116 |
+ width: 1435px; |
|
117 |
+ height: auto; |
|
118 |
+ margin: 0 auto; |
|
119 |
+} |
|
120 |
+ |
|
121 |
+#container { |
|
122 |
+ position: relative; |
|
123 |
+ margin: auto; |
|
124 |
+ border: 10px #333 solid; |
|
125 |
+ display: flex; |
|
126 |
+ justify-content: center; |
|
127 |
+ align-items: center; |
|
128 |
+} |
|
129 |
+ |
|
130 |
+video { |
|
131 |
+ width: 100%; |
|
132 |
+ height: auto; |
|
133 |
+ background-color: #666; |
|
134 |
+} |
|
135 |
+ |
|
136 |
+.mirrored { |
|
137 |
+ transform: scaleX(-1); |
|
138 |
+} |
|
139 |
+</style> |
--- client/views/pages/main/Chapter/Chapter2_1.vue
+++ client/views/pages/main/Chapter/Chapter2_1.vue
... | ... | @@ -1,63 +1,169 @@ |
1 | 1 |
<template> |
2 |
- <div id="Chapter1_1" class="content-wrap"> |
|
2 |
+ <div id="Chapter1_1" class="content-wrap"> |
|
3 | 3 |
<div class="title-box mb25 flex align-center mt40"> |
4 |
- <span class="title mr40">1. Hello WORLD</span> |
|
5 |
- <span class="subtitle">my name is dd</span> |
|
4 |
+ <span class="title mr40">1. Hello WORLD</span> |
|
5 |
+ <span class="subtitle">my name is dd</span> |
|
6 | 6 |
</div> |
7 | 7 |
<div class="flex justify-between align-center"> |
8 |
- <div class="pre-btn" @click="goToPage('Chapter2')"><img src="../../../../resources/img/left.png" alt=""></div> |
|
9 |
- <div class="content title-box"> |
|
10 |
- <p class="title mt25 title-bg">step2</p> |
|
11 |
- <div class="flex align-center mb30"> |
|
12 |
- <p class="subtitle2 mr20">오늘 배웠던 단어를 말하고 생성된 예문을 따라 읽어보세요</p> |
|
13 |
- <!-- <button><img src="../../../../resources/img/btn10_s.png" alt=""> |
|
14 |
- </button> --> |
|
15 |
- </div> |
|
16 |
- <div class="flex justify-center "> |
|
17 |
- <div class="readGroup"> |
|
18 |
- <section > |
|
19 |
- <div class="imgGroup flex justify-center"> |
|
20 |
- <div class="mic-btn"> |
|
21 |
- <img src="../../../../resources/img/btn11_s.png" alt=""> |
|
22 |
- </div> |
|
23 |
- |
|
24 |
- </div> |
|
25 |
- <article > |
|
26 |
- <input type="text" class="speak mb25" placeholder="오늘 배운 단어를 말해보세요!"> |
|
27 |
- <p class="read-ai"><img style="margin-top: -5px;" src="../../../../resources/img/img43_s.png" alt=""></p> |
|
28 |
- </article> |
|
29 |
- |
|
30 |
- </section> |
|
31 |
- |
|
8 |
+ <div class="pre-btn" @click="goToPage('Chapter2')"> |
|
9 |
+ <img src="../../../../resources/img/left.png" alt="" /> |
|
32 | 10 |
</div> |
33 |
- </div> |
|
34 |
- </div> |
|
35 |
- <div class="next-btn" @click="goToPage('Chapter2_2')"><img src="../../../../resources/img/right.png" alt=""></div> |
|
11 |
+ <div class="content title-box"> |
|
12 |
+ <p class="title mt25 title-bg">step2</p> |
|
13 |
+ <div class="flex align-center mb30"> |
|
14 |
+ <p class="subtitle2 mr20">오늘 배웠던 단어를 말하고 생성된 예문을 따라 읽어보세요</p> |
|
15 |
+ <!-- <button><img src="../../../../resources/img/btn10_s.png" alt=""> |
|
16 |
+ </button> --> |
|
17 |
+ </div> |
|
18 |
+ <div> |
|
19 |
+ <img src="http://localhost:8081/client/build/dad67b1726cb2d2b215965b433149ca3.png" data-num="1" /> |
|
20 |
+ <p> {{ word }} </p> |
|
21 |
+ <p> {{ mean }} </p> |
|
22 |
+ </div> |
|
23 |
+ <div class="flex justify-center"> |
|
24 |
+ <div class="readGroup"> |
|
25 |
+ <section> |
|
26 |
+ <div class="imgGroup flex justify-center"> |
|
27 |
+ <!-- 녹음 버튼 --> |
|
28 |
+ <div :class="['mic-btn', { notRecording: !isRecording }]" @click="toggleRecording"> |
|
29 |
+ <img src="../../../../resources/img/btn11_s.png" alt="" /> |
|
30 |
+ </div> |
|
31 |
+ </div> |
|
32 |
+ <article> |
|
33 |
+ <p class="speakText mb25"> |
|
34 |
+ <span v-if="transcription === null" |
|
35 |
+ >위의 버튼을 누른 후 오늘 배운 단어를 말해보세요!</span |
|
36 |
+ > |
|
37 |
+ <span v-else-if="!transcription || transcription.trim() === ''" |
|
38 |
+ >다시 말해보세요!</span |
|
39 |
+ > |
|
40 |
+ <span v-else>{{ transcription }}</span> |
|
41 |
+ </p> |
|
42 |
+ <p class="read-ai"> |
|
43 |
+ <img style="margin-top: -5px" src="../../../../resources/img/img43_s.png" alt="" /> |
|
44 |
+ </p> |
|
45 |
+ </article> |
|
46 |
+ </section> |
|
47 |
+ </div> |
|
48 |
+ </div> |
|
49 |
+ </div> |
|
50 |
+ <div class="next-btn" @click="goToPage('Chapter2_2')"> |
|
51 |
+ <img src="../../../../resources/img/right.png" alt="" /> |
|
52 |
+ </div> |
|
36 | 53 |
</div> |
37 |
- </div> |
|
38 |
- </template> |
|
39 |
- |
|
40 |
- <script> |
|
41 |
- export default { |
|
42 |
- data() { |
|
54 |
+ </div> |
|
55 |
+</template> |
|
56 |
+ |
|
57 |
+<script> |
|
58 |
+import axios from 'axios'; |
|
59 |
+import SvgIcon from '@jamescoyle/vue-icon'; |
|
60 |
+import { mdiStop } from '@mdi/js'; |
|
61 |
+export default { |
|
62 |
+ data() { |
|
43 | 63 |
return { |
44 |
- } |
|
45 |
- }, |
|
46 |
- methods: { |
|
64 |
+ isRecording: false, // 녹음 중 여부 |
|
65 |
+ mediaRecorder: null, |
|
66 |
+ audioChunks: [], // 녹음된 오디오 데이터 |
|
67 |
+ audioBlob: null, // 오디오 Blob 객체 |
|
68 |
+ transcription: null, // 서버에서 받아온 텍스트 결과 |
|
69 |
+ stream: null, // MediaStream 객체 |
|
70 |
+ |
|
71 |
+ path: mdiStop, |
|
72 |
+ |
|
73 |
+ /* audioURL : null // 오디오 URL 객체 */ |
|
74 |
+ |
|
75 |
+ word : "apple", |
|
76 |
+ mean : "사과", |
|
77 |
+ imageSrc : "http://localhost:8081/client/build/dad67b1726cb2d2b215965b433149ca3.png" |
|
78 |
+ }; |
|
79 |
+ }, |
|
80 |
+ methods: { |
|
47 | 81 |
goToPage(page) { |
48 |
- this.$router.push({ name: page }); |
|
49 |
- } |
|
50 |
- }, |
|
51 |
- watch: { |
|
52 |
- |
|
53 |
- }, |
|
54 |
- computed: { |
|
55 |
- |
|
56 |
- }, |
|
57 |
- components: { |
|
58 |
- }, |
|
59 |
- mounted() { |
|
60 |
- |
|
61 |
- } |
|
62 |
- } |
|
63 |
- </script>(No newline at end of file) |
|
82 |
+ this.$router.push({ name: page }); |
|
83 |
+ }, |
|
84 |
+ // 녹음 시작/중지 토글 |
|
85 |
+ async toggleRecording() { |
|
86 |
+ if (this.isRecording) { |
|
87 |
+ console.log('녹음 그만!'); |
|
88 |
+ this.stopRecording(); // 녹음 중이면 중지 |
|
89 |
+ } else { |
|
90 |
+ console.log('녹음 시작!'); |
|
91 |
+ await this.startRecording(); // 녹음 중이 아니면 녹음 시작 |
|
92 |
+ } |
|
93 |
+ }, |
|
94 |
+ |
|
95 |
+ // 녹음 시작 |
|
96 |
+ async startRecording() { |
|
97 |
+ this.audioChunks = []; // 오디오 초기화 |
|
98 |
+ this.stream = await navigator.mediaDevices.getUserMedia({ audio: true }); |
|
99 |
+ this.mediaRecorder = new MediaRecorder(this.stream); |
|
100 |
+ this.mediaRecorder.ondataavailable = (event) => { |
|
101 |
+ this.audioChunks.push(event.data); // 녹음 데이터 저장 |
|
102 |
+ }; |
|
103 |
+ this.mediaRecorder.onstop = () => { |
|
104 |
+ this.audioBlob = new Blob(this.audioChunks, { type: 'audio/wav' }); |
|
105 |
+ |
|
106 |
+ /******************************/ |
|
107 |
+ // this.audioURL = URL.createObjectURL(this.audioBlob); // 오디오 URL 생성 |
|
108 |
+ // console.log('Audio URL:', this.audioURL); |
|
109 |
+ /******************************/ |
|
110 |
+ |
|
111 |
+ console.log('Recorded Audio Blob:', this.audioBlob); // 콘솔에 Blob 확인 |
|
112 |
+ this.sendAudioToServer(); // 서버로 오디오 전송 |
|
113 |
+ }; |
|
114 |
+ this.mediaRecorder.start(); // 녹음 시작 |
|
115 |
+ this.isRecording = true; // 녹음 상태 변경 |
|
116 |
+ }, |
|
117 |
+ |
|
118 |
+ // 녹음 중지 |
|
119 |
+ stopRecording() { |
|
120 |
+ this.mediaRecorder.stop(); // 녹음 중단 |
|
121 |
+ |
|
122 |
+ if (this.stream) { |
|
123 |
+ this.stream.getTracks().forEach((track) => track.stop()); // 스트림의 모든 트랙 중지 |
|
124 |
+ } |
|
125 |
+ |
|
126 |
+ this.isRecording = false; // 녹음 상태 변경 |
|
127 |
+ }, |
|
128 |
+ |
|
129 |
+ // 오디오 전송 |
|
130 |
+ async sendAudioToServer() { |
|
131 |
+ const formData = new FormData(); |
|
132 |
+ formData.append('file', this.audioBlob, 'recording.wav'); |
|
133 |
+ try { |
|
134 |
+ const resposne = await axios.post('/api/speechToText.json', formData, { |
|
135 |
+ headers: { |
|
136 |
+ 'Content-Type': 'multipart/form-data', |
|
137 |
+ }, |
|
138 |
+ }); |
|
139 |
+ this.transcription = resposne.data; |
|
140 |
+ console.log(`받은 데이터 : ${this.transcription}`); |
|
141 |
+ } catch (error) { |
|
142 |
+ console.log('파일 전송 실패 : ', error); |
|
143 |
+ } |
|
144 |
+ }, |
|
145 |
+ }, |
|
146 |
+ watch: {}, |
|
147 |
+ computed: {}, |
|
148 |
+ components: { |
|
149 |
+ SvgIcon, |
|
150 |
+ }, |
|
151 |
+ mounted() {}, |
|
152 |
+}; |
|
153 |
+</script> |
|
154 |
+<style scoped> |
|
155 |
+.mic-btn { |
|
156 |
+ cursor: pointer; |
|
157 |
+} |
|
158 |
+.mic-btn.notRecording { |
|
159 |
+ background-image: none; |
|
160 |
+ cursor: pointer; |
|
161 |
+} |
|
162 |
+.speakText { |
|
163 |
+ background-color: #fff8e9; |
|
164 |
+ border: 0; |
|
165 |
+} |
|
166 |
+.speakText span { |
|
167 |
+ font-size: 28px; |
|
168 |
+} |
|
169 |
+</style>(No newline at end of file) |
--- client/views/pages/main/Chapter/Chapter3_1.vue
+++ client/views/pages/main/Chapter/Chapter3_1.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="flex align-center justify-center" style="gap: 113px;"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
23 | 26 |
</div> |
24 | 27 |
</div> |
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="pickGroup "> |
27 | 30 |
<div class="flex" style="gap: 250px;"> |
28 | 31 |
<article class="text-ct"> |
... | ... | @@ -108,7 +111,6 @@ |
108 | 111 |
|
109 | 112 |
.pickGroup button { |
110 | 113 |
position: relative; |
111 |
- margin-right: 30px; |
|
112 | 114 |
} |
113 | 115 |
|
114 | 116 |
.pickGroup button p { |
--- client/views/pages/main/Chapter/Chapter3_10.vue
+++ client/views/pages/main/Chapter/Chapter3_10.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup mt20"> |
27 | 30 |
<img src="../../../../resources/img/img116_59s.png" alt=""> |
28 | 31 |
<p class="title1 mt10" style="width: auto;"><strong>진수가 거절한 제안</strong>은 무엇인지 우리말로 쓰세요.</p> |
--- client/views/pages/main/Chapter/Chapter3_11.vue
+++ client/views/pages/main/Chapter/Chapter3_11.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup mt20"> |
27 | 30 |
<img src="../../../../resources/img/img115_58s.png" alt=""> |
28 | 31 |
<!-- <p class="title1 mt10"><strong>진수가 거절한 제안</strong>은 무엇인지 우리말로 쓰세요.</p> --> |
--- client/views/pages/main/Chapter/Chapter3_12.vue
+++ client/views/pages/main/Chapter/Chapter3_12.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class=" text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="dragGroup mt40"> |
27 | 30 |
<div class="flex justify-center" style="gap: 20px;"> |
28 | 31 |
<button><img src="../../../../resources/img/img63_37s.png" alt=""> |
--- client/views/pages/main/Chapter/Chapter3_13.vue
+++ client/views/pages/main/Chapter/Chapter3_13.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="flex justify-center "> |
27 | 30 |
<div class=" flex justify-between align-center" style="width: 50%;"> |
28 | 31 |
<div class="pickGroup left"> |
--- client/views/pages/main/Chapter/Chapter3_14.vue
+++ client/views/pages/main/Chapter/Chapter3_14.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup"><img src="../../../../resources/img/img124_63s.png" alt=""></div> |
27 | 30 |
|
28 | 31 |
<div class="dropGroup flex align-center justify-center mt30"> |
--- client/views/pages/main/Chapter/Chapter3_15.vue
+++ client/views/pages/main/Chapter/Chapter3_15.vue
... | ... | @@ -9,39 +9,33 @@ |
9 | 9 |
<div class="content title-box"> |
10 | 10 |
<p class="title mt25 title-bg">step3</p> |
11 | 11 |
<div class="flex align-center mb30"> |
12 |
- <p class="subtitle2 mr20">그림에 알맞는 낱말을 쓰세요.</p> |
|
13 |
- <!-- <button><img src="../../../../resources/img/btn10_s.png" alt=""> |
|
14 |
- </button> --> |
|
12 |
+ <p class="subtitle2 mr20">듣고 올바른 대답을 말해보세요!</p> |
|
13 |
+ <button><img src="../../../../resources/img/btn10_s.png" alt=""> |
|
14 |
+ </button> |
|
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup"><img src="../../../../resources/img/img125_64s.png" alt=""></div> |
27 | 30 |
|
28 | 31 |
<div class="dropGroup flex align-center justify-center mt30"> |
29 |
- <div class="flex" style="gap: 20px;"> |
|
30 |
- <div class="bd-bt textbox" @click="showButton(1)"> |
|
31 |
- <p v-if="showButton1">A</p></div> |
|
32 |
- <div class="bd-bt textbox" @click="showButton(2)"> |
|
33 |
- <p v-if="showButton2">A</p></div> |
|
34 |
- <div class="bd-bt textbox" @click="showButton(3)"> |
|
35 |
- <p v-if="showButton3">A</p></div> |
|
36 |
- <div class="bd-bt textbox" @click="showButton(4)"> |
|
37 |
- <p v-if="showButton4">A</p></div> |
|
38 |
- </div> |
|
32 |
+ <img src="../../../../resources/img/btn18_64s_normal.png" alt=""> |
|
39 | 33 |
|
40 | 34 |
</div> |
41 | 35 |
|
42 | 36 |
</div> |
43 | 37 |
</div> |
44 |
- <div class="next-btn" @click="goToPage('Chapter3_16')"><img src="../../../../resources/img/right.png" alt=""></div> |
|
38 |
+ <div class="next-btn" @click="goToPage('Chapter4')"><img src="../../../../resources/img/right.png" alt=""></div> |
|
45 | 39 |
</div> |
46 | 40 |
</div> |
47 | 41 |
</template> |
--- client/views/pages/main/Chapter/Chapter3_16.vue
+++ client/views/pages/main/Chapter/Chapter3_16.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
<span class="subtitle">my name is dd</span> |
6 | 6 |
</div> |
7 | 7 |
<div class="flex justify-between align-center"> |
8 |
- <div class="pre-btn" @click="goToPage('Chapter3_15')"><img src="../../../../resources/img/left.png" alt=""></div> |
|
8 |
+ <div class="pre-btn" @click="goToPage('Chapter4')"><img src="../../../../resources/img/left.png" alt=""></div> |
|
9 | 9 |
<div class="content title-box"> |
10 | 10 |
<p class="title mt25 title-bg">중간 평가 설문 조사</p> |
11 | 11 |
<div class="flex align-center mb30"> |
--- client/views/pages/main/Chapter/Chapter3_2.vue
+++ client/views/pages/main/Chapter/Chapter3_2.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup "> |
27 | 30 |
<img src="../../../../resources/img/img109_51s.png" alt=""> |
28 | 31 |
</div> |
--- client/views/pages/main/Chapter/Chapter3_3.vue
+++ client/views/pages/main/Chapter/Chapter3_3.vue
... | ... | @@ -13,14 +13,17 @@ |
13 | 13 |
</div> |
14 | 14 |
|
15 | 15 |
<div class="text-ct"> |
16 |
- <div class="time-bg"> |
|
17 |
- <div> |
|
18 |
- <div class="time"> |
|
19 |
- <p class="second">{{ timer }}</p> |
|
20 |
- <p class="text">sec</p> |
|
16 |
+ <div class="time-hint"> |
|
17 |
+ <button class="hint-btn">HINT</button> |
|
18 |
+ <div class="time-bg mt20"> |
|
19 |
+ <div> |
|
20 |
+ <div class="time"> |
|
21 |
+ <p class="second">{{ timer }}</p> |
|
22 |
+ <p class="text">sec</p> |
|
23 |
+ </div> |
|
24 |
+ </div> |
|
21 | 25 |
</div> |
22 |
- </div> |
|
23 |
- </div> |
|
26 |
+ </div> |
|
24 | 27 |
<div class="pickGroup mt60 flex align-center justify-center" style="gap: 100px; margin-top: 7%;"> |
25 | 28 |
<article style="gap: 60px; bottom: 159px; |
26 | 29 |
left: 242px;"> |
... | ... | @@ -43,7 +46,7 @@ |
43 | 46 |
</div> |
44 | 47 |
</div> |
45 | 48 |
</div> |
46 |
- <div class="next-btn" @click="goToPage('Chapter3_4')"><img src="../../../../resources/img/right.png" alt=""></div> |
|
49 |
+ <div class="next-btn" @click="goToPage('Chapter3_3_1')"><img src="../../../../resources/img/right.png" alt=""></div> |
|
47 | 50 |
</div> |
48 | 51 |
</div> |
49 | 52 |
</template> |
+++ client/views/pages/main/Chapter/Chapter3_3_1.vue
... | ... | @@ -0,0 +1,150 @@ |
1 | +<template> | |
2 | + <div id="Chapter1_1" class="content-wrap"> | |
3 | + <div class="title-box mb25 flex align-center mt40"> | |
4 | + <span class="title mr40">1. Hello WORLD</span> | |
5 | + <span class="subtitle">my name is dd</span> | |
6 | + </div> | |
7 | + <div class="flex justify-between align-center"> | |
8 | + <div class="pre-btn" @click="goToPage('Chapter3_3')"><img src="../../../../resources/img/left.png" alt=""></div> | |
9 | + <div class="content title-box"> | |
10 | + <p class="title mt25 title-bg">step3.</p> | |
11 | + <div class="flex align-center mb30"> | |
12 | + <p class="subtitle2 mr20">1. see the picture</p> | |
13 | + <button><img src="../../../../resources/img/btn10_s.png" alt=""> | |
14 | + </button> | |
15 | + </div> | |
16 | + | |
17 | + <div class="text-ct"> | |
18 | + <div class="time-hint"> | |
19 | + <button class="hint-btn">HINT</button> | |
20 | + <div class="time-bg mt20"> | |
21 | + <div> | |
22 | + <div class="time"> | |
23 | + <p class="second">{{ timer }}</p> | |
24 | + <p class="text">sec</p> | |
25 | + </div> | |
26 | + </div> | |
27 | + </div> | |
28 | + </div> | |
29 | + <div class="imgGroup "> | |
30 | + <img src="../../../../resources/img/img109_51s.png" alt=""> | |
31 | + </div> | |
32 | + | |
33 | + <div class="pickGroup mt60 flex align-center justify-center" style="gap: 100px; margin-top: 7%;"> | |
34 | + <article style="gap: 60px; bottom: 159px; | |
35 | + left: 242px;"> | |
36 | + <div class="flex align-center"> | |
37 | + <button><img src="../../../../resources/img/img136_71s.png" alt=""> | |
38 | + <p>1</p> | |
39 | + </button> | |
40 | + <img src="../../../../resources/img/img122_62s.png" alt=""> | |
41 | + </div> | |
42 | + </article> | |
43 | + <article style="gap: 60px; bottom: 159px; | |
44 | + right: 559px;"> | |
45 | + <div class="flex align-center"> | |
46 | + <button><img src="../../../../resources/img/img136_71s.png" alt=""> | |
47 | + <p>2</p> | |
48 | + </button> | |
49 | + <img src="../../../../resources/img/img123_62s.png" alt=""> | |
50 | + </div> | |
51 | + </article> | |
52 | + <article style="gap: 60px; bottom: 159px; | |
53 | + right: 559px;"> | |
54 | + <div class="flex align-center"> | |
55 | + <button><img src="../../../../resources/img/img136_71s.png" alt=""> | |
56 | + <p>3</p> | |
57 | + </button> | |
58 | + <img src="../../../../resources/img/img121_62s.png" alt=""> | |
59 | + </div> | |
60 | + </article> | |
61 | + </div> | |
62 | + </div> | |
63 | + </div> | |
64 | + <div class="next-btn" @click="goToPage('Chapter3_4')"><img src="../../../../resources/img/right.png" alt=""></div> | |
65 | + </div> | |
66 | + </div> | |
67 | +</template> | |
68 | + | |
69 | +<script> | |
70 | +export default { | |
71 | + data() { | |
72 | + return { | |
73 | + timer: '00' | |
74 | + } | |
75 | + }, | |
76 | + methods: { | |
77 | + goToPage(page) { | |
78 | + this.$router.push({ name: page }); | |
79 | + }, | |
80 | + startTimer() { | |
81 | + if (this.intervalId) { | |
82 | + clearInterval(this.intervalId); | |
83 | + } | |
84 | + this.timer = 5; | |
85 | + this.intervalId = setInterval(() => { | |
86 | + if (this.timer > 0) { | |
87 | + this.timer--; | |
88 | + } else { | |
89 | + clearInterval(this.intervalId); | |
90 | + } | |
91 | + }, 1000); | |
92 | + } | |
93 | + }, | |
94 | + watch: { | |
95 | + | |
96 | + }, | |
97 | + computed: { | |
98 | + | |
99 | + }, | |
100 | + components: { | |
101 | + }, | |
102 | + mounted() { | |
103 | + | |
104 | + } | |
105 | +} | |
106 | +</script> | |
107 | +<style scoped> | |
108 | +.inputbox { | |
109 | + font-size: 38px; | |
110 | + font-family: 'Pretendard-ExtraBold'; | |
111 | +} | |
112 | + | |
113 | +.imgGroup button { | |
114 | + position: relative; | |
115 | +} | |
116 | + | |
117 | +.imgGroup button p, | |
118 | +.textbox p { | |
119 | + position: absolute; | |
120 | + top: 50%; | |
121 | + left: 50%; | |
122 | + transform: translate(-50%, -50%); | |
123 | + width: fit-content; | |
124 | + height: fit-content; | |
125 | + background: #ffffffb8; | |
126 | + border-radius: 5px; | |
127 | + padding: 10px; | |
128 | + font-size: 48px; | |
129 | + font-family: 'ONEMobilePOP'; | |
130 | +} | |
131 | + | |
132 | +.pickGroup p { | |
133 | + font-size: 34px; | |
134 | + font-weight: bold; | |
135 | +} | |
136 | + | |
137 | +.pickGroup button { | |
138 | + position: relative; | |
139 | + margin-right: 30px; | |
140 | +} | |
141 | + | |
142 | +.pickGroup button p { | |
143 | + font-size: 34px; | |
144 | + color: #c6c6c6; | |
145 | + position: absolute; | |
146 | + top: 50%; | |
147 | + left: 50%; | |
148 | + transform: translate(-50%, -50%); | |
149 | +} | |
150 | +</style>(No newline at end of file) |
--- client/views/pages/main/Chapter/Chapter3_4.vue
+++ client/views/pages/main/Chapter/Chapter3_4.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 |
<span class="subtitle">my name is dd</span> |
6 | 6 |
</div> |
7 | 7 |
<div class="flex justify-between align-center"> |
8 |
- <div class="pre-btn" @click="goToPage('Chapter3_3')"><img src="../../../../resources/img/left.png" alt=""></div> |
|
8 |
+ <div class="pre-btn" @click="goToPage('Chapter3_3_1')"><img src="../../../../resources/img/left.png" alt=""></div> |
|
9 | 9 |
<div class="content title-box"> |
10 | 10 |
<p class="title mt25 title-bg">step3.</p> |
11 | 11 |
<div class="flex align-center mb30"> |
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="pickGroup flex align-center justify-center" style="gap: 100px; margin-top: 7%;"> |
27 | 30 |
<article style="gap: 60px; bottom: 159px; |
28 | 31 |
left: 242px;"> |
--- client/views/pages/main/Chapter/Chapter3_5.vue
+++ client/views/pages/main/Chapter/Chapter3_5.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class=" text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup "> |
27 | 30 |
<img src="../../../../resources/img/img125_64s.png" alt=""> |
28 | 31 |
</div> |
--- client/views/pages/main/Chapter/Chapter3_6.vue
+++ client/views/pages/main/Chapter/Chapter3_6.vue
... | ... | @@ -14,14 +14,17 @@ |
14 | 14 |
<button><img src="../../../../resources/img/btn10_s.png" alt=""> |
15 | 15 |
</button> |
16 | 16 |
</div> |
17 |
- <div class="time-bg"> |
|
18 |
- <div> |
|
17 |
+ <div class="time-hint"> |
|
18 |
+ <button class="hint-btn">HINT</button> |
|
19 |
+ <div class="time-bg mt20"> |
|
20 |
+ <div> |
|
19 | 21 |
<div class="time"> |
20 |
- <p class="second">{{ timer }}</p> |
|
21 |
- <p class="text">sec</p> |
|
22 |
+ <p class="second">{{ timer }}</p> |
|
23 |
+ <p class="text">sec</p> |
|
22 | 24 |
</div> |
23 |
- </div> |
|
24 |
- </div> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
27 |
+ </div> |
|
25 | 28 |
|
26 | 29 |
<div class="imgGroup"> |
27 | 30 |
<img src="../../../../resources/img/img114_57s.png" alt=""> |
--- client/views/pages/main/Chapter/Chapter3_7.vue
+++ client/views/pages/main/Chapter/Chapter3_7.vue
... | ... | @@ -15,16 +15,19 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
|
27 |
- <div class="pickGroup flex align-center justify-between" style="gap: 100px;"> |
|
30 |
+ <div class="pickGroup flex align-center justify-between mt80" style="gap: 100px;"> |
|
28 | 31 |
<p>1. 문제</p> |
29 | 32 |
<div class="flex justify-center" style="gap: 60px;"> |
30 | 33 |
<article > |
--- client/views/pages/main/Chapter/Chapter3_8.vue
+++ client/views/pages/main/Chapter/Chapter3_8.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup flex align-center justify-center mt50"> |
27 | 30 |
<img src="../../../../resources/img/img114_57s.png" alt=""> |
28 | 31 |
<input class="yellow-bd ml50" style="width: 30%;" type="text" name="" id="" placeholder="답을 입력하세요."> |
--- client/views/pages/main/Chapter/Chapter3_9.vue
+++ client/views/pages/main/Chapter/Chapter3_9.vue
... | ... | @@ -15,14 +15,17 @@ |
15 | 15 |
</div> |
16 | 16 |
|
17 | 17 |
<div class="mt50 text-ct"> |
18 |
- <div class="time-bg"> |
|
19 |
- <div> |
|
20 |
- <div class="time"> |
|
21 |
- <p class="second">{{ timer }}</p> |
|
22 |
- <p class="text">sec</p> |
|
18 |
+ <div class="time-hint"> |
|
19 |
+ <button class="hint-btn">HINT</button> |
|
20 |
+ <div class="time-bg mt20"> |
|
21 |
+ <div> |
|
22 |
+ <div class="time"> |
|
23 |
+ <p class="second">{{ timer }}</p> |
|
24 |
+ <p class="text">sec</p> |
|
25 |
+ </div> |
|
26 |
+ </div> |
|
23 | 27 |
</div> |
24 |
- </div> |
|
25 |
- </div> |
|
28 |
+ </div> |
|
26 | 29 |
<div class="imgGroup mt50"> |
27 | 30 |
<img src="../../../../resources/img/img115_58s.png" alt=""> |
28 | 31 |
<div class=" mt50"> |
--- client/views/pages/main/Chapter/Chapter4.vue
+++ client/views/pages/main/Chapter/Chapter4.vue
... | ... | @@ -102,7 +102,7 @@ |
102 | 102 |
|
103 | 103 |
</div> |
104 | 104 |
</div> |
105 |
- <div class="next-btn" @click="goToPage('Dashboard')"><img src="../../../../resources/img/right.png" alt=""> |
|
105 |
+ <div class="next-btn" @click="goToPage('Chapter3_16')"><img src="../../../../resources/img/right.png" alt=""> |
|
106 | 106 |
</div> |
107 | 107 |
</div> |
108 | 108 |
</div> |
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
... | ... | @@ -6,131 +6,288 @@ |
6 | 6 |
<p class="subtitle">hi my name is dd!</p> |
7 | 7 |
</div> |
8 | 8 |
<div class="race-box"> |
9 |
- <div class="rabbit"><img src="../../../resources/img/img09_s.png" alt=""></div> |
|
9 |
+ <div class="rabbit-start"><img src="../../../resources/img/img09_s.png" alt=""></div> |
|
10 | 10 |
<div class="rcon flex justify-end mb5"> |
11 | 11 |
<div class="race-btn" @click="goToPage('Chapter1')"> |
12 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="1"> |
|
13 |
- <img :src="item.imgSrc1" > |
|
14 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
15 |
- </button> |
|
12 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
13 |
+ data-num="1"> |
|
14 |
+ <img :src="item.imgSrc1"> |
|
15 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
16 |
+ </button> |
|
16 | 17 |
<p>지문1</p> |
17 | 18 |
</div> |
18 | 19 |
<div class="race-btn" @click="goToPage('Chapter2')"> |
19 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="2"> |
|
20 |
- <img :src="item.imgSrc1" > |
|
21 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
22 |
- </button> |
|
20 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
21 |
+ data-num="2"> |
|
22 |
+ <img :src="item.imgSrc1"> |
|
23 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
24 |
+ </button> |
|
23 | 25 |
<p>단어장</p> |
24 | 26 |
</div> |
25 | 27 |
</div> |
26 | 28 |
<div class="lcon flex justify-between mb5"> |
27 | 29 |
<div class="race-btn" @click="goToPage('Chapter7')"> |
28 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="7"> |
|
29 |
- <img :src="item.imgSrc1" > |
|
30 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
31 |
- </button> |
|
30 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
31 |
+ data-num="7"> |
|
32 |
+ <img :src="item.imgSrc1"> |
|
33 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
34 |
+ </button> |
|
32 | 35 |
<p>문제1</p> |
33 | 36 |
</div> |
34 | 37 |
<div class="race-btn" @click="goToPage('Chapter6')"> |
35 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="6"> |
|
36 |
- <img :src="item.imgSrc1" > |
|
37 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
38 |
- </button> |
|
38 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
39 |
+ data-num="6"> |
|
40 |
+ <img :src="item.imgSrc1"> |
|
41 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
42 |
+ </button> |
|
39 | 43 |
<p>단어장</p> |
40 | 44 |
</div> |
41 | 45 |
<div class="race-btn" @click="goToPage('Chapter5')"> |
42 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="5"> |
|
43 |
- <img :src="item.imgSrc1" > |
|
44 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
45 |
- </button> |
|
46 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
47 |
+ data-num="5"> |
|
48 |
+ <img :src="item.imgSrc1"> |
|
49 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
50 |
+ </button> |
|
46 | 51 |
<p>지문2</p> |
47 | 52 |
</div> |
48 | 53 |
<div class="race-btn" @click="goToPage('Chapter4')"> |
49 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="4"> |
|
50 |
- <img :src="item.imgSrc1" > |
|
51 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
52 |
- </button> |
|
54 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
55 |
+ data-num="4"> |
|
56 |
+ <img :src="item.imgSrc1"> |
|
57 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
58 |
+ </button> |
|
53 | 59 |
<p>문제2</p> |
54 | 60 |
</div> |
55 | 61 |
<div class="race-btn" @click="goToPage('Chapter3')"> |
56 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="3"> |
|
57 |
- <img :src="item.imgSrc1" > |
|
58 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
59 |
- </button> |
|
62 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
63 |
+ data-num="3"> |
|
64 |
+ <img :src="item.imgSrc1"> |
|
65 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
66 |
+ </button> |
|
60 | 67 |
<p>문제1</p> |
61 | 68 |
</div> |
62 | 69 |
</div> |
63 | 70 |
<div class="rcon flex"> |
64 | 71 |
<div class="race-btn" @click="goToPage('Chapter8')"> |
65 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="8"> |
|
66 |
- <img :src="item.imgSrc3" > |
|
67 |
- <img :src="item.imgSrc4" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
68 |
- </button> |
|
72 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
73 |
+ data-num="8"> |
|
74 |
+ <img :src="item.imgSrc3"> |
|
75 |
+ <img :src="item.imgSrc4" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
76 |
+ </button> |
|
69 | 77 |
<p class="long">중간 평가</p> |
70 | 78 |
</div> |
71 | 79 |
<div class="race-btn" @click="goToPage('Chapter9')"> |
72 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="9"> |
|
73 |
- <img :src="item.imgSrc1" > |
|
74 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
75 |
- </button> |
|
80 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
81 |
+ data-num="9"> |
|
82 |
+ <img :src="item.imgSrc1"> |
|
83 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
84 |
+ </button> |
|
76 | 85 |
<p>지문3</p> |
77 | 86 |
</div> |
78 | 87 |
<div class="race-btn" @click="goToPage('Chapter10')"> |
79 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="10"> |
|
80 |
- <img :src="item.imgSrc1" > |
|
81 |
- <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
82 |
- </button> |
|
88 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" |
|
89 |
+ data-num="10"> |
|
90 |
+ <img :src="item.imgSrc1"> |
|
91 |
+ <img :src="item.imgSrc2" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
92 |
+ </button> |
|
83 | 93 |
<p>단어장</p> |
84 | 94 |
</div> |
85 |
- <div class="race-btn" > |
|
86 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="toggleImage(index)" data-num="11"> |
|
87 |
- <img :src="item.imgSrc3" > |
|
88 |
- <img :src="item.imgSrc4" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
89 |
- </button> |
|
90 |
- <p class="long">최종 평가</p> |
|
95 |
+ <div class="rcon flex"> |
|
96 |
+ <div class="race-btn"> |
|
97 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" |
|
98 |
+ @click="toggleImageAndShowPopup(index, '11')"> |
|
99 |
+ <img :src="item.imgSrc3"> |
|
100 |
+ <img :src="item.imgSrc4" :style="{ display: item.isSecondImageVisible ? 'block' : 'none' }"> |
|
101 |
+ </button> |
|
102 |
+ <p class="long">최종 평가</p> |
|
103 |
+ </div> |
|
91 | 104 |
</div> |
92 | 105 |
</div> |
93 | 106 |
</div> |
94 | 107 |
<!-- 팝업 --> |
95 |
- <div v-show="searchOpen" class="popup-wrap"> |
|
96 |
- <div class="popup-box "> |
|
97 |
- <div class=" mb30 text-ct"> |
|
98 |
- <p class="title1 mb20">1단원이 끝났습니다! </p> |
|
99 |
- <p class="title1"><em class="yellow">기념사진</em>을 촬영하러 가요 </p> |
|
108 |
+ <div v-show="searchOpen2" class="popup-wrap"> |
|
109 |
+ <div class="popup-box"> |
|
110 |
+ <button type="button" class="popup-close-btn" style="position:absolute; top:10px; right: 10px;" |
|
111 |
+ @click="closeModal"> |
|
112 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
113 |
+ </button> |
|
114 |
+ |
|
115 |
+ <div class="mb30 text-ct"> |
|
116 |
+ <p class="title1 mb20">1단원이 끝났습니다!</p> |
|
117 |
+ <p class="title1"><em class="yellow">기념사진</em>을 촬영하러 가요</p> |
|
100 | 118 |
</div> |
101 |
- <div class="flex justify-center "> |
|
102 |
- <button type="button" title="사진촬영" class="new-btn" @click="goToPage('Camera')"> |
|
103 |
- 사진촬영 |
|
119 |
+ <div class="flex justify-center"> |
|
120 |
+ <button type="button" title="사진촬영" class="new-btn" @click="openCameraModal"> |
|
121 |
+ 사진 촬영 |
|
104 | 122 |
</button> |
105 | 123 |
</div> |
106 | 124 |
</div> |
107 | 125 |
</div> |
126 |
+ |
|
127 |
+ <!-- 카메라 모달 --> |
|
128 |
+ <article v-show="showCameraModal" class="popup-wrap"> |
|
129 |
+ <div class="popup-box" style="top: 500px; left:500px"> |
|
130 |
+ <div class="flex mb10 justify-between"> |
|
131 |
+ <p class="popup-title">사진 촬영</p> |
|
132 |
+ <button type="button" class="popup-close-btn" @click="closeModal"> |
|
133 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
134 |
+ </button> |
|
135 |
+ </div> |
|
136 |
+ <div class="box"> |
|
137 |
+ <div style="width: 100%;"> |
|
138 |
+ <!-- 여기에 카메라 기능을 구현 --> |
|
139 |
+ <!-- <p>카메라 모듈이 여기에 위치합니다.</p> --> |
|
140 |
+ |
|
141 |
+ <div id="container" ref="container"> |
|
142 |
+ <video v-if="!photoTaken" autoplay="true" ref="modalVideoElement" class="mirrored" |
|
143 |
+ @canplay="onVideoLoaded"></video> |
|
144 |
+ </div> |
|
145 |
+ |
|
146 |
+ </div> |
|
147 |
+ </div> |
|
148 |
+ <div class="flex justify-center mt20"> |
|
149 |
+ <button type="button" class="new-btn" v-if="!photoTaken" @click="capturePhoto" |
|
150 |
+ :disabled="!videoReady"> |
|
151 |
+ 사진 촬영 |
|
152 |
+ </button> |
|
153 |
+ |
|
154 |
+ </div> |
|
155 |
+ </div> |
|
156 |
+ </article> |
|
157 |
+ |
|
158 |
+ <!-- 사진 모달 --> |
|
159 |
+ <article v-show="showPhotoModal" class="popup-wrap"> |
|
160 |
+ <div class="popup-box" style="top: 500px; left: auto"> |
|
161 |
+ <div class="flex mb10 justify-between"> |
|
162 |
+ <p class="popup-title">사진 꾸미기</p> |
|
163 |
+ <button type="button" class="popup-close-btn" @click="closePhotoModal"> |
|
164 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
165 |
+ </button> |
|
166 |
+ </div> |
|
167 |
+ <div class="flex justify-between align-center" style="gap: 40px;"> |
|
168 |
+ <div class="content" style="padding: 30px; min-width: 401px; min-height: 710px;"> |
|
169 |
+ <div class="tool"> |
|
170 |
+ <div class="flex justify-center mb20" style="gap: 20px;"> |
|
171 |
+ <button class="popTxt" style="width: 101px;" v-for="(item, index) in items_photo" |
|
172 |
+ :key="index" @click="updateContent(index)" |
|
173 |
+ :class="{ active: selectedIndex === index }"> |
|
174 |
+ <img :src="item.imgSrc1" style="display: block;"> |
|
175 |
+ <img :src="item.imgSrc2" v-if="selectedIndex === index" style="display: block;"> |
|
176 |
+ </button> |
|
177 |
+ </div> |
|
178 |
+ </div> |
|
179 |
+ |
|
180 |
+ <div class="stickers" v-show="!stickersVisible"> |
|
181 |
+ <div class="toolbar"> |
|
182 |
+ <label for="brushSize" style="font-size: 9px;">펜 굵기</label> |
|
183 |
+ <input type="color" v-model="color" /> |
|
184 |
+ <input type="range" id="brushSize" min="1" max="10" v-model="brushSize" |
|
185 |
+ @input="updateBrushSize" style="width: 100px; margin-left: 5px;" /> |
|
186 |
+ <button class="new-btn" style="font-size: 9px;" @click="setTool('draw')">펜</button> |
|
187 |
+ <button class="new-btn" style="font-size: 9px;" @click="setTool('eraser')">지우개</button> |
|
188 |
+ <button class="new-btn" style="font-size: 9px;" @click="clearAll">전체 지우개</button> |
|
189 |
+ </div> |
|
190 |
+ </div> |
|
191 |
+ |
|
192 |
+ <div class="stickers" v-show="stickersVisible"> |
|
193 |
+ <button><img src="../../../resources/img/img146_75s.png" alt=""></button> |
|
194 |
+ <button><img src="../../../resources/img/img147_75s.png" alt=""></button> |
|
195 |
+ <button><img src="../../../resources/img/img148_75s.png" alt=""></button> |
|
196 |
+ <button><img src="../../../resources/img/img149_75s.png" alt=""></button> |
|
197 |
+ <button><img src="../../../resources/img/img150_75s.png" alt=""></button> |
|
198 |
+ <button><img src="../../../resources/img/img151_75s.png" alt=""></button> |
|
199 |
+ <button><img src="../../../resources/img/img152_75s.png" alt=""></button> |
|
200 |
+ <button><img src="../../../resources/img/img153_75s.png" alt=""></button> |
|
201 |
+ <button><img src="../../../resources/img/img154_75s.png" alt=""></button> |
|
202 |
+ <button><img src="../../../resources/img/img155_75s.png" alt=""></button> |
|
203 |
+ <button><img src="../../../resources/img/img156_75s.png" alt=""></button> |
|
204 |
+ <button><img src="../../../resources/img/img157_75s.png" alt=""></button> |
|
205 |
+ <button><img src="../../../resources/img/img158_75s.png" alt=""></button> |
|
206 |
+ </div> |
|
207 |
+ </div> |
|
208 |
+ <div> |
|
209 |
+ <div class="content" style="height: 549px; |
|
210 |
+ position: relative; |
|
211 |
+ width: 973px; |
|
212 |
+ display: flex; |
|
213 |
+ justify-content: center; |
|
214 |
+ align-items: center;"> |
|
215 |
+ <canvas ref="canvas" style="position: absolute;"></canvas> |
|
216 |
+ </div> |
|
217 |
+ <div class="btn-wrap flex justify-center mt40" style="gap: 40px;"> |
|
218 |
+ <button class="login-btn" @click="openCameraModal"> |
|
219 |
+ <img src="../../../resources/img/btn07_s.png" alt=""> |
|
220 |
+ <p>재촬영</p> |
|
221 |
+ </button> |
|
222 |
+ |
|
223 |
+ <button class="login-btn" type="submit" @click="goToPage('PhotoEdit')"> |
|
224 |
+ <img src="../../../resources/img/btn07_s.png" alt=""> |
|
225 |
+ <p>완성</p> |
|
226 |
+ </button> |
|
227 |
+ </div> |
|
228 |
+ </div> |
|
229 |
+ <div class="content" style="padding: 30px; min-width: 401px; min-height: 710px;"> |
|
230 |
+ <div class="mb20"> |
|
231 |
+ <p class="popup-title" style="font-size: 32px">랜덤 단어</p> |
|
232 |
+ </div> |
|
233 |
+ <div class="flex-column" style="gap: 10px;"> |
|
234 |
+ <button class="login-btn"><img src="../../../resources/img/img141_75s.png" alt=""> |
|
235 |
+ <p class="title">a</p> |
|
236 |
+ </button> |
|
237 |
+ <button class="login-btn"><img src="../../../resources/img/img152_75s_01.png" alt=""> |
|
238 |
+ <p class="title">a</p> |
|
239 |
+ </button> |
|
240 |
+ <button class="login-btn"><img src="../../../resources/img/img144_75s.png" alt=""> |
|
241 |
+ <p class="title" style="color: #fff;">a</p> |
|
242 |
+ </button> |
|
243 |
+ <button class="login-btn"><img src="../../../resources/img/img145_75s.png" alt=""> |
|
244 |
+ <p class="title mt20" style="color: #fff;">a</p> |
|
245 |
+ </button> |
|
246 |
+ </div> |
|
247 |
+ </div> |
|
248 |
+ </div> |
|
249 |
+ <!-- <div class="box"> |
|
250 |
+ <div style="width: 100%;"> |
|
251 |
+ <div id="container"> |
|
252 |
+ <canvas ref="canvas"></canvas> |
|
253 |
+ </div> |
|
254 |
+ </div> |
|
255 |
+ </div> --> |
|
256 |
+ |
|
257 |
+ </div> |
|
258 |
+ </article> |
|
259 |
+ |
|
108 | 260 |
</div> |
109 | 261 |
<div class="complete-wrap mt90 myphoto"> |
110 | 262 |
<h2 class="mb40">이 단원을 끝낸 친구들</h2> |
111 | 263 |
<article class=" flex-column" style="gap: 5px;"> |
112 | 264 |
<div class="flex" style="gap: 5px;"> |
113 |
- <div @click="buttonSearch" class="photo" ><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
265 |
+ <div @click="buttonSearch2" class="photo" ><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
266 |
+ <div @click="buttonSearch" class="photo"><img src="../../../resources/img/img143_75s.png" alt=""></div> |
|
114 | 267 |
</div> |
115 | 268 |
</article> |
269 |
+ <!-- 팝업 --> |
|
116 | 270 |
<article class="popup-wrap" v-show="searchOpen"> |
117 | 271 |
<div class="popup-box "> |
118 | 272 |
<div class="flex mb10 justify-between"> |
119 | 273 |
<p class="popup-title">알림</p> |
120 |
- <button type="button" class="popup-close-btn" @click="closeBtn"> |
|
274 |
+ <button type="button" class="popup-close-btn" @click="closeBtn2"> |
|
121 | 275 |
<svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
122 | 276 |
</button> |
123 | 277 |
</div> |
124 | 278 |
<div class="box"> |
125 | 279 |
<div style="width: 910px;"><img src="../../../resources/img/img140_747s.png" alt=""></div> |
126 | 280 |
</div> |
127 |
- <div class="flex justify-between mt20"> |
|
281 |
+ <div class="flex justify-between mt20"> |
|
128 | 282 |
<div class="text flex"> |
129 | 283 |
<p class="title2 date ml30">2024-08-06</p> |
130 | 284 |
<span class=" title1 ml30">1단원을 마친 <em class="yellow">가나다</em>친구</span> |
131 | 285 |
</div> |
132 |
- <div class="title2 flex align-center" style="gap: 10px;"><svg-icon type="mdi" :path="mdiHeart" style="color: #FFBA08;"></svg-icon><p><em class="yellow">1</em></p></div> |
|
133 |
- </div> |
|
286 |
+ <div class="title2 flex align-center" style="gap: 10px;"><svg-icon type="mdi" :path="mdiHeart" |
|
287 |
+ style="color: #FFBA08;"></svg-icon> |
|
288 |
+ <p><em class="yellow">1</em></p> |
|
289 |
+ </div> |
|
290 |
+ </div> |
|
134 | 291 |
</div> |
135 | 292 |
</article> |
136 | 293 |
</div> |
... | ... | @@ -141,41 +298,442 @@ |
141 | 298 |
<script> |
142 | 299 |
import SvgIcon from '@jamescoyle/vue-icon'; |
143 | 300 |
import { mdiMagnify, mdiHeart, mdiWindowClose } from '@mdi/js'; |
301 |
+ |
|
144 | 302 |
export default { |
145 | 303 |
data() { |
146 | 304 |
return { |
147 | 305 |
items: [ |
148 |
- { imgSrc1: 'client/resources/img/img11_1_s.png', imgSrc2: 'client/resources/img/img12_1_s.png', imgSrc3: 'client/resources/img/img11_2_s.png', imgSrc4: 'client/resources/img/img12_2_s.png', isSecondImageVisible: false }, |
|
149 |
- ], |
|
306 |
+ { |
|
307 |
+ imgSrc1: 'client/resources/img/img11_1_s.png', |
|
308 |
+ imgSrc2: 'client/resources/img/img12_1_s.png', |
|
309 |
+ imgSrc3: 'client/resources/img/img11_2_s.png', |
|
310 |
+ imgSrc4: 'client/resources/img/img12_2_s.png', |
|
311 |
+ isSecondImageVisible: false |
|
312 |
+ }, |
|
313 |
+ ], |
|
314 |
+ items_photo: [ |
|
315 |
+ { |
|
316 |
+ imgSrc1: 'client/resources/img/btn20_75s_normal.png', //펜 선택되지 않음 |
|
317 |
+ imgSrc2: 'client/resources/img/btn20_75s_click.png' //펜 선택됨 |
|
318 |
+ }, |
|
319 |
+ { |
|
320 |
+ imgSrc1: 'client/resources/img/btn21_75s_normal.png', //스티커 선택되지 않음 |
|
321 |
+ imgSrc2: 'client/resources/img/btn21_75s_click.png' //스티커 선택됨 |
|
322 |
+ }, |
|
323 |
+ ], |
|
150 | 324 |
mdiWindowClose: mdiWindowClose, |
151 | 325 |
mdiHeart: mdiHeart, |
152 | 326 |
showModal: false, |
153 |
- searchOpen: false, |
|
154 |
- searchOpen2: false, |
|
327 |
+ searchOpen: false, // 사진 상세보기 모달창 |
|
328 |
+ searchOpen2: false, // 단원 마친 후, 사진 촬영 여부 선택 모달창 |
|
329 |
+ showCameraModal: false, // 카메라 모달창 |
|
330 |
+ showPhotoModal: false, // 사진꾸미기 모달창 |
|
331 |
+ photoTaken: false, |
|
332 |
+ photo: null, //캡쳐 사진 |
|
333 |
+ videoReady: false, // 비디오 준비 상태를 나타내는 플래그 |
|
334 |
+ stream: null, |
|
335 |
+ canvasWidth: 0, |
|
336 |
+ canvasHeight: 0, |
|
337 |
+ selectedIndex: 0, //툴 선택 여부 인덱스 |
|
338 |
+ stickersVisible: false, // 스티커 표시 여부 |
|
339 |
+ |
|
340 |
+ //사진 꾸미기 관련 변수 |
|
341 |
+ drawHistory: [], //도형 기록 |
|
342 |
+ tempLines: [], //펜 기록 |
|
343 |
+ stickers: [], //스티커 파일 기록 |
|
344 |
+ draggingStickerIndex: null, //스티커 드래그 |
|
345 |
+ activeStickerIndex: null, // 현재 활성화된 스티커의 인덱스 |
|
346 |
+ nextLineId: 0, //획 아이디 |
|
347 |
+ tool: 'draw', //툴 결정 |
|
348 |
+ color: '#000000', //펜 기본 색상 |
|
349 |
+ isDrawing: false, //그리는 중인지 판단하는 변수 |
|
350 |
+ brushSize: 5, // 초기 펜 굵기 |
|
351 |
+ startX: 0, |
|
352 |
+ startY: 0, |
|
353 |
+ canvasRect: { |
|
354 |
+ topLeft: { x: 0, y: 0 }, |
|
355 |
+ bottomRight: { x: 0, y: 0 } |
|
356 |
+ } |
|
357 |
+ |
|
155 | 358 |
} |
156 | 359 |
}, |
157 | 360 |
methods: { |
158 | 361 |
toggleImage(index) { |
159 |
- this.items[index].isSecondImageVisible = !this.items[index].isSecondImageVisible; |
|
160 |
- }, |
|
362 |
+ this.items[index].isSecondImageVisible = !this.items[index].isSecondImageVisible; |
|
363 |
+ }, |
|
364 |
+ toggleImageAndShowPopup(index, dataNum) { |
|
365 |
+ this.toggleImage(index); |
|
366 |
+ if (dataNum === '11') { // 최종 평가 버튼 클릭 시 |
|
367 |
+ this.searchOpen2 = true; // 모달창 열기 |
|
368 |
+ } |
|
369 |
+ }, |
|
370 |
+ updateContent(index) { |
|
371 |
+ this.selectedIndex = index; |
|
372 |
+ |
|
373 |
+ // 선택된 버튼이 스티커 버튼(인덱스 1)인지 확인 |
|
374 |
+ if (index === 1) { |
|
375 |
+ this.stickersVisible = true; // 스티커 툴 보이기 |
|
376 |
+ } else { |
|
377 |
+ this.stickersVisible = false; // 스티커 툴 숨기기 |
|
378 |
+ } |
|
379 |
+ }, |
|
161 | 380 |
goToPage(page) { |
162 | 381 |
this.$router.push({ name: page }); |
163 | 382 |
}, |
164 |
- closeModal() { |
|
165 |
- this.showModal = false; |
|
383 |
+ openCameraModal() { |
|
384 |
+ this.closeModal(); |
|
385 |
+ this.closePhotoModal(); |
|
386 |
+ |
|
387 |
+ this.drawHistory = []; |
|
388 |
+ this.stickers = []; |
|
389 |
+ this.tempLines = []; |
|
390 |
+ this.videoReady = false; // 비디오 준비 상태 초기화 |
|
391 |
+ |
|
392 |
+ this.showCameraModal = true; |
|
393 |
+ navigator.mediaDevices.getUserMedia({ video: true }) |
|
394 |
+ .then(stream => { |
|
395 |
+ const modalVideo = this.$refs.modalVideoElement; |
|
396 |
+ modalVideo.srcObject = stream; |
|
397 |
+ this.stream = stream; |
|
398 |
+ modalVideo.addEventListener('loadedmetadata', this.adjustContainerSize); |
|
399 |
+ }) |
|
400 |
+ .catch(error => { |
|
401 |
+ console.log("error>>>>>>>>", error); |
|
402 |
+ }); |
|
166 | 403 |
}, |
404 |
+ closeModal() { //웹캠 팝업 닫기 |
|
405 |
+ // this.showModal = false; |
|
406 |
+ this.searchOpen2 = false; |
|
407 |
+ this.showCameraModal = false; |
|
408 |
+ this.photoTaken = false; |
|
409 |
+ this.photo = null; |
|
410 |
+ |
|
411 |
+ //스트림 종료 |
|
412 |
+ if (this.stream) { |
|
413 |
+ let tracks = this.stream.getTracks(); |
|
414 |
+ tracks.forEach(track => track.stop()); |
|
415 |
+ this.stream = null; |
|
416 |
+ } |
|
417 |
+ }, |
|
418 |
+ closePhotoModal() { //사진꾸미기 팝업 닫기 |
|
419 |
+ this.showPhotoModal = false; |
|
420 |
+ this.closeModal(); |
|
421 |
+ }, |
|
422 |
+ onVideoLoaded() { |
|
423 |
+ this.videoReady = true; |
|
424 |
+ this.adjustContainerSize(); |
|
425 |
+ }, |
|
426 |
+ adjustContainerSize() { |
|
427 |
+ const video = this.$refs.modalVideoElement; |
|
428 |
+ const container = this.$refs.container; |
|
429 |
+ const body = this.$refs.body; |
|
430 |
+ if (video && container) { |
|
431 |
+ container.style.width = `${video.videoWidth}px`; |
|
432 |
+ container.style.height = `${video.videoHeight}px`; |
|
433 |
+ body.style.height = `${video.videoHeight}px`; |
|
434 |
+ } |
|
435 |
+ }, |
|
436 |
+ |
|
167 | 437 |
buttonSearch() { |
168 | 438 |
this.searchOpen = true; |
169 | 439 |
}, |
440 |
+ buttonSearch2() { |
|
441 |
+ this.searchOpen2 = true; |
|
442 |
+ }, |
|
170 | 443 |
closeBtn() { |
171 | 444 |
this.searchOpen = false; |
445 |
+ }, |
|
446 |
+ capturePhoto() { |
|
447 |
+ // 사진 촬영 기능 구현 |
|
448 |
+ console.log("cam on"); |
|
449 |
+ |
|
450 |
+ if (!this.videoReady) return; // 비디오가 준비되지 않았으면 사진을 찍지 않음 |
|
451 |
+ |
|
452 |
+ const video = this.$refs.modalVideoElement; |
|
453 |
+ const canvas = document.createElement('canvas'); |
|
454 |
+ |
|
455 |
+ canvas.width = video.videoWidth; |
|
456 |
+ canvas.height = video.videoHeight; |
|
457 |
+ this.canvasWidth = video.videoWidth; |
|
458 |
+ this.canvasHeight = video.videoHeight; |
|
459 |
+ const context = canvas.getContext('2d'); |
|
460 |
+ context.translate(canvas.width, 0); |
|
461 |
+ context.scale(-1, 1); |
|
462 |
+ context.drawImage(video, 0, 0, canvas.width, canvas.height); |
|
463 |
+ this.photo = canvas.toDataURL('image/png'); |
|
464 |
+ this.photoTaken = true; |
|
465 |
+ this.showPhotoModal = true; |
|
466 |
+ console.log("PhotoModal open"); |
|
467 |
+ this.$nextTick(() => { |
|
468 |
+ console.log("canvas setup"); |
|
469 |
+ // console.log("Photo data>>>>", this.photo); |
|
470 |
+ this.setupCanvas(); |
|
471 |
+ }); |
|
172 | 472 |
|
173 | 473 |
}, |
174 |
- }, |
|
175 |
- watch: { |
|
474 |
+ setupCanvas() { |
|
475 |
+ const canvas = this.$refs.canvas; |
|
476 |
+ // const container = this.$refs.container; |
|
477 |
+ if (!canvas) { |
|
478 |
+ console.error("Canvas reference not found"); |
|
479 |
+ resolve(); |
|
480 |
+ return; |
|
481 |
+ } |
|
482 |
+ const context = canvas.getContext('2d'); |
|
483 |
+ if (!context) { |
|
484 |
+ console.error("Canvas context not found"); |
|
485 |
+ return; |
|
486 |
+ } |
|
487 |
+ const image = new Image(); |
|
488 |
+ image.src = this.photo; |
|
489 |
+ // console.log("Photo data>>>>", image.src); |
|
490 |
+ image.onload = () => { |
|
491 |
+ console.log("Image loaded successfully"); |
|
492 |
+ // this.canvasWidth = image.width; |
|
493 |
+ // this.canvasHeight = image.height; |
|
494 |
+ //이미지 크기가 캔버스와 안맞으면 이미지 불러오는데에 에러 남 |
|
495 |
+ // container.style.width = this.canvasWidth; |
|
496 |
+ // container.style.height = this.canvasHeight; |
|
176 | 497 |
|
177 |
- }, |
|
178 |
- computed: { |
|
498 |
+ canvas.width = this.canvasWidth; |
|
499 |
+ canvas.height = this.canvasHeight; |
|
500 |
+ |
|
501 |
+ const rect = canvas.getBoundingClientRect(); |
|
502 |
+ // 좌측 상단 좌표 |
|
503 |
+ const topLeft = { |
|
504 |
+ x: rect.left, |
|
505 |
+ y: rect.top |
|
506 |
+ }; |
|
507 |
+ |
|
508 |
+ // 우측 하단 좌표 |
|
509 |
+ const bottomRight = { |
|
510 |
+ x: rect.right, |
|
511 |
+ y: rect.bottom |
|
512 |
+ }; |
|
513 |
+ |
|
514 |
+ // 캔버스 크기 초기화 |
|
515 |
+ this.updateCanvasRect(); |
|
516 |
+ |
|
517 |
+ // 윈도우 리사이즈 이벤트 리스너 추가 |
|
518 |
+ window.addEventListener('resize', this.updateCanvasRect); |
|
519 |
+ |
|
520 |
+ // 클릭 이벤트 핸들러 추가 |
|
521 |
+ this.$refs.canvas.addEventListener('click', this.handleCanvasClick); |
|
522 |
+ |
|
523 |
+ |
|
524 |
+ // canvas.width = canvas.clientWidth; |
|
525 |
+ // canvas.height = canvas.clientHeight; |
|
526 |
+ // this.canvasWidth = canvas.clientWidth; |
|
527 |
+ // this.canvasHeight = canvas.clientHeight; |
|
528 |
+ |
|
529 |
+ context.clearRect(0, 0, canvas.width, canvas.height); // 이전 이미지 있으면 초기화 |
|
530 |
+ context.drawImage(image, 0, 0, this.canvasWidth, this.canvasHeight); |
|
531 |
+ this.addCanvasEventListeners(); //추가해야함 |
|
532 |
+ }; |
|
533 |
+ image.onerror = (error) => { |
|
534 |
+ console.error("Error loading image: ", error); |
|
535 |
+ }; |
|
536 |
+ }, |
|
537 |
+ |
|
538 |
+ addCanvasEventListeners() { |
|
539 |
+ const canvas = this.$refs.canvas; |
|
540 |
+ canvas.addEventListener('mousedown', this.onMouseDown); |
|
541 |
+ canvas.addEventListener('mouseup', this.onMouseUp); |
|
542 |
+ canvas.addEventListener('mousemove', this.onMouseMove); |
|
543 |
+ canvas.addEventListener('click', this.onCanvasClick); |
|
544 |
+ }, |
|
545 |
+ setTool(tool) { |
|
546 |
+ this.tool = tool; |
|
547 |
+ }, |
|
548 |
+ updateBrushSize() { |
|
549 |
+ // 펜 굵기 변경 로직 |
|
550 |
+ if (this.tool === 'draw') { |
|
551 |
+ this.setBrushSize(this.brushSize); |
|
552 |
+ } |
|
553 |
+ }, |
|
554 |
+ setBrushSize(size) { |
|
555 |
+ this.brushSize = size; |
|
556 |
+ const context = this.$refs.canvas.getContext('2d'); |
|
557 |
+ context.lineWidth = size; |
|
558 |
+ }, |
|
559 |
+ // 캔버스 크기 갱신 함수 |
|
560 |
+ updateCanvasRect() { |
|
561 |
+ const rect = this.$refs.canvas.getBoundingClientRect(); |
|
562 |
+ this.canvasRect = { |
|
563 |
+ topLeft: { x: rect.left, y: rect.top }, |
|
564 |
+ bottomRight: { x: rect.right, y: rect.bottom } |
|
565 |
+ }; |
|
566 |
+ console.log(">>>>>>>>>2222", rect.left); |
|
567 |
+ }, |
|
568 |
+ getCanvasPosition(event) { |
|
569 |
+ |
|
570 |
+ const rect = this.canvasRect; |
|
571 |
+ console.log(">>>>>>>>>", this.canvasRect); |
|
572 |
+ this.updateCanvasRect(); |
|
573 |
+ |
|
574 |
+ // 윈도우 리사이즈 이벤트 리스너 추가 |
|
575 |
+ window.addEventListener('resize', this.updateCanvasRect); |
|
576 |
+ |
|
577 |
+ // 클릭 이벤트 핸들러 추가 |
|
578 |
+ this.$refs.canvas.addEventListener('click', this.handleCanvasClick); |
|
579 |
+ |
|
580 |
+ // // 좌측 상단 좌표 |
|
581 |
+ // const topLeft = { |
|
582 |
+ // x: rect.left, |
|
583 |
+ // y: rect.top |
|
584 |
+ // }; |
|
585 |
+ |
|
586 |
+ // // 우측 하단 좌표 |
|
587 |
+ // const bottomRight = { |
|
588 |
+ // x: rect.right, |
|
589 |
+ // y: rect.bottom |
|
590 |
+ // }; |
|
591 |
+ |
|
592 |
+ // console.log(this.scrollLeft) |
|
593 |
+ |
|
594 |
+ const x = event.clientX - rect.topLeft.x |
|
595 |
+ const y = event.clientY - rect.topLeft.y |
|
596 |
+ |
|
597 |
+ |
|
598 |
+ console.log(`클릭한 좌표: x=${event.clientX}, y=${event.clientY}`); |
|
599 |
+ console.log(`계산베이스 좌표: x=${rect.topLeft.x}, y=${rect.topLeft.y}`); |
|
600 |
+ console.log(`계산베이스 좌표: x=${rect.topLeft.x}, y=${rect.topLeft.y}`); |
|
601 |
+ console.log(`계산된 좌표: x=${x}, y=${y}`); |
|
602 |
+ return { |
|
603 |
+ x, y |
|
604 |
+ }; |
|
605 |
+ }, |
|
606 |
+ onMouseDown(event) { |
|
607 |
+ |
|
608 |
+ // 캔버스 크기 초기화 |
|
609 |
+ this.updateCanvasRect(); |
|
610 |
+ |
|
611 |
+ // 윈도우 리사이즈 이벤트 리스너 추가 |
|
612 |
+ window.addEventListener('resize', this.updateCanvasRect); |
|
613 |
+ |
|
614 |
+ // 클릭 이벤트 핸들러 추가 |
|
615 |
+ this.$refs.canvas.addEventListener('click', this.handleCanvasClick); |
|
616 |
+ |
|
617 |
+ const { x, y } = this.getCanvasPosition(event); |
|
618 |
+ this.startX = x; |
|
619 |
+ this.startY = y; |
|
620 |
+ const context = this.$refs.canvas.getContext('2d'); |
|
621 |
+ context.strokeStyle = this.color; |
|
622 |
+ context.lineWidth = this.brushSize; // 브러시 크기 설정 |
|
623 |
+ if (this.tool === 'draw') { |
|
624 |
+ context.beginPath(); |
|
625 |
+ context.moveTo(this.startX, this.startY); |
|
626 |
+ this.nextLineId++; |
|
627 |
+ } |
|
628 |
+ this.isDrawing = true; |
|
629 |
+ }, |
|
630 |
+ onMouseUp(event) { |
|
631 |
+ if (!this.isDrawing) return; |
|
632 |
+ const { x, y } = this.getCanvasPosition(event); |
|
633 |
+ const context = this.$refs.canvas.getContext('2d'); |
|
634 |
+ context.strokeStyle = this.color; |
|
635 |
+ context.lineWidth = this.brushSize; // 브러시 크기 설정 |
|
636 |
+ if (this.tool === 'rectangle') { |
|
637 |
+ context.strokeRect(this.startX, this.startY, x - this.startX, y - this.startY); |
|
638 |
+ this.drawHistory.push({ type: 'rectangle', startX: this.startX, startY: this.startY, endX: x, endY: y, color: this.color }); |
|
639 |
+ } else if (this.tool === 'circle') { |
|
640 |
+ context.beginPath(); |
|
641 |
+ const radius = Math.sqrt(Math.pow((x - this.startX), 2) + Math.pow((y - this.startY), 2)); |
|
642 |
+ context.arc(this.startX, this.startY, radius, 0, 2 * Math.PI); |
|
643 |
+ context.stroke(); |
|
644 |
+ this.drawHistory.push({ type: 'circle', startX: this.startX, startY: this.startY, radius, color: this.color }); |
|
645 |
+ } else if (this.tool === 'draw') { |
|
646 |
+ context.lineTo(x, y); |
|
647 |
+ context.stroke(); |
|
648 |
+ this.tempLines.push({ id: this.nextLineId, startX: this.startX, startY: this.startY, endX: x, endY: y, color: this.color }); |
|
649 |
+ } |
|
650 |
+ this.isDrawing = false; |
|
651 |
+ }, |
|
652 |
+ onMouseMove(event) { |
|
653 |
+ if (!this.isDrawing || this.tool !== 'draw') return; |
|
654 |
+ const { x, y } = this.getCanvasPosition(event); |
|
655 |
+ const context = this.$refs.canvas.getContext('2d'); |
|
656 |
+ context.strokeStyle = this.color; |
|
657 |
+ context.lineWidth = this.brushSize; // 브러시 크기 설정 |
|
658 |
+ context.lineTo(x, y); |
|
659 |
+ context.stroke(); |
|
660 |
+ this.tempLines.push({ id: this.nextLineId, startX: this.startX, startY: this.startY, endX: x, endY: y, color: this.color }); |
|
661 |
+ this.startX = x; |
|
662 |
+ this.startY = y; |
|
663 |
+ }, |
|
664 |
+ onCanvasClick(event) { |
|
665 |
+ if (this.tool === 'eraser') { |
|
666 |
+ const { x, y } = this.getCanvasPosition(event); |
|
667 |
+ this.eraseDrawing(x, y); |
|
668 |
+ } |
|
669 |
+ }, |
|
670 |
+ eraseDrawing(x, y) { |
|
671 |
+ const eraserRadius = 10; |
|
672 |
+ this.drawHistory = this.drawHistory.filter(item => { |
|
673 |
+ if (item.type === 'rectangle') { |
|
674 |
+ return !(x >= item.startX && x <= item.endX && y >= item.startY && y <= item.endY); |
|
675 |
+ } else if (item.type === 'circle') { |
|
676 |
+ const distance = Math.sqrt(Math.pow((x - item.startX), 2) + Math.pow((y - item.startY), 2)); |
|
677 |
+ return !(distance <= item.radius); |
|
678 |
+ } |
|
679 |
+ }); |
|
680 |
+ const linesToDelete = this.tempLines.filter(line => { |
|
681 |
+ const distanceToLine = this.distanceToLineSegment(line.startX, line.startY, line.endX, line.endY, x, y); |
|
682 |
+ return distanceToLine <= 10; |
|
683 |
+ }).map(line => line.id); |
|
684 |
+ this.tempLines = this.tempLines.filter(line => !linesToDelete.includes(line.id)); |
|
685 |
+ this.redraw(); |
|
686 |
+ }, |
|
687 |
+ distanceToLineSegment(x1, y1, x2, y2, px, py) { |
|
688 |
+ const lengthSquared = Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2); |
|
689 |
+ if (lengthSquared === 0) return Math.sqrt(Math.pow(px - x1, 2) + Math.pow(py - y1, 2)); |
|
690 |
+ const t = Math.max(0, Math.min(1, ((px - x1) * (x2 - x1) + (py - y1) * (y2 - y1)) / lengthSquared)); |
|
691 |
+ const projX = x1 + t * (x2 - x1); |
|
692 |
+ const projY = y1 + t * (y2 - y1); |
|
693 |
+ return Math.sqrt(Math.pow(px - projX, 2) + Math.pow(py - projY, 2)); |
|
694 |
+ }, |
|
695 |
+ clearAll() { |
|
696 |
+ this.drawHistory = []; |
|
697 |
+ this.stickers = []; |
|
698 |
+ this.tempLines = []; |
|
699 |
+ this.redraw(); |
|
700 |
+ }, |
|
701 |
+ redraw() { |
|
702 |
+ const canvas = this.$refs.canvas; |
|
703 |
+ const context = canvas.getContext('2d'); |
|
704 |
+ const image = new Image(); |
|
705 |
+ image.src = this.photo; |
|
706 |
+ image.onload = () => { |
|
707 |
+ context.clearRect(0, 0, this.canvasWidth, this.canvasHeight); |
|
708 |
+ context.drawImage(image, 0, 0, this.canvasWidth, this.canvasHeight); |
|
709 |
+ this.drawHistory.forEach(item => { |
|
710 |
+ context.strokeStyle = item.color; |
|
711 |
+ if (item.type === 'draw') { |
|
712 |
+ context.beginPath(); |
|
713 |
+ context.moveTo(item.startX, item.startY); |
|
714 |
+ context.lineTo(item.endX, item.endY); |
|
715 |
+ context.stroke(); |
|
716 |
+ } else if (item.type === 'rectangle') { |
|
717 |
+ context.strokeRect(item.startX, item.startY, item.endX - item.startX, item.endY - item.startY); |
|
718 |
+ } else if (item.type === 'circle') { |
|
719 |
+ context.beginPath(); |
|
720 |
+ context.arc(item.startX, item.startY, item.radius, 0, 2 * Math.PI); |
|
721 |
+ context.stroke(); |
|
722 |
+ } |
|
723 |
+ }); |
|
724 |
+ this.tempLines.forEach(line => { |
|
725 |
+ context.strokeStyle = line.color; |
|
726 |
+ context.beginPath(); |
|
727 |
+ context.moveTo(line.startX, line.startY); |
|
728 |
+ context.lineTo(line.endX, line.endY); |
|
729 |
+ context.stroke(); |
|
730 |
+ }); |
|
731 |
+ this.stickers.forEach((sticker, index) => { |
|
732 |
+ context.drawImage(sticker.img, sticker.x, sticker.y, sticker.width, sticker.height); |
|
733 |
+ }); |
|
734 |
+ }; |
|
735 |
+ }, |
|
736 |
+ |
|
179 | 737 |
|
180 | 738 |
}, |
181 | 739 |
components: { |
... | ... | @@ -183,6 +741,104 @@ |
183 | 741 |
}, |
184 | 742 |
mounted() { |
185 | 743 |
console.log('main mounted'); |
744 |
+ |
|
745 |
+ |
|
746 |
+ }, |
|
747 |
+ computed() { |
|
748 |
+ |
|
749 |
+ }, |
|
750 |
+ beforeDestroy() { |
|
751 |
+ // 컴포넌트가 파괴되기 전에 리스너 제거 |
|
752 |
+ window.removeEventListener('resize', this.updateCanvasRect); |
|
753 |
+ this.$refs.canvas.removeEventListener('click', this.handleCanvasClick); |
|
186 | 754 |
} |
187 | 755 |
} |
188 |
-</script>(No newline at end of file) |
|
756 |
+</script> |
|
757 |
+ |
|
758 |
+<style> |
|
759 |
+.body { |
|
760 |
+ width: 1435px; |
|
761 |
+ height: auto; |
|
762 |
+ margin: 0 auto; |
|
763 |
+} |
|
764 |
+ |
|
765 |
+#container { |
|
766 |
+ position: relative; |
|
767 |
+ margin: auto; |
|
768 |
+ border: 10px #333 solid; |
|
769 |
+ display: flex; |
|
770 |
+ justify-content: center; |
|
771 |
+ align-items: center; |
|
772 |
+ z-index: 100; |
|
773 |
+} |
|
774 |
+ |
|
775 |
+ |
|
776 |
+video { |
|
777 |
+ width: 100%; |
|
778 |
+ height: auto; |
|
779 |
+ background-color: #666; |
|
780 |
+} |
|
781 |
+ |
|
782 |
+.mirrored { |
|
783 |
+ transform: scaleX(-1); |
|
784 |
+} |
|
785 |
+ |
|
786 |
+.new-btn:disabled { |
|
787 |
+ background-color: #FFF3D7; |
|
788 |
+ cursor: not-allowed; |
|
789 |
+} |
|
790 |
+ |
|
791 |
+/* button { |
|
792 |
+ margin: auto; |
|
793 |
+ padding: 5px 10px; |
|
794 |
+ font-size: 13px; |
|
795 |
+ cursor: pointer; |
|
796 |
+ display: flex; |
|
797 |
+ justify-content: center; |
|
798 |
+ text-align: center; |
|
799 |
+} */ |
|
800 |
+ |
|
801 |
+.sticker { |
|
802 |
+ position: absolute; |
|
803 |
+ cursor: move; |
|
804 |
+} |
|
805 |
+ |
|
806 |
+.sticker-handle { |
|
807 |
+ width: 15px; |
|
808 |
+ height: 15px; |
|
809 |
+ background: rgba(255, 255, 255, 0.521); |
|
810 |
+ position: absolute; |
|
811 |
+ bottom: 0; |
|
812 |
+ right: 0; |
|
813 |
+ cursor: nwse-resize; |
|
814 |
+ font-size: 13px; |
|
815 |
+ font-weight: bolder; |
|
816 |
+ color: rgb(63, 63, 63); |
|
817 |
+} |
|
818 |
+ |
|
819 |
+.sticker-delete { |
|
820 |
+ position: absolute; |
|
821 |
+ top: 0; |
|
822 |
+ right: 0; |
|
823 |
+ background: rgba(255, 0, 0, 0.425); |
|
824 |
+ color: white; |
|
825 |
+ padding: 5px; |
|
826 |
+ cursor: pointer; |
|
827 |
+} |
|
828 |
+ |
|
829 |
+.toolbar { |
|
830 |
+ display: flex; |
|
831 |
+ justify-content: center; |
|
832 |
+ margin-top: 10px; |
|
833 |
+} |
|
834 |
+ |
|
835 |
+.toolbar button { |
|
836 |
+ margin: 5px; |
|
837 |
+ padding: 5px 10px; |
|
838 |
+ cursor: pointer; |
|
839 |
+} |
|
840 |
+ |
|
841 |
+.toolbar input { |
|
842 |
+ margin: 5px; |
|
843 |
+} |
|
844 |
+</style>(No newline at end of file) |
--- client/views/pages/main/MyPage.vue
+++ client/views/pages/main/MyPage.vue
... | ... | @@ -172,4 +172,7 @@ |
172 | 172 |
} |
173 | 173 |
</script> |
174 | 174 |
<style scoped> |
175 |
+.mypage .textbook { |
|
176 |
+ width: 22%; |
|
177 |
+} |
|
175 | 178 |
</style>(No newline at end of file) |
--- client/views/pages/main/PhotoBook.vue
+++ client/views/pages/main/PhotoBook.vue
... | ... | @@ -6,96 +6,49 @@ |
6 | 6 |
<div> |
7 | 7 |
<div class="title-box flex justify-end mb40"> |
8 | 8 |
<select name="" id=""> |
9 |
- <option value="">A반</option> |
|
9 |
+ <option v-for="classItem in classList" :key="classItem.sclsId" :value="classItem.sclsId" @click="currentPage = 1; stdPhotoSelectList(classItem.sclsId)"> |
|
10 |
+ {{ classItem.sclsNm }} |
|
11 |
+ </option> |
|
10 | 12 |
</select> |
11 | 13 |
</div> |
12 |
- <div class="btnGroup"> |
|
13 |
- <button @click="selectedTab = 'tab1'" type="button" title="글쓰기" class="tab-btn"> |
|
14 |
- <img v-if="selectedTab !== 'tab1'" src="../../../resources/img/btn49_15s_normal.png" alt=""> |
|
14 |
+ <div class="btnGroup" style="display: flex; flex-direction: column;"> |
|
15 |
+ <button v-for="n in totalPages" :key="n" @click="changePage(n)" type="button" title="페이지 버튼" class="tab-btn"> |
|
16 |
+ <img v-if="currentPage !== n" src="../../../resources/img/btn49_15s_normal.png" alt=""> |
|
15 | 17 |
<img v-else src="../../../resources/img/btn49_15s_click.png" alt=""> |
16 |
- <p :class="{ 'custom-style': selectedTab === 'tab1' }">1</p> |
|
18 |
+ <p :class="{ 'custom-style': currentPage === n }">{{ n }}</p> |
|
17 | 19 |
</button> |
18 | 20 |
</div> |
19 | 21 |
<div v-if="selectedTab === 'tab1'" class="tab-box"> |
20 | 22 |
<div class="flex justify-between"> |
21 |
- <div class="photo" style="transform: rotate(2deg);" @click="buttonSearch"> |
|
22 |
- <div class="class "> |
|
23 |
+ <div v-for="(photo, index) in (photoList?.result || []).slice(0, 3)" :key="index" class="photo" :style="{ transform: getRotation(index) }" @click="buttonSearch(photo)"> |
|
24 |
+ <div class="class"> |
|
23 | 25 |
<div class="box"> |
24 | 26 |
<div><img src="../../../resources/img/img213_15s.png" alt=""></div> |
25 | 27 |
</div> |
26 | 28 |
<div class="text flex justify-between mt20"> |
27 |
- <span class="member ml30">20</span> |
|
28 |
- <p class="title2">1단원</p> |
|
29 |
+ <span class="member ml30">{{ photo.likeData }}</span> |
|
30 |
+ <p class="title2">{{ photo.unitName }}</p> |
|
29 | 31 |
</div> |
30 |
- </div> |
|
31 |
- </div> |
|
32 |
- <div class="photo" style="transform: rotate(-1deg);" @click="buttonSearch"> |
|
33 |
- <div class="class photo"> |
|
34 |
- <div class="box"> |
|
35 |
- <div><img src="../../../resources/img/img213_15s.png" alt=""></div> |
|
36 |
- </div> |
|
37 |
- <div class="text flex justify-between mt20"> |
|
38 |
- <span class="member ml30">20</span> |
|
39 |
- <p class="title2">1단원</p> |
|
40 |
- </div> |
|
41 |
- |
|
42 |
- </div> |
|
43 |
- </div> |
|
44 |
- <div class="photo" style="transform: rotate(1deg);" @click="buttonSearch"> |
|
45 |
- <div class="class "> |
|
46 |
- <div class="box"> |
|
47 |
- <div><img src="../../../resources/img/img213_15s.png" alt=""></div> |
|
48 |
- </div> |
|
49 |
- <div class="text flex justify-between mt20"> |
|
50 |
- <span class="member ml30">20</span> |
|
51 |
- <p class="title2">1단원</p> |
|
52 |
- </div> |
|
53 |
- |
|
54 | 32 |
</div> |
55 | 33 |
</div> |
56 | 34 |
</div> |
57 | 35 |
<div class="flex justify-between mt50"> |
58 |
- <div class="photo" style="transform: rotate(-2deg);" @click="buttonSearch"> |
|
59 |
- <div class="class "> |
|
36 |
+ <div v-for="(photo, index) in (photoList?.result || []).slice(3, 6)" :key="index + 3" class="photo" :style="{ transform: getRotation(index + 3) }" @click="buttonSearch(photo)"> |
|
37 |
+ <div class="class"> |
|
60 | 38 |
<div class="box"> |
61 | 39 |
<div><img src="../../../resources/img/img213_15s.png" alt=""></div> |
62 | 40 |
</div> |
63 | 41 |
<div class="text flex justify-between mt20"> |
64 |
- <span class="member ml30">20</span> |
|
65 |
- <p class="title2">1단원</p> |
|
66 |
- </div> |
|
67 |
- |
|
68 |
- </div> |
|
69 |
- </div> |
|
70 |
- <div class="photo" style="transform: rotate(1deg);" @click="buttonSearch"> |
|
71 |
- <div class="class "> |
|
72 |
- <div class="box"> |
|
73 |
- <div><img src="../../../resources/img/img213_15s.png" alt=""></div> |
|
74 |
- </div> |
|
75 |
- <div class="text flex justify-between mt20"> |
|
76 |
- <span class="member ml30">20</span> |
|
77 |
- <p class="title2">1단원</p> |
|
78 |
- </div> |
|
79 |
- |
|
80 |
- </div> |
|
81 |
- </div> |
|
82 |
- <div class="photo" style="transform: rotate(-1deg);" @click="buttonSearch"> |
|
83 |
- <div class="class "> |
|
84 |
- <div class="box"> |
|
85 |
- <div><img src="../../../resources/img/img213_15s.png" alt=""></div> |
|
86 |
- </div> |
|
87 |
- <div class="text flex justify-between mt20"> |
|
88 |
- <span class="member ml30">20</span> |
|
89 |
- <p class="title2">1단원</p> |
|
42 |
+ <span class="member ml30">{{ photo.likeData }}</span> |
|
43 |
+ <p class="title2">{{ photo.unitName }}</p> |
|
90 | 44 |
</div> |
91 | 45 |
</div> |
92 | 46 |
</div> |
93 | 47 |
</div> |
94 |
- |
|
95 | 48 |
</div> |
96 | 49 |
<div class="popup-wrap" v-show="searchOpen"> |
97 |
- <div class="popup-box "> |
|
98 |
- <div class="flex mb10 justify-between"> |
|
50 |
+ <div class="popup-box"> |
|
51 |
+ <div class="flex mb10 justify-between"> |
|
99 | 52 |
<p class="popup-title">알림</p> |
100 | 53 |
<button type="button" class="popup-close-btn" @click="closeBtn"> |
101 | 54 |
<svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
... | ... | @@ -104,12 +57,16 @@ |
104 | 57 |
<div class="box"> |
105 | 58 |
<div><img src="../../../resources/img/img184_91t.png" alt=""></div> |
106 | 59 |
</div> |
107 |
- <div class="text flex justify-between mt20"> |
|
108 |
- <span class=" title1">1단원을 마친 <em class="yellow">가나다</em>친구</span> |
|
109 |
- <p class="title2 date">2024-08-06</p> |
|
60 |
+ <div class="text flex justify-between mt20" v-if="photoData.length > 0"> |
|
61 |
+ <span class="title1">{{ photoData[0].unitName }}을 마친 <em class="yellow">{{ photoData[0].stdName }}</em>친구</span> |
|
62 |
+ <p class="title2 date">{{ photoData[0].photoDate }}</p> |
|
63 |
+ </div> |
|
64 |
+ <div class="text flex justify-between mt20" v-else> |
|
65 |
+ <span class="title1">데이터를 불러올 수 없습니다.</span> |
|
110 | 66 |
</div> |
111 | 67 |
</div> |
112 | 68 |
</div> |
69 |
+ |
|
113 | 70 |
</div> |
114 | 71 |
</div> |
115 | 72 |
</template> |
... | ... | @@ -119,11 +76,21 @@ |
119 | 76 |
import { mdiMagnify, mdiHeart, mdiWindowClose } from '@mdi/js'; |
120 | 77 |
import { mdilArrowRight } from '@mdi/light-js'; |
121 | 78 |
import ProgressBar from '../../component/ProgressBar.vue'; |
79 |
+import axios from "axios"; |
|
122 | 80 |
|
123 | 81 |
|
124 | 82 |
export default { |
125 | 83 |
data() { |
126 | 84 |
return { |
85 |
+ classList: [], |
|
86 |
+ photoList: [], |
|
87 |
+ |
|
88 |
+ photoData: [], |
|
89 |
+ |
|
90 |
+ currentPage: 1, |
|
91 |
+ pageSize: 6, |
|
92 |
+ totalPages: 1, |
|
93 |
+ |
|
127 | 94 |
mdiWindowClose: mdiWindowClose, |
128 | 95 |
selectedTab: 'tab1', |
129 | 96 |
mdiMagnify: mdiMagnify, |
... | ... | @@ -136,15 +103,95 @@ |
136 | 103 |
} |
137 | 104 |
}, |
138 | 105 |
methods: { |
106 |
+ stdClassesSelectList: function () { |
|
107 |
+ const vm = this; |
|
108 |
+ axios({ |
|
109 |
+ url: "/classes/selectClass.json", |
|
110 |
+ method: "post", |
|
111 |
+ headers:{ |
|
112 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
113 |
+ }, |
|
114 |
+ data: { |
|
115 |
+ userId:"1" |
|
116 |
+ } |
|
117 |
+ }) |
|
118 |
+ .then(function (response) { |
|
119 |
+ console.log("classList - response : ", response.data); |
|
120 |
+ vm.classList = response.data.data; |
|
121 |
+ vm.currentPage = 1; |
|
122 |
+ }) |
|
123 |
+ .catch(function (error) { |
|
124 |
+ console.log("classList - error : ", error); |
|
125 |
+ alert("학생 반 조회에 오류가 발생했습니다."); |
|
126 |
+ }); |
|
127 |
+ }, |
|
128 |
+ |
|
129 |
+ stdPhotoSelectList: function (sclsId) { |
|
130 |
+ const vm = this; |
|
131 |
+ axios({ |
|
132 |
+ url: "/photo/stdPhotoList.json", |
|
133 |
+ method: "post", |
|
134 |
+ headers:{ |
|
135 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
136 |
+ }, |
|
137 |
+ data: { |
|
138 |
+ "stdId":"1", |
|
139 |
+ "sclsId":"1", // 여기에 sclsId들어가야함 |
|
140 |
+ page: vm.currentPage, |
|
141 |
+ pageSize: vm.pageSize |
|
142 |
+ } |
|
143 |
+ }) |
|
144 |
+ .then(function (response) { |
|
145 |
+ console.log("photoList - response : ", response.data); |
|
146 |
+ vm.photoList = response.data; |
|
147 |
+ vm.totalPages = Math.ceil(response.data.photoCount / vm.pageSize); |
|
148 |
+ }) |
|
149 |
+ .catch(function (error) { |
|
150 |
+ console.log("photoList - error : ", error); |
|
151 |
+ alert("반별 내 사진 조회에 오류가 발생했습니다."); |
|
152 |
+ }); |
|
153 |
+ }, |
|
154 |
+ |
|
155 |
+ getRotation(index) { |
|
156 |
+ const rotations = [2, -1, 1, -2, 1, -1]; |
|
157 |
+ return `rotate(${rotations[index]}deg)`; |
|
158 |
+ }, |
|
159 |
+ |
|
160 |
+ changePage(pageNumber) { |
|
161 |
+ this.currentPage = pageNumber; |
|
162 |
+ this.stdPhotoSelectList(this.selectedClassId); |
|
163 |
+ }, |
|
164 |
+ |
|
139 | 165 |
closeModal() { |
140 | 166 |
this.showModal = false; |
141 | 167 |
}, |
142 |
- buttonSearch() { |
|
168 |
+ buttonSearch(photo) { |
|
169 |
+ if(!photo) return; |
|
170 |
+ |
|
171 |
+ const vm = this; |
|
143 | 172 |
this.searchOpen = true; |
173 |
+ axios({ |
|
174 |
+ url: "/photo/photoDetail.json", |
|
175 |
+ method: "post", |
|
176 |
+ headers:{ |
|
177 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
178 |
+ }, |
|
179 |
+ data: { |
|
180 |
+ "photoId":photo.photoId |
|
181 |
+ } |
|
182 |
+ }) |
|
183 |
+ .then(function (response) { |
|
184 |
+ console.log("photoData - response : ", response.data); |
|
185 |
+ vm.photoData = response.data; |
|
186 |
+ }) |
|
187 |
+ .catch(function (error) { |
|
188 |
+ console.log("photoData - error : ", error); |
|
189 |
+ alert("사진 조회에 오류가 발생했습니다."); |
|
190 |
+ }); |
|
144 | 191 |
}, |
192 |
+ |
|
145 | 193 |
closeBtn() { |
146 | 194 |
this.searchOpen = false; |
147 |
- |
|
148 | 195 |
}, |
149 | 196 |
goToPage(page) { |
150 | 197 |
this.$router.push({ name: page }); |
... | ... | @@ -173,7 +220,12 @@ |
173 | 220 |
|
174 | 221 |
}, |
175 | 222 |
computed: { |
176 |
- |
|
223 |
+ currentPhotos() { |
|
224 |
+ // 현재 페이지에 해당하는 사진들만 반환 |
|
225 |
+ const start = (this.currentPage - 1) * this.pageSize; |
|
226 |
+ const end = start + this.pageSize; |
|
227 |
+ return this.photoList.result.slice(start, end); |
|
228 |
+ } |
|
177 | 229 |
}, |
178 | 230 |
components: { |
179 | 231 |
SvgIcon, |
... | ... | @@ -181,6 +233,15 @@ |
181 | 233 |
}, |
182 | 234 |
mounted() { |
183 | 235 |
console.log('Main2 mounted'); |
236 |
+ this.stdClassesSelectList(); |
|
237 |
+ this.stdPhotoSelectList(); |
|
184 | 238 |
} |
185 | 239 |
} |
186 |
-</script>(No newline at end of file) |
|
240 |
+</script> |
|
241 |
+ |
|
242 |
+<style> |
|
243 |
+.btnGroup button { |
|
244 |
+ cursor: pointer; |
|
245 |
+ z-index: 100000; |
|
246 |
+} |
|
247 |
+</style>(No newline at end of file) |
--- client/views/pages/main/PhotoDesign.vue
+++ client/views/pages/main/PhotoDesign.vue
... | ... | @@ -5,13 +5,14 @@ |
5 | 5 |
<span class="title mr40">기념 사진을 꾸며봅시다.</span> |
6 | 6 |
</div> |
7 | 7 |
<div class="flex justify-between align-center" style="gap: 40px;"> |
8 |
- <div class="content " style="padding: 30px;"> |
|
8 |
+ <div class="content" style="padding: 30px;"> |
|
9 | 9 |
<div class="tool"> |
10 | 10 |
<div class="flex justify-center mb20" style="gap: 20px;"> |
11 |
- <button class="popTxt" v-for="(item, index) in items" :key="index" @click="updateContent(index)" :class="{ active: selectedIndex === index }"> |
|
12 |
- <img :src="item.imgSrc1" style="display: block;"> |
|
13 |
- <img :src="item.imgSrc2" v-if="selectedIndex === index" style="display: block;"> |
|
14 |
- </button> |
|
11 |
+ <button class="popTxt" v-for="(item, index) in items" :key="index" @click="updateContent(index)" |
|
12 |
+ :class="{ active: selectedIndex === index }"> |
|
13 |
+ <img :src="item.imgSrc1" style="display: block;"> |
|
14 |
+ <img :src="item.imgSrc2" v-if="selectedIndex === index" style="display: block;"> |
|
15 |
+ </button> |
|
15 | 16 |
</div> |
16 | 17 |
</div> |
17 | 18 |
<div class="stickers"> |
... | ... | @@ -31,8 +32,8 @@ |
31 | 32 |
</div> |
32 | 33 |
</div> |
33 | 34 |
<div> |
34 |
- <div class="content " style="height: 549px; width: 973px;"> |
|
35 |
- <button><img src="../../../resources/img/img143_75s.png" alt=""></button> |
|
35 |
+ <div class="content" style="height: 549px; width: 973px;"> |
|
36 |
+ <button><img class="captured-img" :src="capturedImage" alt="Captured Image"></button> |
|
36 | 37 |
</div> |
37 | 38 |
<div class="btn-wrap flex justify-center mt40" style="gap: 40px;"> |
38 | 39 |
<button class="login-btn" @click="goToPage('Camera')"> |
... | ... | @@ -40,8 +41,8 @@ |
40 | 41 |
<p>재촬영</p> |
41 | 42 |
</button> |
42 | 43 |
|
43 |
- <button class="login-btn" type="submit" @click="goToPage('PhotoEdit')"><img |
|
44 |
- src="../../../resources/img/btn07_s.png" alt=""> |
|
44 |
+ <button class="login-btn" type="submit" @click="goToPage('PhotoEdit')"> |
|
45 |
+ <img src="../../../resources/img/btn07_s.png" alt=""> |
|
45 | 46 |
<p>완성</p> |
46 | 47 |
</button> |
47 | 48 |
</div> |
... | ... | @@ -65,7 +66,6 @@ |
65 | 66 |
</button> |
66 | 67 |
</div> |
67 | 68 |
</div> |
68 |
- |
|
69 | 69 |
</div> |
70 | 70 |
</div> |
71 | 71 |
</template> |
... | ... | @@ -75,49 +75,49 @@ |
75 | 75 |
data() { |
76 | 76 |
return { |
77 | 77 |
items: [ |
78 |
- { imgSrc1: 'client/resources/img/btn20_75s_normal.png', imgSrc2: 'client/resources/img/btn20_75s_click.png', }, |
|
79 |
- { imgSrc1: 'client/resources/img/btn21_75s_normal.png', imgSrc2: 'client/resources/img/btn21_75s_click.png', }, |
|
78 |
+ { imgSrc1: 'client/resources/img/btn20_75s_normal.png', imgSrc2: 'client/resources/img/btn20_75s_click.png' }, |
|
79 |
+ { imgSrc1: 'client/resources/img/btn21_75s_normal.png', imgSrc2: 'client/resources/img/btn21_75s_click.png' }, |
|
80 | 80 |
], |
81 |
- timer: '00', |
|
82 | 81 |
selectedIndex: 0, |
82 |
+ }; |
|
83 |
+ }, |
|
84 |
+ computed: { |
|
85 |
+ capturedImage() { |
|
86 |
+ // Retrieve the captured image from route query parameters |
|
87 |
+ return this.$route.query.image || ''; // Return an empty string if no image is provided |
|
83 | 88 |
} |
84 | 89 |
}, |
85 | 90 |
methods: { |
86 | 91 |
updateContent(index) { |
87 |
- this.selectedIndex = index; |
|
88 |
- // this.currentCon = this.items[index].con; |
|
89 |
- }, |
|
92 |
+ this.selectedIndex = index; |
|
93 |
+ }, |
|
90 | 94 |
goToPage(page) { |
91 | 95 |
this.$router.push({ name: page }); |
92 | 96 |
}, |
93 |
- startTimer() { |
|
94 |
- if (this.intervalId) { |
|
95 |
- clearInterval(this.intervalId); |
|
96 |
- } |
|
97 |
- this.timer = 5; |
|
98 |
- this.intervalId = setInterval(() => { |
|
99 |
- if (this.timer > 0) { |
|
100 |
- this.timer--; |
|
101 |
- } else { |
|
102 |
- clearInterval(this.intervalId); |
|
103 |
- } |
|
104 |
- }, 1000); |
|
105 |
- } |
|
106 |
- }, |
|
107 |
- watch: { |
|
97 |
+ // captureAndGoToPhotoDesign() { |
|
98 |
+ // const video = this.$refs.modalVideoElement; |
|
99 |
+ // const canvas = document.createElement('canvas'); |
|
100 |
+ // canvas.width = video.videoWidth; |
|
101 |
+ // canvas.height = video.videoHeight; |
|
102 |
+ // const ctx = canvas.getContext('2d'); |
|
108 | 103 |
|
109 |
- }, |
|
110 |
- computed: { |
|
104 |
+ // // 좌우 반전 적용 |
|
105 |
+ // ctx.translate(canvas.width, 0); |
|
106 |
+ // ctx.scale(-1, 1); |
|
111 | 107 |
|
108 |
+ // ctx.drawImage(video, 0, 0, canvas.width, canvas.height); |
|
109 |
+ // const imageDataUrl = canvas.toDataURL('image/png'); |
|
110 |
+ // this.$router.push({ name: 'PhotoDesign', query: { image: imageDataUrl } }); |
|
111 |
+ // } |
|
112 | 112 |
}, |
113 |
- components: { |
|
114 |
- }, |
|
115 |
- mounted() { |
|
116 |
- |
|
117 |
- } |
|
118 | 113 |
} |
119 | 114 |
</script> |
115 |
+ |
|
120 | 116 |
<style scoped> |
117 |
+.captured-img { |
|
118 |
+ margin: auto auto; |
|
119 |
+} |
|
120 |
+ |
|
121 | 121 |
.imgGroup { |
122 | 122 |
width: fit-content; |
123 | 123 |
} |
... | ... | @@ -163,5 +163,8 @@ |
163 | 163 |
.pickGroup article>div>p { |
164 | 164 |
font-size: 64px; |
165 | 165 |
} |
166 |
-.popTxt{width: 101px;} |
|
167 |
-</style>(No newline at end of file) |
|
166 |
+ |
|
167 |
+.popTxt { |
|
168 |
+ width: 101px; |
|
169 |
+} |
|
170 |
+</style> |
--- client/views/pages/teacher/Board.vue
+++ client/views/pages/teacher/Board.vue
... | ... | @@ -1,8 +1,14 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 | 3 |
<p class="title">게시판</p> |
4 |
- <select name="" id=""> |
|
5 |
- <option value="">A반</option> |
|
4 |
+ <select v-model="sclsId" @change="handleClassId()"> |
|
5 |
+ <option |
|
6 |
+ v-for="(item, index) in classList" |
|
7 |
+ :key="index" |
|
8 |
+ :value="item.sclsId" |
|
9 |
+ > |
|
10 |
+ {{ item.sclsNm }} |
|
11 |
+ </option> |
|
6 | 12 |
</select> |
7 | 13 |
</div> |
8 | 14 |
<div class="search-wrap flex justify-end mb20"> |
... | ... | @@ -38,11 +44,11 @@ |
38 | 44 |
:class="{ 'selected-row': selectedRow == item.dataList }" |
39 | 45 |
@click="[goToPage('noticeDetail'), selectBoardList(item)]" |
40 | 46 |
> |
41 |
- <td>{{ totalBoard - index }}</td> |
|
47 |
+ <td>{{ createNo(index) }}</td> |
|
42 | 48 |
<td>{{ item.bbsTtl }}</td> |
43 | 49 |
<td>{{ item.bbsCls }}</td> |
44 | 50 |
<td>{{ userNm }}</td> |
45 |
- <td>{{ item.bbsTm }}</td> |
|
51 |
+ <td>{{ item.bbsTm.substr(0, 16) }}</td> |
|
46 | 52 |
</tr> |
47 | 53 |
</tbody> |
48 | 54 |
</table> |
... | ... | @@ -50,22 +56,19 @@ |
50 | 56 |
class="table-pagination flex justify-center align-center mb20 mt30" |
51 | 57 |
style="gap: 10px" |
52 | 58 |
> |
53 |
- <button> |
|
54 |
- <img |
|
55 |
- src="../../../resources/img/btn27_90t_normal.png" |
|
56 |
- alt="" |
|
57 |
- @click="previousPage" |
|
58 |
- :disabled="page === 1" |
|
59 |
- /> |
|
59 |
+ <button @click="goToPagination(currentPage - 1)"> |
|
60 |
+ <img src="../../../resources/img/btn27_90t_normal.png" alt="" /> |
|
60 | 61 |
</button> |
61 |
- <button class="selected-btn">{{ page }}</button> |
|
62 |
- <button> |
|
63 |
- <img |
|
64 |
- src="../../../resources/img/btn28_90t_normal.png" |
|
65 |
- alt="" |
|
66 |
- @click="nextPage" |
|
67 |
- :disabled="page === totalPages" |
|
68 |
- /> |
|
62 |
+ <button |
|
63 |
+ v-for="page in paginationButtons" |
|
64 |
+ :key="page" |
|
65 |
+ @click="goToPagination(page - 1)" |
|
66 |
+ :class="{ 'selected-btn': currentPage === page - 1 }" |
|
67 |
+ > |
|
68 |
+ {{ page }} |
|
69 |
+ </button> |
|
70 |
+ <button @click="goToPagination(currentPage + 1)"> |
|
71 |
+ <img src="../../../resources/img/btn28_90t_normal.png" alt="" /> |
|
69 | 72 |
</button> |
70 | 73 |
</article> |
71 | 74 |
<div class="flex justify-end"> |
... | ... | @@ -93,20 +96,24 @@ |
93 | 96 |
|
94 | 97 |
// 게시글 정보 |
95 | 98 |
dataList: [], |
96 |
- totalBoard: null, |
|
99 |
+ totalPosts: 0, |
|
97 | 100 |
selectedRow: "", |
101 |
+ bbsTm: "", |
|
98 | 102 |
|
99 | 103 |
// 페이징 |
100 |
- page: 1, |
|
101 |
- pageSize: 8, |
|
102 |
- totalPages: null, |
|
104 |
+ currentPage: 0, |
|
105 |
+ itemsPerPage: 8, |
|
103 | 106 |
|
104 | 107 |
// 반 아이디 (추후 세션에서 받는걸로 수정) |
105 |
- sclsId: "1", |
|
108 |
+ sclsId: "", |
|
109 |
+ classList: [], |
|
106 | 110 |
|
111 |
+ userId: "", |
|
107 | 112 |
// 검색어 |
108 | 113 |
searchKeyword: "", |
109 | 114 |
selectedSearchOption: "bbsTtl", |
115 |
+ |
|
116 |
+ selected: null, |
|
110 | 117 |
}; |
111 | 118 |
}, |
112 | 119 |
methods: { |
... | ... | @@ -131,39 +138,44 @@ |
131 | 138 |
// 게시글 전체 조회 |
132 | 139 |
boardList() { |
133 | 140 |
const vm = this; |
141 |
+ vm.sclsId = JSON.parse(sessionStorage.getItem("sclsId")); |
|
134 | 142 |
axios({ |
135 | 143 |
url: "/board/findAll.json", |
136 | 144 |
method: "post", |
137 | 145 |
headers: { |
138 | 146 |
"Content-Type": "application/json; charset=UTF-8", |
139 | 147 |
}, |
140 |
- data: { page: vm.page, pageSize: vm.pageSize, sclsId: vm.sclsId }, |
|
148 |
+ data: { |
|
149 |
+ page: vm.currentPage + 1, |
|
150 |
+ pageSize: vm.itemsPerPage, |
|
151 |
+ sclsId: vm.sclsId, |
|
152 |
+ }, |
|
141 | 153 |
}) |
142 | 154 |
.then(function (res) { |
143 | 155 |
console.log("dataList - response : ", res.data); |
144 |
- console.log(res.data.result[0].boardClass[0].board); |
|
145 |
- |
|
146 |
- vm.dataList = res.data.result[0].boardClass[0].board; |
|
147 |
- vm.userNm = res.data.result[0].userNm; |
|
148 |
- vm.userId = res.data.result[0].userId; |
|
149 |
- vm.totalBoard = res.data.totalBoard; |
|
150 |
- vm.totalPages = Math.ceil(vm.totalBoard / vm.pageSize); |
|
156 |
+ if (res.data.result.length !== 0) { |
|
157 |
+ vm.dataList = res.data.result[0].boardClass[0].board; |
|
158 |
+ vm.userNm = res.data.result[0].userNm; |
|
159 |
+ vm.userId = res.data.result[0].userId; |
|
160 |
+ vm.totalPosts = res.data.totalBoard; |
|
161 |
+ vm.selectClass(); |
|
162 |
+ sessionStorage.removeItem("bbsId"); |
|
163 |
+ sessionStorage.removeItem("file"); |
|
164 |
+ } else { |
|
165 |
+ vm.selectClass(); |
|
166 |
+ } |
|
151 | 167 |
}) |
152 | 168 |
.catch(function (error) { |
153 |
- console.log("result - error : ", error); |
|
154 |
- alert("비상 비상!"); |
|
169 |
+ console.log("boardListError - error : ", error); |
|
155 | 170 |
}); |
156 | 171 |
}, |
157 | 172 |
|
158 | 173 |
// 게시글 정보 세션에 저장 |
159 | 174 |
selectBoardList(item) { |
160 |
- sessionStorage.setItem("selectedBoardList", JSON.stringify(item)); |
|
175 |
+ sessionStorage.setItem("bbsId", JSON.stringify(item.bbsId)); |
|
161 | 176 |
}, |
162 | 177 |
|
163 | 178 |
// 반 아이디 세션에 저장 |
164 |
- setClassId() { |
|
165 |
- sessionStorage.setItem("sclsId", JSON.stringify(this.sclsId)); |
|
166 |
- }, |
|
167 | 179 |
|
168 | 180 |
// 게시글 검색 |
169 | 181 |
boardDataSearch() { |
... | ... | @@ -171,8 +183,8 @@ |
171 | 183 |
let searchPayload = { |
172 | 184 |
keyword: vm.searchKeyword, |
173 | 185 |
option: vm.selectedSearchOption, |
174 |
- page: vm.page, |
|
175 |
- pageSize: vm.pageSize, |
|
186 |
+ page: vm.currentPage, |
|
187 |
+ pageSize: vm.itemsPerPage, |
|
176 | 188 |
sclsId: vm.sclsId, |
177 | 189 |
}; |
178 | 190 |
axios({ |
... | ... | @@ -188,7 +200,7 @@ |
188 | 200 |
vm.dataList = res.data.result[0].boardClass[0].board; |
189 | 201 |
vm.userNm = res.data.result[0].userNm; |
190 | 202 |
vm.userId = res.data.result[0].userId; |
191 |
- vm.totalBoard = res.data.totalBoard; |
|
203 |
+ vm.totalPosts = res.data.totalBoard; |
|
192 | 204 |
}) |
193 | 205 |
.catch(function (error) { |
194 | 206 |
console.log("dataSearch - error : ", error); |
... | ... | @@ -196,29 +208,70 @@ |
196 | 208 |
}); |
197 | 209 |
}, |
198 | 210 |
|
199 |
- previousPage() { |
|
200 |
- if (this.page > 1) { |
|
201 |
- this.page -= 1; |
|
202 |
- this.boardList(); |
|
203 |
- } |
|
211 |
+ // 반 조회 |
|
212 |
+ selectClass() { |
|
213 |
+ const vm = this; |
|
214 |
+ axios({ |
|
215 |
+ url: "/classes/selectClass.json", |
|
216 |
+ method: "post", |
|
217 |
+ headers: { |
|
218 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
219 |
+ }, |
|
220 |
+ data: { |
|
221 |
+ userId: vm.userId, |
|
222 |
+ }, |
|
223 |
+ }) |
|
224 |
+ .then(function (res) { |
|
225 |
+ console.log("classData - response : ", res.data); |
|
226 |
+ vm.classList = res.data.data; |
|
227 |
+ vm.selected = res.data.data.sclsId; |
|
228 |
+ }) |
|
229 |
+ .catch(function (error) { |
|
230 |
+ console.log("classData - error : ", error); |
|
231 |
+ }); |
|
232 |
+ }, |
|
233 |
+ handleClassId() { |
|
234 |
+ sessionStorage.setItem("sclsId", JSON.stringify(this.sclsId)); |
|
235 |
+ this.boardList(); |
|
204 | 236 |
}, |
205 | 237 |
|
206 |
- nextPage() { |
|
207 |
- if (this.page < this.totalPages) { |
|
208 |
- this.page += 1; |
|
209 |
- this.boardList(); |
|
238 |
+ createNo(index) { |
|
239 |
+ return this.totalPosts - (this.currentPage * this.itemsPerPage + index); |
|
240 |
+ }, |
|
241 |
+ |
|
242 |
+ goToPagination(page) { |
|
243 |
+ if (page < 0 || page >= this.totalPages) { |
|
244 |
+ return; |
|
210 | 245 |
} |
246 |
+ this.currentPage = page; |
|
247 |
+ this.boardList(); |
|
211 | 248 |
}, |
212 | 249 |
}, |
213 | 250 |
watch: {}, |
214 |
- computed: {}, |
|
251 |
+ computed: { |
|
252 |
+ totalPages() { |
|
253 |
+ return Math.ceil(this.totalPosts / this.itemsPerPage); |
|
254 |
+ }, |
|
255 |
+ paginationButtons() { |
|
256 |
+ let start = Math.max(0, this.currentPage - 2); |
|
257 |
+ let end = Math.min(start + 5, this.totalPages); |
|
258 |
+ |
|
259 |
+ if (end - start < 5) { |
|
260 |
+ start = Math.max(0, end - 5); |
|
261 |
+ } |
|
262 |
+ |
|
263 |
+ return Array.from({ length: end - start }, (_, i) => start + i + 1); |
|
264 |
+ }, |
|
265 |
+ startIndex() { |
|
266 |
+ return this.currentPage * this.itemsPerPage; |
|
267 |
+ }, |
|
268 |
+ }, |
|
215 | 269 |
components: { |
216 | 270 |
SvgIcon, |
217 | 271 |
}, |
218 | 272 |
mounted() { |
219 | 273 |
console.log("Main2 mounted"); |
220 | 274 |
this.boardList(); |
221 |
- this.setClassId(); |
|
222 | 275 |
}, |
223 | 276 |
}; |
224 | 277 |
</script> |
--- client/views/pages/teacher/C_TextBookDetail.vue
+++ client/views/pages/teacher/C_TextBookDetail.vue
... | ... | @@ -1,13 +1,13 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 |
- <p class="title">A반</p> |
|
3 |
+ <p class="title">A교재</p> |
|
4 | 4 |
<select name="" id=""> |
5 |
- <option value="">A 교재</option> |
|
5 |
+ <option value="">A 반</option> |
|
6 | 6 |
</select> |
7 | 7 |
</div> |
8 | 8 |
<div class="board-wrap"> |
9 |
- <label for="" class="title2">단원</label> |
|
10 |
- <div class="table-pagination flex mt10"> |
|
9 |
+ <label for="" class="title1">단원</label> |
|
10 |
+ <div class="unit-pagination flex mt10" style="gap: 10px;"> |
|
11 | 11 |
<button class="selected-btn">1</button> |
12 | 12 |
<button>2</button> |
13 | 13 |
<button>3</button> |
--- client/views/pages/teacher/ClassDetail.vue
+++ client/views/pages/teacher/ClassDetail.vue
... | ... | @@ -1,153 +1,218 @@ |
1 | 1 |
<template> |
2 |
- <div class="title-box flex justify-between mb40"> |
|
3 |
- <p class="title">반 관리</p> |
|
2 |
+ <div class="title-box flex justify-between mb40"> |
|
3 |
+ <p class="title">반 관리</p> |
|
4 |
+ </div> |
|
5 |
+ <div class="wrap mb30"> |
|
6 |
+ <div class="flex justify-between mb30 align-center"> |
|
7 |
+ <label for="" class="title1">게시판</label> |
|
8 |
+ <div class="look-btn flex align-center" @click="goToPage('Board')"> |
|
9 |
+ <p>자세히 보기</p> |
|
10 |
+ <svg-icon type="mdi" :path="mdilArrowRight" class="ml10"></svg-icon> |
|
11 |
+ </div> |
|
12 |
+ </div> |
|
13 |
+ <div class="table-wrap"> |
|
14 |
+ <table> |
|
15 |
+ <thead> |
|
16 |
+ <td>No.</td> |
|
17 |
+ <td>제목</td> |
|
18 |
+ <td>내용</td> |
|
19 |
+ <td>작성자</td> |
|
20 |
+ <td>등록일</td> |
|
21 |
+ </thead> |
|
22 |
+ <tbody> |
|
23 |
+ <tr |
|
24 |
+ v-for="(item, index) in dataList" |
|
25 |
+ :key="item.id" |
|
26 |
+ :class="{ 'selected-row': selectedRow == item.dataList }" |
|
27 |
+ @click="[goToPage('noticeDetail'), selectBoardList(item)]" |
|
28 |
+ > |
|
29 |
+ <td>{{ totalPosts - index }}</td> |
|
30 |
+ <td>{{ item.bbsTtl }}</td> |
|
31 |
+ <td>{{ item.bbsCls }}</td> |
|
32 |
+ <td>{{ userNm }}</td> |
|
33 |
+ <td>{{ item.bbsTm.substr(0, 16) }}</td> |
|
34 |
+ </tr> |
|
35 |
+ </tbody> |
|
36 |
+ </table> |
|
37 |
+ </div> |
|
38 |
+ </div> |
|
39 |
+ <div class="flex justify-between" style="gap: 30px"> |
|
40 |
+ <div class="wrap mb30"> |
|
41 |
+ <div class="flex justify-between mb30 align-center"> |
|
42 |
+ <label for="" class="title1">학생 목록</label> |
|
43 |
+ <div class="look-btn align-center flex"> |
|
44 |
+ <p>자세히 보기</p> |
|
45 |
+ <svg-icon type="mdi" :path="mdilArrowRight" class="ml10"></svg-icon> |
|
46 |
+ </div> |
|
47 |
+ </div> |
|
48 |
+ <div class="table-wrap"> |
|
49 |
+ <table> |
|
50 |
+ <thead> |
|
51 |
+ <td>No.</td> |
|
52 |
+ <td>이름</td> |
|
53 |
+ <td>학년</td> |
|
54 |
+ <td>반</td> |
|
55 |
+ </thead> |
|
56 |
+ <tbody> |
|
57 |
+ <tr> |
|
58 |
+ <td></td> |
|
59 |
+ <td></td> |
|
60 |
+ <td></td> |
|
61 |
+ <td></td> |
|
62 |
+ </tr> |
|
63 |
+ </tbody> |
|
64 |
+ </table> |
|
65 |
+ </div> |
|
4 | 66 |
</div> |
5 | 67 |
<div class="wrap mb30"> |
6 |
- <div class="flex justify-between mb30 align-center"> |
|
7 |
- <label for="" class="title1">학습 현황</label> |
|
8 |
- <div class="look-btn flex align-center"> |
|
9 |
- <p>자세히 보기 </p> |
|
10 |
- <svg-icon type="mdi" :path="mdilArrowRight" class=" ml10"></svg-icon> |
|
68 |
+ <div class="flex justify-between mb30 align-center"> |
|
69 |
+ <label for="" class="title1">책 </label> |
|
70 |
+ <div class="align-center flex look-btn"> |
|
71 |
+ <p>자세히 보기</p> |
|
72 |
+ <svg-icon type="mdi" :path="mdilArrowRight" class="ml10"></svg-icon> |
|
73 |
+ </div> |
|
74 |
+ </div> |
|
75 |
+ <div class="flex" style="gap: 50px"> |
|
76 |
+ <div class="textbook"> |
|
77 |
+ <div class="box" style="gap: 10px"></div> |
|
78 |
+ <div class="text"> |
|
79 |
+ <p class="title1" style="color: #fff">A 교재</p> |
|
80 |
+ <div |
|
81 |
+ class="btnGroup mt15 flex align-center justify-end" |
|
82 |
+ style="gap: 10px" |
|
83 |
+ > |
|
84 |
+ <button>수정</button> |
|
85 |
+ <p>|</p> |
|
86 |
+ <button @click="showConfirm('delete')">삭제</button> |
|
11 | 87 |
</div> |
88 |
+ </div> |
|
12 | 89 |
</div> |
13 |
- <div class="table-wrap"> |
|
14 |
- <table> |
|
15 |
- <thead> |
|
16 |
- <td>No.</td> |
|
17 |
- <td>제목</td> |
|
18 |
- <td>내용</td> |
|
19 |
- <td>작성자</td> |
|
20 |
- <td>등록일</td> |
|
21 |
- </thead> |
|
22 |
- <tbody> |
|
23 |
- <tr> |
|
24 |
- <td></td> |
|
25 |
- <td></td> |
|
26 |
- <td></td> |
|
27 |
- <td></td> |
|
28 |
- <td></td> |
|
29 |
- </tr> |
|
30 |
- </tbody> |
|
31 |
- </table> |
|
90 |
+ <div class="textbook"> |
|
91 |
+ <div class="box" style="gap: 10px"></div> |
|
92 |
+ <div class="text"> |
|
93 |
+ <p class="title1" style="color: #fff">A 교재</p> |
|
94 |
+ <div |
|
95 |
+ class="btnGroup mt15 flex align-center justify-end" |
|
96 |
+ style="gap: 10px" |
|
97 |
+ > |
|
98 |
+ <button>수정</button> |
|
99 |
+ <p>|</p> |
|
100 |
+ <button @click="showConfirm('delete')">삭제</button> |
|
101 |
+ </div> |
|
102 |
+ </div> |
|
32 | 103 |
</div> |
104 |
+ </div> |
|
33 | 105 |
</div> |
34 |
- <div class="flex justify-between" style="gap: 30px;"> |
|
35 |
- <div class="wrap mb30"> |
|
36 |
- <div class="flex justify-between mb30 align-center"> |
|
37 |
- <label for="" class="title1">학생 목록</label> |
|
38 |
- <div class="look-btn align-center flex"> |
|
39 |
- <p>자세히 보기 </p> |
|
40 |
- <svg-icon type="mdi" :path="mdilArrowRight" class=" ml10"></svg-icon> |
|
41 |
- </div> |
|
42 |
- </div> |
|
43 |
- <div class="table-wrap"> |
|
44 |
- <table> |
|
45 |
- <thead> |
|
46 |
- <td>No.</td> |
|
47 |
- <td>이름</td> |
|
48 |
- <td>학년</td> |
|
49 |
- <td>반</td> |
|
50 |
- </thead> |
|
51 |
- <tbody> |
|
52 |
- <tr> |
|
53 |
- <td></td> |
|
54 |
- <td></td> |
|
55 |
- <td></td> |
|
56 |
- <td></td> |
|
57 |
- </tr> |
|
58 |
- </tbody> |
|
59 |
- </table> |
|
60 |
- </div> |
|
61 |
- </div> |
|
62 |
- <div class="wrap mb30"> |
|
63 |
- <div class="flex justify-between mb30 align-center"> |
|
64 |
- <label for="" class="title1">책 </label> |
|
65 |
- <div class="align-center flex look-btn"><p>자세히 보기 </p><svg-icon type="mdi" :path="mdilArrowRight" class=" ml10"></svg-icon></div> |
|
66 |
- </div> |
|
67 |
- <div class=" flex " style="gap: 50px;"> |
|
68 |
- <div class="textbook"> |
|
69 |
- <div class="box " style="gap: 10px;"> |
|
70 |
- </div> |
|
71 |
- <div class="text "> |
|
72 |
- <p class="title1" style="color: #fff;">A 교재</p> |
|
73 |
- <div class="btnGroup mt15 flex align-center justify-end" style="gap: 10px;"> |
|
74 |
- <button>수정</button><p>|</p> |
|
75 |
- <button @click="showConfirm('delete')">삭제</button> |
|
76 |
- </div> |
|
77 |
- </div> |
|
78 |
- </div> |
|
79 |
- <div class="textbook"> |
|
80 |
- <div class="box " style="gap: 10px;"> |
|
81 |
- </div> |
|
82 |
- <div class="text "> |
|
83 |
- <p class="title1" style="color: #fff;">A 교재</p> |
|
84 |
- <div class="btnGroup mt15 flex align-center justify-end" style="gap: 10px;"> |
|
85 |
- <button>수정</button><p>|</p> |
|
86 |
- <button @click="showConfirm('delete')">삭제</button> |
|
87 |
- </div> |
|
88 |
- </div> |
|
89 |
- </div> |
|
90 |
- </div> |
|
91 |
- </div> |
|
92 |
- </div> |
|
106 |
+ </div> |
|
93 | 107 |
</template> |
94 | 108 |
|
95 | 109 |
<script> |
96 |
-import SvgIcon from '@jamescoyle/vue-icon'; |
|
97 |
-import { mdiMagnify, } from '@mdi/js'; |
|
98 |
-import { mdilArrowRight } from '@mdi/light-js'; |
|
99 |
-import ProgressBar from '../../component/ProgressBar.vue'; |
|
100 |
- |
|
110 |
+import SvgIcon from "@jamescoyle/vue-icon"; |
|
111 |
+import { mdiMagnify } from "@mdi/js"; |
|
112 |
+import { mdilArrowRight } from "@mdi/light-js"; |
|
113 |
+import ProgressBar from "../../component/ProgressBar.vue"; |
|
114 |
+import axios from "axios"; |
|
101 | 115 |
|
102 | 116 |
export default { |
103 |
- data() { |
|
104 |
- return { |
|
105 |
- mdiMagnify: mdiMagnify, |
|
106 |
- mdilArrowRight: mdilArrowRight, |
|
107 |
- timer: "00:00", |
|
108 |
- progress: 20, |
|
117 |
+ data() { |
|
118 |
+ return { |
|
119 |
+ mdiMagnify: mdiMagnify, |
|
120 |
+ mdilArrowRight: mdilArrowRight, |
|
121 |
+ timer: "00:00", |
|
122 |
+ progress: 20, |
|
109 | 123 |
|
110 |
- // 교사 홈페이지에서 쿼리 파라미터로부터 전달받은 선택된 반의 아이디 |
|
111 |
- selectedClassId : this.$route.query.sclsId |
|
112 |
- } |
|
124 |
+ // 교사 홈페이지에서 쿼리 파라미터로부터 전달받은 선택된 반의 아이디 |
|
125 |
+ selectedClassId: this.$route.query.sclsId, |
|
126 |
+ |
|
127 |
+ // 게시글 정보 |
|
128 |
+ dataList: [], |
|
129 |
+ totalPosts: 0, |
|
130 |
+ selectedRow: "", |
|
131 |
+ bbsTm: "", |
|
132 |
+ |
|
133 |
+ // 페이징 |
|
134 |
+ currentPage: 0, |
|
135 |
+ itemsPerPage: 5, |
|
136 |
+ |
|
137 |
+ // 반 아이디 |
|
138 |
+ sclsId: "", |
|
139 |
+ }; |
|
140 |
+ }, |
|
141 |
+ methods: { |
|
142 |
+ goToPage(page) { |
|
143 |
+ this.$router.push({ name: page }); |
|
113 | 144 |
}, |
114 |
- methods: { |
|
115 |
- goToPage(page) { |
|
116 |
- this.$router.push({ name: page }); |
|
145 |
+ increaseProgress() { |
|
146 |
+ if (this.progress < 100) { |
|
147 |
+ this.progress += 10; |
|
148 |
+ } |
|
149 |
+ }, |
|
150 |
+ showConfirm(type) { |
|
151 |
+ let message = ""; |
|
152 |
+ if (type === "cancel") { |
|
153 |
+ message = "삭제하시겠습니까?"; |
|
154 |
+ } else if (type === "reset") { |
|
155 |
+ message = "초기화하시겠습니까?"; |
|
156 |
+ } else if (type === "save") { |
|
157 |
+ message = "등록하시겠습니까?"; |
|
158 |
+ } |
|
159 |
+ |
|
160 |
+ if (confirm(message)) { |
|
161 |
+ this.goBack(); |
|
162 |
+ } |
|
163 |
+ }, |
|
164 |
+ |
|
165 |
+ // 게시글 조회 |
|
166 |
+ boardList() { |
|
167 |
+ const vm = this; |
|
168 |
+ axios({ |
|
169 |
+ url: "/board/findAll.json", |
|
170 |
+ method: "post", |
|
171 |
+ headers: { |
|
172 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
117 | 173 |
}, |
118 |
- increaseProgress() { |
|
119 |
- if (this.progress < 100) { |
|
120 |
- this.progress += 10; |
|
121 |
- } |
|
174 |
+ data: { |
|
175 |
+ page: vm.currentPage + 1, |
|
176 |
+ pageSize: vm.itemsPerPage, |
|
177 |
+ sclsId: vm.selectedClassId, |
|
122 | 178 |
}, |
123 |
- showConfirm(type) { |
|
124 |
- let message = ''; |
|
125 |
- if (type === 'cancel') { |
|
126 |
- message = '삭제하시겠습니까?'; |
|
127 |
- } else if (type === 'reset') { |
|
128 |
- message = '초기화하시겠습니까?'; |
|
129 |
- } else if (type === 'save') { |
|
130 |
- message = '등록하시겠습니까?'; |
|
131 |
- } |
|
179 |
+ }) |
|
180 |
+ .then(function (res) { |
|
181 |
+ console.log("dataList - response : ", res.data); |
|
132 | 182 |
|
133 |
- if (confirm(message)) { |
|
134 |
- this.goBack(); |
|
135 |
- } |
|
136 |
- }, |
|
137 |
- }, |
|
138 |
- watch: { |
|
183 |
+ vm.dataList = res.data.result[0].boardClass[0].board; |
|
184 |
+ vm.userNm = res.data.result[0].userNm; |
|
185 |
+ vm.userId = res.data.result[0].userId; |
|
186 |
+ vm.totalPosts = res.data.totalBoard; |
|
139 | 187 |
|
188 |
+ console.log(vm.userId); |
|
189 |
+ }) |
|
190 |
+ .catch(function (error) { |
|
191 |
+ console.log("result - error : ", error); |
|
192 |
+ }); |
|
140 | 193 |
}, |
141 |
- computed: { |
|
194 |
+ setClassId() { |
|
195 |
+ sessionStorage.setItem("sclsId", JSON.stringify(this.selectedClassId)); |
|
196 |
+ sessionStorage.removeItem("selectedBoardList"); |
|
197 |
+ sessionStorage.removeItem("file"); |
|
198 |
+ this.boardList(); |
|
199 |
+ }, |
|
142 | 200 |
|
201 |
+ // 게시글 정보 세션에 저장 |
|
202 |
+ selectBoardList(item) { |
|
203 |
+ sessionStorage.setItem("selectedBoardList", JSON.stringify(item)); |
|
143 | 204 |
}, |
144 |
- components: { |
|
145 |
- SvgIcon, |
|
146 |
- ProgressBar |
|
147 |
- }, |
|
148 |
- mounted() { |
|
149 |
- console.log('Main2 mounted'); |
|
150 |
- //console.log(`반 페이지 sclsId(반 아이디) 확인 : ${this.selectedClassId}`); |
|
151 |
- } |
|
152 |
-} |
|
153 |
-</script>(No newline at end of file) |
|
205 |
+ }, |
|
206 |
+ watch: {}, |
|
207 |
+ computed: {}, |
|
208 |
+ components: { |
|
209 |
+ SvgIcon, |
|
210 |
+ ProgressBar, |
|
211 |
+ }, |
|
212 |
+ mounted() { |
|
213 |
+ console.log("Main2 mounted"); |
|
214 |
+ //console.log(`반 페이지 sclsId(반 아이디) 확인 : ${this.selectedClassId}`); |
|
215 |
+ this.setClassId(); |
|
216 |
+ }, |
|
217 |
+}; |
|
218 |
+</script> |
+++ client/views/pages/teacher/ExamInsert.vue
... | ... | @@ -0,0 +1,131 @@ |
1 | +<template> | |
2 | + <div class="title-box flex justify-between mb40"> | |
3 | + <p class="title">평가 등록</p> | |
4 | + </div> | |
5 | + <!-- <label for="" class="title1">문제 리스트</label> | |
6 | + <table class="mt20 mb100"> | |
7 | + <colgroup> | |
8 | + <col style="width: 10%;"> | |
9 | + <col style="width: 70%;"> | |
10 | + <col style="width: 20%;"> | |
11 | + </colgroup> | |
12 | + <thead> | |
13 | + <td>No.</td> | |
14 | + <td>문제</td> | |
15 | + <td>보기</td> | |
16 | + </thead> | |
17 | + <tbody> | |
18 | + <tr> | |
19 | + <td>1</td> | |
20 | + <td>1</td> | |
21 | + <td><button type="button" title="수정" class="new-btn"> | |
22 | + 수정 | |
23 | + </button></td> | |
24 | + </tr> | |
25 | + </tbody> | |
26 | + </table> --> | |
27 | + <label for="" class="title1">상세 내용</label> | |
28 | + <div class="board-wrap mt20"> | |
29 | + <div class="flex align-center mb20"> | |
30 | + <label for="" class="title2">단원</label> | |
31 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
32 | + <option value="bbsTtl">제목</option> | |
33 | + <option value="bbsCnt">내용</option> | |
34 | + <option value="userNm">작성자</option> | |
35 | + <option value="bbsCls">카테고리</option> | |
36 | + </select> | |
37 | + </div> | |
38 | + <div class="flex align-center mb20"> | |
39 | + <label for="" class="title2">평가 유형</label> | |
40 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
41 | + <option value="bbsTtl">제목</option> | |
42 | + <option value="bbsCnt">내용</option> | |
43 | + <option value="userNm">작성자</option> | |
44 | + <option value="bbsCls">카테고리</option> | |
45 | + </select> | |
46 | + </div> | |
47 | + | |
48 | + <hr> | |
49 | + <div class="flex align-center mb20"> | |
50 | + <label for="" class="title2">문제 1</label> | |
51 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
52 | + <option value="bbsTtl">제목</option> | |
53 | + <option value="bbsCnt">내용</option> | |
54 | + <option value="userNm">작성자</option> | |
55 | + <option value="bbsCls">카테고리</option> | |
56 | + </select> | |
57 | + </div> | |
58 | + <div class="flex align-center mb20"> | |
59 | + <label for="" class="title2">문제 2</label> | |
60 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
61 | + <option value="bbsTtl">제목</option> | |
62 | + <option value="bbsCnt">내용</option> | |
63 | + <option value="userNm">작성자</option> | |
64 | + <option value="bbsCls">카테고리</option> | |
65 | + </select> | |
66 | + </div> | |
67 | + <div class="flex align-center mb20"> | |
68 | + <label for="" class="title2">문제 3</label> | |
69 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
70 | + <option value="bbsTtl">제목</option> | |
71 | + <option value="bbsCnt">내용</option> | |
72 | + <option value="userNm">작성자</option> | |
73 | + <option value="bbsCls">카테고리</option> | |
74 | + </select> | |
75 | + </div> | |
76 | + <div class="flex align-center mb20"> | |
77 | + <label for="" class="title2">문제 4</label> | |
78 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
79 | + <option value="bbsTtl">제목</option> | |
80 | + <option value="bbsCnt">내용</option> | |
81 | + <option value="userNm">작성자</option> | |
82 | + <option value="bbsCls">카테고리</option> | |
83 | + </select> | |
84 | + </div> | |
85 | + | |
86 | + </div> | |
87 | + <div class="flex justify-between mt50"> | |
88 | + <button type="button" title="글쓰기" class="new-btn" @click="goToPage('C_ExamList')"> | |
89 | + 목록 | |
90 | + </button> | |
91 | + <div class="flex"> | |
92 | + <button type="button" title="글쓰기" class="new-btn mr10"> | |
93 | + 취소 | |
94 | + </button> | |
95 | + <button type="button" title="글쓰기" class="new-btn"> | |
96 | + 등록 | |
97 | + </button> | |
98 | + </div> | |
99 | + </div> | |
100 | +</template> | |
101 | + | |
102 | +<script> | |
103 | +import SvgIcon from '@jamescoyle/vue-icon'; | |
104 | +import { mdiMagnify } from '@mdi/js'; | |
105 | + | |
106 | + | |
107 | +export default { | |
108 | + data() { | |
109 | + return { | |
110 | + mdiMagnify: mdiMagnify, | |
111 | + } | |
112 | + }, | |
113 | + methods: { | |
114 | + goToPage(page) { | |
115 | + this.$router.push({ name: page }); | |
116 | + }, | |
117 | + }, | |
118 | + watch: { | |
119 | + | |
120 | + }, | |
121 | + computed: { | |
122 | + | |
123 | + }, | |
124 | + components: { | |
125 | + SvgIcon | |
126 | + }, | |
127 | + mounted() { | |
128 | + console.log('Main2 mounted'); | |
129 | + } | |
130 | +} | |
131 | +</script>(No newline at end of file) |
--- client/views/pages/teacher/ExamList.vue
+++ client/views/pages/teacher/ExamList.vue
... | ... | @@ -5,6 +5,12 @@ |
5 | 5 |
<option value="">1단원</option> |
6 | 6 |
</select> |
7 | 7 |
</div> |
8 |
+ <label for="" class="title2">단원</label> |
|
9 |
+ <div class="unit-pagination flex mt10 mb20" style="gap: 10px;"> |
|
10 |
+ <button class="selected-btn">1</button> |
|
11 |
+ <button>2</button> |
|
12 |
+ <button>3</button> |
|
13 |
+ </div> |
|
8 | 14 |
<div class="search-wrap flex justify-end mb20"> |
9 | 15 |
<select name="" id="" class="mr10 data-wrap"> |
10 | 16 |
<option value="">중간</option> |
... | ... | @@ -78,7 +84,7 @@ |
78 | 84 |
<button><img src="../../../resources/img/btn28_90t_normal.png" alt=""></button> |
79 | 85 |
</article> |
80 | 86 |
<div class="flex justify-end "> |
81 |
- <button type="button" title="등록" class="new-btn" @click="goToPage('ExamDetail')"> |
|
87 |
+ <button type="button" title="등록" class="new-btn" @click="goToPage('ExamInsert')"> |
|
82 | 88 |
등록 |
83 | 89 |
</button> |
84 | 90 |
</div> |
--- client/views/pages/teacher/Home.vue
+++ client/views/pages/teacher/Home.vue
... | ... | @@ -1,267 +1,289 @@ |
1 | 1 |
<template> |
2 |
- <div class="title-box flex justify-between mb40"> |
|
3 |
- <p class="title">홈</p> |
|
4 |
- </div> |
|
5 |
- <div class="content-t"> |
|
6 |
- <div class=" flex " style="gap: 50px;" :style="{flexWrap: 'wrap'}"> |
|
7 |
- <div class="class" v-for="classItem in classesList" :key="classItem.sclsId"> |
|
8 |
- <div class="box gd-col2" style="gap: 10px;" @click="goToPage('ClassDetail', classItem.sclsId)"> |
|
9 |
- <div><img src="../../../resources/img/img176_82t.png" alt=""></div> |
|
10 |
- <div><img src="../../../resources/img/img176_82t.png" alt=""></div> |
|
11 |
- <div><img src="../../../resources/img/img176_82t.png" alt=""></div> |
|
12 |
- <div><img src="../../../resources/img/img176_82t.png" alt=""></div> |
|
13 |
- </div> |
|
14 |
- <div class="text flex justify-between mt20"> |
|
15 |
- <p class="title1">{{ classItem.sclsNm }}</p> |
|
16 |
- <span class="member">{{ classItem. studentCount}}</span> |
|
17 |
- </div> |
|
18 |
- <div class="btnGroup mt15 flex align-center justify-end" style="gap: 10px;"> |
|
19 |
- <button @click="editModeModal(classItem.sclsId)">수정</button> |
|
20 |
- <p>|</p> |
|
21 |
- <button @click="deleteClass(classItem.sclsId)">삭제</button> |
|
22 |
- </div> |
|
23 |
- </div> |
|
24 |
- <div class="textbook-add"> |
|
25 |
- <button @click="addModeModal"><img src="../../../resources/img/btn32_98t_normal.png" alt=""></button> |
|
26 |
- |
|
27 |
- </div> |
|
28 |
- <!-- 팝업창 --> |
|
29 |
- <div v-show="searchOpen" class="popup-wrap"> |
|
30 |
- <div class="popup-box "> |
|
31 |
- <div class="flex justify-between mb30"> |
|
32 |
- <p class="popup-title">반 이름</p> |
|
33 |
- <button type="button" class="popup-close-btn" @click="closeBtn"> |
|
34 |
- <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
35 |
- |
|
36 |
- </button> |
|
37 |
- </div> |
|
38 |
- <div class="search-wrap mb30"> |
|
39 |
- <input type="text" v-model="createClassName" class="data-wrap" placeholder=""> |
|
40 |
- <!-- <button type="button" > |
|
2 |
+ <div class="title-box flex justify-between mb40"> |
|
3 |
+ <p class="title">홈</p> |
|
4 |
+ </div> |
|
5 |
+ <div class="content-t"> |
|
6 |
+ <div class="flex" style="gap: 50px" :style="{ flexWrap: 'wrap' }"> |
|
7 |
+ <div |
|
8 |
+ class="class" |
|
9 |
+ v-for="classItem in classesList" |
|
10 |
+ :key="classItem.sclsId" |
|
11 |
+ > |
|
12 |
+ <div |
|
13 |
+ class="box gd-col2" |
|
14 |
+ style="gap: 10px" |
|
15 |
+ @click="goToPage('ClassDetail', classItem.sclsId)" |
|
16 |
+ > |
|
17 |
+ <div><img src="../../../resources/img/img176_82t.png" alt="" /></div> |
|
18 |
+ <div><img src="../../../resources/img/img176_82t.png" alt="" /></div> |
|
19 |
+ <div><img src="../../../resources/img/img176_82t.png" alt="" /></div> |
|
20 |
+ <div><img src="../../../resources/img/img176_82t.png" alt="" /></div> |
|
21 |
+ </div> |
|
22 |
+ <div class="text flex justify-between mt20"> |
|
23 |
+ <p class="title1">{{ classItem.sclsNm }}</p> |
|
24 |
+ <span class="member">{{ classItem.studentCount }}</span> |
|
25 |
+ </div> |
|
26 |
+ <div |
|
27 |
+ class="btnGroup mt15 flex align-center justify-end" |
|
28 |
+ style="gap: 10px" |
|
29 |
+ > |
|
30 |
+ <button @click="editModeModal(classItem.sclsId)">수정</button> |
|
31 |
+ <p>|</p> |
|
32 |
+ <button @click="deleteClass(classItem.sclsId)">삭제</button> |
|
33 |
+ </div> |
|
34 |
+ </div> |
|
35 |
+ <div class="textbook-add"> |
|
36 |
+ <button @click="addModeModal"> |
|
37 |
+ <img src="../../../resources/img/btn32_98t_normal.png" alt="" /> |
|
38 |
+ </button> |
|
39 |
+ </div> |
|
40 |
+ <!-- 팝업창 --> |
|
41 |
+ <div v-show="searchOpen" class="popup-wrap"> |
|
42 |
+ <div class="popup-box"> |
|
43 |
+ <div class="flex justify-between mb30"> |
|
44 |
+ <p class="popup-title">반 이름</p> |
|
45 |
+ <button type="button" class="popup-close-btn" @click="closeBtn"> |
|
46 |
+ <svg-icon |
|
47 |
+ type="mdi" |
|
48 |
+ :path="mdiWindowClose" |
|
49 |
+ class="close-btn" |
|
50 |
+ ></svg-icon> |
|
51 |
+ </button> |
|
52 |
+ </div> |
|
53 |
+ <div class="search-wrap mb30"> |
|
54 |
+ <input |
|
55 |
+ type="text" |
|
56 |
+ v-model="createClassName" |
|
57 |
+ class="data-wrap" |
|
58 |
+ placeholder="" |
|
59 |
+ /> |
|
60 |
+ <!-- <button type="button" > |
|
41 | 61 |
<img src="../../../resources/img/look_t.png" alt=""> |
42 | 62 |
</button> --> |
43 |
- </div> |
|
44 |
- <div class="flex justify-center "> |
|
45 |
- <button type="button" title="글쓰기" class="new-btn mr10" @click="closeBtn"> |
|
46 |
- 취소 |
|
47 |
- </button> |
|
48 |
- <button type="button" title="등록" class="new-btn" @click="isEditMode ? updateClass() : insertClass()"> |
|
49 |
- {{ isEditMode ? '수정' : '등록' }} |
|
50 |
- </button> |
|
51 |
- </div> |
|
52 |
- </div> |
|
53 |
- </div> |
|
63 |
+ </div> |
|
64 |
+ <div class="flex justify-center"> |
|
65 |
+ <button |
|
66 |
+ type="button" |
|
67 |
+ title="글쓰기" |
|
68 |
+ class="new-btn mr10" |
|
69 |
+ @click="closeBtn" |
|
70 |
+ > |
|
71 |
+ 취소 |
|
72 |
+ </button> |
|
73 |
+ <button |
|
74 |
+ type="button" |
|
75 |
+ title="등록" |
|
76 |
+ class="new-btn" |
|
77 |
+ @click="isEditMode ? updateClass() : insertClass()" |
|
78 |
+ > |
|
79 |
+ {{ isEditMode ? "수정" : "등록" }} |
|
80 |
+ </button> |
|
81 |
+ </div> |
|
54 | 82 |
</div> |
83 |
+ </div> |
|
55 | 84 |
</div> |
85 |
+ </div> |
|
56 | 86 |
</template> |
57 | 87 |
|
58 | 88 |
<script> |
59 |
-import axios from 'axios'; |
|
60 |
-import SvgIcon from '@jamescoyle/vue-icon'; |
|
61 |
-import { mdiMagnify, mdiWindowClose } from '@mdi/js'; |
|
89 |
+import axios from "axios"; |
|
90 |
+import SvgIcon from "@jamescoyle/vue-icon"; |
|
91 |
+import { mdiMagnify, mdiWindowClose } from "@mdi/js"; |
|
62 | 92 |
export default { |
63 |
- data() { |
|
64 |
- return { |
|
65 |
- mdiWindowClose: mdiWindowClose, |
|
66 |
- showModal: false, |
|
67 |
- searchOpen: false, |
|
93 |
+ data() { |
|
94 |
+ return { |
|
95 |
+ mdiWindowClose: mdiWindowClose, |
|
96 |
+ showModal: false, |
|
97 |
+ searchOpen: false, |
|
68 | 98 |
|
69 |
- classesList : [], // 불러온 반 정보 |
|
70 |
- user_id : '2', //유저 아이디 : 현재는 고정 |
|
71 |
- createClassName : "", // 생성 또는 수정할 반 이름 |
|
99 |
+ classesList: [], // 불러온 반 정보 |
|
100 |
+ user_id: "2", //유저 아이디 : 현재는 고정 |
|
101 |
+ createClassName: "", // 생성 또는 수정할 반 이름 |
|
72 | 102 |
|
73 |
- isEditMode: false, // 추가 모드인지 수정 모드인지 구분하는 변수 |
|
74 |
- current_editId : '', // 현재 수정할 반 id |
|
75 |
- } |
|
103 |
+ isEditMode: false, // 추가 모드인지 수정 모드인지 구분하는 변수 |
|
104 |
+ current_editId: "", // 현재 수정할 반 id |
|
105 |
+ }; |
|
106 |
+ }, |
|
107 |
+ methods: { |
|
108 |
+ goToPage(page, sclsId) { |
|
109 |
+ //console.log(`sclsId : ${sclsId}`); // 쿼리 확인 |
|
110 |
+ this.$router.push({ name: page, query: { sclsId: sclsId } }); |
|
76 | 111 |
}, |
77 |
- methods: { |
|
78 |
- goToPage(page, sclsId) { |
|
79 |
- //console.log(`sclsId : ${sclsId}`); // 쿼리 확인 |
|
80 |
- this.$router.push({ name: page , query : {sclsId : sclsId}}); |
|
81 |
- }, |
|
82 |
- closeModal() { |
|
83 |
- this.showModal = false; |
|
84 |
- }, |
|
85 |
- editModeModal(sclsId) { |
|
86 |
- this.searchOpen = true; |
|
87 |
- this.isEditMode = true; // 수정 모드로 설정 |
|
88 |
- this.current_editId = sclsId |
|
89 |
- }, |
|
90 |
- addModeModal() { |
|
91 |
- this.searchOpen = true; |
|
92 |
- this.isEditMode = false; // 추가 모드로 설정 |
|
93 |
- }, |
|
94 |
- closeBtn() { |
|
95 |
- this.searchOpen = false; |
|
96 |
- this.createClassName = ""; // 팝업 닫을 때 반 이름 초기화 |
|
112 |
+ closeModal() { |
|
113 |
+ this.showModal = false; |
|
114 |
+ }, |
|
115 |
+ editModeModal(sclsId) { |
|
116 |
+ this.searchOpen = true; |
|
117 |
+ this.isEditMode = true; // 수정 모드로 설정 |
|
118 |
+ this.current_editId = sclsId; |
|
119 |
+ }, |
|
120 |
+ addModeModal() { |
|
121 |
+ this.searchOpen = true; |
|
122 |
+ this.isEditMode = false; // 추가 모드로 설정 |
|
123 |
+ }, |
|
124 |
+ closeBtn() { |
|
125 |
+ this.searchOpen = false; |
|
126 |
+ this.createClassName = ""; // 팝업 닫을 때 반 이름 초기화 |
|
127 |
+ }, |
|
128 |
+ showConfirm(type, callback) { |
|
129 |
+ let message = ""; |
|
130 |
+ if (type === "delete") { |
|
131 |
+ message = "삭제하시겠습니까?"; |
|
132 |
+ } else if (type === "reset") { |
|
133 |
+ message = "초기화하시겠습니까?"; |
|
134 |
+ } else if (type === "save") { |
|
135 |
+ message = "등록하시겠습니까?"; |
|
136 |
+ } else if (type === "edit") { |
|
137 |
+ message = "수정하시겠습니까?"; |
|
138 |
+ } |
|
97 | 139 |
|
140 |
+ if (confirm(message)) { |
|
141 |
+ if (callback) callback(); // 콜백 함수 호출 |
|
142 |
+ } |
|
143 |
+ }, |
|
144 |
+ // 조회 |
|
145 |
+ selectClass() { |
|
146 |
+ sessionStorage.removeItem("sclsId"); |
|
147 |
+ axios({ |
|
148 |
+ url: "/classes/selectClass.json", |
|
149 |
+ method: "post", |
|
150 |
+ headers: { |
|
151 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
98 | 152 |
}, |
99 |
- showConfirm(type, callback) { |
|
100 |
- let message = ''; |
|
101 |
- if (type === 'delete') { |
|
102 |
- message = '삭제하시겠습니까?'; |
|
103 |
- } else if (type === 'reset') { |
|
104 |
- message = '초기화하시겠습니까?'; |
|
105 |
- } else if (type === 'save') { |
|
106 |
- message = '등록하시겠습니까?'; |
|
107 |
- } else if (type === 'edit'){ |
|
108 |
- message = '수정하시겠습니까?'; |
|
109 |
- } |
|
110 |
- |
|
111 |
- |
|
112 |
- if (confirm(message)) { |
|
113 |
- if (callback) callback(); // 콜백 함수 호출 |
|
114 |
- } |
|
153 |
+ data: { |
|
154 |
+ userId: this.user_id, |
|
115 | 155 |
}, |
116 |
- // 조회 |
|
117 |
- selectClass() { |
|
118 |
- axios({ |
|
119 |
- url: "/classes/selectClass.json", |
|
120 |
- method: "post", |
|
121 |
- headers: { |
|
122 |
- "Content-Type": "application/json; charset=UTF-8", |
|
123 |
- }, |
|
124 |
- data: { |
|
125 |
- userId: this.user_id |
|
126 |
- }, |
|
127 |
- }) |
|
156 |
+ }) |
|
157 |
+ .then((res) => { |
|
158 |
+ if (res.data.status === "success") { |
|
159 |
+ console.log("classesList - response(조회) : ", res.data.data); |
|
160 |
+ this.classesList = res.data.data; |
|
161 |
+ } else { |
|
162 |
+ console.log("조회에 실패했습니다: ", res.data); |
|
163 |
+ alert("조회에 실패했습니다."); |
|
164 |
+ } |
|
165 |
+ }) |
|
166 |
+ .catch((err) => { |
|
167 |
+ console.log("classesList - error(조회) : ", err); |
|
168 |
+ alert("조회에 오류가 발생했습니다."); |
|
169 |
+ }); |
|
170 |
+ }, |
|
171 |
+ // 추가 |
|
172 |
+ insertClass() { |
|
173 |
+ if (this.createClassName.trim() === "") { |
|
174 |
+ alert("반 이름을 입력해주세요"); |
|
175 |
+ } else { |
|
176 |
+ this.showConfirm("save", () => { |
|
177 |
+ axios({ |
|
178 |
+ url: "/classes/insertClass.json", |
|
179 |
+ method: "post", |
|
180 |
+ headers: { |
|
181 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
182 |
+ }, |
|
183 |
+ data: { |
|
184 |
+ userId: this.user_id, |
|
185 |
+ sclsNm: this.createClassName, |
|
186 |
+ }, |
|
187 |
+ }) |
|
128 | 188 |
.then((res) => { |
129 |
- if (res.data.status === "success") { |
|
130 |
- console.log("classesList - response(조회) : ", res.data.data); |
|
131 |
- this.classesList = res.data.data; |
|
132 |
- } else { |
|
133 |
- console.log("조회에 실패했습니다: ", res.data); |
|
134 |
- alert("조회에 실패했습니다."); |
|
135 |
- } |
|
189 |
+ if (res.data.status === "success") { |
|
190 |
+ console.log("classesList - response(추가) : ", res.data.data); |
|
191 |
+ this.selectClass(); |
|
192 |
+ this.createClassName = ""; // 반 이름 초기화 |
|
193 |
+ this.closeBtn(); // 생성 모달 닫기 |
|
194 |
+ } else { |
|
195 |
+ console.log("추가에 실패했습니다: ", res.data); |
|
196 |
+ alert("추가에 실패했습니다."); |
|
197 |
+ } |
|
136 | 198 |
}) |
137 | 199 |
.catch((err) => { |
138 |
- console.log("classesList - error(조회) : ", err); |
|
139 |
- alert("조회에 오류가 발생했습니다."); |
|
200 |
+ console.log("classesList - error(추가) : ", err); |
|
201 |
+ alert("추가에 오류가 발생했습니다."); |
|
140 | 202 |
}); |
141 |
- }, |
|
142 |
- // 추가 |
|
143 |
- insertClass() { |
|
144 |
- if(this.createClassName.trim() === ""){ |
|
145 |
- alert("반 이름을 입력해주세요"); |
|
203 |
+ }); |
|
204 |
+ } |
|
205 |
+ }, |
|
206 |
+ // 삭제 |
|
207 |
+ deleteClass(sclsId) { |
|
208 |
+ this.showConfirm("delete", () => { |
|
209 |
+ axios({ |
|
210 |
+ url: "/classes/deleteClass.json", |
|
211 |
+ method: "post", |
|
212 |
+ headers: { |
|
213 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
214 |
+ }, |
|
215 |
+ data: { |
|
216 |
+ sclsId: sclsId, |
|
217 |
+ }, |
|
218 |
+ }) |
|
219 |
+ .then((res) => { |
|
220 |
+ if (res.data.status === "success") { |
|
221 |
+ console.log("classesList - response(삭제) : ", res.data.data); |
|
222 |
+ this.selectClass(); |
|
223 |
+ } else { |
|
224 |
+ console.log("삭제에 실패했습니다: ", res.data); |
|
225 |
+ alert("삭제에 실패했습니다."); |
|
146 | 226 |
} |
147 |
- else{ |
|
148 |
- this.showConfirm('save', () => { |
|
149 |
- axios({ |
|
150 |
- url: "/classes/insertClass.json", |
|
151 |
- method: "post", |
|
152 |
- headers: { |
|
153 |
- "Content-Type": "application/json; charset=UTF-8", |
|
154 |
- }, |
|
155 |
- data: { |
|
156 |
- userId: this.user_id, |
|
157 |
- sclsNm: this.createClassName |
|
158 |
- }, |
|
159 |
- }) |
|
160 |
- .then((res) => { |
|
161 |
- if (res.data.status === "success") { |
|
162 |
- console.log("classesList - response(추가) : ", res.data.data); |
|
163 |
- this.selectClass(); |
|
164 |
- this.createClassName = ""; // 반 이름 초기화 |
|
165 |
- this.closeBtn(); // 생성 모달 닫기 |
|
166 |
- } else { |
|
167 |
- console.log("추가에 실패했습니다: ", res.data); |
|
168 |
- alert("추가에 실패했습니다."); |
|
169 |
- } |
|
170 |
- }) |
|
171 |
- .catch((err) => { |
|
172 |
- console.log("classesList - error(추가) : ", err); |
|
173 |
- alert("추가에 오류가 발생했습니다."); |
|
174 |
- }); |
|
175 |
- }); |
|
176 |
- } |
|
177 |
- |
|
178 |
- }, |
|
179 |
- // 삭제 |
|
180 |
- deleteClass(sclsId) { |
|
181 |
- this.showConfirm('delete', () => { |
|
182 |
- axios({ |
|
183 |
- url: "/classes/deleteClass.json", |
|
184 |
- method: "post", |
|
185 |
- headers: { |
|
186 |
- "Content-Type": "application/json; charset=UTF-8", |
|
187 |
- }, |
|
188 |
- data: { |
|
189 |
- sclsId: sclsId |
|
190 |
- }, |
|
191 |
- }) |
|
192 |
- .then((res) => { |
|
193 |
- if (res.data.status === "success") { |
|
194 |
- console.log("classesList - response(삭제) : ", res.data.data); |
|
195 |
- this.selectClass(); |
|
196 |
- } else { |
|
197 |
- console.log("삭제에 실패했습니다: ", res.data); |
|
198 |
- alert("삭제에 실패했습니다."); |
|
199 |
- } |
|
200 |
- }) |
|
201 |
- .catch((err) => { |
|
202 |
- console.log("classesList - error(삭제) : ", err); |
|
203 |
- alert("삭제에 오류가 발생했습니다."); |
|
204 |
- }); |
|
227 |
+ }) |
|
228 |
+ .catch((err) => { |
|
229 |
+ console.log("classesList - error(삭제) : ", err); |
|
230 |
+ alert("삭제에 오류가 발생했습니다."); |
|
231 |
+ }); |
|
232 |
+ }); |
|
233 |
+ }, |
|
234 |
+ // 수정 |
|
235 |
+ updateClass() { |
|
236 |
+ if (this.createClassName.trim() === "") { |
|
237 |
+ alert("반 이름을 입력해주세요"); |
|
238 |
+ } else { |
|
239 |
+ this.showConfirm("edit", () => { |
|
240 |
+ axios({ |
|
241 |
+ url: "/classes/updateClass.json", |
|
242 |
+ method: "post", |
|
243 |
+ headers: { |
|
244 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
245 |
+ }, |
|
246 |
+ data: { |
|
247 |
+ sclsId: this.current_editId, |
|
248 |
+ sclsNm: this.createClassName, |
|
249 |
+ }, |
|
250 |
+ }) |
|
251 |
+ .then((res) => { |
|
252 |
+ if (res.data.status === "success") { |
|
253 |
+ console.log("classesList - response(수정) : ", res.data.data); |
|
254 |
+ this.selectClass(); |
|
255 |
+ this.createClassName = ""; // 반 이름 초기화 |
|
256 |
+ this.current_editId = ""; // 반 Id 초기화 |
|
257 |
+ this.closeBtn(); // 팝업 닫기 |
|
258 |
+ } else { |
|
259 |
+ console.log("수정에 실패했습니다: ", res.data); |
|
260 |
+ alert("수정에 실패했습니다."); |
|
261 |
+ } |
|
262 |
+ }) |
|
263 |
+ .catch((err) => { |
|
264 |
+ console.log("classesList - error(수정) : ", err); |
|
265 |
+ alert("수정에 오류가 발생했습니다."); |
|
205 | 266 |
}); |
206 |
- }, |
|
207 |
- // 수정 |
|
208 |
- updateClass() { |
|
209 |
- if(this.createClassName.trim() === ""){ |
|
210 |
- alert("반 이름을 입력해주세요"); |
|
211 |
- } |
|
212 |
- else{ |
|
213 |
- this.showConfirm('edit', () => { |
|
214 |
- axios({ |
|
215 |
- url: "/classes/updateClass.json", |
|
216 |
- method: "post", |
|
217 |
- headers: { |
|
218 |
- "Content-Type": "application/json; charset=UTF-8", |
|
219 |
- }, |
|
220 |
- data: { |
|
221 |
- sclsId: this.current_editId, |
|
222 |
- sclsNm: this.createClassName |
|
223 |
- }, |
|
224 |
- }) |
|
225 |
- .then((res) => { |
|
226 |
- if (res.data.status === "success") { |
|
227 |
- console.log("classesList - response(수정) : ", res.data.data); |
|
228 |
- this.selectClass(); |
|
229 |
- this.createClassName = ""; // 반 이름 초기화 |
|
230 |
- this.current_editId = ""; // 반 Id 초기화 |
|
231 |
- this.closeBtn(); // 팝업 닫기 |
|
232 |
- } else { |
|
233 |
- console.log("수정에 실패했습니다: ", res.data); |
|
234 |
- alert("수정에 실패했습니다."); |
|
235 |
- } |
|
236 |
- }) |
|
237 |
- .catch((err) => { |
|
238 |
- console.log("classesList - error(수정) : ", err); |
|
239 |
- alert("수정에 오류가 발생했습니다."); |
|
240 |
- }); |
|
241 |
- }); |
|
242 |
- } |
|
243 |
- } |
|
267 |
+ }); |
|
268 |
+ } |
|
244 | 269 |
}, |
245 |
- watch: { |
|
246 |
- |
|
247 |
- }, |
|
248 |
- computed: { |
|
249 |
- |
|
250 |
- }, |
|
251 |
- components: { |
|
252 |
- SvgIcon |
|
253 |
- }, |
|
254 |
- mounted() { |
|
255 |
- console.log('Main2 mounted'); |
|
256 |
- this.selectClass(); |
|
257 |
- } |
|
258 |
-} |
|
270 |
+ }, |
|
271 |
+ watch: {}, |
|
272 |
+ computed: {}, |
|
273 |
+ components: { |
|
274 |
+ SvgIcon, |
|
275 |
+ }, |
|
276 |
+ mounted() { |
|
277 |
+ console.log("Main2 mounted"); |
|
278 |
+ this.selectClass(); |
|
279 |
+ }, |
|
280 |
+}; |
|
259 | 281 |
</script> |
260 | 282 |
|
261 | 283 |
<style> |
262 | 284 |
.content-t { |
263 |
- flex-wrap: wrap; |
|
264 |
- height: 90%; |
|
265 |
- overflow-y: scroll; |
|
285 |
+ flex-wrap: wrap; |
|
286 |
+ height: 90%; |
|
287 |
+ overflow-y: scroll; |
|
266 | 288 |
} |
267 |
-</style>(No newline at end of file) |
|
289 |
+</style> |
--- client/views/pages/teacher/Main_t.vue
+++ client/views/pages/teacher/Main_t.vue
... | ... | @@ -1,7 +1,7 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="flex justify-between" style="height: 100%;"> |
3 | 3 |
<Side_t></Side_t> |
4 |
- <div style="padding: 15px 60px 90px 60px; "> |
|
4 |
+ <div style="padding: 15px 60px 120px 0px "> |
|
5 | 5 |
<Header></Header> |
6 | 6 |
<div class="main-wrap"> |
7 | 7 |
<router-view /> |
--- client/views/pages/teacher/QuestionDetail.vue
+++ client/views/pages/teacher/QuestionDetail.vue
... | ... | @@ -1,5 +1,6 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 |
+<<<<<<< HEAD |
|
3 | 4 |
<p class="title">문제 조회</p> |
4 | 5 |
</div> |
5 | 6 |
<div class="board-wrap"> |
... | ... | @@ -75,12 +76,195 @@ |
75 | 76 |
</table> |
76 | 77 |
</div> |
77 | 78 |
</div> |
79 |
+======= |
|
80 |
+ <p class="title">문제 등록</p> |
|
81 |
+ </div> |
|
82 |
+ <div class="board-wrap"> |
|
83 |
+ <div class="tab-box" > |
|
84 |
+ <label class="mr20 title1"> |
|
85 |
+ <input type="radio" v-model="selectedTab" value="tab1" /> |
|
86 |
+ 문제 유형 (일반형) |
|
87 |
+ </label> |
|
88 |
+ <label class="mr20 title1"> |
|
89 |
+ <input type="radio" v-model="selectedTab" value="tab2" /> |
|
90 |
+ 문제 유형 (O,X형) |
|
91 |
+ </label> |
|
92 |
+ <label class="mr20 title1"> |
|
93 |
+ <input type="radio" v-model="selectedTab" value="tab3" /> |
|
94 |
+ 문제 유형 (연결형) |
|
95 |
+ </label> |
|
96 |
+ <label class="mr20 title1"> |
|
97 |
+ <input type="radio" v-model="selectedTab" value="tab4" /> |
|
98 |
+ 문제 유형 (다중 정답형) |
|
99 |
+ </label> |
|
100 |
+ </div> |
|
101 |
+ <hr> |
|
102 |
+ <div class="gd-col2 " > |
|
103 |
+ <div class="flex align-center mb20"> |
|
104 |
+ <label for="" class="title2">카테고리</label> |
|
105 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
106 |
+ <option value="bbsTtl">제목</option> |
|
107 |
+ <option value="bbsCnt">내용</option> |
|
108 |
+ <option value="userNm">작성자</option> |
|
109 |
+ <option value="bbsCls">카테고리</option> |
|
110 |
+ </select> |
|
111 |
+ </div> |
|
112 |
+ <div class="flex align-center mb20"> |
|
113 |
+ <label for="" class="title2">문제 유형</label> |
|
114 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
115 |
+ <option value="bbsTtl">제목</option> |
|
116 |
+ <option value="bbsCnt">내용</option> |
|
117 |
+ <option value="userNm">작성자</option> |
|
118 |
+ <option value="bbsCls">카테고리</option> |
|
119 |
+ </select> |
|
120 |
+ </div> |
|
121 |
+ <div class="flex align-center"> |
|
122 |
+ <label for="" class="title2">지문</label> |
|
123 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
124 |
+ <option value="bbsTtl">제목</option> |
|
125 |
+ <option value="bbsCnt">내용</option> |
|
126 |
+ <option value="userNm">작성자</option> |
|
127 |
+ <option value="bbsCls">카테고리</option> |
|
128 |
+ </select> |
|
129 |
+ </div> |
|
130 |
+ <div class="flex align-center"> |
|
131 |
+ <label for="" class="title2">문제 지표</label> |
|
132 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
133 |
+ <option value="bbsTtl">제목</option> |
|
134 |
+ <option value="bbsCnt">내용</option> |
|
135 |
+ <option value="userNm">작성자</option> |
|
136 |
+ <option value="bbsCls">카테고리</option> |
|
137 |
+ </select> |
|
138 |
+ </div> |
|
139 |
+ </div> |
|
140 |
+ <div class="flex align-center mb20 mt40"> |
|
141 |
+ <label for="" class="title2">문제 배점</label> |
|
142 |
+ <input type="text" class="data-wrap"> |
|
143 |
+ </div> |
|
144 |
+ |
|
145 |
+ <div class="flex align-center mb20"> |
|
146 |
+ <label for="" class="title2">내용</label> |
|
147 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
148 |
+ </div> |
|
149 |
+ <div class="flex align-center mb20"> |
|
150 |
+ <label for="" class="title2">힌트</label> |
|
151 |
+ <input type="text" class="data-wrap"> |
|
152 |
+ </div> |
|
153 |
+ <div class="flex align-center mb20"> |
|
154 |
+ <label for="" class="title2">첨부파일</label> |
|
155 |
+ <input type="file" ref="fileInput" @change="handleFileUpload" /> |
|
156 |
+ </div> |
|
157 |
+ <hr> |
|
158 |
+ <div v-if="selectedTab === 'tab1'"> |
|
159 |
+ <div class="flex align-center mb20"> |
|
160 |
+ <label for="" class="title2">답1</label> |
|
161 |
+ <input type="text" class="data-wrap"> |
|
162 |
+ </div> |
|
163 |
+ <div class="flex align-center mb20"> |
|
164 |
+ <label for="" class="title2">답2</label> |
|
165 |
+ <input type="text" class="data-wrap"> |
|
166 |
+ </div> |
|
167 |
+ <div class="flex align-center mb20"> |
|
168 |
+ <label for="" class="title2">답3</label> |
|
169 |
+ <input type="text" class="data-wrap"> |
|
170 |
+ </div> |
|
171 |
+ <div class="flex align-center mb20"> |
|
172 |
+ <label for="" class="title2">답4</label> |
|
173 |
+ <input type="text" class="data-wrap"> |
|
174 |
+ </div> |
|
175 |
+ <div class="flex align-center mb20"> |
|
176 |
+ <label for="" class="title2">해설</label> |
|
177 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
178 |
+ </div> |
|
179 |
+ </div> |
|
180 |
+ <div v-else-if="selectedTab === 'tab2'"> |
|
181 |
+ <div class="flex align-center mb20"> |
|
182 |
+ <label for="" class="title2">답</label> |
|
183 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
184 |
+ <option value="bbsTtl">O</option> |
|
185 |
+ <option value="bbsCnt">X</option> |
|
186 |
+ </select> |
|
187 |
+ </div> |
|
188 |
+ <div class="flex align-center mb20"> |
|
189 |
+ <label for="" class="title2">해설</label> |
|
190 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
191 |
+ </div> |
|
192 |
+ </div> |
|
193 |
+ <div v-else-if="selectedTab === 'tab3'"> |
|
194 |
+ <div class="gd-col2 " > |
|
195 |
+ <div class="flex align-center mb20 mr40" > |
|
196 |
+ <label for="" class="title2">문제1</label> |
|
197 |
+ <input type="text" class="data-wrap"> |
|
198 |
+ </div> |
|
199 |
+ <div class="flex align-center mb20"> |
|
200 |
+ <label for="" class="title2">답1</label> |
|
201 |
+ <input type="text" class="data-wrap"> |
|
202 |
+ </div> |
|
203 |
+ <div class="flex align-center mb20 mr40"> |
|
204 |
+ <label for="" class="title2">문제2</label> |
|
205 |
+ <input type="text" class="data-wrap"> |
|
206 |
+ </div> |
|
207 |
+ <div class="flex align-center mb20"> |
|
208 |
+ <label for="" class="title2">답2</label> |
|
209 |
+ <input type="text" class="data-wrap"> |
|
210 |
+ </div> |
|
211 |
+ <div class="flex align-center mb20 mr40"> |
|
212 |
+ <label for="" class="title2">문제3</label> |
|
213 |
+ <input type="text" class="data-wrap"> |
|
214 |
+ </div> |
|
215 |
+ <div class="flex align-center mb20 "> |
|
216 |
+ <label for="" class="title2">답3</label> |
|
217 |
+ <input type="text" class="data-wrap"> |
|
218 |
+ </div> |
|
219 |
+ <div class="flex align-center mb20 mr40"> |
|
220 |
+ <label for="" class="title2">문제4</label> |
|
221 |
+ <input type="text" class="data-wrap"> |
|
222 |
+ </div> |
|
223 |
+ <div class="flex align-center mb20"> |
|
224 |
+ <label for="" class="title2">답4</label> |
|
225 |
+ <input type="text" class="data-wrap"> |
|
226 |
+ </div> |
|
227 |
+ </div> |
|
228 |
+ <div class="flex align-center mb20"> |
|
229 |
+ <label for="" class="title2">해설</label> |
|
230 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
231 |
+ </div> |
|
232 |
+ </div> |
|
233 |
+ <div v-else-if="selectedTab === 'tab4'"> |
|
234 |
+ <div class="flex align-center mb20 mr40" > |
|
235 |
+ <label for="" class="title2">문제1</label> |
|
236 |
+ <input type="text" class="data-wrap"> |
|
237 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
238 |
+ </div> |
|
239 |
+ <div class="flex align-center mb20 mr40"> |
|
240 |
+ <label for="" class="title2">문제2</label> |
|
241 |
+ <input type="text" class="data-wrap"> |
|
242 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
243 |
+ </div> |
|
244 |
+ <div class="flex align-center mb20 mr40"> |
|
245 |
+ <label for="" class="title2">문제3</label> |
|
246 |
+ <input type="text" class="data-wrap"> |
|
247 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
248 |
+ </div> |
|
249 |
+ <div class="flex align-center mb20 mr40"> |
|
250 |
+ <label for="" class="title2">문제4</label> |
|
251 |
+ <input type="text" class="data-wrap"> |
|
252 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
253 |
+ </div> |
|
254 |
+ <div class="flex align-center mb20"> |
|
255 |
+ <label for="" class="title2">해설</label> |
|
256 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
257 |
+ </div> |
|
258 |
+ </div> |
|
259 |
+ |
|
260 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
78 | 261 |
</div> |
79 | 262 |
<div class="flex justify-between mt50"> |
80 | 263 |
<button type="button" title="글쓰기" class="new-btn" @click="goToPage('QuestionList')"> |
81 | 264 |
목록 |
82 | 265 |
</button> |
83 | 266 |
<div class="flex"> |
267 |
+<<<<<<< HEAD |
|
84 | 268 |
<button type="button" title="글쓰기" class="new-btn mr10" @click="editQuestion"> |
85 | 269 |
수정 |
86 | 270 |
</button> |
... | ... | @@ -96,6 +280,14 @@ |
96 | 280 |
<p>삭제하시겠습니까?</p> |
97 | 281 |
<button @click="deleteQuestion">예, 삭제</button> |
98 | 282 |
<button @click="cancelDelete">취소</button> |
283 |
+======= |
|
284 |
+ <button type="button" title="글쓰기" class="new-btn mr10"> |
|
285 |
+ 삭제 |
|
286 |
+ </button> |
|
287 |
+ <button type="button" title="글쓰기" class="new-btn"> |
|
288 |
+ 수정 |
|
289 |
+ </button> |
|
290 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
99 | 291 |
</div> |
100 | 292 |
</div> |
101 | 293 |
</template> |
... | ... | @@ -103,12 +295,17 @@ |
103 | 295 |
<script> |
104 | 296 |
import SvgIcon from '@jamescoyle/vue-icon'; |
105 | 297 |
import { mdiMagnify } from '@mdi/js'; |
298 |
+<<<<<<< HEAD |
|
106 | 299 |
import axios from 'axios'; |
300 |
+======= |
|
301 |
+ |
|
302 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
107 | 303 |
|
108 | 304 |
export default { |
109 | 305 |
data() { |
110 | 306 |
return { |
111 | 307 |
mdiMagnify: mdiMagnify, |
308 |
+<<<<<<< HEAD |
|
112 | 309 |
questionTitle: '샘플 제목', |
113 | 310 |
questionExpln: '샘플 내용', |
114 | 311 |
questionFile: null, // 파일 URL을 여기에 저장 |
... | ... | @@ -124,12 +321,16 @@ |
124 | 321 |
questionScore: '', |
125 | 322 |
questionHint: '', |
126 | 323 |
questionExplanation: '' |
324 |
+======= |
|
325 |
+ selectedTab: 'tab1', |
|
326 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
127 | 327 |
} |
128 | 328 |
}, |
129 | 329 |
methods: { |
130 | 330 |
goToPage(page) { |
131 | 331 |
this.$router.push({ name: page }); |
132 | 332 |
}, |
333 |
+<<<<<<< HEAD |
|
133 | 334 |
editQuestion() { |
134 | 335 |
// 수정 로직 추가 |
135 | 336 |
console.log('수정 버튼 클릭'); |
... | ... | @@ -180,11 +381,20 @@ |
180 | 381 |
// 문제 ID를 얻는 로직을 추가하세요 |
181 | 382 |
return 'sampleProblemId'; |
182 | 383 |
} |
384 |
+======= |
|
385 |
+ }, |
|
386 |
+ watch: { |
|
387 |
+ |
|
388 |
+ }, |
|
389 |
+ computed: { |
|
390 |
+ |
|
391 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
183 | 392 |
}, |
184 | 393 |
components: { |
185 | 394 |
SvgIcon |
186 | 395 |
}, |
187 | 396 |
mounted() { |
397 |
+<<<<<<< HEAD |
|
188 | 398 |
this.loadFromLocalStorage(); |
189 | 399 |
} |
190 | 400 |
} |
... | ... | @@ -230,3 +440,12 @@ |
230 | 440 |
cursor: pointer; |
231 | 441 |
} |
232 | 442 |
</style> |
443 |
+======= |
|
444 |
+ console.log('Main2 mounted'); |
|
445 |
+ } |
|
446 |
+} |
|
447 |
+</script> |
|
448 |
+<style scoped> |
|
449 |
+.ui-checkbox{width: 30px; height: 30px;} |
|
450 |
+</style> |
|
451 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
--- client/views/pages/teacher/QuestionInsert.vue
+++ client/views/pages/teacher/QuestionInsert.vue
... | ... | @@ -3,54 +3,183 @@ |
3 | 3 |
<p class="title">문제 등록</p> |
4 | 4 |
</div> |
5 | 5 |
<div class="board-wrap"> |
6 |
- <div class="flex align-center mb20"> |
|
7 |
- <label for="" class="title2">제목</label> |
|
8 |
- <input type="text" class="data-wrap"> |
|
6 |
+ <div class="tab-box" > |
|
7 |
+ <label class="mr20 title1"> |
|
8 |
+ <input type="radio" v-model="selectedTab" value="tab1" /> |
|
9 |
+ 문제 유형 (일반형) |
|
10 |
+ </label> |
|
11 |
+ <label class="mr20 title1"> |
|
12 |
+ <input type="radio" v-model="selectedTab" value="tab2" /> |
|
13 |
+ 문제 유형 (O,X형) |
|
14 |
+ </label> |
|
15 |
+ <label class="mr20 title1"> |
|
16 |
+ <input type="radio" v-model="selectedTab" value="tab3" /> |
|
17 |
+ 문제 유형 (연결형) |
|
18 |
+ </label> |
|
19 |
+ <label class="mr20 title1"> |
|
20 |
+ <input type="radio" v-model="selectedTab" value="tab4" /> |
|
21 |
+ 문제 유형 (다중 정답형) |
|
22 |
+ </label> |
|
9 | 23 |
</div> |
10 | 24 |
<hr> |
11 |
- <div class="flex align-center"> |
|
25 |
+ <div class="gd-col2 " > |
|
26 |
+ <div class="flex align-center mb20"> |
|
27 |
+ <label for="" class="title2">카테고리</label> |
|
28 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
29 |
+ <option value="bbsTtl">제목</option> |
|
30 |
+ <option value="bbsCnt">내용</option> |
|
31 |
+ <option value="userNm">작성자</option> |
|
32 |
+ <option value="bbsCls">카테고리</option> |
|
33 |
+ </select> |
|
34 |
+ </div> |
|
35 |
+ <div class="flex align-center mb20"> |
|
36 |
+ <label for="" class="title2">문제 유형</label> |
|
37 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
38 |
+ <option value="bbsTtl">제목</option> |
|
39 |
+ <option value="bbsCnt">내용</option> |
|
40 |
+ <option value="userNm">작성자</option> |
|
41 |
+ <option value="bbsCls">카테고리</option> |
|
42 |
+ </select> |
|
43 |
+ </div> |
|
44 |
+ <div class="flex align-center"> |
|
45 |
+ <label for="" class="title2">지문</label> |
|
46 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
47 |
+ <option value="bbsTtl">제목</option> |
|
48 |
+ <option value="bbsCnt">내용</option> |
|
49 |
+ <option value="userNm">작성자</option> |
|
50 |
+ <option value="bbsCls">카테고리</option> |
|
51 |
+ </select> |
|
52 |
+ </div> |
|
53 |
+ <div class="flex align-center"> |
|
54 |
+ <label for="" class="title2">문제 지표</label> |
|
55 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
56 |
+ <option value="bbsTtl">제목</option> |
|
57 |
+ <option value="bbsCnt">내용</option> |
|
58 |
+ <option value="userNm">작성자</option> |
|
59 |
+ <option value="bbsCls">카테고리</option> |
|
60 |
+ </select> |
|
61 |
+ </div> |
|
62 |
+ </div> |
|
63 |
+ <div class="flex align-center mb20 mt40"> |
|
64 |
+ <label for="" class="title2">문제 배점</label> |
|
65 |
+ <input type="text" class="data-wrap"> |
|
66 |
+ </div> |
|
67 |
+ |
|
68 |
+ <div class="flex align-center mb20"> |
|
12 | 69 |
<label for="" class="title2">내용</label> |
13 | 70 |
<textarea name="" id="" class="data-wrap"></textarea> |
14 | 71 |
</div> |
15 |
- <hr> |
|
72 |
+ <div class="flex align-center mb20"> |
|
73 |
+ <label for="" class="title2">힌트</label> |
|
74 |
+ <input type="text" class="data-wrap"> |
|
75 |
+ </div> |
|
16 | 76 |
<div class="flex align-center mb20"> |
17 | 77 |
<label for="" class="title2">첨부파일</label> |
18 | 78 |
<input type="file" ref="fileInput" @change="handleFileUpload" /> |
19 | 79 |
</div> |
20 |
- <div class="flex align-center mb20"> |
|
21 |
- <label for="" class="title2">답</label> |
|
22 |
- <input type="text" class="data-wrap"> |
|
23 |
- </div> |
|
24 |
- <div> |
|
25 |
- <label for="" class="title2">오답 학생</label> |
|
26 |
- <div class="table-wrap mt20"> |
|
27 |
- <table> |
|
28 |
- <thead> |
|
29 |
- <td>No.</td> |
|
30 |
- <td>이름</td> |
|
31 |
- <td>학년</td> |
|
32 |
- <td>반</td> |
|
33 |
- <td>오답</td> |
|
34 |
- </thead> |
|
35 |
- <tbody> |
|
36 |
- <tr @click="goToPage('noticeDetail')"> |
|
37 |
- <td></td> |
|
38 |
- <td></td> |
|
39 |
- <td></td> |
|
40 |
- <td></td> |
|
41 |
- <td></td> |
|
42 |
- </tr> |
|
43 |
- </tbody> |
|
44 |
- </table> |
|
45 |
- <!-- <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px;"> |
|
46 |
- <button><img src="../../../resources/img/btn27_90t_normal.png" alt=""></button> |
|
47 |
- <button class="selected-btn">1</button> |
|
48 |
- <button>2</button> |
|
49 |
- <button>3</button> |
|
50 |
- <button><img src="../../../resources/img/btn28_90t_normal.png" alt=""></button> |
|
51 |
- </article> --> |
|
80 |
+ <hr> |
|
81 |
+ <div v-if="selectedTab === 'tab1'"> |
|
82 |
+ <div class="flex align-center mb20"> |
|
83 |
+ <label for="" class="title2">답1</label> |
|
84 |
+ <input type="text" class="data-wrap"> |
|
85 |
+ </div> |
|
86 |
+ <div class="flex align-center mb20"> |
|
87 |
+ <label for="" class="title2">답2</label> |
|
88 |
+ <input type="text" class="data-wrap"> |
|
89 |
+ </div> |
|
90 |
+ <div class="flex align-center mb20"> |
|
91 |
+ <label for="" class="title2">답3</label> |
|
92 |
+ <input type="text" class="data-wrap"> |
|
93 |
+ </div> |
|
94 |
+ <div class="flex align-center mb20"> |
|
95 |
+ <label for="" class="title2">답4</label> |
|
96 |
+ <input type="text" class="data-wrap"> |
|
97 |
+ </div> |
|
98 |
+ <div class="flex align-center mb20"> |
|
99 |
+ <label for="" class="title2">해설</label> |
|
100 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
52 | 101 |
</div> |
53 | 102 |
</div> |
103 |
+ <div v-else-if="selectedTab === 'tab2'"> |
|
104 |
+ <div class="flex align-center mb20"> |
|
105 |
+ <label for="" class="title2">답</label> |
|
106 |
+ <select v-model="selectedSearchOption" class="mr10 data-wrap"> |
|
107 |
+ <option value="bbsTtl">O</option> |
|
108 |
+ <option value="bbsCnt">X</option> |
|
109 |
+ </select> |
|
110 |
+ </div> |
|
111 |
+ <div class="flex align-center mb20"> |
|
112 |
+ <label for="" class="title2">해설</label> |
|
113 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
114 |
+ </div> |
|
115 |
+ </div> |
|
116 |
+ <div v-else-if="selectedTab === 'tab3'"> |
|
117 |
+ <div class="gd-col2 " > |
|
118 |
+ <div class="flex align-center mb20 mr40" > |
|
119 |
+ <label for="" class="title2">문제1</label> |
|
120 |
+ <input type="text" class="data-wrap"> |
|
121 |
+ </div> |
|
122 |
+ <div class="flex align-center mb20"> |
|
123 |
+ <label for="" class="title2">답1</label> |
|
124 |
+ <input type="text" class="data-wrap"> |
|
125 |
+ </div> |
|
126 |
+ <div class="flex align-center mb20 mr40"> |
|
127 |
+ <label for="" class="title2">문제2</label> |
|
128 |
+ <input type="text" class="data-wrap"> |
|
129 |
+ </div> |
|
130 |
+ <div class="flex align-center mb20"> |
|
131 |
+ <label for="" class="title2">답2</label> |
|
132 |
+ <input type="text" class="data-wrap"> |
|
133 |
+ </div> |
|
134 |
+ <div class="flex align-center mb20 mr40"> |
|
135 |
+ <label for="" class="title2">문제3</label> |
|
136 |
+ <input type="text" class="data-wrap"> |
|
137 |
+ </div> |
|
138 |
+ <div class="flex align-center mb20 "> |
|
139 |
+ <label for="" class="title2">답3</label> |
|
140 |
+ <input type="text" class="data-wrap"> |
|
141 |
+ </div> |
|
142 |
+ <div class="flex align-center mb20 mr40"> |
|
143 |
+ <label for="" class="title2">문제4</label> |
|
144 |
+ <input type="text" class="data-wrap"> |
|
145 |
+ </div> |
|
146 |
+ <div class="flex align-center mb20"> |
|
147 |
+ <label for="" class="title2">답4</label> |
|
148 |
+ <input type="text" class="data-wrap"> |
|
149 |
+ </div> |
|
150 |
+ </div> |
|
151 |
+ <div class="flex align-center mb20"> |
|
152 |
+ <label for="" class="title2">해설</label> |
|
153 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
154 |
+ </div> |
|
155 |
+ </div> |
|
156 |
+ <div v-else-if="selectedTab === 'tab4'"> |
|
157 |
+ <div class="flex align-center mb20 mr40" > |
|
158 |
+ <label for="" class="title2">문제1</label> |
|
159 |
+ <input type="text" class="data-wrap"> |
|
160 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
161 |
+ </div> |
|
162 |
+ <div class="flex align-center mb20 mr40"> |
|
163 |
+ <label for="" class="title2">문제2</label> |
|
164 |
+ <input type="text" class="data-wrap"> |
|
165 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
166 |
+ </div> |
|
167 |
+ <div class="flex align-center mb20 mr40"> |
|
168 |
+ <label for="" class="title2">문제3</label> |
|
169 |
+ <input type="text" class="data-wrap"> |
|
170 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
171 |
+ </div> |
|
172 |
+ <div class="flex align-center mb20 mr40"> |
|
173 |
+ <label for="" class="title2">문제4</label> |
|
174 |
+ <input type="text" class="data-wrap"> |
|
175 |
+ <input type="checkbox" class="ui-checkbox ml30"> |
|
176 |
+ </div> |
|
177 |
+ <div class="flex align-center mb20"> |
|
178 |
+ <label for="" class="title2">해설</label> |
|
179 |
+ <textarea name="" id="" class="data-wrap"></textarea> |
|
180 |
+ </div> |
|
181 |
+ </div> |
|
182 |
+ |
|
54 | 183 |
</div> |
55 | 184 |
<div class="flex justify-between mt50"> |
56 | 185 |
<button type="button" title="글쓰기" class="new-btn" @click="goToPage('QuestionList')"> |
... | ... | @@ -58,10 +187,10 @@ |
58 | 187 |
</button> |
59 | 188 |
<div class="flex"> |
60 | 189 |
<button type="button" title="글쓰기" class="new-btn mr10"> |
61 |
- 수정 |
|
190 |
+ 취소 |
|
62 | 191 |
</button> |
63 | 192 |
<button type="button" title="글쓰기" class="new-btn"> |
64 |
- 삭제 |
|
193 |
+ 등록 |
|
65 | 194 |
</button> |
66 | 195 |
</div> |
67 | 196 |
</div> |
... | ... | @@ -76,6 +205,7 @@ |
76 | 205 |
data() { |
77 | 206 |
return { |
78 | 207 |
mdiMagnify: mdiMagnify, |
208 |
+ selectedTab: 'tab1', |
|
79 | 209 |
} |
80 | 210 |
}, |
81 | 211 |
methods: { |
... | ... | @@ -96,4 +226,7 @@ |
96 | 226 |
console.log('Main2 mounted'); |
97 | 227 |
} |
98 | 228 |
} |
99 |
-</script>(No newline at end of file) |
|
229 |
+</script> |
|
230 |
+<style scoped> |
|
231 |
+.ui-checkbox{width: 30px; height: 30px;} |
|
232 |
+</style>(No newline at end of file) |
--- client/views/pages/teacher/QuestionList.vue
+++ client/views/pages/teacher/QuestionList.vue
... | ... | @@ -2,9 +2,15 @@ |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 | 3 |
<p class="title">문제</p> |
4 | 4 |
<select name="" id=""> |
5 |
- <option value="">1단원</option> |
|
5 |
+ <option value="">A교재</option> |
|
6 | 6 |
</select> |
7 | 7 |
</div> |
8 |
+ <label for="" class="title2">단원</label> |
|
9 |
+ <div class="unit-pagination flex mt10 mb20" style="gap: 10px;"> |
|
10 |
+ <button class="selected-btn">1</button> |
|
11 |
+ <button>2</button> |
|
12 |
+ <button>3</button> |
|
13 |
+ </div> |
|
8 | 14 |
<div class="search-wrap flex justify-end mb20"> |
9 | 15 |
<select name="" id="" class="mr10 data-wrap" v-model="searchOption"> |
10 | 16 |
<option value="">전체</option> |
... | ... | @@ -24,10 +30,11 @@ |
24 | 30 |
<tr> |
25 | 31 |
<td>No.</td> |
26 | 32 |
<td>제목</td> |
27 |
- <td>문제</td> |
|
28 |
- <td>작성자</td> |
|
29 |
- <td>오답률</td> |
|
33 |
+ <td>내용</td> |
|
34 |
+ <td>유형</td> |
|
35 |
+ <td>지문</td> |
|
30 | 36 |
<td>등록일</td> |
37 |
+<<<<<<< HEAD |
|
31 | 38 |
</tr> |
32 | 39 |
</thead> |
33 | 40 |
<tbody> |
... | ... | @@ -56,6 +63,32 @@ |
56 | 63 |
<button type="button" title="등록" class="new-btn" @click="goToPage('QuestionInsert')"> |
57 | 64 |
등록 |
58 | 65 |
</button> |
66 |
+======= |
|
67 |
+ </thead> |
|
68 |
+ <tbody> |
|
69 |
+ <tr @click="goToPage('QuestionDetail')"> |
|
70 |
+ <td></td> |
|
71 |
+ <td></td> |
|
72 |
+ <td></td> |
|
73 |
+ <td></td> |
|
74 |
+ <td></td> |
|
75 |
+ <td></td> |
|
76 |
+ </tr> |
|
77 |
+ </tbody> |
|
78 |
+ </table> |
|
79 |
+ <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px;"> |
|
80 |
+ <button><img src="../../../resources/img/btn27_90t_normal.png" alt=""></button> |
|
81 |
+ <button class="selected-btn">1</button> |
|
82 |
+ <button>2</button> |
|
83 |
+ <button>3</button> |
|
84 |
+ <button><img src="../../../resources/img/btn28_90t_normal.png" alt=""></button> |
|
85 |
+ </article> |
|
86 |
+ <div class="flex justify-end "> |
|
87 |
+ <button type="button" title="등록" class="new-btn" @click="goToPage('QuestionInsert')"> |
|
88 |
+ 등록 |
|
89 |
+ </button> |
|
90 |
+ </div> |
|
91 |
+>>>>>>> e47769b90c7ad4f0b34f38bb2a56a8a69a894941 |
|
59 | 92 |
</div> |
60 | 93 |
</div> |
61 | 94 |
</template> |
--- client/views/pages/teacher/TextBookDetail.vue
+++ client/views/pages/teacher/TextBookDetail.vue
... | ... | @@ -1,18 +1,20 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 | 3 |
<p class="title">A교재</p> |
4 |
- <select name="" id=""> |
|
5 |
- <option value="">A 교재</option> |
|
6 |
- </select> |
|
4 |
+ <!-- <select name="" id=""> |
|
5 |
+ <option value="">1단원</option> |
|
6 |
+ </select> --> |
|
7 | 7 |
</div> |
8 |
- <div class="board-wrap"> |
|
9 |
- <label for="" class="title2">단원</label> |
|
10 |
- <div class="table-pagination flex mt10"> |
|
8 |
+ <label for="" class="title1">단원</label> |
|
9 |
+ <div class="unit-pagination flex mt10" style="gap: 10px;"> |
|
11 | 10 |
<button class="selected-btn">1</button> |
12 | 11 |
<button>2</button> |
13 | 12 |
<button>3</button> |
13 |
+ <button ><svg-icon type="mdi" :path="mdiPlus" style=" padding-top: 6px; |
|
14 |
+ width: 30px; |
|
15 |
+ height: 30px;"></svg-icon></button> |
|
14 | 16 |
</div> |
15 |
- <hr> |
|
17 |
+ <div class="board-wrap mt30"> |
|
16 | 18 |
<div class="mb20 "> |
17 | 19 |
<div class="flex justify-between mb30 align-center"> |
18 | 20 |
<label for="" class="title1">지문</label> |
... | ... | @@ -175,7 +177,7 @@ |
175 | 177 |
|
176 | 178 |
<script> |
177 | 179 |
import SvgIcon from '@jamescoyle/vue-icon'; |
178 |
-import { mdiMagnify, } from '@mdi/js'; |
|
180 |
+import { mdiMagnify,mdiPlus } from '@mdi/js'; |
|
179 | 181 |
import { mdilArrowRight } from '@mdi/light-js'; |
180 | 182 |
import ProgressBar from '../../component/ProgressBar.vue'; |
181 | 183 |
|
... | ... | @@ -183,6 +185,7 @@ |
183 | 185 |
export default { |
184 | 186 |
data() { |
185 | 187 |
return { |
188 |
+ mdiPlus :mdiPlus , |
|
186 | 189 |
mdiMagnify: mdiMagnify, |
187 | 190 |
mdilArrowRight: mdilArrowRight, |
188 | 191 |
timer: "00:00", |
+++ client/views/pages/teacher/TextDetail.vue
... | ... | @@ -0,0 +1,229 @@ |
1 | +<template> | |
2 | + <div class="title-box flex justify-between mb40"> | |
3 | + <p class="title">지문 상세 보기</p> | |
4 | + </div> | |
5 | + <div class="board-wrap"> | |
6 | + <div class="flex align-center mb20"> | |
7 | + <label for="" class="title2">제목</label> | |
8 | + <input v-if="isEditing" type="text" v-model="post.textTtl" class=" data-wrap"> | |
9 | + <p class="data-wrap" v-else>{{ post.textTtl }}</p> | |
10 | + </div> | |
11 | + <div class="flex align-center mb20"> | |
12 | + <label for="" class="title2">URL</label> | |
13 | + <input v-if="isEditing" type="text" v-model="post.textUrl" class="data-wrap"> | |
14 | + <p v-else class="data-wrap">{{ post.textUrl }}</p> | |
15 | + </div> | |
16 | + <div class="flex align-center mb20" style="display: flex; flex-direction: row;"> | |
17 | + <label class="title2">형식</label> | |
18 | + <label class="title2"> | |
19 | + <input type="radio" v-model="post.textTypeId" value="1" class="data-wrap" :disabled="!isEditing"> 일반 | |
20 | + </label> | |
21 | + <label class="title2"> | |
22 | + <input type="radio" v-model="post.textTypeId" value="2" class="data-wrap" :disabled="!isEditing"> 대화 | |
23 | + </label> | |
24 | + <label class="title2"> | |
25 | + <input type="radio" v-model="post.textTypeId" value="3" class="data-wrap" :disabled="!isEditing"> 책 리스닝 | |
26 | + </label> | |
27 | + <select v-if="isEditing" id="" v-model="post.bookId" @change="fetchUnits" class="ml20"> | |
28 | + <option value="" disabled>교재를 선택하세요</option> | |
29 | + <option v-for="book in books" :key="book.book_id" :value="book.book_id"> | |
30 | + {{ book.book_nm }} | |
31 | + </option> | |
32 | + </select> | |
33 | + <label v-else for="" class="title2 flex align-center ml20" style="display: flex; width: 20rem;">교재: | |
34 | + <p class="title2">{{ post.bookName }}</p> | |
35 | + </label> | |
36 | + <select v-if="isEditing" name="" id="" v-model="post.unitId" class="ml20"> | |
37 | + <option value="" disabled>단원을 선택하세요</option> | |
38 | + <option v-for="unit in units" :key="unit.unitId" :value="unit.unitId"> | |
39 | + {{ unit.unitName }} | |
40 | + </option> | |
41 | + </select> | |
42 | + <label v-else for="" class="title2 flex align-center ml20" | |
43 | + style="display: flex; width: 20rem; text-align: right;">단원: | |
44 | + <p class="title2">{{ post.unitName }}</p> | |
45 | + </label> | |
46 | + </div> | |
47 | + <hr> | |
48 | + <div class="flex align-center"> | |
49 | + <label for="" class="title2">스크립트</label> | |
50 | + <textarea v-if="isEditing" v-model="post.textCnt" class="data-wrap"></textarea> | |
51 | + <p v-else class="data-wrap">{{ post.textCnt }}</p> | |
52 | + </div> | |
53 | + </div> | |
54 | + <div class="flex justify-between mt50"> | |
55 | + <button type="button" title="목록으로" class="new-btn" @click="goToPage('TextList')"> | |
56 | + 목록 | |
57 | + </button> | |
58 | + <div class="flex"> | |
59 | + <button type="button" title="수정" class="new-btn mr10" @click="toggleEdit"> | |
60 | + {{ isEditing ? '저장' : '수정' }} | |
61 | + </button> | |
62 | + <button type="button" title="삭제" class="new-btn" @click="deletePost"> | |
63 | + 삭제 | |
64 | + </button> | |
65 | + </div> | |
66 | + </div> | |
67 | +</template> | |
68 | + | |
69 | +<script> | |
70 | +import axios from "axios"; | |
71 | +import SvgIcon from '@jamescoyle/vue-icon'; | |
72 | +import { mdiMagnify } from '@mdi/js'; | |
73 | + | |
74 | +export default { | |
75 | + data() { | |
76 | + return { | |
77 | + mdiMagnify: mdiMagnify, | |
78 | + post: { | |
79 | + textId: "", | |
80 | + textTtl: "", | |
81 | + textCnt: "", | |
82 | + textUrl: "", | |
83 | + textTypeId: "", | |
84 | + bookId: "", | |
85 | + unitId: "", | |
86 | + bookName: "", | |
87 | + unitName: "" | |
88 | + }, | |
89 | + books: [], | |
90 | + units: [], | |
91 | + isEditing: false | |
92 | + }; | |
93 | + }, | |
94 | + computed: { | |
95 | + textId() { | |
96 | + return this.$route.query.textId; | |
97 | + }, | |
98 | + selectedBookName() { | |
99 | + const book = this.books.find(book => book.book_id === this.post.bookId); | |
100 | + return book ? book.book_nm : ''; | |
101 | + }, | |
102 | + selectedUnitName() { | |
103 | + const unit = this.units.find(unit => unit.unit_id === this.post.unitId); | |
104 | + return unit ? unit.unit_nm : ''; | |
105 | + } | |
106 | + }, | |
107 | + methods: { | |
108 | + goToPage(page) { | |
109 | + this.$router.push({ name: page }); | |
110 | + }, | |
111 | + fetchPostDetail() { | |
112 | + const textId = this.$route.query.textId; | |
113 | + axios.post('/text/selectOneText.json', { textId }, { | |
114 | + headers: { | |
115 | + "Content-Type": "application/json; charset=UTF-8", | |
116 | + } | |
117 | + }) | |
118 | + .then(response => { | |
119 | + if (response.data && response.data[0]) { | |
120 | + this.post.textId = response.data[0].text_id; | |
121 | + this.post.textTtl = response.data[0].text_ttl; | |
122 | + this.post.textCnt = response.data[0].text_cnt; | |
123 | + this.post.textUrl = response.data[0].text_url; | |
124 | + this.post.textTypeId = response.data[0].text_type_id; | |
125 | + this.post.bookId = response.data[0].book_id; | |
126 | + this.post.unitId = response.data[0].unit_id; | |
127 | + this.post.bookName = response.data[0].book_name; | |
128 | + this.post.unitName = response.data[0].unit_name; | |
129 | + } else { | |
130 | + this.error = "Failed to fetch post details."; | |
131 | + } | |
132 | + }) | |
133 | + .catch(error => { | |
134 | + console.error("Error fetching post detail:", error); | |
135 | + this.error = "Failed to fetch post details."; | |
136 | + }); | |
137 | + }, | |
138 | + dataInsert() { | |
139 | + this.newPost = { | |
140 | + textId: this.post.textId, | |
141 | + textTtl: this.post.textTtl, | |
142 | + textCnt: this.post.textCnt, | |
143 | + textUrl: this.post.textUrl, | |
144 | + textTypeId: this.post.textTypeId, | |
145 | + bookId: this.post.bookId, | |
146 | + unitId: this.post.unitId | |
147 | + }; | |
148 | + console.log(this.newPost) | |
149 | + | |
150 | + axios.post("/text/textUpdate.json", this.newPost, { | |
151 | + headers: { | |
152 | + "Content-Type": "application/json; charset=UTF-8", | |
153 | + } | |
154 | + }) | |
155 | + .then(response => { | |
156 | + alert(response.data.message); | |
157 | + this.fetchPostDetail(); | |
158 | + }) | |
159 | + .catch(error => { | |
160 | + console.log("dataInsert - error:", error.response.data); | |
161 | + alert("게시글 등록에 오류가 발생했습니다."); | |
162 | + }); | |
163 | + }, | |
164 | + toggleEdit() { | |
165 | + if (this.isEditing) { | |
166 | + this.dataInsert(); | |
167 | + this.isEditing = false; | |
168 | + } else { | |
169 | + this.isEditing = true; | |
170 | + this.fetchBooks(); | |
171 | + } | |
172 | + }, | |
173 | + deletePost() { | |
174 | + axios.post("/text/textDelete.json", { textId: this.textId }, { | |
175 | + headers: { | |
176 | + "Content-Type": "application/json; charset=UTF-8", | |
177 | + } | |
178 | + }) | |
179 | + .then(response => { | |
180 | + alert(response.data.message); | |
181 | + this.goToPage('TextList'); | |
182 | + }) | |
183 | + .catch(error => { | |
184 | + console.error("Error deleting post:", error); | |
185 | + alert("게시글 삭제에 오류가 발생했습니다."); | |
186 | + }); | |
187 | + }, | |
188 | + fetchBooks() { | |
189 | + axios.post("/book/findAll.json", {}, { | |
190 | + headers: { | |
191 | + "Content-Type": "application/json; charset=UTF-8", | |
192 | + } | |
193 | + }) | |
194 | + .then(response => { | |
195 | + this.books = response.data; | |
196 | + }) | |
197 | + .catch(error => { | |
198 | + console.error("fetchBooks - error:", error); | |
199 | + alert("교재 목록을 불러오는 중 오류가 발생했습니다."); | |
200 | + }); | |
201 | + }, | |
202 | + fetchUnits() { | |
203 | + if (!this.post.bookId) return; | |
204 | + | |
205 | + axios.post("/unit/unitList.json", { bookId: this.post.bookId }, { | |
206 | + headers: { | |
207 | + "Content-Type": "application/json; charset=UTF-8", | |
208 | + } | |
209 | + }) | |
210 | + .then(response => { | |
211 | + this.units = response.data; | |
212 | + }) | |
213 | + .catch(error => { | |
214 | + console.error("fetchUnits - error:", error); | |
215 | + alert("단원 목록을 불러오는 중 오류가 발생했습니다."); | |
216 | + }); | |
217 | + } | |
218 | + }, | |
219 | + mounted() { | |
220 | + this.fetchPostDetail(); | |
221 | + }, | |
222 | + components: { | |
223 | + SvgIcon | |
224 | + } | |
225 | +}; | |
226 | +</script> | |
227 | + | |
228 | +<style scoped> | |
229 | +</style> |
--- client/views/pages/teacher/TextInsert.vue
+++ client/views/pages/teacher/TextInsert.vue
... | ... | @@ -1,63 +1,221 @@ |
1 |
+ |
|
1 | 2 |
<template> |
2 | 3 |
<div class="title-box flex justify-between mb40"> |
3 | 4 |
<p class="title">지문 등록</p> |
4 | 5 |
</div> |
5 |
- <div class="board-wrap"> |
|
6 |
- <div class="flex align-center mb20"> |
|
7 |
- <label for="" class="title2">제목</label> |
|
8 |
- <input type="text" class="data-wrap"> |
|
9 |
- </div> |
|
10 |
- <div class="flex align-center"> |
|
11 |
- <label for="" class="title2">URL</label> |
|
12 |
- <input type="text" class="data-wrap"> |
|
13 |
- </div> |
|
14 |
- <hr> |
|
15 |
- <div class="flex align-center"> |
|
16 |
- <label for="" class="title2">스크립트</label> |
|
17 |
- <textarea name="" id="" class="data-wrap"></textarea> |
|
18 |
- </div> |
|
6 |
+ <div class="board-wrap"> |
|
7 |
+ <div class="flex align-center mb20"> |
|
8 |
+ <label for="" class="title2">제목</label> |
|
9 |
+ <input type="text" class="data-wrap" v-model="newData.textTtl"> |
|
19 | 10 |
</div> |
20 |
- <div class="flex justify-between mt50"> |
|
21 |
- <button type="button" title="글쓰기" class="new-btn" @click="goToPage('TextList')"> |
|
22 |
- 목록 |
|
23 |
- </button> |
|
24 |
- <div class="flex"> |
|
25 |
- <button type="button" title="글쓰기" class="new-btn mr10" > |
|
26 |
- 수정 |
|
27 |
- </button> |
|
28 |
- <button type="button" title="글쓰기" class="new-btn" > |
|
29 |
- 삭제 |
|
30 |
- </button> |
|
31 |
- </div> |
|
11 |
+ <div class="flex align-center mb20"> |
|
12 |
+ <label for="" class="title2">URL</label> |
|
13 |
+ <input type="text" class="data-wrap" v-model="newData.textUrl"> |
|
32 | 14 |
</div> |
15 |
+ <div class="flex align-center"> |
|
16 |
+ <label class="title2">형식</label> |
|
17 |
+ <label class="title2"> |
|
18 |
+ <input type="radio" v-model="newData.textTypeId" value="1" class="data-wrap"> 일반 |
|
19 |
+ </label> |
|
20 |
+ <label class="title2"> |
|
21 |
+ <input type="radio" v-model="newData.textTypeId" value="2" class="data-wrap"> 대화 |
|
22 |
+ </label> |
|
23 |
+ <label class="title2"> |
|
24 |
+ <input type="radio" v-model="newData.textTypeId" value="3" class="data-wrap"> 책 리스닝 |
|
25 |
+ </label> |
|
26 |
+ <select name="" id="" v-model="newData.bookId" @change="fetchUnits" class="ml20"> |
|
27 |
+ <option value="" disabled>교재를 선택하세요</option> |
|
28 |
+ <option v-for="book in books" :key="book.book_id" :value="book.book_id"> |
|
29 |
+ {{ book.book_nm }} |
|
30 |
+ </option> |
|
31 |
+ </select> |
|
32 |
+ <select name="" id="" v-model="newData.unitId" class="ml20"> |
|
33 |
+ <option value="" disabled>단원을 선택하세요</option> |
|
34 |
+ <option v-for="unit in units" :key="unit.unitId" :value="unit.unitId"> |
|
35 |
+ {{ unit.unitName }} |
|
36 |
+ </option> |
|
37 |
+ </select> |
|
38 |
+ </div> |
|
39 |
+ <hr> |
|
40 |
+ <div class="flex align-center"> |
|
41 |
+ <label for="" class="title2">스크립트</label> |
|
42 |
+ <textarea name="" id="" class="data-wrap" v-model="newData.textCnt"></textarea> |
|
43 |
+ </div> |
|
44 |
+ </div> |
|
45 |
+ <div class="flex justify-between mt50"> |
|
46 |
+ <button type="button" title="글쓰기" class="new-btn" @click="goToPage('TextList')"> |
|
47 |
+ 목록 |
|
48 |
+ </button> |
|
49 |
+ <div class="flex"> |
|
50 |
+ <button type="button" title="글쓰기" class="new-btn mr10" @click="handleButtonAction"> |
|
51 |
+ 작성 |
|
52 |
+ </button> |
|
53 |
+ </div> |
|
54 |
+ </div> |
|
33 | 55 |
</template> |
34 | 56 |
|
35 | 57 |
<script> |
58 |
+import axios from "axios"; |
|
36 | 59 |
import SvgIcon from '@jamescoyle/vue-icon'; |
37 |
-import { mdiMagnify} from '@mdi/js'; |
|
60 |
+import { mdiMagnify } from '@mdi/js'; |
|
38 | 61 |
|
39 | 62 |
|
40 | 63 |
export default { |
41 |
- data () { |
|
64 |
+ computed: { |
|
65 |
+ textId() { |
|
66 |
+ return this.$route.query.textId; |
|
67 |
+ } |
|
68 |
+ }, |
|
69 |
+ data() { |
|
42 | 70 |
return { |
43 | 71 |
mdiMagnify: mdiMagnify, |
72 |
+ post: null, |
|
73 |
+ newData: { |
|
74 |
+ textId: "", |
|
75 |
+ textTtl: "", |
|
76 |
+ textCnt: "", |
|
77 |
+ textUrl: "", |
|
78 |
+ textTypeId: "", |
|
79 |
+ //fileMngId:"", |
|
80 |
+ // userId:"". |
|
81 |
+ bookId: "", |
|
82 |
+ unitId: "" |
|
83 |
+ }, |
|
84 |
+ books: [], |
|
85 |
+ units: [], |
|
44 | 86 |
} |
45 | 87 |
}, |
46 | 88 |
methods: { |
47 | 89 |
goToPage(page) { |
48 |
- this.$router.push({ name: page }); |
|
49 |
- }, |
|
90 |
+ this.$router.push({ name: page }); |
|
91 |
+ }, fetchPostDetail() { |
|
92 |
+ const textId = this.$route.query.textId |
|
93 |
+ axios({ |
|
94 |
+ url: `/text/selectOneText.json`, |
|
95 |
+ method: "post", |
|
96 |
+ headers: { |
|
97 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
98 |
+ }, |
|
99 |
+ data: { "textId": textId } |
|
100 |
+ }) |
|
101 |
+ .then(response => { |
|
102 |
+ if (response.data && response.data[0]) { |
|
103 |
+ this.post = response.data[0]; |
|
104 |
+ this.editTitle = this.post.title; |
|
105 |
+ this.editContent = this.post.content; |
|
106 |
+ console.log(this.post); |
|
107 |
+ } else { |
|
108 |
+ this.error = "Failed to fetch post details."; |
|
109 |
+ } |
|
110 |
+ }) |
|
111 |
+ .catch(error => { |
|
112 |
+ console.error("Error fetching post detail:", error); |
|
113 |
+ this.error = "Failed to fetch post details."; |
|
114 |
+ }); |
|
115 |
+ }, dataInsert() { |
|
116 |
+ const vm = this; |
|
117 |
+ axios({ |
|
118 |
+ url: "/text/insertText.json", |
|
119 |
+ method: "post", |
|
120 |
+ headers: { |
|
121 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
122 |
+ }, |
|
123 |
+ data: vm.newData, |
|
124 |
+ }) |
|
125 |
+ .then(response => { |
|
126 |
+ alert(response.data.message); |
|
127 |
+ this.goToPage('TextList') |
|
128 |
+ }) |
|
129 |
+ .catch(error => { |
|
130 |
+ console.log("dataInsert - error : ", error.response.data); |
|
131 |
+ alert("게시글 등록에 오류가 발생했습니다."); |
|
132 |
+ }); |
|
133 |
+ }, |
|
134 |
+ handleButtonAction() { |
|
135 |
+ if (!this.newData.textTtl) { |
|
136 |
+ alert("제목을 입력해 주세요."); |
|
137 |
+ return; |
|
138 |
+ } |
|
139 |
+ |
|
140 |
+ if (!this.newData.textUrl) { |
|
141 |
+ alert("url을 입력해 주세요."); |
|
142 |
+ return; |
|
143 |
+ } |
|
144 |
+ |
|
145 |
+ if (!this.newData.textTypeId) { |
|
146 |
+ alert("지문 형식을 입력해 주세요."); |
|
147 |
+ return; |
|
148 |
+ } |
|
149 |
+ |
|
150 |
+ if (!this.newData.bookId) { |
|
151 |
+ alert("교재를 선택해 주세요."); |
|
152 |
+ return; |
|
153 |
+ } |
|
154 |
+ |
|
155 |
+ if (!this.newData.unitId) { |
|
156 |
+ alert("단원을 선택해 주세요."); |
|
157 |
+ return; |
|
158 |
+ } |
|
159 |
+ |
|
160 |
+ if (!this.newData.textCnt) { |
|
161 |
+ alert("내용을 입력해 주세요."); |
|
162 |
+ return; |
|
163 |
+ } |
|
164 |
+ |
|
165 |
+ this.dataInsert(); |
|
166 |
+ }, |
|
167 |
+ fetchBooks() { |
|
168 |
+ axios({ |
|
169 |
+ url: "/book/findAll.json", |
|
170 |
+ method: "post", |
|
171 |
+ headers: { |
|
172 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
173 |
+ }, |
|
174 |
+ }) |
|
175 |
+ .then(response => { |
|
176 |
+ console.log(response.data) |
|
177 |
+ this.books = response.data; |
|
178 |
+ }) |
|
179 |
+ .catch(error => { |
|
180 |
+ console.error("fetchBooks - error: ", error); |
|
181 |
+ alert("교재 목록을 불러오는 중 오류가 발생했습니다."); |
|
182 |
+ }); |
|
183 |
+ }, |
|
184 |
+ fetchUnits() { |
|
185 |
+ if (!this.newData.bookId) return; |
|
186 |
+ |
|
187 |
+ axios({ |
|
188 |
+ url: "/unit/unitList.json", |
|
189 |
+ method: "post", |
|
190 |
+ headers: { |
|
191 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
192 |
+ }, |
|
193 |
+ data: { |
|
194 |
+ "bookId": this.newData.bookId |
|
195 |
+ }, |
|
196 |
+ }) |
|
197 |
+ .then(response => { |
|
198 |
+ console.log(response.data) |
|
199 |
+ this.units = response.data; |
|
200 |
+ }) |
|
201 |
+ .catch(error => { |
|
202 |
+ console.error("fetchUnits - error: ", error); |
|
203 |
+ alert("단원 목록을 불러오는 중 오류가 발생했습니다."); |
|
204 |
+ }); |
|
205 |
+ }, |
|
50 | 206 |
}, |
51 | 207 |
watch: { |
52 | 208 |
|
53 | 209 |
}, |
54 | 210 |
computed: { |
55 |
- |
|
211 |
+ |
|
56 | 212 |
}, |
57 |
- components:{ |
|
213 |
+ components: { |
|
58 | 214 |
SvgIcon |
59 | 215 |
}, |
60 | 216 |
mounted() { |
217 |
+ this.fetchPostDetail(); |
|
218 |
+ this.fetchBooks(); |
|
61 | 219 |
console.log('Main2 mounted'); |
62 | 220 |
} |
63 | 221 |
} |
--- client/views/pages/teacher/TextList.vue
+++ client/views/pages/teacher/TextList.vue
... | ... | @@ -1,69 +1,109 @@ |
1 | 1 |
<template> |
2 |
- <div class="title-box flex justify-between mb40"> |
|
2 |
+ <div class="title-box flex justify-between mb40 myplan"> |
|
3 | 3 |
<p class="title">지문</p> |
4 |
- <select name="" id=""> |
|
5 |
- <option value="">1단원</option> |
|
4 |
+ <select name="" id="" v-model="selectedBook" @change="fetchUnits"> |
|
5 |
+ <option value="" disabled>교재를 선택하세요</option> |
|
6 |
+ <option v-for="book in books" :key="book.book_id" :value="book.book_id"> |
|
7 |
+ {{ book.book_nm }} |
|
8 |
+ </option> |
|
6 | 9 |
</select> |
7 | 10 |
</div> |
11 |
+ <label for="" class="title2">단원</label> |
|
12 |
+ <div class="unit-pagination flex mt10 mb20" style="gap: 10px;"> |
|
13 |
+ <button |
|
14 |
+ v-for="(unit, index) in units" |
|
15 |
+ :key="index" |
|
16 |
+ :class="{ 'selected-btn': selectedUnit === unit.unitId }" |
|
17 |
+ @click="selectUnit(unit.unitId)"> |
|
18 |
+ {{ unit.unitName }} |
|
19 |
+ </button> |
|
20 |
+ </div> |
|
8 | 21 |
<div class="search-wrap flex justify-end mb20"> |
9 |
- <select name="" id="" class="mr10 data-wrap"> |
|
10 |
- <option value="">전체</option> |
|
11 |
- </select> |
|
12 |
- <input type="text" placeholder="검색하세요."> |
|
13 |
- <button type="button" title="위원회 검색"> |
|
14 |
- <img src="../../../resources/img/look_t.png" alt=""> |
|
15 |
- </button> |
|
16 |
- </div> |
|
17 |
- <div class="table-wrap"> |
|
18 |
- <table> |
|
19 |
- <thead> |
|
22 |
+ <select name="" id="" class="mr10 data-wrap" style="width: 15rem;" v-model="option"> |
|
23 |
+ <option value="" disabled>검색유형</option> |
|
24 |
+ <option v-for="g in optionList" :key="g.value" :value="g.value">{{ g.text }}</option> |
|
25 |
+ </select> |
|
26 |
+ <input type="text" placeholder="검색하세요." v-model="keyword"> |
|
27 |
+ <button type="button" title="위원회 검색" @click="search"> |
|
28 |
+ <img src="../../../resources/img/look_t.png" alt=""> |
|
29 |
+ </button> |
|
30 |
+ </div> |
|
31 |
+ <div class="table-wrap"> |
|
32 |
+ <table> |
|
33 |
+ <thead> |
|
34 |
+ <tr> |
|
20 | 35 |
<td>No.</td> |
21 | 36 |
<td>제목</td> |
22 | 37 |
<td>내용</td> |
23 | 38 |
<td>작성자</td> |
24 | 39 |
<td>등록일</td> |
25 |
- </thead> |
|
26 |
- <tbody> |
|
27 |
- <tr @click="goToPage('TextInsert')"> |
|
28 |
- <td></td> |
|
29 |
- <td></td> |
|
30 |
- <td></td> |
|
31 |
- <td></td> |
|
32 |
- <td></td> |
|
33 |
- </tr> |
|
34 |
- </tbody> |
|
35 |
- </table> |
|
36 |
- <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px;"> |
|
37 |
- <button><img src="../../../resources/img/btn27_90t_normal.png" alt=""></button> |
|
38 |
- <button class="selected-btn">1</button> |
|
39 |
- <button>2</button> |
|
40 |
- <button>3</button> |
|
41 |
- <button><img src="../../../resources/img/btn28_90t_normal.png" alt=""></button> |
|
42 |
- </article> |
|
43 |
- <div class="flex justify-end "> |
|
44 |
- <button type="button" title="등록" class="new-btn" @click="goToPage('TextInsert')"> |
|
45 |
- 등록 |
|
46 |
- </button> |
|
40 |
+ </tr> |
|
41 |
+ </thead> |
|
42 |
+ <tbody> |
|
43 |
+ <tr v-for="(post, index) in posts" :key="index" class="post" |
|
44 |
+ @click="goToPage('TextDetail', post.textId)"> |
|
45 |
+ <td>{{ index + 1 + (currentPage - 1) * pageSize }}</td> |
|
46 |
+ <td>{{ post.textTtl.slice(0, 20) }}{{ post.textTtl.length > 20 ? '...' : '' }}</td> |
|
47 |
+ <td>{{ post.textCnt.slice(0, 20) }}{{ post.textCnt.length > 20 ? '...' : '' }}</td> |
|
48 |
+ <td>{{ post.userId }}</td> |
|
49 |
+ <td>{{ post.regDt }}</td> |
|
50 |
+ </tr> |
|
51 |
+ </tbody> |
|
52 |
+ </table> |
|
53 |
+ <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px;"> |
|
54 |
+ <button @click="changePage(currentPage - 1)" :disabled="currentPage === 1"> |
|
55 |
+ <img src="../../../resources/img/btn27_90t_normal.png" alt="Previous"> |
|
56 |
+ </button> |
|
57 |
+ <button v-for="page in totalPages" :key="page" @click="changePage(page)" |
|
58 |
+ :class="{ 'selected-btn': currentPage === page }"> |
|
59 |
+ {{ page }} |
|
60 |
+ </button> |
|
61 |
+ <button @click="changePage(currentPage + 1)" :disabled="currentPage === totalPages"> |
|
62 |
+ <img src="../../../resources/img/btn28_90t_normal.png" alt="Next"> |
|
63 |
+ </button> |
|
64 |
+ </article> |
|
65 |
+ <div class="flex justify-end"> |
|
66 |
+ <button type="button" title="등록" class="new-btn" @click="goToPage('TextInsert')"> |
|
67 |
+ 등록 |
|
68 |
+ </button> |
|
47 | 69 |
</div> |
48 |
- </div> |
|
70 |
+ </div> |
|
49 | 71 |
</template> |
50 | 72 |
|
51 | 73 |
<script> |
74 |
+import axios from "axios"; |
|
52 | 75 |
import SvgIcon from '@jamescoyle/vue-icon'; |
53 |
-import { mdiMagnify} from '@mdi/js'; |
|
54 |
- |
|
76 |
+import { mdiMagnify } from '@mdi/js'; |
|
55 | 77 |
|
56 | 78 |
export default { |
57 |
- data () { |
|
79 |
+ data() { |
|
58 | 80 |
return { |
59 | 81 |
mdiMagnify: mdiMagnify, |
60 |
- } |
|
82 |
+ posts: [], |
|
83 |
+ currentPage: 1, |
|
84 |
+ pageSize: 10, |
|
85 |
+ totalPosts: 0, |
|
86 |
+ option: "", |
|
87 |
+ keyword: "", |
|
88 |
+ books: [], |
|
89 |
+ selectedBook: "", |
|
90 |
+ optionList: [ |
|
91 |
+ { text: "번호", value: "textId" }, |
|
92 |
+ { text: "제목", value: "textTtl" }, |
|
93 |
+ { text: "내용", value: "textCnt" }, |
|
94 |
+ { text: "작성자", value: "userId" }, |
|
95 |
+ { text: "등록일", value: "regDt" }, |
|
96 |
+ ], |
|
97 |
+ units: [], |
|
98 |
+ selectedUnit: null, |
|
99 |
+ searching: false, |
|
100 |
+ }; |
|
61 | 101 |
}, |
62 | 102 |
methods: { |
63 |
- goToPage(page) { |
|
64 |
- this.$router.push({ name: page }); |
|
65 |
- }, |
|
66 |
- showConfirm(type) { |
|
103 |
+ goToPage(page, textId) { |
|
104 |
+ this.$router.push({ name: page, query: { textId } }); |
|
105 |
+ }, |
|
106 |
+ showConfirm(type) { |
|
67 | 107 |
let message = ''; |
68 | 108 |
if (type === 'cancel') { |
69 | 109 |
message = '삭제하시겠습니까?'; |
... | ... | @@ -77,19 +117,110 @@ |
77 | 117 |
this.goBack(); |
78 | 118 |
} |
79 | 119 |
}, |
120 |
+ selectUnit(unitId) { |
|
121 |
+ this.selectedUnit = unitId; |
|
122 |
+ this.fetchData(); |
|
123 |
+ }, |
|
124 |
+ search() { |
|
125 |
+ if (!this.option) { |
|
126 |
+ alert("검색유형을 선택해 주세요") |
|
127 |
+ } else { |
|
128 |
+ this.currentPage = 1; |
|
129 |
+ this.searching = true; |
|
130 |
+ this.fetchData(); |
|
131 |
+ } |
|
132 |
+ }, |
|
133 |
+ fetchData() { |
|
134 |
+ const idx = (this.currentPage - 1) * this.pageSize; |
|
135 |
+ axios({ |
|
136 |
+ url: "/text/textSearch.json", |
|
137 |
+ method: "post", |
|
138 |
+ headers: { |
|
139 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
140 |
+ }, |
|
141 |
+ data: { |
|
142 |
+ "option": this.option, |
|
143 |
+ "keyword": this.keyword, |
|
144 |
+ "pageSize": this.pageSize, |
|
145 |
+ "startIndex": idx, |
|
146 |
+ "unitId": this.selectedUnit |
|
147 |
+ }, |
|
148 |
+ }) |
|
149 |
+ .then(response => { |
|
150 |
+ this.posts = response.data.list; |
|
151 |
+ if (!this.searching || this.keyword === "") { |
|
152 |
+ this.totalPosts = response.data.totalText; |
|
153 |
+ } else if (this.searching) { |
|
154 |
+ this.totalPosts = response.data.resultCount; |
|
155 |
+ } |
|
156 |
+ this.posts.forEach(post => { |
|
157 |
+ let regDt = post.regDt; |
|
158 |
+ let date = new Date(regDt); |
|
159 |
+ post.regDt = date.toISOString().split('T')[0]; |
|
160 |
+ }); |
|
161 |
+ }) |
|
162 |
+ .catch(error => { |
|
163 |
+ console.error("fetchData - error: ", error); |
|
164 |
+ alert("검색 중 오류가 발생했습니다."); |
|
165 |
+ }); |
|
166 |
+ }, |
|
167 |
+ changePage(page) { |
|
168 |
+ if (page > 0 && page <= this.totalPages) { |
|
169 |
+ this.currentPage = page; |
|
170 |
+ this.fetchData(); |
|
171 |
+ } |
|
172 |
+ }, |
|
173 |
+ fetchBooks() { |
|
174 |
+ axios({ |
|
175 |
+ url: "/book/findAll.json", |
|
176 |
+ method: "post", |
|
177 |
+ headers: { |
|
178 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
179 |
+ }, |
|
180 |
+ }) |
|
181 |
+ .then(response => { |
|
182 |
+ console.log(response.data) |
|
183 |
+ this.books = response.data; |
|
184 |
+ }) |
|
185 |
+ .catch(error => { |
|
186 |
+ console.error("fetchBooks - error: ", error); |
|
187 |
+ alert("교재 목록을 불러오는 중 오류가 발생했습니다."); |
|
188 |
+ }); |
|
189 |
+ }, |
|
190 |
+ fetchUnits() { |
|
191 |
+ if (!this.selectedBook) return; |
|
80 | 192 |
|
81 |
- }, |
|
82 |
- watch: { |
|
83 |
- |
|
193 |
+ axios({ |
|
194 |
+ url: "/unit/unitList.json", |
|
195 |
+ method: "post", |
|
196 |
+ headers: { |
|
197 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
198 |
+ }, |
|
199 |
+ data: { |
|
200 |
+ "bookId": this.selectedBook |
|
201 |
+ }, |
|
202 |
+ }) |
|
203 |
+ .then(response => { |
|
204 |
+ console.log(response.data) |
|
205 |
+ this.units = response.data; |
|
206 |
+ }) |
|
207 |
+ .catch(error => { |
|
208 |
+ console.error("fetchUnits - error: ", error); |
|
209 |
+ alert("단원 목록을 불러오는 중 오류가 발생했습니다."); |
|
210 |
+ }); |
|
211 |
+ }, |
|
84 | 212 |
}, |
85 | 213 |
computed: { |
86 |
- |
|
214 |
+ totalPages() { |
|
215 |
+ return Math.ceil(this.totalPosts / this.pageSize); |
|
216 |
+ } |
|
87 | 217 |
}, |
88 |
- components:{ |
|
218 |
+ components: { |
|
89 | 219 |
SvgIcon |
90 | 220 |
}, |
91 | 221 |
mounted() { |
92 |
- console.log('Main2 mounted'); |
|
222 |
+ this.fetchBooks(); // Fetch books when the component is mounted |
|
223 |
+ this.fetchData(); // Fetch data for the default view |
|
93 | 224 |
} |
94 |
-} |
|
95 |
-</script>(No newline at end of file) |
|
225 |
+}; |
|
226 |
+</script> |
+++ client/views/pages/teacher/VocaDetail.vue
... | ... | @@ -0,0 +1,102 @@ |
1 | +<template> | |
2 | + <div class="title-box flex justify-between mb40"> | |
3 | + <p class="title">단어장 등록</p> | |
4 | + </div> | |
5 | + <div class="board-wrap"> | |
6 | + <div class="flex align-center mb20"> | |
7 | + <label for="" class="title2">지문</label> | |
8 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
9 | + <option value="bbsTtl">제목</option> | |
10 | + <option value="bbsCnt">내용</option> | |
11 | + <option value="userNm">작성자</option> | |
12 | + <option value="bbsCls">카테고리</option> | |
13 | + </select> | |
14 | + </div> | |
15 | + <div class="flex align-center"> | |
16 | + <label for="" class="title2">단어 목록</label> | |
17 | + <div class="flex-column" style="gap: 10px;"> | |
18 | + <div class="flex align-center" style="gap: 10px;"> | |
19 | + <input type="text" class="data-wrap" placeholder="영어"> | |
20 | + <input type="text" class="data-wrap" placeholder="한글"> | |
21 | + <button type="button" @click="addThesis"> | |
22 | + <img src="../../../resources/img/btn39_120t_normal.png" alt=""> | |
23 | + | |
24 | + </button> | |
25 | + </div> | |
26 | + <div class="flex align-center " style="gap: 10px;" v-for="(thesis, index) in thesised" :key="thesis.id"> | |
27 | + <input type="text" class="data-wrap" placeholder="영어"> | |
28 | + <input type="text" class="data-wrap" placeholder="한글"> | |
29 | + <button type="button" @click="removeThesis(thesis.id)"> | |
30 | + <img src="../../../resources/img/btn38_120t_normal.png" alt=""> | |
31 | + </button> | |
32 | + | |
33 | + </div> | |
34 | + </div> | |
35 | + | |
36 | + </div> | |
37 | + </div> | |
38 | + <div class="flex justify-between mt50"> | |
39 | + <button type="button" title="글쓰기" class="new-btn" @click="goToPage('TextList')"> | |
40 | + 목록 | |
41 | + </button> | |
42 | + <div class="flex"> | |
43 | + <button type="button" title="글쓰기" class="new-btn mr10"> | |
44 | + 취소 | |
45 | + </button> | |
46 | + <button type="button" title="글쓰기" class="new-btn"> | |
47 | + 수정 | |
48 | + </button> | |
49 | + </div> | |
50 | + </div> | |
51 | +</template> | |
52 | + | |
53 | +<script> | |
54 | +import SvgIcon from '@jamescoyle/vue-icon'; | |
55 | +import { mdiMagnify, mdiPlusCircleOutline, mdiWindowClose } from '@mdi/js'; | |
56 | + | |
57 | + | |
58 | +export default { | |
59 | + data() { | |
60 | + return { | |
61 | + thesised: [], | |
62 | + mdiPlusCircleOutline: mdiPlusCircleOutline, | |
63 | + mdiMagnify: mdiMagnify, | |
64 | + mdiWindowClose: mdiWindowClose, | |
65 | + } | |
66 | + }, | |
67 | + methods: { | |
68 | + // 논문실적 버튼 추가 | |
69 | + addThesis() { | |
70 | + // 고유 ID로 현재 시간의 타임스탬프를 사용 | |
71 | + const uniqueId = Date.now(); | |
72 | + this.thesised.push({ | |
73 | + id: uniqueId, // 고유 ID 추가 | |
74 | + | |
75 | + }); | |
76 | + }, | |
77 | + removeThesis(thesisId) { | |
78 | + // ID를 기준으로 교육 정보 객체를 찾아서 삭제 | |
79 | + const index = this.thesised.findIndex(thesis => thesis.id === thesisId); | |
80 | + if (index !== -1) { | |
81 | + this.thesised.splice(index, 1); | |
82 | + } | |
83 | + }, | |
84 | + // | |
85 | + goToPage(page) { | |
86 | + this.$router.push({ name: page }); | |
87 | + }, | |
88 | + }, | |
89 | + watch: { | |
90 | + | |
91 | + }, | |
92 | + computed: { | |
93 | + | |
94 | + }, | |
95 | + components: { | |
96 | + SvgIcon | |
97 | + }, | |
98 | + mounted() { | |
99 | + console.log('Main2 mounted'); | |
100 | + } | |
101 | +} | |
102 | +</script>(No newline at end of file) |
+++ client/views/pages/teacher/VocaInsert.vue
... | ... | @@ -0,0 +1,102 @@ |
1 | +<template> | |
2 | + <div class="title-box flex justify-between mb40"> | |
3 | + <p class="title">단어장 등록</p> | |
4 | + </div> | |
5 | + <div class="board-wrap"> | |
6 | + <div class="flex align-center mb20"> | |
7 | + <label for="" class="title2">지문</label> | |
8 | + <select v-model="selectedSearchOption" class="mr10 data-wrap"> | |
9 | + <option value="bbsTtl">제목</option> | |
10 | + <option value="bbsCnt">내용</option> | |
11 | + <option value="userNm">작성자</option> | |
12 | + <option value="bbsCls">카테고리</option> | |
13 | + </select> | |
14 | + </div> | |
15 | + <div class="flex align-center"> | |
16 | + <label for="" class="title2">단어 목록</label> | |
17 | + <div class="flex-column" style="gap: 10px;"> | |
18 | + <div class="flex align-center" style="gap: 10px;"> | |
19 | + <input type="text" class="data-wrap" placeholder="영어"> | |
20 | + <input type="text" class="data-wrap" placeholder="한글"> | |
21 | + <button type="button" @click="addThesis"> | |
22 | + <img src="../../../resources/img/btn39_120t_normal.png" alt=""> | |
23 | + | |
24 | + </button> | |
25 | + </div> | |
26 | + <div class="flex align-center " style="gap: 10px;" v-for="(thesis, index) in thesised" :key="thesis.id"> | |
27 | + <input type="text" class="data-wrap" placeholder="영어"> | |
28 | + <input type="text" class="data-wrap" placeholder="한글"> | |
29 | + <button type="button" @click="removeThesis(thesis.id)"> | |
30 | + <img src="../../../resources/img/btn38_120t_normal.png" alt=""> | |
31 | + </button> | |
32 | + | |
33 | + </div> | |
34 | + </div> | |
35 | + | |
36 | + </div> | |
37 | + </div> | |
38 | + <div class="flex justify-between mt50"> | |
39 | + <button type="button" title="글쓰기" class="new-btn" @click="goToPage('TextList')"> | |
40 | + 목록 | |
41 | + </button> | |
42 | + <div class="flex"> | |
43 | + <button type="button" title="글쓰기" class="new-btn mr10"> | |
44 | + 취소 | |
45 | + </button> | |
46 | + <button type="button" title="글쓰기" class="new-btn"> | |
47 | + 등록 | |
48 | + </button> | |
49 | + </div> | |
50 | + </div> | |
51 | +</template> | |
52 | + | |
53 | +<script> | |
54 | +import SvgIcon from '@jamescoyle/vue-icon'; | |
55 | +import { mdiMagnify, mdiPlusCircleOutline, mdiWindowClose } from '@mdi/js'; | |
56 | + | |
57 | + | |
58 | +export default { | |
59 | + data() { | |
60 | + return { | |
61 | + thesised: [], | |
62 | + mdiPlusCircleOutline: mdiPlusCircleOutline, | |
63 | + mdiMagnify: mdiMagnify, | |
64 | + mdiWindowClose: mdiWindowClose, | |
65 | + } | |
66 | + }, | |
67 | + methods: { | |
68 | + // 논문실적 버튼 추가 | |
69 | + addThesis() { | |
70 | + // 고유 ID로 현재 시간의 타임스탬프를 사용 | |
71 | + const uniqueId = Date.now(); | |
72 | + this.thesised.push({ | |
73 | + id: uniqueId, // 고유 ID 추가 | |
74 | + | |
75 | + }); | |
76 | + }, | |
77 | + removeThesis(thesisId) { | |
78 | + // ID를 기준으로 교육 정보 객체를 찾아서 삭제 | |
79 | + const index = this.thesised.findIndex(thesis => thesis.id === thesisId); | |
80 | + if (index !== -1) { | |
81 | + this.thesised.splice(index, 1); | |
82 | + } | |
83 | + }, | |
84 | + // | |
85 | + goToPage(page) { | |
86 | + this.$router.push({ name: page }); | |
87 | + }, | |
88 | + }, | |
89 | + watch: { | |
90 | + | |
91 | + }, | |
92 | + computed: { | |
93 | + | |
94 | + }, | |
95 | + components: { | |
96 | + SvgIcon | |
97 | + }, | |
98 | + mounted() { | |
99 | + console.log('Main2 mounted'); | |
100 | + } | |
101 | +} | |
102 | +</script>(No newline at end of file) |
--- client/views/pages/teacher/VocaList.vue
+++ client/views/pages/teacher/VocaList.vue
... | ... | @@ -2,9 +2,15 @@ |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 | 3 |
<p class="title">단어장</p> |
4 | 4 |
<select name="" id=""> |
5 |
- <option value="UNIT_000000000000001">1단원</option> |
|
5 |
+ <option value="UNIT_000000000000001">A교재</option> |
|
6 | 6 |
</select> |
7 | 7 |
</div> |
8 |
+ <label for="" class="title2">단원</label> |
|
9 |
+ <div class="unit-pagination flex mt10 mb20" style="gap: 10px;"> |
|
10 |
+ <button class="selected-btn">1</button> |
|
11 |
+ <button>2</button> |
|
12 |
+ <button>3</button> |
|
13 |
+ </div> |
|
8 | 14 |
<div class="search-wrap flex justify-between mb20 align-center"> |
9 | 15 |
<div class="title2 gray">?단원 전체 목록</div> |
10 | 16 |
<div> |
... | ... | @@ -28,7 +34,7 @@ |
28 | 34 |
<td>등록일</td> |
29 | 35 |
</thead> |
30 | 36 |
<tbody> |
31 |
- <tr v-for="(wordBook, index) in dataList" :key="wordBook.wdBookId" @click="goToViewPage('noticeDetail')"> |
|
37 |
+ <tr v-for="(wordBook, index) in dataList" :key="wordBook.wdBookId" @click="goToViewPage('VocaDetail')"> |
|
32 | 38 |
<td>{{ createNo(index) }}</td> |
33 | 39 |
<td>{{ wordBook.textTtl }}</td> |
34 | 40 |
<td>{{ wordBook.wordsPreview }}</td> |
... | ... | @@ -49,7 +55,7 @@ |
49 | 55 |
</button> |
50 | 56 |
</article> |
51 | 57 |
<div class="flex justify-end "> |
52 |
- <button type="button" title="등록" class="new-btn" @click="goToPage('noticeInsert')"> |
|
58 |
+ <button type="button" title="등록" class="new-btn" @click="goToPage('VocaInsert')"> |
|
53 | 59 |
등록 |
54 | 60 |
</button> |
55 | 61 |
</div> |
--- client/views/pages/teacher/noticeDetail.vue
+++ client/views/pages/teacher/noticeDetail.vue
... | ... | @@ -1,78 +1,224 @@ |
1 | 1 |
<template> |
2 |
- <div class="title-box flex justify-between mb40"> |
|
3 |
- <p class="title">공지 등록</p> |
|
2 |
+ <div class="title-box flex justify-between mb40"> |
|
3 |
+ <p class="title">{{ category }}</p> |
|
4 |
+ </div> |
|
5 |
+ <div class="board-wrap"> |
|
6 |
+ <div class="flex align-center"> |
|
7 |
+ <label for="" class="title2">{{ title }}</label> |
|
4 | 8 |
</div> |
5 |
- <div class="board-wrap"> |
|
6 |
- <div class="flex align-center"> |
|
7 |
- <label for="" class="title2">제목</label> |
|
8 |
- <input type="text" class="data-wrap"> |
|
9 |
- </div> |
|
10 |
- <hr> |
|
11 |
- <textarea name="" id=""></textarea> |
|
12 |
- <hr> |
|
13 |
- <div class="flex align-center"> |
|
14 |
- <label for="" class="title2">첨부파일</label> |
|
15 |
- <input type="file" ref="fileInput" @change="handleFileUpload" /> |
|
16 |
- </div> |
|
17 |
- <hr> |
|
18 |
- <div class="flex justify-between"> |
|
19 |
- <button type="button" class="flex align-center"> |
|
20 |
- <svg-icon type="mdi" :path="mdilChevronLeft" ></svg-icon> |
|
21 |
- <p> 이전글</p> |
|
22 |
- </button> |
|
23 |
- <button type="button" class="flex align-center"><p>다음글</p> |
|
24 |
- <svg-icon type="mdi" :path="mdilChevronRight" ></svg-icon> |
|
25 |
- |
|
26 |
- </button> |
|
27 |
- |
|
28 |
- |
|
29 |
- </div> |
|
30 |
- </div> |
|
31 |
- <div class="flex justify-between mt50"> |
|
32 |
- <button type="button" title="글쓰기" class="new-btn" @click="goToPage('Board')"> |
|
33 |
- 목록 |
|
34 |
- </button> |
|
35 |
- <div class="flex"> |
|
36 |
- <button type="button" title="글쓰기" class="new-btn mr10" > |
|
37 |
- 수정 |
|
38 |
- </button> |
|
39 |
- <button type="button" title="글쓰기" class="new-btn" > |
|
40 |
- 삭제 |
|
41 |
- </button> |
|
42 |
- </div> |
|
43 |
- </div> |
|
9 |
+ <hr /> |
|
10 |
+ <textarea readonly name="" id="">{{ content }}</textarea> |
|
11 |
+ <hr /> |
|
12 |
+ <div class="flex align-center"> |
|
13 |
+ <label for="" class="title2">첨부파일</label> |
|
14 |
+ <label for="" class="title2" v-if="file">{{ file.fileNm }}</label> |
|
15 |
+ </div> |
|
16 |
+ <hr /> |
|
17 |
+ <div class="flex justify-between"> |
|
18 |
+ <button type="button" class="flex align-center" @click="prevBoard()"> |
|
19 |
+ <svg-icon type="mdi" :path="mdilChevronLeft"></svg-icon> |
|
20 |
+ <p>이전글</p> |
|
21 |
+ </button> |
|
22 |
+ <button type="button" class="flex align-center" @click="nextBoard()"> |
|
23 |
+ <p>다음글</p> |
|
24 |
+ <svg-icon type="mdi" :path="mdilChevronRight"></svg-icon> |
|
25 |
+ </button> |
|
26 |
+ </div> |
|
27 |
+ </div> |
|
28 |
+ <div class="flex justify-between mt50"> |
|
29 |
+ <button |
|
30 |
+ type="button" |
|
31 |
+ title="글쓰기" |
|
32 |
+ class="new-btn" |
|
33 |
+ @click="goToPage('Board')" |
|
34 |
+ > |
|
35 |
+ 목록 |
|
36 |
+ </button> |
|
37 |
+ <div class="flex"> |
|
38 |
+ <button |
|
39 |
+ type="button" |
|
40 |
+ title="글쓰기" |
|
41 |
+ class="new-btn mr10" |
|
42 |
+ @click="goToPage('noticeInsert')" |
|
43 |
+ > |
|
44 |
+ 수정 |
|
45 |
+ </button> |
|
46 |
+ <button |
|
47 |
+ type="button" |
|
48 |
+ title="글쓰기" |
|
49 |
+ class="new-btn" |
|
50 |
+ @click="[deleteBoard(), goToPage('Board')]" |
|
51 |
+ > |
|
52 |
+ 삭제 |
|
53 |
+ </button> |
|
54 |
+ </div> |
|
55 |
+ </div> |
|
44 | 56 |
</template> |
45 | 57 |
|
46 | 58 |
<script> |
47 |
-import SvgIcon from '@jamescoyle/vue-icon'; |
|
48 |
-import { mdiMagnify } from '@mdi/js'; |
|
49 |
-import { mdilChevronRight,mdilChevronLeft } from '@mdi/light-js'; |
|
50 |
- |
|
59 |
+import SvgIcon from "@jamescoyle/vue-icon"; |
|
60 |
+import { mdiMagnify } from "@mdi/js"; |
|
61 |
+import { mdilChevronRight, mdilChevronLeft } from "@mdi/light-js"; |
|
62 |
+import axios from "axios"; |
|
51 | 63 |
|
52 | 64 |
export default { |
53 |
- data () { |
|
54 |
- return { |
|
55 |
- mdiMagnify: mdiMagnify, |
|
56 |
- mdilChevronRight: mdilChevronRight , |
|
57 |
- mdilChevronLeft:mdilChevronLeft, |
|
58 |
- } |
|
59 |
- }, |
|
60 |
- methods: { |
|
61 |
- goToPage(page) { |
|
62 |
- this.$router.push({ name: page }); |
|
63 |
- }, |
|
64 |
- }, |
|
65 |
- watch: { |
|
65 |
+ data() { |
|
66 |
+ return { |
|
67 |
+ mdiMagnify: mdiMagnify, |
|
68 |
+ mdilChevronRight: mdilChevronRight, |
|
69 |
+ mdilChevronLeft: mdilChevronLeft, |
|
66 | 70 |
|
71 |
+ dataList: null, |
|
72 |
+ sclsId: "", |
|
73 |
+ bbsId: "", |
|
74 |
+ |
|
75 |
+ title: "", |
|
76 |
+ content: "", |
|
77 |
+ category: "", |
|
78 |
+ file: "", |
|
79 |
+ time: "", |
|
80 |
+ user: "", |
|
81 |
+ }; |
|
82 |
+ }, |
|
83 |
+ methods: { |
|
84 |
+ goToPage(page) { |
|
85 |
+ this.$router.push({ name: page }); |
|
67 | 86 |
}, |
68 |
- computed: { |
|
69 |
- |
|
87 |
+ |
|
88 |
+ findBoard() { |
|
89 |
+ const vm = this; |
|
90 |
+ vm.bbsId = JSON.parse(sessionStorage.getItem("bbsId")); |
|
91 |
+ console.log(vm.bbsId); |
|
92 |
+ axios({ |
|
93 |
+ url: "/board/find.json", |
|
94 |
+ method: "post", |
|
95 |
+ headers: { |
|
96 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
97 |
+ }, |
|
98 |
+ data: { |
|
99 |
+ bbsId: vm.bbsId, |
|
100 |
+ }, |
|
101 |
+ }) |
|
102 |
+ .then(function (res) { |
|
103 |
+ console.log("boardData - response : ", res.data); |
|
104 |
+ vm.dataList = res.data.result[0].boardClass[0].board[0]; |
|
105 |
+ vm.title = vm.dataList.bbsTtl; |
|
106 |
+ vm.content = vm.dataList.bbsCnt; |
|
107 |
+ vm.category = vm.dataList.bbsCls; |
|
108 |
+ vm.time = vm.dataList.bbsTm; |
|
109 |
+ vm.findFile(); |
|
110 |
+ }) |
|
111 |
+ .catch(function (error) { |
|
112 |
+ console.log("boardData - error : ", error); |
|
113 |
+ }); |
|
70 | 114 |
}, |
71 |
- components:{ |
|
72 |
- SvgIcon |
|
115 |
+ |
|
116 |
+ findFile() { |
|
117 |
+ const vm = this; |
|
118 |
+ axios({ |
|
119 |
+ url: "/file/find.json", |
|
120 |
+ method: "post", |
|
121 |
+ headers: { |
|
122 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
123 |
+ }, |
|
124 |
+ data: { |
|
125 |
+ file_mng_id: vm.dataList.fileMngId, |
|
126 |
+ }, |
|
127 |
+ }) |
|
128 |
+ .then(function (res) { |
|
129 |
+ console.log("fileInfo - response : ", res.data.list[0]); |
|
130 |
+ vm.file = res.data.list[0]; |
|
131 |
+ sessionStorage.setItem("file", JSON.stringify(vm.file)); |
|
132 |
+ }) |
|
133 |
+ .catch(function (error) { |
|
134 |
+ console.log("result - error : ", error); |
|
135 |
+ }); |
|
73 | 136 |
}, |
74 |
- mounted() { |
|
75 |
- console.log('Main2 mounted'); |
|
76 |
- } |
|
77 |
-} |
|
78 |
-</script>(No newline at end of file) |
|
137 |
+ |
|
138 |
+ prevBoard() { |
|
139 |
+ const vm = this; |
|
140 |
+ axios({ |
|
141 |
+ url: "/board/prevBoard.json", |
|
142 |
+ method: "post", |
|
143 |
+ headers: { |
|
144 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
145 |
+ }, |
|
146 |
+ data: { |
|
147 |
+ sclsId: vm.dataList.sclsId, |
|
148 |
+ bbsId: vm.dataList.bbsId, |
|
149 |
+ }, |
|
150 |
+ }) |
|
151 |
+ .then(function (res) { |
|
152 |
+ console.log("dataList - response : ", res.data); |
|
153 |
+ vm.dataList = res.data[0].boardClass[0].board[0]; |
|
154 |
+ vm.title = vm.dataList.bbsTtl; |
|
155 |
+ vm.content = vm.dataList.bbsCnt; |
|
156 |
+ vm.category = vm.dataList.bbsCls; |
|
157 |
+ vm.time = vm.dataList.bbsTm; |
|
158 |
+ vm.findFile(); |
|
159 |
+ }) |
|
160 |
+ .catch(function (error) { |
|
161 |
+ console.log("result - error : ", error); |
|
162 |
+ alert("첫번째 글 입니다."); |
|
163 |
+ }); |
|
164 |
+ }, |
|
165 |
+ |
|
166 |
+ nextBoard() { |
|
167 |
+ const vm = this; |
|
168 |
+ axios({ |
|
169 |
+ url: "/board/nextBoard.json", |
|
170 |
+ method: "post", |
|
171 |
+ headers: { |
|
172 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
173 |
+ }, |
|
174 |
+ data: { |
|
175 |
+ sclsId: vm.dataList.sclsId, |
|
176 |
+ bbsId: vm.dataList.bbsId, |
|
177 |
+ }, |
|
178 |
+ }) |
|
179 |
+ .then(function (res) { |
|
180 |
+ console.log("dataList - response : ", res.data); |
|
181 |
+ vm.dataList = res.data[0].boardClass[0].board[0]; |
|
182 |
+ vm.title = vm.dataList.bbsTtl; |
|
183 |
+ vm.content = vm.dataList.bbsCnt; |
|
184 |
+ vm.category = vm.dataList.bbsCls; |
|
185 |
+ vm.time = vm.dataList.bbsTm; |
|
186 |
+ vm.findFile(); |
|
187 |
+ }) |
|
188 |
+ .catch(function (error) { |
|
189 |
+ console.log("result - error : ", error); |
|
190 |
+ alert("가장 최신 글 입니다."); |
|
191 |
+ }); |
|
192 |
+ }, |
|
193 |
+ deleteBoard() { |
|
194 |
+ const vm = this; |
|
195 |
+ axios({ |
|
196 |
+ url: "/board/delete.json", |
|
197 |
+ method: "post", |
|
198 |
+ headers: { |
|
199 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
200 |
+ }, |
|
201 |
+ data: { |
|
202 |
+ bbsId: vm.dataList.bbsId, |
|
203 |
+ }, |
|
204 |
+ }) |
|
205 |
+ .then(function (res) { |
|
206 |
+ console.log("delete - response : ", res.data); |
|
207 |
+ alert("삭제 되었습니다."); |
|
208 |
+ }) |
|
209 |
+ .catch(function (error) { |
|
210 |
+ console.log("rssult - error : ", error); |
|
211 |
+ }); |
|
212 |
+ }, |
|
213 |
+ }, |
|
214 |
+ watch: {}, |
|
215 |
+ computed: {}, |
|
216 |
+ components: { |
|
217 |
+ SvgIcon, |
|
218 |
+ }, |
|
219 |
+ mounted() { |
|
220 |
+ console.log("Main2 mounted"); |
|
221 |
+ this.findBoard(); |
|
222 |
+ }, |
|
223 |
+}; |
|
224 |
+</script> |
--- client/views/pages/teacher/noticeInsert.vue
+++ client/views/pages/teacher/noticeInsert.vue
... | ... | @@ -1,9 +1,9 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 |
- <p class="title">공지 등록</p> |
|
3 |
+ <p class="title">{{ titleLabel }}</p> |
|
4 | 4 |
</div> |
5 | 5 |
<div class="board-wrap"> |
6 |
- <form @submit.prevent="handleSubmit"> |
|
6 |
+ <form @submit.prevent="handleButtonAction"> |
|
7 | 7 |
<div class="flex align-center"> |
8 | 8 |
<label for="title" class="title2">제목</label> |
9 | 9 |
<input type="text" id="title" class="data-wrap" v-model="title" /> |
... | ... | @@ -13,13 +13,21 @@ |
13 | 13 |
<hr /> |
14 | 14 |
<div class="flex align-center"> |
15 | 15 |
<label for="file" class="title2">첨부파일</label> |
16 |
- <input type="file" ref="fileInput" @change="handleFileUpload" /> |
|
16 |
+ <label for="file" class="title2"> {{ file.fileNm }}</label> |
|
17 |
+ <input |
|
18 |
+ type="file" |
|
19 |
+ ref="fileInput" |
|
20 |
+ @change="handleFileUpload" |
|
21 |
+ multiple |
|
22 |
+ /> |
|
17 | 23 |
</div> |
18 | 24 |
<div class="flex justify-between mt50"> |
19 | 25 |
<button title="글쓰기" class="new-btn" @click="goToPage('Board')"> |
20 | 26 |
목록 |
21 | 27 |
</button> |
22 |
- <button title="글쓰기" class="new-btn">등록</button> |
|
28 |
+ <button title="글쓰기" class="new-btn"> |
|
29 |
+ {{ buttonLabel }} |
|
30 |
+ </button> |
|
23 | 31 |
</div> |
24 | 32 |
</form> |
25 | 33 |
</div> |
... | ... | @@ -38,8 +46,16 @@ |
38 | 46 |
title: "", |
39 | 47 |
content: "", |
40 | 48 |
category: "Notice", |
49 |
+ file: "", |
|
41 | 50 |
sclsId: "", |
42 |
- selectedFile: null, |
|
51 |
+ bbsId: "", |
|
52 |
+ fileMngId: null, |
|
53 |
+ |
|
54 |
+ selectedFiles: [], |
|
55 |
+ dataList: "", |
|
56 |
+ |
|
57 |
+ // 데이터 편집 상태 (true = 수정, false = 등록) |
|
58 |
+ isEditMode: false, |
|
43 | 59 |
}; |
44 | 60 |
}, |
45 | 61 |
methods: { |
... | ... | @@ -48,26 +64,113 @@ |
48 | 64 |
}, |
49 | 65 |
|
50 | 66 |
handleFileUpload(e) { |
51 |
- this.selectedFile = e.target.files[0]; |
|
52 |
- console.log(this.selectedFile); |
|
67 |
+ this.selectedFiles = e.target.files; |
|
53 | 68 |
}, |
54 | 69 |
|
55 | 70 |
created() { |
56 | 71 |
const vm = this; |
57 | 72 |
const sclsId = JSON.parse(sessionStorage.getItem("sclsId")); |
73 |
+ const bbsId = JSON.parse(sessionStorage.getItem("bbsId")); |
|
74 |
+ const file = JSON.parse(sessionStorage.getItem("file")); |
|
58 | 75 |
|
59 | 76 |
if (sclsId) { |
60 | 77 |
vm.sclsId = sclsId; |
78 |
+ if (bbsId && file) { |
|
79 |
+ vm.bbsId = bbsId; |
|
80 |
+ vm.file = file; |
|
81 |
+ vm.fileMngId = file.fileMngId; |
|
82 |
+ vm.isEditMode = true; |
|
83 |
+ vm.findBoard(); |
|
84 |
+ } else { |
|
85 |
+ vm.isEditMode = false; |
|
86 |
+ } |
|
61 | 87 |
} |
62 |
- console.log(sclsId); |
|
63 | 88 |
}, |
64 | 89 |
|
65 |
- async handleSubmit() { |
|
90 |
+ // 게시글 상세 조회 |
|
91 |
+ findBoard() { |
|
92 |
+ const vm = this; |
|
93 |
+ vm.bbsId = JSON.parse(sessionStorage.getItem("bbsId")); |
|
94 |
+ console.log(vm.bbsId); |
|
95 |
+ axios({ |
|
96 |
+ url: "/board/find.json", |
|
97 |
+ method: "post", |
|
98 |
+ headers: { |
|
99 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
100 |
+ }, |
|
101 |
+ data: { |
|
102 |
+ bbsId: vm.bbsId, |
|
103 |
+ }, |
|
104 |
+ }) |
|
105 |
+ .then(function (res) { |
|
106 |
+ console.log("boardData - response : ", res.data); |
|
107 |
+ vm.dataList = res.data.result[0].boardClass[0].board[0]; |
|
108 |
+ vm.title = vm.dataList.bbsTtl; |
|
109 |
+ vm.content = vm.dataList.bbsCnt; |
|
110 |
+ vm.category = vm.dataList.bbsCls; |
|
111 |
+ vm.time = vm.dataList.bbsTm; |
|
112 |
+ }) |
|
113 |
+ .catch(function (error) { |
|
114 |
+ console.log("boardData - error : ", error); |
|
115 |
+ }); |
|
116 |
+ }, |
|
117 |
+ |
|
118 |
+ // 게시글 등록 |
|
119 |
+ async dataInsert() { |
|
66 | 120 |
const vm = this; |
67 | 121 |
try { |
68 | 122 |
// 파일 업로드 |
123 |
+ if (this.selectedFiles && this.selectedFiles.length > 0) { |
|
124 |
+ // 파일 업로드 |
|
125 |
+ const formData = new FormData(); |
|
126 |
+ for (let i = 0; i < this.selectedFiles.length; i++) { |
|
127 |
+ formData.append("files", this.selectedFiles[i]); |
|
128 |
+ } |
|
129 |
+ |
|
130 |
+ const fileUploadResponse = await axios.post( |
|
131 |
+ "/file/upload.json", |
|
132 |
+ formData, |
|
133 |
+ { |
|
134 |
+ headers: { |
|
135 |
+ "Content-Type": "multipart/form-data", |
|
136 |
+ }, |
|
137 |
+ } |
|
138 |
+ ); |
|
139 |
+ |
|
140 |
+ // 업로드 후 파일 매니지 아이디 호출 |
|
141 |
+ fileMngId = fileUploadResponse.data.fileMngId; |
|
142 |
+ } |
|
143 |
+ |
|
144 |
+ // 게시물 등록 |
|
145 |
+ const newData = { |
|
146 |
+ bbsTtl: vm.title, |
|
147 |
+ bbsCls: vm.category, |
|
148 |
+ bbsCnt: vm.content, |
|
149 |
+ fileMngId: vm.fileMngId, |
|
150 |
+ sclsId: vm.sclsId, |
|
151 |
+ }; |
|
152 |
+ |
|
153 |
+ await axios.post("/board/insert.json", newData); |
|
154 |
+ |
|
155 |
+ alert("게시물 등록 성공"); |
|
156 |
+ vm.$router.push({ name: "Board" }); |
|
157 |
+ } catch (error) { |
|
158 |
+ console.error("게시물 등록 실패 ", error); |
|
159 |
+ alert("게시물 등록 실패"); |
|
160 |
+ } |
|
161 |
+ }, |
|
162 |
+ |
|
163 |
+ // 게시글 수정 |
|
164 |
+ async boardUpdate() { |
|
165 |
+ const vm = this; |
|
166 |
+ |
|
167 |
+ // 파일 업로드 |
|
168 |
+ if (this.selectedFiles && this.selectedFiles.length > 0) { |
|
169 |
+ // 파일 업로드 |
|
69 | 170 |
const formData = new FormData(); |
70 |
- formData.append("files", this.selectedFile); |
|
171 |
+ for (let i = 0; i < this.selectedFiles.length; i++) { |
|
172 |
+ formData.append("files", this.selectedFiles[i]); |
|
173 |
+ } |
|
71 | 174 |
|
72 | 175 |
const fileUploadResponse = await axios.post( |
73 | 176 |
"/file/upload.json", |
... | ... | @@ -80,28 +183,50 @@ |
80 | 183 |
); |
81 | 184 |
|
82 | 185 |
// 업로드 후 파일 매니지 아이디 호출 |
83 |
- const fileMngId = fileUploadResponse.data.fileMngId; |
|
186 |
+ fileMngId = fileUploadResponse.data.fileMngId; |
|
187 |
+ } |
|
84 | 188 |
|
85 |
- // 게시물 등록 |
|
86 |
- const newData = { |
|
87 |
- bbsTtl: vm.title, |
|
88 |
- bbsCls: vm.category, |
|
89 |
- bbsCnt: vm.content, |
|
90 |
- fileMngId: fileMngId, |
|
91 |
- sclsId: vm.sclsId, |
|
92 |
- }; |
|
189 |
+ const newData = { |
|
190 |
+ bbsTtl: vm.title, |
|
191 |
+ bbsCls: vm.category, |
|
192 |
+ bbsCnt: vm.content, |
|
193 |
+ fileMngId: vm.fileMngId, |
|
194 |
+ bbsId: vm.bbsId, |
|
195 |
+ }; |
|
196 |
+ await axios({ |
|
197 |
+ url: "/board/update.json", |
|
198 |
+ method: "post", |
|
199 |
+ headers: { |
|
200 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
201 |
+ }, |
|
202 |
+ data: newData, |
|
203 |
+ }) |
|
204 |
+ .then(function (res) { |
|
205 |
+ console.log("dataUpdate - response : ", res.data); |
|
206 |
+ }) |
|
207 |
+ .catch(function (error) { |
|
208 |
+ console.log("result - error : ", error); |
|
209 |
+ }); |
|
210 |
+ }, |
|
93 | 211 |
|
94 |
- await axios.post("/board/insert.json", newData); |
|
95 |
- |
|
96 |
- alert("게시물 등록 성공"); |
|
97 |
- } catch (error) { |
|
98 |
- console.error("게시물 등록 실패 ", error); |
|
99 |
- alert("게시물 등록 실패"); |
|
212 |
+ handleButtonAction() { |
|
213 |
+ if (this.isEditMode) { |
|
214 |
+ this.boardUpdate(); |
|
215 |
+ } else { |
|
216 |
+ this.dataInsert(); |
|
100 | 217 |
} |
101 | 218 |
}, |
102 | 219 |
}, |
103 | 220 |
watch: {}, |
104 |
- computed: {}, |
|
221 |
+ computed: { |
|
222 |
+ titleLabel() { |
|
223 |
+ return this.isEditMode ? "수정" : "공지 등록"; |
|
224 |
+ }, |
|
225 |
+ |
|
226 |
+ buttonLabel() { |
|
227 |
+ return this.isEditMode ? "수정" : "등록"; |
|
228 |
+ }, |
|
229 |
+ }, |
|
105 | 230 |
components: { |
106 | 231 |
SvgIcon, |
107 | 232 |
}, |
--- client/views/pages/teacher/textbook.vue
+++ client/views/pages/teacher/textbook.vue
... | ... | @@ -1,101 +1,166 @@ |
1 | 1 |
<template> |
2 | 2 |
<div class="title-box flex justify-between mb40"> |
3 |
- <p class="title">교재 관리</p> |
|
4 |
- <!-- <select name="" id=""> |
|
3 |
+ <p class="title">교재</p> |
|
4 |
+ <select name="" id=""> |
|
5 | 5 |
<option value="">A반</option> |
6 |
- </select> --> |
|
7 |
- </div> |
|
8 |
- <div class="content-t"> |
|
9 |
- <div class=" flex " style="gap: 50px;"> |
|
10 |
- <div class="textbook"> |
|
11 |
- <div class="box " style="gap: 10px;" @click="goToPage('TextBookDetail')"> |
|
12 |
- </div> |
|
13 |
- <div class="text "> |
|
14 |
- <p class="title1" style="color: #fff;">A 교재</p> |
|
15 |
- <div class="btnGroup mt15 flex align-center justify-end" style="gap: 10px;"> |
|
16 |
- <button>수정</button><p>|</p> |
|
17 |
- <button @click="showConfirm('delete')">삭제</button> |
|
18 |
- </div> |
|
19 |
- </div> |
|
6 |
+ </select> |
|
7 |
+ </div> |
|
8 |
+ <div class="content-t"> |
|
9 |
+ <div class="flex" style="gap: 2.5%;" :style="{flexWrap: 'wrap'}"> |
|
10 |
+ <div class="textbook" v-for="textbookItem in textbookList" :key="textbookItem.book_id" style="width: 22.5%; margin-bottom: 30px;"> |
|
11 |
+ <div class="box" style="gap: 10px;" @click="goToPage('TextBookDetail', textbookItem.book_id)"> |
|
20 | 12 |
</div> |
21 |
- |
|
22 |
- <div class="textbook-add"> |
|
23 |
- <button @click="buttonSearch"><img src="../../../resources/img/btn32_98t_normal.png" alt=""></button> |
|
24 |
- |
|
13 |
+ <div class="text"> |
|
14 |
+ <p class="title1" style="color: #fff;">{{ textbookItem.book_nm }}</p> |
|
15 |
+ <div class="btnGroup mt15 flex align-center justify-end" style="gap: 10px;"> |
|
16 |
+ <button @click="editBook(textbookItem)">수정</button> |
|
17 |
+ <p>|</p> |
|
18 |
+ <button @click="deleteBook(textbookItem.book_id)">삭제</button> |
|
19 |
+ </div> |
|
25 | 20 |
</div> |
26 | 21 |
</div> |
27 |
- </div> |
|
28 |
- <div v-show="searchOpen" class="popup-wrap"> |
|
29 |
- <div class="popup-box "> |
|
22 |
+ |
|
23 |
+ <div class="textbook-add" style="width: 22.5%; margin-bottom: 30px;"> |
|
24 |
+ <button @click="buttonSearch"> |
|
25 |
+ <img src="../../../resources/img/btn32_98t_normal.png" alt=""> |
|
26 |
+ </button> |
|
27 |
+ </div> |
|
28 |
+ |
|
29 |
+ <div v-show="searchOpen" class="popup-wrap"> |
|
30 |
+ <div class="popup-box"> |
|
30 | 31 |
<div class="flex justify-between mb30"> |
31 | 32 |
<p class="popup-title">교재 이름</p> |
32 | 33 |
<button type="button" class="popup-close-btn" @click="closeBtn"> |
33 | 34 |
<svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
34 |
- |
|
35 | 35 |
</button> |
36 | 36 |
</div> |
37 | 37 |
<div class="search-wrap mb30"> |
38 |
- <input type="text" class="data-wrap" placeholder=""> |
|
39 |
- <!-- <button type="button" title="교재 검색"> |
|
38 |
+ <input type="text" class="data-wrap" v-model="newBookName" placeholder="교재 이름을 입력하세요"> |
|
39 |
+ <button type="button" title="교재 검색" @click="insertBook"> |
|
40 | 40 |
<img src="../../../resources/img/look_t.png" alt=""> |
41 |
- </button> --> |
|
41 |
+ </button> |
|
42 | 42 |
</div> |
43 |
- <div class="flex justify-center "> |
|
44 |
- <button type="button" title="글쓰기" class="new-btn mr10"> |
|
43 |
+ <div class="flex justify-center"> |
|
44 |
+ <button type="button" title="취소" class="new-btn mr10" @click="closeBtn"> |
|
45 | 45 |
취소 |
46 | 46 |
</button> |
47 |
- <button type="button" title="글쓰기" class="new-btn"> |
|
48 |
- 생성 |
|
47 |
+ <button type="button" title="생성" class="new-btn" @click="editMode ? updateBook() : insertBook()"> |
|
48 |
+ {{ editMode ? '수정' : '생성' }} |
|
49 | 49 |
</button> |
50 | 50 |
</div> |
51 | 51 |
</div> |
52 | 52 |
</div> |
53 |
+ </div> |
|
54 |
+ </div> |
|
53 | 55 |
</template> |
56 |
+ |
|
57 |
+ |
|
54 | 58 |
|
55 | 59 |
<script> |
56 | 60 |
import SvgIcon from '@jamescoyle/vue-icon'; |
57 |
-import { mdiMagnify, mdiWindowClose } from '@mdi/js'; |
|
61 |
+import { mdiWindowClose } from '@mdi/js'; |
|
62 |
+import axios from 'axios'; |
|
58 | 63 |
|
59 | 64 |
export default { |
60 |
- data () { |
|
65 |
+ data() { |
|
61 | 66 |
return { |
62 | 67 |
mdiWindowClose: mdiWindowClose, |
63 | 68 |
showModal: false, |
64 | 69 |
searchOpen: false, |
70 |
+ textbookList: [], |
|
71 |
+ newBookName: '', |
|
72 |
+ editMode: false, |
|
73 |
+ editBookId: null, |
|
65 | 74 |
} |
66 | 75 |
}, |
67 | 76 |
methods: { |
68 |
- goToPage(page) { |
|
69 |
- this.$router.push({ name: page }); |
|
70 |
- }, |
|
71 |
- closeModal() { |
|
72 |
- this.showModal = false; |
|
77 |
+ goToPage(page, book_id) { |
|
78 |
+ this.$router.push({ name: page, query: { book_id }}); |
|
73 | 79 |
}, |
74 | 80 |
buttonSearch() { |
75 | 81 |
this.searchOpen = true; |
76 | 82 |
}, |
77 | 83 |
closeBtn() { |
78 | 84 |
this.searchOpen = false; |
79 |
- |
|
85 |
+ this.editMode = false; |
|
86 |
+ this.editBookId = null; |
|
87 |
+ this.newBookName = ''; |
|
80 | 88 |
}, |
81 |
- showConfirm(type) { |
|
82 |
- let message = ''; |
|
83 |
- if (type === 'delete') { |
|
84 |
- message = '삭제하시겠습니까?'; |
|
85 |
- } else if (type === 'reset') { |
|
86 |
- message = '초기화하시겠습니까?'; |
|
87 |
- } else if (type === 'save') { |
|
88 |
- message = '등록하시겠습니까?'; |
|
89 |
- } |
|
90 |
- |
|
91 |
- if (confirm(message)) { |
|
92 |
- this.goBack(); |
|
93 |
- } |
|
89 |
+ editBook(book) { |
|
90 |
+ this.newBookName = book.book_nm; |
|
91 |
+ this.editMode = true; |
|
92 |
+ this.editBookId = book.book_id; |
|
93 |
+ this.searchOpen = true; |
|
94 | 94 |
}, |
95 |
- |
|
96 |
- }, |
|
97 |
- watch: { |
|
98 |
- |
|
95 |
+ bookList() { |
|
96 |
+ axios({ |
|
97 |
+ url: "/book/findAll.json", |
|
98 |
+ method: "post", |
|
99 |
+ headers: { |
|
100 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
101 |
+ } |
|
102 |
+ }) |
|
103 |
+ .then(response => { |
|
104 |
+ this.textbookList = response.data; |
|
105 |
+ }) |
|
106 |
+ .catch(error => { |
|
107 |
+ console.error('Error fetching books:', error); |
|
108 |
+ }); |
|
109 |
+ }, |
|
110 |
+ insertBook() { |
|
111 |
+ const newBook = { |
|
112 |
+ book_nm: this.newBookName |
|
113 |
+ }; |
|
114 |
+ axios.post('/book/insert.json', newBook) |
|
115 |
+ .then(response => { |
|
116 |
+ this.bookList(); |
|
117 |
+ this.closeBtn(); |
|
118 |
+ }) |
|
119 |
+ .catch(error => { |
|
120 |
+ console.error('Error creating book:', error); |
|
121 |
+ }); |
|
122 |
+ }, |
|
123 |
+ updateBook() { |
|
124 |
+ const updatedBook = { |
|
125 |
+ book_id: this.editBookId, |
|
126 |
+ book_nm: this.newBookName |
|
127 |
+ }; |
|
128 |
+ axios({ |
|
129 |
+ url: "/book/update.json", |
|
130 |
+ method: "post", |
|
131 |
+ headers: { |
|
132 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
133 |
+ }, |
|
134 |
+ data: updatedBook, |
|
135 |
+ }) |
|
136 |
+ .then(response => { |
|
137 |
+ this.bookList(); |
|
138 |
+ this.closeBtn(); |
|
139 |
+ }) |
|
140 |
+ .catch(error => { |
|
141 |
+ console.error('Error updating book:', error); |
|
142 |
+ }); |
|
143 |
+ }, |
|
144 |
+ deleteBook(book_id) { |
|
145 |
+ if (confirm('삭제하시겠습니까?')) { |
|
146 |
+ axios({ |
|
147 |
+ url: "/book/delete.json", |
|
148 |
+ method: "post", |
|
149 |
+ headers: { |
|
150 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
151 |
+ }, |
|
152 |
+ data: { |
|
153 |
+ book_id: book_id |
|
154 |
+ }, |
|
155 |
+ }) |
|
156 |
+ .then(response => { |
|
157 |
+ this.bookList(); |
|
158 |
+ }) |
|
159 |
+ .catch(error => { |
|
160 |
+ console.error('Error deleting book:', error); |
|
161 |
+ }); |
|
162 |
+ } |
|
163 |
+ } |
|
99 | 164 |
}, |
100 | 165 |
computed: { |
101 | 166 |
|
... | ... | @@ -105,9 +170,22 @@ |
105 | 170 |
}, |
106 | 171 |
mounted() { |
107 | 172 |
console.log('Main2 mounted'); |
173 |
+ this.bookList(); |
|
108 | 174 |
} |
109 | 175 |
} |
110 | 176 |
</script> |
111 |
-<style scoped> |
|
112 |
-.textbook{width: 300px;} |
|
177 |
+ |
|
178 |
+<style> |
|
179 |
+.content-t { |
|
180 |
+ flex-wrap: wrap; |
|
181 |
+ height: 90%; |
|
182 |
+ overflow-y: scroll; |
|
183 |
+} |
|
184 |
+.flex { |
|
185 |
+ display: flex; |
|
186 |
+ flex-wrap: wrap; |
|
187 |
+} |
|
188 |
+.textbook, .textbook-add { |
|
189 |
+ margin-bottom: 30px; |
|
190 |
+} |
|
113 | 191 |
</style>(No newline at end of file) |
--- package-lock.json
+++ package-lock.json
... | ... | @@ -12,6 +12,7 @@ |
12 | 12 |
"@mdi/light-js": "^0.2.63", |
13 | 13 |
"axios": "^1.7.3", |
14 | 14 |
"babel-loader": "8.2.5", |
15 |
+ "compress.js": "^2.1.2", |
|
15 | 16 |
"css-loader": "6.7.1", |
16 | 17 |
"express": "^4.18.1", |
17 | 18 |
"express-http-proxy": "^2.0.0", |
... | ... | @@ -25,9 +26,11 @@ |
25 | 26 |
"vue-router": "4.1.5", |
26 | 27 |
"vue-style-loader": "4.1.3", |
27 | 28 |
"vue3-sfc-loader": "^0.8.4", |
28 |
- "vuex": "^4.1.0", |
|
29 |
- "webpack": "5.74.0", |
|
30 |
- "webpack-cli": "4.10.0" |
|
29 |
+ "vuex": "^4.1.0" |
|
30 |
+ }, |
|
31 |
+ "devDependencies": { |
|
32 |
+ "webpack": "^5.93.0", |
|
33 |
+ "webpack-cli": "^5.1.4" |
|
31 | 34 |
} |
32 | 35 |
}, |
33 | 36 |
"node_modules/@ampproject/remapping": { |
... | ... | @@ -316,6 +319,7 @@ |
316 | 319 |
"version": "0.5.7", |
317 | 320 |
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", |
318 | 321 |
"integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", |
322 |
+ "dev": true, |
|
319 | 323 |
"license": "MIT", |
320 | 324 |
"engines": { |
321 | 325 |
"node": ">=10.0.0" |
... | ... | @@ -425,10 +429,9 @@ |
425 | 429 |
} |
426 | 430 |
}, |
427 | 431 |
"node_modules/@types/estree": { |
428 |
- "version": "0.0.51", |
|
429 |
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", |
|
430 |
- "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", |
|
431 |
- "license": "MIT" |
|
432 |
+ "version": "1.0.5", |
|
433 |
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", |
|
434 |
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" |
|
432 | 435 |
}, |
433 | 436 |
"node_modules/@types/json-schema": { |
434 | 437 |
"version": "7.0.15", |
... | ... | @@ -564,180 +567,173 @@ |
564 | 567 |
"license": "MIT" |
565 | 568 |
}, |
566 | 569 |
"node_modules/@webassemblyjs/ast": { |
567 |
- "version": "1.11.1", |
|
568 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", |
|
569 |
- "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", |
|
570 |
- "license": "MIT", |
|
570 |
+ "version": "1.12.1", |
|
571 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", |
|
572 |
+ "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", |
|
571 | 573 |
"dependencies": { |
572 |
- "@webassemblyjs/helper-numbers": "1.11.1", |
|
573 |
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1" |
|
574 |
+ "@webassemblyjs/helper-numbers": "1.11.6", |
|
575 |
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6" |
|
574 | 576 |
} |
575 | 577 |
}, |
576 | 578 |
"node_modules/@webassemblyjs/floating-point-hex-parser": { |
577 |
- "version": "1.11.1", |
|
578 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", |
|
579 |
- "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", |
|
580 |
- "license": "MIT" |
|
579 |
+ "version": "1.11.6", |
|
580 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", |
|
581 |
+ "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==" |
|
581 | 582 |
}, |
582 | 583 |
"node_modules/@webassemblyjs/helper-api-error": { |
583 |
- "version": "1.11.1", |
|
584 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", |
|
585 |
- "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", |
|
586 |
- "license": "MIT" |
|
584 |
+ "version": "1.11.6", |
|
585 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", |
|
586 |
+ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" |
|
587 | 587 |
}, |
588 | 588 |
"node_modules/@webassemblyjs/helper-buffer": { |
589 |
- "version": "1.11.1", |
|
590 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", |
|
591 |
- "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", |
|
592 |
- "license": "MIT" |
|
589 |
+ "version": "1.12.1", |
|
590 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", |
|
591 |
+ "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==" |
|
593 | 592 |
}, |
594 | 593 |
"node_modules/@webassemblyjs/helper-numbers": { |
595 |
- "version": "1.11.1", |
|
596 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", |
|
597 |
- "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", |
|
598 |
- "license": "MIT", |
|
594 |
+ "version": "1.11.6", |
|
595 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", |
|
596 |
+ "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", |
|
599 | 597 |
"dependencies": { |
600 |
- "@webassemblyjs/floating-point-hex-parser": "1.11.1", |
|
601 |
- "@webassemblyjs/helper-api-error": "1.11.1", |
|
598 |
+ "@webassemblyjs/floating-point-hex-parser": "1.11.6", |
|
599 |
+ "@webassemblyjs/helper-api-error": "1.11.6", |
|
602 | 600 |
"@xtuc/long": "4.2.2" |
603 | 601 |
} |
604 | 602 |
}, |
605 | 603 |
"node_modules/@webassemblyjs/helper-wasm-bytecode": { |
606 |
- "version": "1.11.1", |
|
607 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", |
|
608 |
- "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", |
|
609 |
- "license": "MIT" |
|
604 |
+ "version": "1.11.6", |
|
605 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", |
|
606 |
+ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" |
|
610 | 607 |
}, |
611 | 608 |
"node_modules/@webassemblyjs/helper-wasm-section": { |
612 |
- "version": "1.11.1", |
|
613 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", |
|
614 |
- "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", |
|
615 |
- "license": "MIT", |
|
609 |
+ "version": "1.12.1", |
|
610 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", |
|
611 |
+ "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", |
|
616 | 612 |
"dependencies": { |
617 |
- "@webassemblyjs/ast": "1.11.1", |
|
618 |
- "@webassemblyjs/helper-buffer": "1.11.1", |
|
619 |
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1", |
|
620 |
- "@webassemblyjs/wasm-gen": "1.11.1" |
|
613 |
+ "@webassemblyjs/ast": "1.12.1", |
|
614 |
+ "@webassemblyjs/helper-buffer": "1.12.1", |
|
615 |
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6", |
|
616 |
+ "@webassemblyjs/wasm-gen": "1.12.1" |
|
621 | 617 |
} |
622 | 618 |
}, |
623 | 619 |
"node_modules/@webassemblyjs/ieee754": { |
624 |
- "version": "1.11.1", |
|
625 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", |
|
626 |
- "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", |
|
627 |
- "license": "MIT", |
|
620 |
+ "version": "1.11.6", |
|
621 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", |
|
622 |
+ "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", |
|
628 | 623 |
"dependencies": { |
629 | 624 |
"@xtuc/ieee754": "^1.2.0" |
630 | 625 |
} |
631 | 626 |
}, |
632 | 627 |
"node_modules/@webassemblyjs/leb128": { |
633 |
- "version": "1.11.1", |
|
634 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", |
|
635 |
- "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", |
|
636 |
- "license": "Apache-2.0", |
|
628 |
+ "version": "1.11.6", |
|
629 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", |
|
630 |
+ "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", |
|
637 | 631 |
"dependencies": { |
638 | 632 |
"@xtuc/long": "4.2.2" |
639 | 633 |
} |
640 | 634 |
}, |
641 | 635 |
"node_modules/@webassemblyjs/utf8": { |
642 |
- "version": "1.11.1", |
|
643 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", |
|
644 |
- "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", |
|
645 |
- "license": "MIT" |
|
636 |
+ "version": "1.11.6", |
|
637 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", |
|
638 |
+ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" |
|
646 | 639 |
}, |
647 | 640 |
"node_modules/@webassemblyjs/wasm-edit": { |
648 |
- "version": "1.11.1", |
|
649 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", |
|
650 |
- "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", |
|
651 |
- "license": "MIT", |
|
641 |
+ "version": "1.12.1", |
|
642 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", |
|
643 |
+ "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", |
|
652 | 644 |
"dependencies": { |
653 |
- "@webassemblyjs/ast": "1.11.1", |
|
654 |
- "@webassemblyjs/helper-buffer": "1.11.1", |
|
655 |
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1", |
|
656 |
- "@webassemblyjs/helper-wasm-section": "1.11.1", |
|
657 |
- "@webassemblyjs/wasm-gen": "1.11.1", |
|
658 |
- "@webassemblyjs/wasm-opt": "1.11.1", |
|
659 |
- "@webassemblyjs/wasm-parser": "1.11.1", |
|
660 |
- "@webassemblyjs/wast-printer": "1.11.1" |
|
645 |
+ "@webassemblyjs/ast": "1.12.1", |
|
646 |
+ "@webassemblyjs/helper-buffer": "1.12.1", |
|
647 |
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6", |
|
648 |
+ "@webassemblyjs/helper-wasm-section": "1.12.1", |
|
649 |
+ "@webassemblyjs/wasm-gen": "1.12.1", |
|
650 |
+ "@webassemblyjs/wasm-opt": "1.12.1", |
|
651 |
+ "@webassemblyjs/wasm-parser": "1.12.1", |
|
652 |
+ "@webassemblyjs/wast-printer": "1.12.1" |
|
661 | 653 |
} |
662 | 654 |
}, |
663 | 655 |
"node_modules/@webassemblyjs/wasm-gen": { |
664 |
- "version": "1.11.1", |
|
665 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", |
|
666 |
- "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", |
|
667 |
- "license": "MIT", |
|
656 |
+ "version": "1.12.1", |
|
657 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", |
|
658 |
+ "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", |
|
668 | 659 |
"dependencies": { |
669 |
- "@webassemblyjs/ast": "1.11.1", |
|
670 |
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1", |
|
671 |
- "@webassemblyjs/ieee754": "1.11.1", |
|
672 |
- "@webassemblyjs/leb128": "1.11.1", |
|
673 |
- "@webassemblyjs/utf8": "1.11.1" |
|
660 |
+ "@webassemblyjs/ast": "1.12.1", |
|
661 |
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6", |
|
662 |
+ "@webassemblyjs/ieee754": "1.11.6", |
|
663 |
+ "@webassemblyjs/leb128": "1.11.6", |
|
664 |
+ "@webassemblyjs/utf8": "1.11.6" |
|
674 | 665 |
} |
675 | 666 |
}, |
676 | 667 |
"node_modules/@webassemblyjs/wasm-opt": { |
677 |
- "version": "1.11.1", |
|
678 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", |
|
679 |
- "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", |
|
680 |
- "license": "MIT", |
|
668 |
+ "version": "1.12.1", |
|
669 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", |
|
670 |
+ "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", |
|
681 | 671 |
"dependencies": { |
682 |
- "@webassemblyjs/ast": "1.11.1", |
|
683 |
- "@webassemblyjs/helper-buffer": "1.11.1", |
|
684 |
- "@webassemblyjs/wasm-gen": "1.11.1", |
|
685 |
- "@webassemblyjs/wasm-parser": "1.11.1" |
|
672 |
+ "@webassemblyjs/ast": "1.12.1", |
|
673 |
+ "@webassemblyjs/helper-buffer": "1.12.1", |
|
674 |
+ "@webassemblyjs/wasm-gen": "1.12.1", |
|
675 |
+ "@webassemblyjs/wasm-parser": "1.12.1" |
|
686 | 676 |
} |
687 | 677 |
}, |
688 | 678 |
"node_modules/@webassemblyjs/wasm-parser": { |
689 |
- "version": "1.11.1", |
|
690 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", |
|
691 |
- "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", |
|
692 |
- "license": "MIT", |
|
679 |
+ "version": "1.12.1", |
|
680 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", |
|
681 |
+ "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", |
|
693 | 682 |
"dependencies": { |
694 |
- "@webassemblyjs/ast": "1.11.1", |
|
695 |
- "@webassemblyjs/helper-api-error": "1.11.1", |
|
696 |
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1", |
|
697 |
- "@webassemblyjs/ieee754": "1.11.1", |
|
698 |
- "@webassemblyjs/leb128": "1.11.1", |
|
699 |
- "@webassemblyjs/utf8": "1.11.1" |
|
683 |
+ "@webassemblyjs/ast": "1.12.1", |
|
684 |
+ "@webassemblyjs/helper-api-error": "1.11.6", |
|
685 |
+ "@webassemblyjs/helper-wasm-bytecode": "1.11.6", |
|
686 |
+ "@webassemblyjs/ieee754": "1.11.6", |
|
687 |
+ "@webassemblyjs/leb128": "1.11.6", |
|
688 |
+ "@webassemblyjs/utf8": "1.11.6" |
|
700 | 689 |
} |
701 | 690 |
}, |
702 | 691 |
"node_modules/@webassemblyjs/wast-printer": { |
703 |
- "version": "1.11.1", |
|
704 |
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", |
|
705 |
- "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", |
|
706 |
- "license": "MIT", |
|
692 |
+ "version": "1.12.1", |
|
693 |
+ "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", |
|
694 |
+ "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", |
|
707 | 695 |
"dependencies": { |
708 |
- "@webassemblyjs/ast": "1.11.1", |
|
696 |
+ "@webassemblyjs/ast": "1.12.1", |
|
709 | 697 |
"@xtuc/long": "4.2.2" |
710 | 698 |
} |
711 | 699 |
}, |
712 | 700 |
"node_modules/@webpack-cli/configtest": { |
713 |
- "version": "1.2.0", |
|
714 |
- "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", |
|
715 |
- "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", |
|
716 |
- "license": "MIT", |
|
701 |
+ "version": "2.1.1", |
|
702 |
+ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", |
|
703 |
+ "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", |
|
704 |
+ "dev": true, |
|
705 |
+ "engines": { |
|
706 |
+ "node": ">=14.15.0" |
|
707 |
+ }, |
|
717 | 708 |
"peerDependencies": { |
718 |
- "webpack": "4.x.x || 5.x.x", |
|
719 |
- "webpack-cli": "4.x.x" |
|
709 |
+ "webpack": "5.x.x", |
|
710 |
+ "webpack-cli": "5.x.x" |
|
720 | 711 |
} |
721 | 712 |
}, |
722 | 713 |
"node_modules/@webpack-cli/info": { |
723 |
- "version": "1.5.0", |
|
724 |
- "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.5.0.tgz", |
|
725 |
- "integrity": "sha512-e8tSXZpw2hPl2uMJY6fsMswaok5FdlGNRTktvFk2sD8RjH0hE2+XistawJx1vmKteh4NmGmNUrp+Tb2w+udPcQ==", |
|
726 |
- "license": "MIT", |
|
727 |
- "dependencies": { |
|
728 |
- "envinfo": "^7.7.3" |
|
714 |
+ "version": "2.0.2", |
|
715 |
+ "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", |
|
716 |
+ "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", |
|
717 |
+ "dev": true, |
|
718 |
+ "engines": { |
|
719 |
+ "node": ">=14.15.0" |
|
729 | 720 |
}, |
730 | 721 |
"peerDependencies": { |
731 |
- "webpack-cli": "4.x.x" |
|
722 |
+ "webpack": "5.x.x", |
|
723 |
+ "webpack-cli": "5.x.x" |
|
732 | 724 |
} |
733 | 725 |
}, |
734 | 726 |
"node_modules/@webpack-cli/serve": { |
735 |
- "version": "1.7.0", |
|
736 |
- "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", |
|
737 |
- "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", |
|
738 |
- "license": "MIT", |
|
727 |
+ "version": "2.0.5", |
|
728 |
+ "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", |
|
729 |
+ "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", |
|
730 |
+ "dev": true, |
|
731 |
+ "engines": { |
|
732 |
+ "node": ">=14.15.0" |
|
733 |
+ }, |
|
739 | 734 |
"peerDependencies": { |
740 |
- "webpack-cli": "4.x.x" |
|
735 |
+ "webpack": "5.x.x", |
|
736 |
+ "webpack-cli": "5.x.x" |
|
741 | 737 |
}, |
742 | 738 |
"peerDependenciesMeta": { |
743 | 739 |
"webpack-dev-server": { |
... | ... | @@ -748,14 +744,12 @@ |
748 | 744 |
"node_modules/@xtuc/ieee754": { |
749 | 745 |
"version": "1.2.0", |
750 | 746 |
"resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", |
751 |
- "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", |
|
752 |
- "license": "BSD-3-Clause" |
|
747 |
+ "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" |
|
753 | 748 |
}, |
754 | 749 |
"node_modules/@xtuc/long": { |
755 | 750 |
"version": "4.2.2", |
756 | 751 |
"resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", |
757 |
- "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", |
|
758 |
- "license": "Apache-2.0" |
|
752 |
+ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" |
|
759 | 753 |
}, |
760 | 754 |
"node_modules/accepts": { |
761 | 755 |
"version": "1.3.8", |
... | ... | @@ -782,11 +776,10 @@ |
782 | 776 |
"node": ">=0.4.0" |
783 | 777 |
} |
784 | 778 |
}, |
785 |
- "node_modules/acorn-import-assertions": { |
|
786 |
- "version": "1.9.0", |
|
787 |
- "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", |
|
788 |
- "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", |
|
789 |
- "license": "MIT", |
|
779 |
+ "node_modules/acorn-import-attributes": { |
|
780 |
+ "version": "1.9.5", |
|
781 |
+ "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", |
|
782 |
+ "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", |
|
790 | 783 |
"peerDependencies": { |
791 | 784 |
"acorn": "^8" |
792 | 785 |
} |
... | ... | @@ -1134,6 +1127,7 @@ |
1134 | 1127 |
"version": "4.0.1", |
1135 | 1128 |
"resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", |
1136 | 1129 |
"integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", |
1130 |
+ "dev": true, |
|
1137 | 1131 |
"license": "MIT", |
1138 | 1132 |
"dependencies": { |
1139 | 1133 |
"is-plain-object": "^2.0.4", |
... | ... | @@ -1163,6 +1157,7 @@ |
1163 | 1157 |
"version": "2.0.20", |
1164 | 1158 |
"resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", |
1165 | 1159 |
"integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", |
1160 |
+ "dev": true, |
|
1166 | 1161 |
"license": "MIT" |
1167 | 1162 |
}, |
1168 | 1163 |
"node_modules/combined-stream": { |
... | ... | @@ -1190,6 +1185,11 @@ |
1190 | 1185 |
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", |
1191 | 1186 |
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", |
1192 | 1187 |
"license": "MIT" |
1188 |
+ }, |
|
1189 |
+ "node_modules/compress.js": { |
|
1190 |
+ "version": "2.1.2", |
|
1191 |
+ "resolved": "https://registry.npmjs.org/compress.js/-/compress.js-2.1.2.tgz", |
|
1192 |
+ "integrity": "sha512-DBb6M4wwe0rRAPeiKQ8HJrWuocVppUw9Qte4rEXiDrc5X3TrzeRKLzpvSE9oZ0Nd4HTXSSFphj3/XWwuptkQqw==" |
|
1193 | 1193 |
}, |
1194 | 1194 |
"node_modules/concat-map": { |
1195 | 1195 |
"version": "0.0.1", |
... | ... | @@ -1243,6 +1243,7 @@ |
1243 | 1243 |
"version": "7.0.3", |
1244 | 1244 |
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", |
1245 | 1245 |
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", |
1246 |
+ "dev": true, |
|
1246 | 1247 |
"license": "MIT", |
1247 | 1248 |
"dependencies": { |
1248 | 1249 |
"path-key": "^3.1.0", |
... | ... | @@ -1417,7 +1418,7 @@ |
1417 | 1418 |
"version": "7.13.0", |
1418 | 1419 |
"resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", |
1419 | 1420 |
"integrity": "sha512-cvcaMr7KqXVh4nyzGTVqTum+gAiL265x5jUWQIDLq//zOGbW+gSW/C+OWLleY/rs9Qole6AZLMXPbtIFQbqu+Q==", |
1420 |
- "license": "MIT", |
|
1421 |
+ "dev": true, |
|
1421 | 1422 |
"bin": { |
1422 | 1423 |
"envinfo": "dist/cli.js" |
1423 | 1424 |
}, |
... | ... | @@ -1447,10 +1448,9 @@ |
1447 | 1448 |
} |
1448 | 1449 |
}, |
1449 | 1450 |
"node_modules/es-module-lexer": { |
1450 |
- "version": "0.9.3", |
|
1451 |
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", |
|
1452 |
- "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", |
|
1453 |
- "license": "MIT" |
|
1451 |
+ "version": "1.5.4", |
|
1452 |
+ "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", |
|
1453 |
+ "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==" |
|
1454 | 1454 |
}, |
1455 | 1455 |
"node_modules/es6-promise": { |
1456 | 1456 |
"version": "4.2.8", |
... | ... | @@ -1645,6 +1645,7 @@ |
1645 | 1645 |
"version": "1.0.16", |
1646 | 1646 |
"resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", |
1647 | 1647 |
"integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", |
1648 |
+ "dev": true, |
|
1648 | 1649 |
"license": "MIT", |
1649 | 1650 |
"engines": { |
1650 | 1651 |
"node": ">= 4.9.1" |
... | ... | @@ -1783,6 +1784,7 @@ |
1783 | 1784 |
"version": "5.0.2", |
1784 | 1785 |
"resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", |
1785 | 1786 |
"integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", |
1787 |
+ "dev": true, |
|
1786 | 1788 |
"license": "BSD-3-Clause", |
1787 | 1789 |
"bin": { |
1788 | 1790 |
"flat": "cli.js" |
... | ... | @@ -2081,6 +2083,7 @@ |
2081 | 2083 |
"version": "3.2.0", |
2082 | 2084 |
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", |
2083 | 2085 |
"integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", |
2086 |
+ "dev": true, |
|
2084 | 2087 |
"license": "MIT", |
2085 | 2088 |
"dependencies": { |
2086 | 2089 |
"pkg-dir": "^4.2.0", |
... | ... | @@ -2114,12 +2117,12 @@ |
2114 | 2117 |
"license": "ISC" |
2115 | 2118 |
}, |
2116 | 2119 |
"node_modules/interpret": { |
2117 |
- "version": "2.2.0", |
|
2118 |
- "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", |
|
2119 |
- "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", |
|
2120 |
- "license": "MIT", |
|
2120 |
+ "version": "3.1.1", |
|
2121 |
+ "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", |
|
2122 |
+ "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", |
|
2123 |
+ "dev": true, |
|
2121 | 2124 |
"engines": { |
2122 |
- "node": ">= 0.10" |
|
2125 |
+ "node": ">=10.13.0" |
|
2123 | 2126 |
} |
2124 | 2127 |
}, |
2125 | 2128 |
"node_modules/ipaddr.js": { |
... | ... | @@ -2148,7 +2151,7 @@ |
2148 | 2151 |
"version": "2.15.0", |
2149 | 2152 |
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", |
2150 | 2153 |
"integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", |
2151 |
- "license": "MIT", |
|
2154 |
+ "dev": true, |
|
2152 | 2155 |
"dependencies": { |
2153 | 2156 |
"hasown": "^2.0.2" |
2154 | 2157 |
}, |
... | ... | @@ -2196,6 +2199,7 @@ |
2196 | 2199 |
"version": "2.0.4", |
2197 | 2200 |
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", |
2198 | 2201 |
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", |
2202 |
+ "dev": true, |
|
2199 | 2203 |
"license": "MIT", |
2200 | 2204 |
"dependencies": { |
2201 | 2205 |
"isobject": "^3.0.1" |
... | ... | @@ -2208,12 +2212,14 @@ |
2208 | 2212 |
"version": "2.0.0", |
2209 | 2213 |
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", |
2210 | 2214 |
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", |
2215 |
+ "dev": true, |
|
2211 | 2216 |
"license": "ISC" |
2212 | 2217 |
}, |
2213 | 2218 |
"node_modules/isobject": { |
2214 | 2219 |
"version": "3.0.1", |
2215 | 2220 |
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", |
2216 | 2221 |
"integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", |
2222 |
+ "dev": true, |
|
2217 | 2223 |
"license": "MIT", |
2218 | 2224 |
"engines": { |
2219 | 2225 |
"node": ">=0.10.0" |
... | ... | @@ -2303,6 +2309,7 @@ |
2303 | 2309 |
"version": "6.0.3", |
2304 | 2310 |
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", |
2305 | 2311 |
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", |
2312 |
+ "dev": true, |
|
2306 | 2313 |
"license": "MIT", |
2307 | 2314 |
"engines": { |
2308 | 2315 |
"node": ">=0.10.0" |
... | ... | @@ -2634,6 +2641,7 @@ |
2634 | 2641 |
"version": "3.1.1", |
2635 | 2642 |
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", |
2636 | 2643 |
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", |
2644 |
+ "dev": true, |
|
2637 | 2645 |
"license": "MIT", |
2638 | 2646 |
"engines": { |
2639 | 2647 |
"node": ">=8" |
... | ... | @@ -2643,7 +2651,7 @@ |
2643 | 2651 |
"version": "1.0.7", |
2644 | 2652 |
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", |
2645 | 2653 |
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", |
2646 |
- "license": "MIT" |
|
2654 |
+ "dev": true |
|
2647 | 2655 |
}, |
2648 | 2656 |
"node_modules/path-to-regexp": { |
2649 | 2657 |
"version": "0.1.7", |
... | ... | @@ -3006,22 +3014,22 @@ |
3006 | 3014 |
} |
3007 | 3015 |
}, |
3008 | 3016 |
"node_modules/rechoir": { |
3009 |
- "version": "0.7.1", |
|
3010 |
- "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", |
|
3011 |
- "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", |
|
3012 |
- "license": "MIT", |
|
3017 |
+ "version": "0.8.0", |
|
3018 |
+ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", |
|
3019 |
+ "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", |
|
3020 |
+ "dev": true, |
|
3013 | 3021 |
"dependencies": { |
3014 |
- "resolve": "^1.9.0" |
|
3022 |
+ "resolve": "^1.20.0" |
|
3015 | 3023 |
}, |
3016 | 3024 |
"engines": { |
3017 |
- "node": ">= 0.10" |
|
3025 |
+ "node": ">= 10.13.0" |
|
3018 | 3026 |
} |
3019 | 3027 |
}, |
3020 | 3028 |
"node_modules/resolve": { |
3021 | 3029 |
"version": "1.22.8", |
3022 | 3030 |
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", |
3023 | 3031 |
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", |
3024 |
- "license": "MIT", |
|
3032 |
+ "dev": true, |
|
3025 | 3033 |
"dependencies": { |
3026 | 3034 |
"is-core-module": "^2.13.0", |
3027 | 3035 |
"path-parse": "^1.0.7", |
... | ... | @@ -3038,6 +3046,7 @@ |
3038 | 3046 |
"version": "3.0.0", |
3039 | 3047 |
"resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", |
3040 | 3048 |
"integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", |
3049 |
+ "dev": true, |
|
3041 | 3050 |
"license": "MIT", |
3042 | 3051 |
"dependencies": { |
3043 | 3052 |
"resolve-from": "^5.0.0" |
... | ... | @@ -3050,6 +3059,7 @@ |
3050 | 3059 |
"version": "5.0.0", |
3051 | 3060 |
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", |
3052 | 3061 |
"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", |
3062 |
+ "dev": true, |
|
3053 | 3063 |
"license": "MIT", |
3054 | 3064 |
"engines": { |
3055 | 3065 |
"node": ">=8" |
... | ... | @@ -3204,6 +3214,7 @@ |
3204 | 3214 |
"version": "3.0.1", |
3205 | 3215 |
"resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", |
3206 | 3216 |
"integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", |
3217 |
+ "dev": true, |
|
3207 | 3218 |
"license": "MIT", |
3208 | 3219 |
"dependencies": { |
3209 | 3220 |
"kind-of": "^6.0.2" |
... | ... | @@ -3216,6 +3227,7 @@ |
3216 | 3227 |
"version": "2.0.0", |
3217 | 3228 |
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", |
3218 | 3229 |
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", |
3230 |
+ "dev": true, |
|
3219 | 3231 |
"license": "MIT", |
3220 | 3232 |
"dependencies": { |
3221 | 3233 |
"shebang-regex": "^3.0.0" |
... | ... | @@ -3228,6 +3240,7 @@ |
3228 | 3240 |
"version": "3.0.0", |
3229 | 3241 |
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", |
3230 | 3242 |
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", |
3243 |
+ "dev": true, |
|
3231 | 3244 |
"license": "MIT", |
3232 | 3245 |
"engines": { |
3233 | 3246 |
"node": ">=8" |
... | ... | @@ -3329,7 +3342,7 @@ |
3329 | 3342 |
"version": "1.0.0", |
3330 | 3343 |
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", |
3331 | 3344 |
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", |
3332 |
- "license": "MIT", |
|
3345 |
+ "dev": true, |
|
3333 | 3346 |
"engines": { |
3334 | 3347 |
"node": ">= 0.4" |
3335 | 3348 |
}, |
... | ... | @@ -3761,7 +3774,6 @@ |
3761 | 3774 |
"version": "4.1.0", |
3762 | 3775 |
"resolved": "https://registry.npmjs.org/vuex/-/vuex-4.1.0.tgz", |
3763 | 3776 |
"integrity": "sha512-hmV6UerDrPcgbSy9ORAtNXDr9M4wlNP4pEFKye4ujJF8oqgFFuxDCdOLS3eNoRTtq5O3hoBDh9Doj1bQMYHRbQ==", |
3764 |
- "license": "MIT", |
|
3765 | 3777 |
"dependencies": { |
3766 | 3778 |
"@vue/devtools-api": "^6.0.0-beta.11" |
3767 | 3779 |
}, |
... | ... | @@ -3783,34 +3795,33 @@ |
3783 | 3795 |
} |
3784 | 3796 |
}, |
3785 | 3797 |
"node_modules/webpack": { |
3786 |
- "version": "5.74.0", |
|
3787 |
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.74.0.tgz", |
|
3788 |
- "integrity": "sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA==", |
|
3789 |
- "license": "MIT", |
|
3798 |
+ "version": "5.93.0", |
|
3799 |
+ "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.93.0.tgz", |
|
3800 |
+ "integrity": "sha512-Y0m5oEY1LRuwly578VqluorkXbvXKh7U3rLoQCEO04M97ScRr44afGVkI0FQFsXzysk5OgFAxjZAb9rsGQVihA==", |
|
3790 | 3801 |
"dependencies": { |
3791 | 3802 |
"@types/eslint-scope": "^3.7.3", |
3792 |
- "@types/estree": "^0.0.51", |
|
3793 |
- "@webassemblyjs/ast": "1.11.1", |
|
3794 |
- "@webassemblyjs/wasm-edit": "1.11.1", |
|
3795 |
- "@webassemblyjs/wasm-parser": "1.11.1", |
|
3803 |
+ "@types/estree": "^1.0.5", |
|
3804 |
+ "@webassemblyjs/ast": "^1.12.1", |
|
3805 |
+ "@webassemblyjs/wasm-edit": "^1.12.1", |
|
3806 |
+ "@webassemblyjs/wasm-parser": "^1.12.1", |
|
3796 | 3807 |
"acorn": "^8.7.1", |
3797 |
- "acorn-import-assertions": "^1.7.6", |
|
3798 |
- "browserslist": "^4.14.5", |
|
3808 |
+ "acorn-import-attributes": "^1.9.5", |
|
3809 |
+ "browserslist": "^4.21.10", |
|
3799 | 3810 |
"chrome-trace-event": "^1.0.2", |
3800 |
- "enhanced-resolve": "^5.10.0", |
|
3801 |
- "es-module-lexer": "^0.9.0", |
|
3811 |
+ "enhanced-resolve": "^5.17.0", |
|
3812 |
+ "es-module-lexer": "^1.2.1", |
|
3802 | 3813 |
"eslint-scope": "5.1.1", |
3803 | 3814 |
"events": "^3.2.0", |
3804 | 3815 |
"glob-to-regexp": "^0.4.1", |
3805 |
- "graceful-fs": "^4.2.9", |
|
3816 |
+ "graceful-fs": "^4.2.11", |
|
3806 | 3817 |
"json-parse-even-better-errors": "^2.3.1", |
3807 | 3818 |
"loader-runner": "^4.2.0", |
3808 | 3819 |
"mime-types": "^2.1.27", |
3809 | 3820 |
"neo-async": "^2.6.2", |
3810 |
- "schema-utils": "^3.1.0", |
|
3821 |
+ "schema-utils": "^3.2.0", |
|
3811 | 3822 |
"tapable": "^2.1.1", |
3812 |
- "terser-webpack-plugin": "^5.1.3", |
|
3813 |
- "watchpack": "^2.4.0", |
|
3823 |
+ "terser-webpack-plugin": "^5.3.10", |
|
3824 |
+ "watchpack": "^2.4.1", |
|
3814 | 3825 |
"webpack-sources": "^3.2.3" |
3815 | 3826 |
}, |
3816 | 3827 |
"bin": { |
... | ... | @@ -3830,42 +3841,40 @@ |
3830 | 3841 |
} |
3831 | 3842 |
}, |
3832 | 3843 |
"node_modules/webpack-cli": { |
3833 |
- "version": "4.10.0", |
|
3834 |
- "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.10.0.tgz", |
|
3835 |
- "integrity": "sha512-NLhDfH/h4O6UOy+0LSso42xvYypClINuMNBVVzX4vX98TmTaTUxwRbXdhucbFMd2qLaCTcLq/PdYrvi8onw90w==", |
|
3836 |
- "license": "MIT", |
|
3844 |
+ "version": "5.1.4", |
|
3845 |
+ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", |
|
3846 |
+ "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", |
|
3847 |
+ "dev": true, |
|
3837 | 3848 |
"dependencies": { |
3838 | 3849 |
"@discoveryjs/json-ext": "^0.5.0", |
3839 |
- "@webpack-cli/configtest": "^1.2.0", |
|
3840 |
- "@webpack-cli/info": "^1.5.0", |
|
3841 |
- "@webpack-cli/serve": "^1.7.0", |
|
3850 |
+ "@webpack-cli/configtest": "^2.1.1", |
|
3851 |
+ "@webpack-cli/info": "^2.0.2", |
|
3852 |
+ "@webpack-cli/serve": "^2.0.5", |
|
3842 | 3853 |
"colorette": "^2.0.14", |
3843 |
- "commander": "^7.0.0", |
|
3854 |
+ "commander": "^10.0.1", |
|
3844 | 3855 |
"cross-spawn": "^7.0.3", |
3856 |
+ "envinfo": "^7.7.3", |
|
3845 | 3857 |
"fastest-levenshtein": "^1.0.12", |
3846 | 3858 |
"import-local": "^3.0.2", |
3847 |
- "interpret": "^2.2.0", |
|
3848 |
- "rechoir": "^0.7.0", |
|
3859 |
+ "interpret": "^3.1.1", |
|
3860 |
+ "rechoir": "^0.8.0", |
|
3849 | 3861 |
"webpack-merge": "^5.7.3" |
3850 | 3862 |
}, |
3851 | 3863 |
"bin": { |
3852 | 3864 |
"webpack-cli": "bin/cli.js" |
3853 | 3865 |
}, |
3854 | 3866 |
"engines": { |
3855 |
- "node": ">=10.13.0" |
|
3867 |
+ "node": ">=14.15.0" |
|
3856 | 3868 |
}, |
3857 | 3869 |
"funding": { |
3858 | 3870 |
"type": "opencollective", |
3859 | 3871 |
"url": "https://opencollective.com/webpack" |
3860 | 3872 |
}, |
3861 | 3873 |
"peerDependencies": { |
3862 |
- "webpack": "4.x.x || 5.x.x" |
|
3874 |
+ "webpack": "5.x.x" |
|
3863 | 3875 |
}, |
3864 | 3876 |
"peerDependenciesMeta": { |
3865 | 3877 |
"@webpack-cli/generators": { |
3866 |
- "optional": true |
|
3867 |
- }, |
|
3868 |
- "@webpack-cli/migrate": { |
|
3869 | 3878 |
"optional": true |
3870 | 3879 |
}, |
3871 | 3880 |
"webpack-bundle-analyzer": { |
... | ... | @@ -3877,18 +3886,19 @@ |
3877 | 3886 |
} |
3878 | 3887 |
}, |
3879 | 3888 |
"node_modules/webpack-cli/node_modules/commander": { |
3880 |
- "version": "7.2.0", |
|
3881 |
- "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", |
|
3882 |
- "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", |
|
3883 |
- "license": "MIT", |
|
3889 |
+ "version": "10.0.1", |
|
3890 |
+ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", |
|
3891 |
+ "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", |
|
3892 |
+ "dev": true, |
|
3884 | 3893 |
"engines": { |
3885 |
- "node": ">= 10" |
|
3894 |
+ "node": ">=14" |
|
3886 | 3895 |
} |
3887 | 3896 |
}, |
3888 | 3897 |
"node_modules/webpack-merge": { |
3889 | 3898 |
"version": "5.10.0", |
3890 | 3899 |
"resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", |
3891 | 3900 |
"integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", |
3901 |
+ "dev": true, |
|
3892 | 3902 |
"license": "MIT", |
3893 | 3903 |
"dependencies": { |
3894 | 3904 |
"clone-deep": "^4.0.1", |
... | ... | @@ -3930,6 +3940,7 @@ |
3930 | 3940 |
"version": "2.0.2", |
3931 | 3941 |
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", |
3932 | 3942 |
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", |
3943 |
+ "dev": true, |
|
3933 | 3944 |
"license": "ISC", |
3934 | 3945 |
"dependencies": { |
3935 | 3946 |
"isexe": "^2.0.0" |
... | ... | @@ -3945,6 +3956,7 @@ |
3945 | 3956 |
"version": "2.0.1", |
3946 | 3957 |
"resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", |
3947 | 3958 |
"integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", |
3959 |
+ "dev": true, |
|
3948 | 3960 |
"license": "MIT" |
3949 | 3961 |
}, |
3950 | 3962 |
"node_modules/wrappy": { |
--- package.json
+++ package.json
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 |
"@mdi/light-js": "^0.2.63", |
8 | 8 |
"axios": "^1.7.3", |
9 | 9 |
"babel-loader": "8.2.5", |
10 |
+ "compress.js": "^2.1.2", |
|
10 | 11 |
"css-loader": "6.7.1", |
11 | 12 |
"express": "^4.18.1", |
12 | 13 |
"express-http-proxy": "^2.0.0", |
... | ... | @@ -20,9 +21,7 @@ |
20 | 21 |
"vue-router": "4.1.5", |
21 | 22 |
"vue-style-loader": "4.1.3", |
22 | 23 |
"vue3-sfc-loader": "^0.8.4", |
23 |
- "vuex": "^4.1.0", |
|
24 |
- "webpack": "5.74.0", |
|
25 |
- "webpack-cli": "4.10.0" |
|
24 |
+ "vuex": "^4.1.0" |
|
26 | 25 |
}, |
27 | 26 |
"scripts": { |
28 | 27 |
"prod": "set NODE_ENV=production&&node ./server/modules/web/server.js", |
... | ... | @@ -33,5 +32,9 @@ |
33 | 32 |
"linux-dev": "export NODE_ENV=development&&node ./server/modules/web/server.js", |
34 | 33 |
"webpack-build": "webpack", |
35 | 34 |
"webpack-build-watch": "webpack --watch" |
35 |
+ }, |
|
36 |
+ "devDependencies": { |
|
37 |
+ "webpack": "^5.93.0", |
|
38 |
+ "webpack-cli": "^5.1.4" |
|
36 | 39 |
} |
37 | 40 |
} |
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?