![](/assets/images/project_default_logo.png)
![](/assets/images/default-avatar-128.png)
240910 정다정 사이드바&헤더 수정
@0a3468aa5a1fb2fbdc1bb33a518d62f28a0836f9
--- client/views/layout/Header.vue
+++ client/views/layout/Header.vue
... | ... | @@ -1,211 +1,227 @@ |
1 | 1 |
<template> |
2 |
- <div class="header flex justify-end"> |
|
3 |
- <div class="setting" @click="logout"> |
|
4 |
- <img src="../../resources/img/setting.png" alt="" /> |
|
5 |
- </div> |
|
6 |
- <div class="notice" @click="buttonSearch"> |
|
7 |
- <img src="../../resources/img/icon2.png" alt="" /> |
|
8 |
- <p>{{ unCheck }}</p> |
|
9 |
- </div> |
|
10 |
- <img src="../../resources/img/img03.png" alt="" /> |
|
11 |
- <div class="popup-wrap" v-show="searchOpen"> |
|
12 |
- <div class="popup-box"> |
|
13 |
- <div class="flex mb10 justify-between"> |
|
14 |
- <p class="popup-title">알림</p> |
|
15 |
- <button type="button" class="popup-close-btn" @click="closeBtn"> |
|
16 |
- <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
17 |
- </button> |
|
2 |
+ <div class="header flex justify-between align-center header-box"> |
|
3 |
+ <div> |
|
4 |
+ <router-link to="/MyPlan.page"> |
|
5 |
+ <div class="logo"><img src="../../resources/img/logo2.png" alt="" /></div> |
|
6 |
+ </router-link> |
|
18 | 7 |
</div> |
19 |
- <article class="flex justify-between mt20" v-for="(item, index) in dataList" :key="item.id" |
|
20 |
- :class="{ 'selected-row': selectedRow == item.dataList }"> |
|
21 |
- <img style="width: fit-content" src="../../resources/img/img200_13p.png" alt="" /> |
|
22 |
- <p class="title1 ml20" style="width: 60%">{{ item.bbsTtl }}</p> |
|
23 |
- <button @click="buttonSearch2(item)" type="button" title="글쓰기" class="new-btn"> |
|
24 |
- 자세히 보기 |
|
25 |
- </button> |
|
26 |
- </article> |
|
27 |
- <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px"> |
|
28 |
- <button @click="previousPage" :disabled="page === 1">이전</button> |
|
29 |
- <button class="selected-btn">{{ page }}</button> |
|
30 |
- <button @click="nextPage" :disabled="page === totalPages"> |
|
31 |
- 다음 |
|
32 |
- </button> |
|
33 |
- </article> |
|
34 |
- </div> |
|
8 |
+ <div class="flex align-center"> |
|
9 |
+ <Menu :currentRoute="$route.path"></Menu> |
|
10 |
+ <div class="notice" @click="buttonSearch"> |
|
11 |
+ <img src="../../resources/img/icon2.png" alt="" /> |
|
12 |
+ <p>{{ unCheck }}</p> |
|
13 |
+ </div> |
|
14 |
+ <img src="../../resources/img/new_img/profile_img.png" alt="" /> |
|
15 |
+ <div class="look-btn" @click="logout"> |
|
16 |
+ <img src="../../resources/img/new_img/icon/logout_icon.png" alt="" /> |
|
17 |
+ </div> |
|
18 |
+ <div class="popup-wrap" v-show="searchOpen"> |
|
19 |
+ <div class="popup-box"> |
|
20 |
+ <div class="flex mb10 justify-between"> |
|
21 |
+ <p class="popup-title">알림</p> |
|
22 |
+ <button type="button" class="popup-close-btn" @click="closeBtn"> |
|
23 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
24 |
+ </button> |
|
25 |
+ </div> |
|
26 |
+ <article |
|
27 |
+ class="flex justify-between mt20" |
|
28 |
+ v-for="item in dataList" |
|
29 |
+ :key="item.id" |
|
30 |
+ :class="{ 'selected-row': selectedRow == item.dataList }" |
|
31 |
+ > |
|
32 |
+ <img style="width: fit-content" src="../../resources/img/img200_13p.png" alt="" /> |
|
33 |
+ <p class="title1 ml20" style="width: 60%">{{ item.bbsTtl }}</p> |
|
34 |
+ <button @click="buttonSearch2(item)" type="button" title="글쓰기" class="new-btn"> |
|
35 |
+ 자세히 보기 |
|
36 |
+ </button> |
|
37 |
+ </article> |
|
38 |
+ <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px"> |
|
39 |
+ <button @click="previousPage" :disabled="page === 1">이전</button> |
|
40 |
+ <button class="selected-btn">{{ page }}</button> |
|
41 |
+ <button @click="nextPage" :disabled="page === totalPages">다음</button> |
|
42 |
+ </article> |
|
43 |
+ </div> |
|
44 |
+ </div> |
|
45 |
+ <div class="popup-wrap popup2" v-show="searchOpen2"> |
|
46 |
+ <div class="popup-box"> |
|
47 |
+ <div class="flex mb10 justify-between"> |
|
48 |
+ <p class="popup-title">알림 자세히 보기</p> |
|
49 |
+ <button type="button" class="popup-close-btn" @click="closeBtn2"> |
|
50 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
51 |
+ </button> |
|
52 |
+ </div> |
|
53 |
+ <div class="board-wrap"> |
|
54 |
+ <div class="flex align-center"> |
|
55 |
+ <label for="" class="title2">{{ boardData.bbsTtl }}</label> |
|
56 |
+ </div> |
|
57 |
+ <hr /> |
|
58 |
+ <!-- <textarea readonly name="" id="">{{ boardData.bbsCnt }}</textarea> --> |
|
59 |
+ </div> |
|
60 |
+ <div class="flex justify-center mt20"> |
|
61 |
+ <button type="button" title="확인" class="new-btn" @click="closeBtn2">확인</button> |
|
62 |
+ </div> |
|
63 |
+ </div> |
|
64 |
+ </div> |
|
65 |
+ </div> |
|
35 | 66 |
</div> |
36 |
- <div class="popup-wrap popup2" v-show="searchOpen2"> |
|
37 |
- <div class="popup-box"> |
|
38 |
- <div class="flex mb10 justify-between"> |
|
39 |
- <p class="popup-title">알림 자세히 보기</p> |
|
40 |
- <button type="button" class="popup-close-btn" @click="closeBtn2"> |
|
41 |
- <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
42 |
- </button> |
|
43 |
- </div> |
|
44 |
- <div class="board-wrap"> |
|
45 |
- <div class="flex align-center"> |
|
46 |
- <label for="" class="title2">{{ boardData.bbsTtl }}</label> |
|
47 |
- </div> |
|
48 |
- <hr /> |
|
49 |
- <textarea readonly name="" id="">{{ boardData.bbsCnt }}</textarea> |
|
50 |
- </div> |
|
51 |
- <div class="flex justify-center mt20"> |
|
52 |
- <button type="button" title="확인" class="new-btn" @click="closeBtn2"> |
|
53 |
- 확인 |
|
54 |
- </button> |
|
55 |
- </div> |
|
56 |
- </div> |
|
57 |
- </div> |
|
58 |
- </div> |
|
59 | 67 |
</template> |
60 | 68 |
|
61 | 69 |
<script> |
62 |
-import SvgIcon from "@jamescoyle/vue-icon"; |
|
63 |
-import { mdiMagnify, mdiWindowClose } from "@mdi/js"; |
|
64 |
-import axios from "axios"; |
|
70 |
+import SvgIcon from '@jamescoyle/vue-icon'; |
|
71 |
+import { mdiMagnify, mdiWindowClose } from '@mdi/js'; |
|
72 |
+import axios from 'axios'; |
|
73 |
+import Menu from './Menu.vue'; |
|
65 | 74 |
export default { |
66 |
- data() { |
|
67 |
- return { |
|
68 |
- mdiWindowClose: mdiWindowClose, |
|
69 |
- showModal: false, |
|
70 |
- searchOpen: false, |
|
71 |
- searchOpen2: false, |
|
75 |
+ data() { |
|
76 |
+ return { |
|
77 |
+ mdiWindowClose: mdiWindowClose, |
|
78 |
+ showModal: false, |
|
79 |
+ searchOpen: false, |
|
80 |
+ searchOpen2: false, |
|
72 | 81 |
|
73 |
- // 게시글 정보 |
|
74 |
- dataList: [], |
|
75 |
- totalBoard: null, |
|
76 |
- selectedRow: "", |
|
77 |
- unCheck: null, |
|
82 |
+ // 게시글 정보 |
|
83 |
+ dataList: [], |
|
84 |
+ totalBoard: null, |
|
85 |
+ selectedRow: '', |
|
86 |
+ unCheck: null, |
|
78 | 87 |
|
79 |
- boardData: [], |
|
88 |
+ boardData: [], |
|
80 | 89 |
|
81 |
- // 페이징 정보 |
|
82 |
- page: 1, |
|
83 |
- pageSize: 2, |
|
84 |
- totalpages: null, |
|
90 |
+ // 페이징 정보 |
|
91 |
+ page: 1, |
|
92 |
+ pageSize: 2, |
|
93 |
+ totalpages: null, |
|
85 | 94 |
|
86 |
- // 사용자 정보 |
|
87 |
- userId: "USID_000000000000006", |
|
88 |
- stdId: "", |
|
89 |
- }; |
|
90 |
- }, |
|
91 |
- methods: { |
|
92 |
- closeModal() { |
|
93 |
- this.showModal = false; |
|
95 |
+ // 사용자 정보 |
|
96 |
+ userId: 'USID_000000000000006', |
|
97 |
+ stdId: '', |
|
98 |
+ }; |
|
94 | 99 |
}, |
95 |
- buttonSearch() { |
|
96 |
- this.searchOpen = true; |
|
97 |
- }, |
|
98 |
- buttonSearch2(item) { |
|
99 |
- const vm = this; |
|
100 |
- this.searchOpen2 = true; |
|
101 |
- this.boardData = item; |
|
102 |
- |
|
103 |
- axios({ |
|
104 |
- url: "/board/boardStudentCheck.json", |
|
105 |
- method: "post", |
|
106 |
- headers: { |
|
107 |
- "Content-Type": "application/json; charset=UTF-8", |
|
100 |
+ methods: { |
|
101 |
+ closeModal() { |
|
102 |
+ this.showModal = false; |
|
108 | 103 |
}, |
109 |
- data: { |
|
110 |
- bbsId: item.bbsId, |
|
111 |
- stdId: vm.stdId, |
|
104 |
+ buttonSearch() { |
|
105 |
+ this.searchOpen = true; |
|
112 | 106 |
}, |
113 |
- }) |
|
114 |
- .then(function (res) { |
|
115 |
- vm.boardList(); |
|
116 |
- }) |
|
117 |
- .catch(function (error) { |
|
118 |
- console.log("result - error : ", error); |
|
119 |
- }); |
|
120 |
- }, |
|
121 |
- closeBtn() { |
|
122 |
- this.searchOpen = false; |
|
123 |
- }, |
|
124 |
- closeBtn2() { |
|
125 |
- this.searchOpen2 = false; |
|
126 |
- }, |
|
107 |
+ buttonSearch2(item) { |
|
108 |
+ const vm = this; |
|
109 |
+ this.searchOpen2 = true; |
|
110 |
+ this.boardData = item; |
|
127 | 111 |
|
128 |
- logout() { |
|
129 |
- const result = confirm('로그아웃 하시겠습니까?') |
|
130 |
- if (result) { |
|
131 |
- this.$store.dispatch('logout'); |
|
132 |
- this.goToPage('login'); |
|
133 |
- } else { |
|
134 |
- return; |
|
135 |
- } |
|
136 |
- |
|
137 |
- }, |
|
138 |
- goToPage(page) { |
|
139 |
- this.$router.push({ name: page }); |
|
140 |
- }, |
|
141 |
- |
|
142 |
- // 공지 조회 |
|
143 |
- boardList() { |
|
144 |
- const vm = this; |
|
145 |
- axios({ |
|
146 |
- url: "/board/boardStudentList.json", |
|
147 |
- method: "post", |
|
148 |
- headers: { |
|
149 |
- "Content-Type": "application/json; charset=UTF-8", |
|
112 |
+ axios({ |
|
113 |
+ url: '/board/boardStudentCheck.json', |
|
114 |
+ method: 'post', |
|
115 |
+ headers: { |
|
116 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
117 |
+ }, |
|
118 |
+ data: { |
|
119 |
+ bbsId: item.bbsId, |
|
120 |
+ stdId: vm.stdId, |
|
121 |
+ }, |
|
122 |
+ }) |
|
123 |
+ .then(function (res) { |
|
124 |
+ vm.boardList(); |
|
125 |
+ }) |
|
126 |
+ .catch(function (error) { |
|
127 |
+ console.log('result - error : ', error); |
|
128 |
+ }); |
|
150 | 129 |
}, |
151 |
- data: { page: vm.page, pageSize: vm.pageSize, userId: vm.userId }, |
|
152 |
- }) |
|
153 |
- .then(function (res) { |
|
154 |
- vm.dataList = res.data.result[0].boardClass[0].board; |
|
155 |
- vm.userNm = res.data.result[0].userNm; |
|
156 |
- vm.userId = res.data.result[0].userId; |
|
157 |
- vm.unCheck = res.data.unCheck; |
|
158 |
- vm.stdId = |
|
159 |
- res.data.result[0].boardClass[0].board[0].boardStudent[0].stdId; |
|
160 |
- vm.totalBoard = res.data.totalBoard; |
|
161 |
- vm.totalPages = Math.ceil(vm.totalBoard / vm.pageSize); |
|
162 |
- }) |
|
163 |
- .catch(function (error) { |
|
164 |
- console.log("result - error : ", error); |
|
165 |
- }); |
|
166 |
- }, |
|
130 |
+ closeBtn() { |
|
131 |
+ this.searchOpen = false; |
|
132 |
+ }, |
|
133 |
+ closeBtn2() { |
|
134 |
+ this.searchOpen2 = false; |
|
135 |
+ }, |
|
167 | 136 |
|
168 |
- previousPage() { |
|
169 |
- if (this.page > 1) { |
|
170 |
- this.page -= 1; |
|
137 |
+ logout() { |
|
138 |
+ const result = confirm('로그아웃 하시겠습니까?'); |
|
139 |
+ if (result) { |
|
140 |
+ this.$store.dispatch('logout'); |
|
141 |
+ this.goToPage('login'); |
|
142 |
+ } else { |
|
143 |
+ return; |
|
144 |
+ } |
|
145 |
+ }, |
|
146 |
+ goToPage(page) { |
|
147 |
+ this.$router.push({ name: page }); |
|
148 |
+ }, |
|
149 |
+ |
|
150 |
+ // 공지 조회 |
|
151 |
+ boardList() { |
|
152 |
+ const vm = this; |
|
153 |
+ axios({ |
|
154 |
+ url: '/board/boardStudentList.json', |
|
155 |
+ method: 'post', |
|
156 |
+ headers: { |
|
157 |
+ 'Content-Type': 'application/json; charset=UTF-8', |
|
158 |
+ }, |
|
159 |
+ data: { page: vm.page, pageSize: vm.pageSize, userId: vm.userId }, |
|
160 |
+ }) |
|
161 |
+ .then(function (res) { |
|
162 |
+ vm.dataList = res.data.result[0].boardClass[0].board; |
|
163 |
+ vm.userNm = res.data.result[0].userNm; |
|
164 |
+ vm.userId = res.data.result[0].userId; |
|
165 |
+ vm.unCheck = res.data.unCheck; |
|
166 |
+ vm.stdId = res.data.result[0].boardClass[0].board[0].boardStudent[0].stdId; |
|
167 |
+ vm.totalBoard = res.data.totalBoard; |
|
168 |
+ vm.totalPages = Math.ceil(vm.totalBoard / vm.pageSize); |
|
169 |
+ }) |
|
170 |
+ .catch(function (error) { |
|
171 |
+ console.log('result - error : ', error); |
|
172 |
+ }); |
|
173 |
+ }, |
|
174 |
+ |
|
175 |
+ previousPage() { |
|
176 |
+ if (this.page > 1) { |
|
177 |
+ this.page -= 1; |
|
178 |
+ this.boardList(); |
|
179 |
+ } |
|
180 |
+ }, |
|
181 |
+ |
|
182 |
+ nextPage() { |
|
183 |
+ if (this.page < this.totalPages) { |
|
184 |
+ this.page += 1; |
|
185 |
+ this.boardList(); |
|
186 |
+ } |
|
187 |
+ }, |
|
188 |
+ }, |
|
189 |
+ watch: {}, |
|
190 |
+ computed: {}, |
|
191 |
+ components: { |
|
192 |
+ SvgIcon, |
|
193 |
+ Menu: Menu, |
|
194 |
+ }, |
|
195 |
+ mounted() { |
|
196 |
+ console.log('Header mounted'); |
|
171 | 197 |
this.boardList(); |
172 |
- } |
|
173 | 198 |
}, |
174 |
- |
|
175 |
- nextPage() { |
|
176 |
- if (this.page < this.totalPages) { |
|
177 |
- this.page += 1; |
|
178 |
- this.boardList(); |
|
179 |
- } |
|
180 |
- }, |
|
181 |
- }, |
|
182 |
- watch: {}, |
|
183 |
- computed: {}, |
|
184 |
- components: { |
|
185 |
- SvgIcon, |
|
186 |
- }, |
|
187 |
- mounted() { |
|
188 |
- console.log("Header mounted"); |
|
189 |
- this.boardList(); |
|
190 |
- }, |
|
191 | 199 |
}; |
192 | 200 |
</script> |
193 | 201 |
<style scoped> |
194 | 202 |
.popup-wrap { |
195 |
- position: fixed; |
|
196 |
- background-color: transparent; |
|
197 |
- width: fit-content; |
|
198 |
- height: fit-content; |
|
199 |
- z-index: 10; |
|
203 |
+ position: fixed; |
|
204 |
+ background-color: transparent; |
|
205 |
+ width: fit-content; |
|
206 |
+ height: fit-content; |
|
207 |
+ z-index: 10; |
|
200 | 208 |
} |
201 | 209 |
|
202 | 210 |
.popup-box { |
203 |
- top: 300px; |
|
204 |
- left: 62%; |
|
211 |
+ top: 300px; |
|
212 |
+ left: 62%; |
|
205 | 213 |
} |
206 | 214 |
|
207 | 215 |
.popup2 .popup-box { |
208 |
- top: 450px; |
|
209 |
- left: 38%; |
|
216 |
+ top: 450px; |
|
217 |
+ left: 38%; |
|
218 |
+} |
|
219 |
+ |
|
220 |
+.header-box { |
|
221 |
+ background-color: white; |
|
222 |
+ padding: 10px 50px; |
|
223 |
+ box-shadow: rgba(14, 63, 126, 0.04) 0px 0px 0px 1px, rgba(42, 51, 69, 0.04) 0px 1px 1px -0.5px, |
|
224 |
+ rgba(42, 51, 70, 0.04) 0px 3px 3px -1.5px, rgba(42, 51, 70, 0.04) 0px 6px 6px -3px, |
|
225 |
+ rgba(14, 63, 126, 0.04) 0px 12px 12px -6px, rgba(14, 63, 126, 0.04) 0px 24px 24px -12px; |
|
210 | 226 |
} |
211 | 227 |
</style> |
--- client/views/layout/Menu.vue
+++ client/views/layout/Menu.vue
... | ... | @@ -1,5 +1,5 @@ |
1 | 1 |
<template> |
2 |
- <div class="menu flex" style="gap: 30px"> |
|
2 |
+ <div class="menu flex align-center" style="gap: 30px; padding-top: 10px"> |
|
3 | 3 |
<router-link to="/MyPlan.page"> |
4 | 4 |
<button :class="{ active: activeButton === 'schedule' }" type="submit" @click="goToApp('schedule')"> |
5 | 5 |
<p :class="{ active: activeButton === 'schedule' }">학습일정계획</p> |
... | ... | @@ -48,7 +48,6 @@ |
48 | 48 |
this.activeButton = 'mypage'; |
49 | 49 |
} |
50 | 50 |
}, |
51 |
- |
|
52 | 51 |
}, |
53 | 52 |
watch: { |
54 | 53 |
currentRoute() { |
--- client/views/layout/Side.vue
+++ client/views/layout/Side.vue
... | ... | @@ -1,164 +1,282 @@ |
1 | 1 |
<template> |
2 |
- <div class="side"> |
|
3 |
- <router-link to="/MyPlan.page"> |
|
4 |
- <div class="logo mb25"> |
|
5 |
- <img src="../../resources/img/logo2.png" alt="" /> |
|
6 |
- </div> |
|
7 |
- </router-link> |
|
8 |
- <div class="profile mb30"> |
|
9 |
- <div class="flex align-start"> |
|
10 |
- <img src="../../resources/img/img16_s.png" alt="" /> |
|
11 |
- <div class="ml25"> |
|
12 |
- <p class="name mb10">{{ studentInfo.studentName }}</p> |
|
13 |
- <p class="mb5"> |
|
14 |
- {{ studentInfo.institutionName }} {{ studentInfo.grade }}학년 |
|
15 |
- {{ studentInfo.className }} |
|
16 |
- </p> |
|
17 |
- <!-- <progress-bar :progress="progress"></progress-bar> --> |
|
18 |
- <span>지금까지 푼 총 문제 수:</span> |
|
19 |
- <span class="brown ml10">{{ studentInfo.totalProblemsSolved }} 개</span> |
|
2 |
+ <div class="side"> |
|
3 |
+ <div class="profile mb30"> |
|
4 |
+ <div class="flex align-center" style="gap: 18px"> |
|
5 |
+ <img src="../../resources/img/img16_s.png" alt="" style="border-radius: 100%; width: 10rem" /> |
|
6 |
+ <div class="mt25"> |
|
7 |
+ <div> |
|
8 |
+ <p class="name mb10">{{ studentInfo.studentName }}</p> |
|
9 |
+ <p class="mb5"> |
|
10 |
+ <span><img src="../../resources/img/new_img/icon/school_icon.png" alt="" /></span> |
|
11 |
+ {{ studentInfo.institutionName }} {{ studentInfo.grade }}학년 |
|
12 |
+ {{ studentInfo.className }} |
|
13 |
+ </p> |
|
14 |
+ </div> |
|
15 |
+ <!-- <progress-bar :progress="progress"></progress-bar> --> |
|
16 |
+ </div> |
|
17 |
+ </div> |
|
18 |
+ <div class="problem-box mt25"> |
|
19 |
+ <p style="font-weight: bold"> |
|
20 |
+ 지금까지 푼 총 문제 수 : |
|
21 |
+ <span style="color: #9528b7; font-size: 16px; font-weight: bold" |
|
22 |
+ >{{ studentInfo.totalProblemsSolved }}개</span |
|
23 |
+ > |
|
24 |
+ </p> |
|
25 |
+ </div> |
|
20 | 26 |
</div> |
21 |
- </div> |
|
22 |
- <hr /> |
|
23 |
- <p class="title2 mb25">최근 학습 히스토리</p> |
|
24 |
- <ul class="flex justify-between ml30 mb30"> |
|
25 |
- <li |
|
26 |
- v-for="historyItem in studentInfo.history" |
|
27 |
- :key="historyItem.unitId" |
|
28 |
- > |
|
29 |
- [{{ historyItem.bookName }}] {{ historyItem.unitName }} |
|
30 |
- </li> |
|
31 |
- </ul> |
|
32 |
- </div> |
|
33 |
- <div class="ask mb30"> |
|
34 |
- <p class="title1 mb15">선생님께 질문 있어요~</p> |
|
27 |
+ <hr style="margin: 25px 20px" /> |
|
28 |
+ <div class="history-box"> |
|
29 |
+ <p class="title2 mb20">최근 학습 히스토리</p> |
|
30 |
+ <ul class="flex-column" style="gap: 10px"> |
|
31 |
+ <!-- 더미 데이터 --> |
|
32 |
+ <li>· 지학사 3학년 1학기</li> |
|
33 |
+ <li>· 지학사 3학년 2학기</li> |
|
34 |
+ <!-- 여기까지 --> |
|
35 |
+ <li v-for="historyItem in studentInfo.history" :key="historyItem.unitId"> |
|
36 |
+ · [{{ historyItem.bookName }}] {{ historyItem.unitName }} |
|
37 |
+ </li> |
|
38 |
+ </ul> |
|
39 |
+ </div> |
|
40 |
+ <!-- <div class="ask mb30"> |
|
41 |
+ <p class="title1 mb15">선생님께 질문 있어요~</p> |
|
35 | 42 |
|
36 |
- <div class="memo mb15"> |
|
37 |
- <textarea |
|
38 |
- name="" |
|
39 |
- id="" |
|
40 |
- placeholder="궁금한 것을 적어보세요." |
|
41 |
- v-model="studentInfo.studentQuestion" |
|
42 |
- ></textarea> |
|
43 |
- </div> |
|
44 |
- <div class="flex justify-end"> |
|
45 |
- <button @click="updateQuestion">질문하기</button> |
|
46 |
- </div> |
|
43 |
+ <div class="memo mb15"> |
|
44 |
+ <textarea |
|
45 |
+ name="" |
|
46 |
+ id="" |
|
47 |
+ placeholder="궁금한 것을 적어보세요." |
|
48 |
+ v-model="studentInfo.studentQuestion" |
|
49 |
+ ></textarea> |
|
50 |
+ </div> |
|
51 |
+ <div class="flex justify-end"> |
|
52 |
+ <button @click="updateQuestion">질문하기</button> |
|
53 |
+ </div> |
|
54 |
+ </div> --> |
|
55 |
+ <div class="mt25"> |
|
56 |
+ <div class="button-box flex"> |
|
57 |
+ <button @click="handleClickEvent" style="width: 100%"> |
|
58 |
+ <img |
|
59 |
+ class="look-btn" |
|
60 |
+ src="../../resources/img/new_img/plan/wrong_note_btn.png" |
|
61 |
+ alt="" |
|
62 |
+ style="width: 100%" |
|
63 |
+ /> |
|
64 |
+ </button> |
|
65 |
+ </div> |
|
66 |
+ <div class="button-box flex"> |
|
67 |
+ <button @click="goPopupOpen" style="width: 100%"> |
|
68 |
+ <img src="../../resources/img/new_img/plan/question_btn.png" alt="" style="width: 100%" /> |
|
69 |
+ </button> |
|
70 |
+ </div> |
|
71 |
+ </div> |
|
47 | 72 |
</div> |
48 |
- <div class="btn-wrap flex justify-between"> |
|
49 |
- <button class="login-btn" @click="handleClickEvent"> |
|
50 |
- <img src="../../resources/img/btn07_s.png" alt="" /> |
|
51 |
- <p>{{ buttonText }}</p> |
|
52 |
- </button> |
|
53 |
- |
|
54 |
- <!-- <button class="login-btn" type="submit"> |
|
55 |
- <img src="../../resources/img/btn07_s.png" alt="" /> |
|
56 |
- <p>오늘 할 다른 공부</p> |
|
57 |
- </button> --> |
|
73 |
+ <!-- 질문하기 팝업 --> |
|
74 |
+ <div class="popup-wrap" v-if="this.popupOpen === true" style="z-index: 100"> |
|
75 |
+ <div class="question-popup"> |
|
76 |
+ <div class="flex justify-between align-center"> |
|
77 |
+ <p class="question-text mt20">선생님께 질문하기</p> |
|
78 |
+ <img class="look-btn" @click="goPopupClose" src="../../resources/img/btn25_93t_normal.png" alt="" /> |
|
79 |
+ </div> |
|
80 |
+ <p style="color: #8c8c8c; font-size: 20px; margin: 40px 0px">선생님! 질문있어요!!</p> |
|
81 |
+ <div class="memo mt25"> |
|
82 |
+ <p class="title1 memo-text">내용</p> |
|
83 |
+ <textarea name="" id="" placeholder="궁금한 것을 적어보세요." v-model="question"></textarea> |
|
84 |
+ </div> |
|
85 |
+ <div class="questionBtn-box flex justify-end" style="gap: 15px"> |
|
86 |
+ <button style="border-color: #eaedf4; color: #8c8c8c" @click="goPopupClose">취소하기</button> |
|
87 |
+ <button @click="updateQuestion" style="border-color: #6327b9; color: white; background-color: #6327b9"> |
|
88 |
+ 질문하기 |
|
89 |
+ </button> |
|
90 |
+ </div> |
|
91 |
+ </div> |
|
58 | 92 |
</div> |
59 |
- </div> |
|
60 | 93 |
</template> |
61 | 94 |
|
62 | 95 |
<script> |
63 |
-import ProgressBar from "../component/ProgressBar.vue"; |
|
64 |
-import axios from "axios"; |
|
96 |
+import ProgressBar from '../component/ProgressBar.vue'; |
|
97 |
+import axios from 'axios'; |
|
65 | 98 |
|
66 | 99 |
export default { |
67 |
- data() { |
|
68 |
- return { |
|
69 |
- buttonText: "오답노트", |
|
70 |
- progress: 20, |
|
71 |
- studentInfo: { |
|
72 |
- studentName: "", |
|
73 |
- institutionName: "", |
|
74 |
- grade: "", |
|
75 |
- className: "", |
|
76 |
- studentQuestion: "", |
|
77 |
- history: [], |
|
78 |
- }, |
|
79 |
- userId: "1", // userId 임시 설정 |
|
80 |
- }; |
|
81 |
- }, |
|
82 |
- methods: { |
|
83 |
- pageSetting() { |
|
84 |
- this.userId = this.$store.getters.getUserInfo.userId; |
|
85 |
- console.log("유저 아이디: ", this.userId); |
|
86 |
- this.fetchStudentInfo(); |
|
87 |
- }, |
|
100 |
+ data() { |
|
101 |
+ return { |
|
102 |
+ progress: 20, |
|
103 |
+ studentInfo: { |
|
104 |
+ studentName: '', |
|
105 |
+ institutionName: '', |
|
106 |
+ grade: '', |
|
107 |
+ className: '', |
|
108 |
+ studentQuestion: '', |
|
109 |
+ history: [], |
|
110 |
+ }, |
|
111 |
+ userId: '1', // userId 임시 설정 |
|
88 | 112 |
|
89 |
- // 학생 정보를 가져오는 메서드 |
|
90 |
- fetchStudentInfo() { |
|
91 |
- axios |
|
92 |
- .post("/studentInfo/getInfo.json", { userId: this.userId }) |
|
93 |
- .then((response) => { |
|
94 |
- console.log(response.data); |
|
95 |
- this.studentInfo = response.data; |
|
96 |
- }) |
|
97 |
- .catch((error) => { |
|
98 |
- console.error("학생 정보 가져오기 실패:", error); |
|
99 |
- }); |
|
113 |
+ popupOpen: false, |
|
114 |
+ question: null, |
|
115 |
+ }; |
|
100 | 116 |
}, |
117 |
+ methods: { |
|
118 |
+ pageSetting() { |
|
119 |
+ this.userId = this.$store.getters.getUserInfo.userId; |
|
120 |
+ console.log('유저 아이디: ', this.userId); |
|
121 |
+ this.fetchStudentInfo(); |
|
122 |
+ }, |
|
101 | 123 |
|
102 |
- // 질문 업데이트 메서드 |
|
103 |
- updateQuestion() { |
|
104 |
- axios |
|
105 |
- .post("/studentInfo/updateQuestion.json", { |
|
106 |
- userId: this.userId, |
|
107 |
- studentQuestion: this.studentInfo.studentQuestion, |
|
108 |
- }) |
|
109 |
- .then((response) => { |
|
110 |
- console.log("질문이 성공적으로 업데이트되었습니다."); |
|
111 |
- alert("질문이 성공적으로 업데이트되었습니다."); |
|
112 |
- }) |
|
113 |
- .catch((error) => { |
|
114 |
- console.error("질문 업데이트 실패:", error); |
|
115 |
- alert("질문 업데이트에 실패했습니다."); |
|
116 |
- }); |
|
117 |
- }, |
|
124 |
+ // 학생 정보를 가져오는 메서드 |
|
125 |
+ fetchStudentInfo() { |
|
126 |
+ axios |
|
127 |
+ .post('/studentInfo/getInfo.json', { userId: this.userId }) |
|
128 |
+ .then((response) => { |
|
129 |
+ console.log('학생 정보 조회 : ', response.data); |
|
130 |
+ this.studentInfo = response.data; |
|
131 |
+ }) |
|
132 |
+ .catch((error) => { |
|
133 |
+ console.error('학생 정보 가져오기 실패:', error); |
|
134 |
+ }); |
|
135 |
+ }, |
|
118 | 136 |
|
119 |
- handleClick() { |
|
120 |
- this.toggleText(); |
|
121 |
- this.goToPage("PreviewNote"); |
|
122 |
- }, |
|
137 |
+ // 질문 업데이트 메서드 |
|
138 |
+ updateQuestion() { |
|
139 |
+ if (this.question === null) { |
|
140 |
+ alert('질문을 입력해주세요'); |
|
141 |
+ return; |
|
142 |
+ } |
|
143 |
+ axios |
|
144 |
+ .post('/studentInfo/updateQuestion.json', { |
|
145 |
+ userId: this.userId, |
|
146 |
+ // userId: 'USID_000000000000002', |
|
147 |
+ studentQuestion: this.question, |
|
148 |
+ }) |
|
149 |
+ .then((response) => { |
|
150 |
+ console.log('질문이 성공적으로 업데이트되었습니다.'); |
|
151 |
+ alert('질문이 성공적으로 업데이트되었습니다.'); |
|
152 |
+ }) |
|
153 |
+ .catch((error) => { |
|
154 |
+ console.error('질문 업데이트 실패:', error); |
|
155 |
+ alert('질문 업데이트에 실패했습니다.'); |
|
156 |
+ }); |
|
157 |
+ this.question = null; |
|
158 |
+ }, |
|
123 | 159 |
|
124 |
- handleClick() { |
|
125 |
- this.toggleTextAndNavigate(); |
|
126 |
- }, |
|
160 |
+ handleClick() { |
|
161 |
+ this.toggleText(); |
|
162 |
+ this.goToPage('PreviewNote'); |
|
163 |
+ }, |
|
127 | 164 |
|
128 |
- toggleTextAndNavigate() { |
|
129 |
- if (this.buttonText === "오답노트") { |
|
130 |
- this.buttonText = "학습 코스"; |
|
131 |
- this.goToPage("PreviewNote"); |
|
132 |
- // 버튼 텍스트가 '학습 코스'일 때 이동할 경로 |
|
133 |
- } else { |
|
134 |
- this.buttonText = "오답노트"; |
|
135 |
- this.goToPage("Dashboard"); |
|
136 |
- // 버튼 텍스트가 '오답노트'일 때 이동할 경로 |
|
137 |
- } |
|
138 |
- }, |
|
165 |
+ handleClick() { |
|
166 |
+ this.toggleTextAndNavigate(); |
|
167 |
+ }, |
|
139 | 168 |
|
140 |
- handleClickEvent() { |
|
141 |
- this.goToPage("PreviewNote"); |
|
142 |
- }, |
|
169 |
+ toggleTextAndNavigate() { |
|
170 |
+ if (this.buttonText === '오답노트') { |
|
171 |
+ this.buttonText = '학습 코스'; |
|
172 |
+ this.goToPage('PreviewNote'); |
|
173 |
+ // 버튼 텍스트가 '학습 코스'일 때 이동할 경로 |
|
174 |
+ } else { |
|
175 |
+ this.buttonText = '오답노트'; |
|
176 |
+ this.goToPage('Dashboard'); |
|
177 |
+ // 버튼 텍스트가 '오답노트'일 때 이동할 경로 |
|
178 |
+ } |
|
179 |
+ }, |
|
143 | 180 |
|
144 |
- goToPage(page) { |
|
145 |
- this.$router.push({ name: page }); |
|
181 |
+ handleClickEvent() { |
|
182 |
+ this.goToPage('PreviewNote'); |
|
183 |
+ }, |
|
184 |
+ |
|
185 |
+ goToPage(page) { |
|
186 |
+ this.$router.push({ name: page }); |
|
187 |
+ }, |
|
188 |
+ |
|
189 |
+ goPopupOpen() { |
|
190 |
+ this.popupOpen = true; |
|
191 |
+ }, |
|
192 |
+ goPopupClose() { |
|
193 |
+ this.popupOpen = false; |
|
194 |
+ this.question = null; |
|
195 |
+ }, |
|
146 | 196 |
}, |
147 |
- }, |
|
148 |
- watch: {}, |
|
149 |
- computed: {}, |
|
150 |
- components: { |
|
151 |
- ProgressBar, |
|
152 |
- }, |
|
153 |
- mounted() { |
|
154 |
- console.log("Side mounted"); |
|
155 |
- this.pageSetting(); |
|
156 |
- }, |
|
197 |
+ watch: {}, |
|
198 |
+ computed: {}, |
|
199 |
+ components: { |
|
200 |
+ ProgressBar, |
|
201 |
+ }, |
|
202 |
+ mounted() { |
|
203 |
+ console.log('Side mounted'); |
|
204 |
+ this.pageSetting(); |
|
205 |
+ }, |
|
157 | 206 |
}; |
158 | 207 |
</script> |
159 | 208 |
<style scoped> |
160 | 209 |
.login-btn img { |
161 |
- width: 430px; |
|
162 |
- height: 85px; |
|
210 |
+ width: 430px; |
|
211 |
+ height: 85px; |
|
212 |
+} |
|
213 |
+ |
|
214 |
+.problem-box { |
|
215 |
+ display: flex; |
|
216 |
+ align-items: center; |
|
217 |
+ justify-content: center; |
|
218 |
+ border: 2px solid #6327b9; |
|
219 |
+ background-color: #f0eaf8; |
|
220 |
+ border-radius: 8px; |
|
221 |
+ padding: 10px 10px; |
|
222 |
+} |
|
223 |
+ |
|
224 |
+.history-box { |
|
225 |
+ background-color: white; |
|
226 |
+ padding: 30px 20px; |
|
227 |
+ border: 1px solid #c6c6c6; |
|
228 |
+ border-radius: 10px; |
|
229 |
+ margin: 25px 20px 0px; |
|
230 |
+} |
|
231 |
+ |
|
232 |
+.history-box li { |
|
233 |
+ background-color: #eaedf4; |
|
234 |
+ border-radius: 10px; |
|
235 |
+ font-size: 18px; |
|
236 |
+ list-style-type: none; |
|
237 |
+ padding: 10px; |
|
238 |
+} |
|
239 |
+ |
|
240 |
+.button-box { |
|
241 |
+ margin: 10px 20px; |
|
242 |
+} |
|
243 |
+ |
|
244 |
+.question-popup { |
|
245 |
+ background-color: white; |
|
246 |
+ border-radius: 10px; |
|
247 |
+ padding: 30px 40px; |
|
248 |
+ position: absolute; |
|
249 |
+ top: 15%; |
|
250 |
+ left: 25%; |
|
251 |
+ width: 100rem; |
|
252 |
+} |
|
253 |
+ |
|
254 |
+.question-text { |
|
255 |
+ font-family: 'ONEMobilePOPOTF'; |
|
256 |
+ font-size: 32px; |
|
257 |
+ color: #6327b9; |
|
258 |
+} |
|
259 |
+ |
|
260 |
+.memo-text { |
|
261 |
+ font-family: 'ONEMobilePOPOTF'; |
|
262 |
+ color: #6327b9; |
|
263 |
+} |
|
264 |
+ |
|
265 |
+.memo textarea { |
|
266 |
+ border: 2px solid #cac0e3; |
|
267 |
+ border-radius: 10px; |
|
268 |
+ width: 100%; |
|
269 |
+ padding: 20px; |
|
270 |
+ height: 30rem; |
|
271 |
+ margin: 20px 0px 40px; |
|
272 |
+} |
|
273 |
+ |
|
274 |
+.questionBtn-box button { |
|
275 |
+ font-size: 18px; |
|
276 |
+ padding: 8px 30px; |
|
277 |
+ border: 2px solid; |
|
278 |
+ border-radius: 8px; |
|
279 |
+ font-weight: bold; |
|
280 |
+ font-family: 'ONEMobileOTF-Regular'; |
|
163 | 281 |
} |
164 | 282 |
</style> |
--- client/views/pages/main/Main.vue
+++ client/views/pages/main/Main.vue
... | ... | @@ -1,17 +1,18 @@ |
1 | 1 |
<template> |
2 |
- <div style="padding: 15px 60px 90px 60px; "> |
|
2 |
+ <div> |
|
3 | 3 |
<Header></Header> |
4 |
- <div class="flex justify-between" > |
|
5 |
- <Side></Side> |
|
6 |
- <div> |
|
7 |
- <Menu :currentRoute="$route.path"></Menu> |
|
8 |
- <div class="main-wrap"> |
|
9 |
- <router-view /> |
|
4 |
+ <div style="padding: 40px 60px 90px"> |
|
5 |
+ <div class="flex justify-between"> |
|
6 |
+ <Side></Side> |
|
7 |
+ <div> |
|
8 |
+ <!-- <Menu :currentRoute="$route.path"></Menu> --> |
|
9 |
+ <div class="main-wrap"> |
|
10 |
+ <router-view /> |
|
11 |
+ </div> |
|
10 | 12 |
</div> |
11 |
- </div> |
|
12 |
- </div> |
|
13 |
+ </div> |
|
14 |
+ </div> |
|
13 | 15 |
</div> |
14 |
- |
|
15 | 16 |
</template> |
16 | 17 |
|
17 | 18 |
<script> |
... | ... | @@ -21,26 +22,19 @@ |
21 | 22 |
|
22 | 23 |
export default { |
23 | 24 |
data() { |
24 |
- return { |
|
25 |
- } |
|
25 |
+ return {}; |
|
26 | 26 |
}, |
27 |
- methods: { |
|
28 |
- |
|
29 |
- }, |
|
30 |
- watch: { |
|
31 |
- |
|
32 |
- }, |
|
33 |
- computed: { |
|
34 |
- |
|
35 |
- }, |
|
27 |
+ methods: {}, |
|
28 |
+ watch: {}, |
|
29 |
+ computed: {}, |
|
36 | 30 |
components: { |
37 | 31 |
Header: Header, |
38 |
- Menu: Menu, |
|
39 |
- // Footer:Footer, |
|
40 |
- Side:Side, |
|
32 |
+ Menu: Menu, |
|
33 |
+ // Footer:Footer, |
|
34 |
+ Side: Side, |
|
41 | 35 |
}, |
42 | 36 |
mounted() { |
43 | 37 |
console.log('main mounted'); |
44 |
- } |
|
45 |
-} |
|
46 |
-</script>(No newline at end of file) |
|
38 |
+ }, |
|
39 |
+}; |
|
40 |
+</script> |
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?