|
|
@ -62,7 +62,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-form-item prop="remarks" label="试卷说明"> |
|
|
|
<el-form-item prop="remarks" label="试卷说明"> |
|
|
|
<Ueditor ref="remarks" @ready="remarksReady" /> |
|
|
|
<UeditorPlus ref="remarks" @ready="remarksReady" /> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<div class="line"></div> |
|
|
|
<div class="line"></div> |
|
|
@ -129,44 +129,46 @@ |
|
|
|
<p class="sum">本大题共{{ item.questionNum }}小题,共{{ item.targetScore }}分</p> |
|
|
|
<p class="sum">本大题共{{ item.questionNum }}小题,共{{ item.targetScore }}分</p> |
|
|
|
|
|
|
|
|
|
|
|
<div :class="['ques-wrap', { hide: item.shrink }]"> |
|
|
|
<div :class="['ques-wrap', { hide: item.shrink }]"> |
|
|
|
<div v-for="(ques, j) in item.examQuestions" :key="j" class="ques-item"> |
|
|
|
<draggable v-model="item.examQuestions" :group="dragGroup" @update="e => updateSort(e, item)"> |
|
|
|
<el-checkbox v-model="ques.check"></el-checkbox> |
|
|
|
<div v-for="(ques, j) in item.examQuestions" :key="j" class="ques-item"> |
|
|
|
<div :class="['ques-info', { disabled: !ques.status, del: ques.isDel, repeat: ques.isRepeat }]"> |
|
|
|
<el-checkbox v-model="ques.check"></el-checkbox> |
|
|
|
<div class="top-line"> |
|
|
|
<div :class="['ques-info', { disabled: !ques.status, del: ques.isDel, repeat: ques.isRepeat }]"> |
|
|
|
<span class="label">{{ j + 1 }} / {{ item.examQuestions.length }}</span> |
|
|
|
<div class="top-line"> |
|
|
|
<span class="label">{{ questionTypes.find(e => e.id === item.questionType).name }}</span> |
|
|
|
<span class="label">{{ j + 1 }} / {{ item.examQuestions.length }}</span> |
|
|
|
<div :id="'stem' + ques.questionVersionId" v-html="getQuesStem(ques)"></div> |
|
|
|
<span class="label">{{ questionTypes.find(e => e.id === item.questionType).name }}</span> |
|
|
|
<p v-if="item.questionType !== 'fill_blank'">(<el-input class="score" placeholder="请输入" |
|
|
|
<div :id="'stem' + ques.questionVersionId" v-html="getQuesStem(ques)"></div> |
|
|
|
v-model="ques.score" />分)</p> |
|
|
|
<p v-if="item.questionType !== 'fill_blank'">(<el-input class="score" placeholder="请输入" |
|
|
|
</div> |
|
|
|
v-model="ques.score" />分)</p> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 单选、多选、判断的选项 --> |
|
|
|
|
|
|
|
<template |
|
|
|
|
|
|
|
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList"> |
|
|
|
|
|
|
|
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> |
|
|
|
|
|
|
|
<span>{{ numToLetter(j) }}. </span> |
|
|
|
|
|
|
|
<div v-html="opt.optionText"></div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="bottom-line"> |
|
|
|
<!-- 单选、多选、判断的选项 --> |
|
|
|
<div class="correct"> |
|
|
|
<template |
|
|
|
【{{ item.questionType === 'essay' ? '参考答案' : '正确答案' }}】: |
|
|
|
v-if="item.questionType !== 'fill_blank' && item.questionType !== 'essay' && ques.questionAnswerVersionsList"> |
|
|
|
<div v-html="getCorrectAnswer(ques)"></div> |
|
|
|
<div v-for="(opt, j) in ques.questionAnswerVersionsList" :key="j" class="opt"> |
|
|
|
</div> |
|
|
|
<span>{{ numToLetter(j) }}. </span> |
|
|
|
<div class="actions"> |
|
|
|
<div class="text" v-html="opt.optionText"></div> |
|
|
|
<div class="sort"> |
|
|
|
</div> |
|
|
|
<span>排序</span> |
|
|
|
</template> |
|
|
|
<el-input class="score" v-model="ques.serialNumber" /> |
|
|
|
|
|
|
|
|
|
|
|
<div class="bottom-line"> |
|
|
|
|
|
|
|
<div class="correct"> |
|
|
|
|
|
|
|
【{{ item.questionType === 'essay' ? '参考答案' : '正确答案' }}】: |
|
|
|
|
|
|
|
<div v-html="getCorrectAnswer(ques)"></div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="actions"> |
|
|
|
|
|
|
|
<div class="sort"> |
|
|
|
|
|
|
|
<span>排序</span> |
|
|
|
|
|
|
|
<el-input class="score" v-model="ques.serialNumber" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<el-button type="text" @click="toQues(item, j, ques)">编辑试题</el-button> |
|
|
|
|
|
|
|
<el-button type="text" @click="showManualDia(item, j, ques)">更换试题</el-button> |
|
|
|
|
|
|
|
<el-button type="text" @click="showManualDia(item, j)">添加试题</el-button> |
|
|
|
|
|
|
|
<el-button type="text" @click="delQues(item, j)">移除试题</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-button type="text" @click="toQues(item, j, ques)">编辑试题</el-button> |
|
|
|
|
|
|
|
<el-button type="text" @click="showManualDia(item, j, ques)">更换试题</el-button> |
|
|
|
|
|
|
|
<el-button type="text" @click="showManualDia(item, j)">添加试题</el-button> |
|
|
|
|
|
|
|
<el-button type="text" @click="delQues(item, j)">移除试题</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</draggable> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
@ -189,7 +191,9 @@ |
|
|
|
import Setting from '@/setting' |
|
|
|
import Setting from '@/setting' |
|
|
|
import Util from '@/libs/util' |
|
|
|
import Util from '@/libs/util' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import dayjs from 'dayjs' |
|
|
|
import Ueditor from '@/components/ueditor' |
|
|
|
import Decimal from 'decimal.js' |
|
|
|
|
|
|
|
import Draggable from 'vuedraggable' |
|
|
|
|
|
|
|
import UeditorPlus from '@/components/ueditorPlus' |
|
|
|
import Breadcrumb from '@/components/breadcrumb' |
|
|
|
import Breadcrumb from '@/components/breadcrumb' |
|
|
|
import QuesConst from '@/const/ques' |
|
|
|
import QuesConst from '@/const/ques' |
|
|
|
import TestPaperConst from '@/const/testPaper' |
|
|
|
import TestPaperConst from '@/const/testPaper' |
|
|
@ -197,10 +201,9 @@ import Template from './template' |
|
|
|
import Manual from './manual' |
|
|
|
import Manual from './manual' |
|
|
|
import Auto from './auto' |
|
|
|
import Auto from './auto' |
|
|
|
import Detail from '@/pages/ques/detail' |
|
|
|
import Detail from '@/pages/ques/detail' |
|
|
|
import Decimal from 'decimal.js' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
components: { Ueditor, Breadcrumb, Template, Manual, Auto, Detail }, |
|
|
|
components: { UeditorPlus, Breadcrumb, Template, Manual, Auto, Detail, Draggable }, |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
crumbs: [], |
|
|
|
crumbs: [], |
|
|
@ -223,6 +226,9 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
professionals: [], |
|
|
|
professionals: [], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dragGroup: { |
|
|
|
|
|
|
|
pull: false, |
|
|
|
|
|
|
|
}, |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
classificationId: +this.$route.query.classificationId || '', |
|
|
|
classificationId: +this.$route.query.classificationId || '', |
|
|
|
difficult: '', |
|
|
|
difficult: '', |
|
|
@ -671,6 +677,13 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { } |
|
|
|
} catch (e) { } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 拖拽后回调 |
|
|
|
|
|
|
|
updateSort (e, item) { |
|
|
|
|
|
|
|
e.preventDefault() |
|
|
|
|
|
|
|
item.examQuestions.map((e, i) => { |
|
|
|
|
|
|
|
this.$set(e, 'serialNumber', i + 1) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 移除试题 |
|
|
|
// 移除试题 |
|
|
|
delQues (item, i) { |
|
|
|
delQues (item, i) { |
|
|
|
item.examQuestions.splice(i, 1) |
|
|
|
item.examQuestions.splice(i, 1) |
|
|
@ -848,7 +861,9 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
if (typeof form.classificationId === 'object') form.classificationId = form.classificationId[form.classificationId.length - 1] |
|
|
|
if (typeof form.classificationId === 'object') form.classificationId = form.classificationId[form.classificationId.length - 1] |
|
|
|
form.questionType = [...new Set(paper.map(e => e.questionType))].join('、') // 试题类型 |
|
|
|
|
|
|
|
|
|
|
|
const { questionTypes } = QuesConst |
|
|
|
|
|
|
|
form.questionType = [...new Set(paper.map(e => questionTypes.find(n => n.id === e.questionType).name))].join('、') // 试题类型 |
|
|
|
form.createSource = 1 |
|
|
|
form.createSource = 1 |
|
|
|
if (isCopy) form.paperId = '' |
|
|
|
if (isCopy) form.paperId = '' |
|
|
|
this.tempForm = form |
|
|
|
this.tempForm = form |
|
|
@ -1003,6 +1018,10 @@ export default { |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
color: #707070; |
|
|
|
color: #707070; |
|
|
|
line-height: 1.6; |
|
|
|
line-height: 1.6; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.text { |
|
|
|
|
|
|
|
max-width: calc(100% - 20px); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.bottom-line { |
|
|
|
.bottom-line { |
|
|
|