--- client/views/pages/teacher/QuestionDetail.vue
+++ client/views/pages/teacher/QuestionDetail.vue
... | ... | @@ -206,8 +206,8 @@ |
206 | 206 |
<div class="flex align-center mb20"> |
207 | 207 |
<label :for="'file' + i" class="title2">첨부파일</label> |
208 | 208 |
<div v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
209 |
- <label>{{ data.fileNm }}</label> |
|
210 |
- </div> |
|
209 |
+ <label>{{ data.fileNm }}</label> |
|
210 |
+ </div> |
|
211 | 211 |
|
212 | 212 |
<input type="file" :ref="'fileInput' + 1" @change="handleDetailFileUpload(1)" multiple /> |
213 | 213 |
</div> |
... | ... | @@ -360,6 +360,10 @@ |
360 | 360 |
vm.dataList = res.data.problem; |
361 | 361 |
vm.problemDetail = res.data.problemDetail; |
362 | 362 |
|
363 |
+ vm.problemDetail.sort((a, b) => { |
|
364 |
+ return a.prblmDtlId.localeCompare(b.prblmDtlId); |
|
365 |
+ }); |
|
366 |
+ |
|
363 | 367 |
vm.selectedSearchOption = vm.dataList.prblmCtgryId; |
364 | 368 |
vm.selectedSearchOption2 = vm.dataList.prblmTypeId; |
365 | 369 |
vm.book_id = vm.dataList.bookId; |
--- client/views/pages/teacher/QuestionList.vue
+++ client/views/pages/teacher/QuestionList.vue
... | ... | @@ -10,68 +10,67 @@ |
10 | 10 |
</div> |
11 | 11 |
<div class="content-t"> |
12 | 12 |
|
13 |
- <label for="" class="title2">단원</label> |
|
14 |
- <div class="unit-pagination flex mt10 mb20" style="gap: 10px;"> |
|
15 |
- <button |
|
16 |
- v-for="(unit, index) in units" |
|
17 |
- :key="index" |
|
18 |
- :class="{ 'selected-btn': selectedUnitId === unit.unitId }" |
|
19 |
- @click="selectUnit(unit.unitId)"> |
|
20 |
- {{ unit.unitName }} |
|
21 |
- </button> |
|
22 |
- </div> |
|
23 |
- <div class="search-wrap flex justify-end mb20"> |
|
24 |
- <select name="" id="" class="mr10 data-wrap" v-model="searchOption"> |
|
25 |
- <option value="">전체</option> |
|
26 |
- <option value="prblm_expln">문제</option> |
|
27 |
- <option value="prblm_type_id">유형</option> |
|
28 |
- <option value="user_id">작성자</option> |
|
29 |
- </select> |
|
30 |
- <input type="text" placeholder="검색하세요." v-model="searchKeyword"> |
|
31 |
- <button type="button" title="위원회 검색" @click="searchProblems"> |
|
32 |
- <img src="../../../resources/img/look_t.png" alt=""> |
|
33 |
- </button> |
|
34 |
- </div> |
|
35 |
- <div class="table-wrap"> |
|
36 |
- <table> |
|
37 |
- <thead> |
|
38 |
- <tr> |
|
39 |
- <td>No.</td> |
|
40 |
- <td>문제</td> |
|
41 |
- <td>유형</td> |
|
42 |
- <td>점수</td> |
|
43 |
- <td>작성자</td> |
|
44 |
- <td>등록일</td> |
|
45 |
- </tr> |
|
46 |
- </thead> |
|
47 |
- <tbody> |
|
48 |
- <tr v-for="(problem, index) in problems" :key="problem.prblmId" @click="[goToPage('QuestionDetail', selectQuestionList(problem))]"> |
|
49 |
- <td>{{ (currentPage - 1) * 10 + index + 1 }}</td> |
|
50 |
- <td>{{ problem.prblmExpln }}</td> |
|
51 |
- <td>{{ problem.prblmTypeNm }}</td> |
|
52 |
- <td>{{ problem.prblmScr }}</td> |
|
53 |
- <td>{{ problem.userId }}</td> |
|
54 |
- <td>{{ problem.regDt}}</td> |
|
55 |
- </tr> |
|
56 |
- </tbody> |
|
57 |
- </table> |
|
58 |
- <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px;"> |
|
59 |
- <button @click="changePage(currentPage - 1)" :disabled="currentPage === 1"> |
|
60 |
- <img src="../../../resources/img/btn27_90t_normal.png" alt="Previous"> |
|
61 |
- </button> |
|
62 |
- <button v-for="page in paginationButtons" :key="page" @click="changePage(page)" :class="{ 'selected-btn': currentPage === page }"> |
|
63 |
- {{ page }} |
|
64 |
- </button> |
|
65 |
- <button @click="changePage(currentPage + 1)" :disabled="currentPage === totalPages"> |
|
66 |
- <img src="../../../resources/img/btn28_90t_normal.png" alt="Next"> |
|
67 |
- </button> |
|
68 |
- </article> |
|
69 |
- <div class="flex justify-end "> |
|
70 |
- <button type="button" title="등록" class="new-btn" @click="goToPage('QuestionInsert')"> |
|
71 |
- 등록 |
|
13 |
+ <label for="" class="title2">단원</label> |
|
14 |
+ <div class="unit-pagination flex mt10 mb20" style="gap: 10px;"> |
|
15 |
+ <button v-for="(unit, index) in units" :key="index" |
|
16 |
+ :class="{ 'selected-btn': selectedUnitId === unit.unitId }" @click="selectUnit(unit.unitId)"> |
|
17 |
+ {{ unit.unitName }} |
|
72 | 18 |
</button> |
73 | 19 |
</div> |
74 |
- </div> |
|
20 |
+ <div class="search-wrap flex justify-end mb20"> |
|
21 |
+ <select name="" id="" class="mr10 data-wrap" v-model="searchOption"> |
|
22 |
+ <option value="">전체</option> |
|
23 |
+ <option value="prblm_expln">문제</option> |
|
24 |
+ <option value="prblm_type_id">유형</option> |
|
25 |
+ <option value="user_id">작성자</option> |
|
26 |
+ </select> |
|
27 |
+ <input type="text" placeholder="검색하세요." v-model="searchKeyword"> |
|
28 |
+ <button type="button" title="위원회 검색" @click="searchProblems"> |
|
29 |
+ <img src="../../../resources/img/look_t.png" alt=""> |
|
30 |
+ </button> |
|
31 |
+ </div> |
|
32 |
+ <div class="table-wrap"> |
|
33 |
+ <table> |
|
34 |
+ <thead> |
|
35 |
+ <tr> |
|
36 |
+ <td>No.</td> |
|
37 |
+ <td>문제</td> |
|
38 |
+ <td>유형</td> |
|
39 |
+ <td>점수</td> |
|
40 |
+ <td>작성자</td> |
|
41 |
+ <td>등록일</td> |
|
42 |
+ </tr> |
|
43 |
+ </thead> |
|
44 |
+ <tbody> |
|
45 |
+ <tr v-for="(problem, index) in problems" :key="problem.prblmId" |
|
46 |
+ @click="[goToPage('QuestionDetail', selectQuestionList(problem))]"> |
|
47 |
+ <td>{{ (currentPage - 1) * 10 + index + 1 }}</td> |
|
48 |
+ <td>{{ problem.prblmExpln }}</td> |
|
49 |
+ <td>{{ problem.prblmTypeNm }}</td> |
|
50 |
+ <td>{{ problem.prblmScr }}</td> |
|
51 |
+ <td>{{ problem.userId }}</td> |
|
52 |
+ <td>{{ problem.regDt }}</td> |
|
53 |
+ </tr> |
|
54 |
+ </tbody> |
|
55 |
+ </table> |
|
56 |
+ <article class="table-pagination flex justify-center align-center mb20 mt30" style="gap: 10px;"> |
|
57 |
+ <button @click="changePage(currentPage - 1)" :disabled="currentPage === 1"> |
|
58 |
+ <img src="../../../resources/img/btn27_90t_normal.png" alt="Previous"> |
|
59 |
+ </button> |
|
60 |
+ <button v-for="page in paginationButtons" :key="page" @click="changePage(page)" |
|
61 |
+ :class="{ 'selected-btn': currentPage === page }"> |
|
62 |
+ {{ page }} |
|
63 |
+ </button> |
|
64 |
+ <button @click="changePage(currentPage + 1)" :disabled="currentPage === totalPages"> |
|
65 |
+ <img src="../../../resources/img/btn28_90t_normal.png" alt="Next"> |
|
66 |
+ </button> |
|
67 |
+ </article> |
|
68 |
+ <div class="flex justify-end "> |
|
69 |
+ <button type="button" title="등록" class="new-btn" @click="goToPage('QuestionInsert')"> |
|
70 |
+ 등록 |
|
71 |
+ </button> |
|
72 |
+ </div> |
|
73 |
+ </div> |
|
75 | 74 |
</div> |
76 | 75 |
</template> |
77 | 76 |
|
... | ... | @@ -85,7 +84,7 @@ |
85 | 84 |
return { |
86 | 85 |
mdiMagnify: mdiMagnify, |
87 | 86 |
problems: [], |
88 |
- units: [], |
|
87 |
+ units: [], |
|
89 | 88 |
books: [], |
90 | 89 |
currentPage: 1, |
91 | 90 |
pageSize: 10, |
... | ... | @@ -93,12 +92,17 @@ |
93 | 92 |
searchOption: '', |
94 | 93 |
searchKeyword: '', |
95 | 94 |
selectedUnitId: '', |
96 |
- selectedBook: "", |
|
95 |
+ selectedBook: "", |
|
97 | 96 |
} |
98 | 97 |
}, |
99 | 98 |
methods: { |
100 | 99 |
goToPage(page) { |
101 |
- this.$router.push({ name: page }); |
|
100 |
+ this.$router.push({ |
|
101 |
+ name: page, query: { |
|
102 |
+ book_id: this.selectedBook, |
|
103 |
+ unit_id: this.selectedUnitId, |
|
104 |
+ } |
|
105 |
+ }); |
|
102 | 106 |
}, |
103 | 107 |
showConfirm(type) { |
104 | 108 |
let message = ''; |
... | ... | @@ -156,7 +160,7 @@ |
156 | 160 |
}) |
157 | 161 |
.then(response => { |
158 | 162 |
console.log(response.data) |
159 |
- this.books = response.data; |
|
163 |
+ this.books = response.data; |
|
160 | 164 |
}) |
161 | 165 |
.catch(error => { |
162 | 166 |
console.error("fetchBooks - error: ", error); |
... | ... | @@ -164,7 +168,7 @@ |
164 | 168 |
}); |
165 | 169 |
}, |
166 | 170 |
fetchUnits() { |
167 |
- if (!this.selectedBook) return; |
|
171 |
+ if (!this.selectedBook) return; |
|
168 | 172 |
|
169 | 173 |
axios({ |
170 | 174 |
url: "/unit/unitList.json", |
... | ... | @@ -178,7 +182,7 @@ |
178 | 182 |
}) |
179 | 183 |
.then(response => { |
180 | 184 |
console.log(response.data) |
181 |
- this.units = response.data; |
|
185 |
+ this.units = response.data; |
|
182 | 186 |
}) |
183 | 187 |
.catch(error => { |
184 | 188 |
console.error("fetchUnits - error: ", error); |
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?