|
|
|
@ -63,7 +63,7 @@ |
|
|
|
|
<div class="stem-wrap"> |
|
|
|
|
<span class="label">{{ j + 1 }} / {{ item.questionNum }}</span> |
|
|
|
|
<span class="label">{{ item.questionTypeName }}</span> |
|
|
|
|
<div class="stem html-parse" :id="'stem' + ques.id" v-html="getQuesStem(ques)"></div> |
|
|
|
|
<div class="stem html-parse" :id="'stem' + ques.id" v-html="ques.stem"></div> |
|
|
|
|
<p v-if="item.questionType !== 'fill_blank'">({{ ques.score }}分)</p> |
|
|
|
|
<img class="tag" :src="require('@/assets/images/' + (ques.sign ? 'tag-active' : 'tag') + '.svg')" alt="" |
|
|
|
|
@click="ques.sign = ques.sign ? 0 : 1"> |
|
|
|
@ -94,13 +94,13 @@ |
|
|
|
|
<UeditorPlus v-if="ques.richTextStatus" :ref="'essayAnswer' + ques.id" v-model="ques.answer" |
|
|
|
|
@ready="editor => essayAnswerReady(editor, ques)" /> |
|
|
|
|
<div v-if="ques.allowAttachment" class="m-t-20"> |
|
|
|
|
<div v-if="ques.uploadInstructions" class="flex m-b-10 fs-12"> |
|
|
|
|
<span>上传要求说明:</span> |
|
|
|
|
<div class="html-parse" v-html="ques.uploadInstructions"></div> |
|
|
|
|
</div> |
|
|
|
|
<el-upload action="#"> |
|
|
|
|
<el-button size="small" type="primary">上传文件</el-button> |
|
|
|
|
</el-upload> |
|
|
|
|
<div v-if="ques.uploadInstructions" class="flex m-t-10 fs-12"> |
|
|
|
|
<span>上传要求说明:</span> |
|
|
|
|
<div class="html-parse" v-html="ques.uploadInstructions"></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
@ -194,6 +194,8 @@ export default { |
|
|
|
|
opts.map(m => { |
|
|
|
|
m.answer = 0 |
|
|
|
|
}) |
|
|
|
|
} else if (type === 'fill_blank') { // 填空题 |
|
|
|
|
n.stem = this.getQuesStem(n) |
|
|
|
|
} else { // 简答题 |
|
|
|
|
n.answer = '' |
|
|
|
|
// 附件 |
|
|
|
@ -313,7 +315,7 @@ export default { |
|
|
|
|
let result = stem |
|
|
|
|
|
|
|
|
|
while ((match = regex.exec(stem)) !== null) { |
|
|
|
|
const newInput = `<input type="text" class="fill-input" value="${fills && fills.length ? fills[index] : ''}">` |
|
|
|
|
const newInput = `<span contenteditable placeholder="(${index + 1})" class="fill-input">${fills && fills.length ? fills[index] : ''}</span>` |
|
|
|
|
result = result.replace(match[0], newInput) |
|
|
|
|
index++ |
|
|
|
|
} |
|
|
|
@ -663,18 +665,22 @@ export default { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.fill-input { |
|
|
|
|
width: 100px; |
|
|
|
|
position: relative; |
|
|
|
|
display: inline; |
|
|
|
|
min-width: 50px; |
|
|
|
|
height: 28px; |
|
|
|
|
padding: 0 15px; |
|
|
|
|
padding: 3px; |
|
|
|
|
margin: 0 10px; |
|
|
|
|
font-size: 13px; |
|
|
|
|
font-size: 14px; |
|
|
|
|
line-height: 28px; |
|
|
|
|
color: #606266; |
|
|
|
|
border: 1px solid #DCDEE0; |
|
|
|
|
border-radius: 2px; |
|
|
|
|
color: #333; |
|
|
|
|
border: 0; |
|
|
|
|
border-bottom: 1px solid #DCDEE0; |
|
|
|
|
outline: none; |
|
|
|
|
|
|
|
|
|
&:focus { |
|
|
|
|
outline: none; |
|
|
|
|
&:empty { |
|
|
|
|
display: inline-block; |
|
|
|
|
width: 3em; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|