试题添加富文本作答区

master
yujialong 1 month ago
parent 688a08ab1a
commit 7ba56e280b
  1. 7
      src/pages/ques/detail/index.vue
  2. 2
      src/pages/testPaper/preview/index.vue

@ -150,6 +150,11 @@
<!-- 问答题特有 -->
<template v-if="form.questionType === 'essay'">
<el-form-item prop="richTextStatus" label="富文本作答区">
<el-switch v-model="form.richTextStatus" :active-value="1" :inactive-value="0"
:active-text="form.richTextStatus ? '启用' : '禁用'">
</el-switch>
</el-form-item>
<el-form-item prop="allowAttachment" label="支持学生上传附件" label-width="140px">
<el-radio-group v-model="form.allowAttachment">
<el-radio :label="0"></el-radio>
@ -283,6 +288,7 @@ export default {
questionType: 'single_choice',
specialtyIds: [1],
stem: '',
richTextStatus: 1,
allowAttachment: 0,
fileName: '',
stemAttachment: '',
@ -431,6 +437,7 @@ export default {
return e.path.split('/').map(n => +n)
}) : [],
specialtyIds: r.professionalList ? r.professionalList.map(e => e.specialtyId) : [],
richTextStatus: r.richTextStatus,
allowAttachment: r.allowAttachment,
fileName: r.fileName,
stemAttachment: r.stemAttachment,

@ -91,7 +91,7 @@
<el-button type="primary" size="mini" round
@click="download(ques.fileName || ques.stemAttachment, ques.stemAttachment)">下载</el-button>
</div>
<UeditorPlus :ref="'essayAnswer' + ques.id" v-model="ques.answer"
<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">

Loading…
Cancel
Save