
--- client/views/pages/teacher/QuestionDetail.vue
+++ client/views/pages/teacher/QuestionDetail.vue
... | ... | @@ -85,7 +85,8 @@ |
85 | 85 |
</div> |
86 | 86 |
<div class="flex align-center mb20"> |
87 | 87 |
<label :for="'file' + i" class="title2">첨부파일</label> |
88 |
- <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
88 |
+ <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" |
|
89 |
+ v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
89 | 90 |
<label>{{ data.fileNm }}</label> |
90 | 91 |
</div> |
91 | 92 |
|
... | ... | @@ -111,7 +112,8 @@ |
111 | 112 |
</div> |
112 | 113 |
<div class="flex align-center mb20"> |
113 | 114 |
<label :for="'file' + i" class="title2">첨부파일</label> |
114 |
- <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
115 |
+ <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" |
|
116 |
+ v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
115 | 117 |
<label>{{ data.fileNm }}</label> |
116 | 118 |
</div> |
117 | 119 |
|
... | ... | @@ -137,7 +139,8 @@ |
137 | 139 |
</div> |
138 | 140 |
<div class="flex align-center mb20"> |
139 | 141 |
<label :for="'file' + i" class="title2">첨부파일</label> |
140 |
- <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
142 |
+ <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" |
|
143 |
+ v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
141 | 144 |
<label>{{ data.fileNm }}</label> |
142 | 145 |
</div> |
143 | 146 |
<input type="file" :ref="'fileInput' + i" @change="handleDetailFileUpload(i)" multiple /> |
... | ... | @@ -161,7 +164,8 @@ |
161 | 164 |
</div> |
162 | 165 |
<div class="flex align-center mb20"> |
163 | 166 |
<label :for="'file' + i" class="title2">첨부파일</label> |
164 |
- <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
167 |
+ <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" |
|
168 |
+ v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
165 | 169 |
<label>{{ data.fileNm }}</label> |
166 | 170 |
</div> |
167 | 171 |
|
... | ... | @@ -171,39 +175,39 @@ |
171 | 175 |
</div> |
172 | 176 |
</div> |
173 | 177 |
<div v-else-if="selectedSearchOption2.prblm_type_cls === 'OX 문제'"> |
174 |
- <!--OX문제--> |
|
178 |
+ <!-- OX 문제 --> |
|
175 | 179 |
<div class="flex align-center mb20"> |
176 | 180 |
<label for="" class="title2">답</label> |
177 |
- <select v-model="prblmDetail.answer1" class="mr10 data-wrap"> |
|
178 |
- <option value="bbsTtl">O</option> |
|
179 |
- <option value="bbsCnt">X</option> |
|
181 |
+ <select v-model="prblmDetail.answers[1].text" class="mr10 data-wrap"> |
|
182 |
+ <option value="O">O</option> |
|
183 |
+ <option value="X">X</option> |
|
180 | 184 |
</select> |
181 | 185 |
</div> |
182 | 186 |
<div class="flex align-center mb20"> |
183 |
- <label :for="'file' + i" class="title2">첨부파일</label> |
|
184 |
- <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
187 |
+ <label class="title2">첨부파일</label> |
|
188 |
+ <div v-if="prblmDetail.answers[1] && prblmDetail.answers[1].fileInfo" |
|
189 |
+ v-for="(data, index) in prblmDetail.answers[1].fileInfo" :key="index"> |
|
185 | 190 |
<label>{{ data.fileNm }}</label> |
186 | 191 |
</div> |
187 |
- |
|
188 |
- <input type="file" :ref="'fileInput' + 1" @change="handleDetailFileUpload(1)" multiple /> |
|
192 |
+ <input type="file" ref="fileInput1" @change="handleDetailFileUpload(1)" multiple /> |
|
189 | 193 |
</div> |
190 | 194 |
</div> |
195 |
+ |
|
191 | 196 |
<div v-else-if="selectedSearchOption2.prblm_type_cls === '서술형'"> |
192 |
- <!--서술형--> |
|
193 |
- <div class="gd-col2 "> |
|
197 |
+ <!-- 서술형 --> |
|
198 |
+ <div class="gd-col2"> |
|
194 | 199 |
<div class="flex align-center mb20"> |
195 | 200 |
<label for="" class="title2">답</label> |
196 |
- <input type="text" class="data-wrap" v-model="prblmDetail.answer1"> |
|
201 |
+ <input type="text" class="data-wrap" v-model="prblmDetail.answers[1].text"> |
|
197 | 202 |
</div> |
198 | 203 |
<div class="flex align-center mb20"> |
199 |
- <label :for="'file' + i" class="title2">첨부파일</label> |
|
200 |
- <div v-if="prblmDetail.answers[i] && prblmDetail.answers[i].fileInfo" v-for="(data, index) in prblmDetail.answers[i].fileInfo" :key="index"> |
|
204 |
+ <label class="title2">첨부파일</label> |
|
205 |
+ <div v-if="prblmDetail.answers[1] && prblmDetail.answers[1].fileInfo" |
|
206 |
+ v-for="(data, index) in prblmDetail.answers[1].fileInfo" :key="index"> |
|
201 | 207 |
<label>{{ data.fileNm }}</label> |
202 | 208 |
</div> |
203 |
- |
|
204 |
- <input type="file" :ref="'fileInput' + 1" @change="handleDetailFileUpload(1)" multiple /> |
|
209 |
+ <input type="file" ref="fileInput1" @change="handleDetailFileUpload(1)" multiple /> |
|
205 | 210 |
</div> |
206 |
- |
|
207 | 211 |
</div> |
208 | 212 |
</div> |
209 | 213 |
<div class="flex align-center mb20"> |
... | ... | @@ -677,7 +681,7 @@ |
677 | 681 |
}, |
678 | 682 |
|
679 | 683 |
// 문제 유형 정보 가져오기 |
680 |
- selectProblemType(){ |
|
684 |
+ selectProblemType() { |
|
681 | 685 |
axios({ |
682 | 686 |
url: "/problem/selectType.json", |
683 | 687 |
method: "post", |
--- client/views/pages/teacher/QuestionInsert.vue
+++ client/views/pages/teacher/QuestionInsert.vue
... | ... | @@ -179,32 +179,39 @@ |
179 | 179 |
</div> |
180 | 180 |
</div> |
181 | 181 |
<div v-else-if="selectedSearchOption2.prblm_type_cls === 'OX 문제'"> |
182 |
- <!--OX문제--> |
|
182 |
+ <!-- OX 문제 --> |
|
183 | 183 |
<div class="flex align-center mb20"> |
184 | 184 |
<label for="" class="title2">답</label> |
185 |
- <select v-model="prblmDetail.answer1" class="mr10 data-wrap"> |
|
186 |
- <option value="bbsTtl">O</option> |
|
187 |
- <option value="bbsCnt">X</option> |
|
185 |
+ <select v-model="prblmDetail.answers[1].text" class="mr10 data-wrap"> |
|
186 |
+ <option value="O">O</option> |
|
187 |
+ <option value="X">X</option> |
|
188 | 188 |
</select> |
189 | 189 |
</div> |
190 | 190 |
<div class="flex align-center mb20"> |
191 |
- <label :for="'file' + i" class="title2">첨부파일</label> |
|
192 |
- <input type="file" :ref="'fileInput' + 1" @change="handleDetailFileUpload(1)" multiple /> |
|
191 |
+ <label class="title2">첨부파일</label> |
|
192 |
+ <div v-if="prblmDetail.answers[1] && prblmDetail.answers[1].fileInfo" |
|
193 |
+ v-for="(data, index) in prblmDetail.answers[1].fileInfo" :key="index"> |
|
194 |
+ <label>{{ data.fileNm }}</label> |
|
195 |
+ </div> |
|
196 |
+ <input type="file" ref="fileInput1" @change="handleDetailFileUpload(1)" multiple /> |
|
193 | 197 |
</div> |
194 |
- |
|
195 | 198 |
</div> |
199 |
+ |
|
196 | 200 |
<div v-else-if="selectedSearchOption2.prblm_type_cls === '서술형'"> |
197 |
- <!--서술형--> |
|
198 |
- <div class="gd-col2 "> |
|
201 |
+ <!-- 서술형 --> |
|
202 |
+ <div class="gd-col2"> |
|
199 | 203 |
<div class="flex align-center mb20"> |
200 | 204 |
<label for="" class="title2">답</label> |
201 |
- <input type="text" class="data-wrap" v-model="prblmDetail.answer1"> |
|
205 |
+ <input type="text" class="data-wrap" v-model="prblmDetail.answers[1].text"> |
|
202 | 206 |
</div> |
203 | 207 |
<div class="flex align-center mb20"> |
204 |
- <label :for="'file' + i" class="title2">첨부파일</label> |
|
205 |
- <input type="file" :ref="'fileInput' + 1" @change="handleDetailFileUpload(1)" multiple /> |
|
208 |
+ <label class="title2">첨부파일</label> |
|
209 |
+ <div v-if="prblmDetail.answers[1] && prblmDetail.answers[1].fileInfo" |
|
210 |
+ v-for="(data, index) in prblmDetail.answers[1].fileInfo" :key="index"> |
|
211 |
+ <label>{{ data.fileNm }}</label> |
|
212 |
+ </div> |
|
213 |
+ <input type="file" ref="fileInput1" @change="handleDetailFileUpload(1)" multiple /> |
|
206 | 214 |
</div> |
207 |
- |
|
208 | 215 |
</div> |
209 | 216 |
</div> |
210 | 217 |
<!--연결형 |
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?