yujialong 3 months ago
parent 872a1f6514
commit f858f467b2
  1. 2
      src/components/breadcrumb/index.vue
  2. 2
      src/components/ueditorPlus/index.vue
  3. 28
      src/pages/knowledge/index.vue
  4. 465
      src/pages/ques/detail/index.vue
  5. 49
      src/pages/ques/list/index.vue
  6. 2
      src/pages/quesBank/index.vue
  7. 2
      src/pages/quesBankType/index.vue
  8. 221
      src/pages/testPaper/detail/auto.vue
  9. 58
      src/pages/testPaper/detail/index.vue
  10. 4
      src/pages/testPaper/detail/manual.vue
  11. 17
      src/pages/testPaper/detail/template.vue
  12. 10
      src/pages/testPaper/list/index.vue
  13. 6
      src/pages/testPaperLibrary/index.vue
  14. 5
      src/router/modules/ques.js

@ -42,7 +42,7 @@ export default {
.el-breadcrumb__inner,
.el-breadcrumb__separator {
font-weight: 400;
color: #333;
color: $main-color;
}
&:last-child:not(:first-child) {

@ -69,7 +69,7 @@ export default {
setText (con) {
// eslint-disable-next-line no-undef
this.instance = UE.getEditor(this.randomId)
this.instance.setContent(con)
this.instance && this.instance.setContent(con)
}
}
}

@ -1,7 +1,7 @@
<template>
<div>
<Breadcrumb :data="crumbs" />
<div class="page">
<div class="page">
<Breadcrumb style="margin-bottom: 0;" :data="crumbs" />
<div class="wrap">
<div class="side">
<div class="m-b-20">
<el-radio-group v-model="isNotJoin" @change="changeType">
@ -142,7 +142,7 @@ export default {
components: { Breadcrumb },
data () {
return {
typeId: this.$route.query.id,
questionBankId: this.$route.query.questionBankId,
createSource: 1,
loading: false,
keyword: '',
@ -208,16 +208,19 @@ export default {
},
},
mounted () {
const { query } = this.$route
this.crumbs = [
{
name: this.$route.query.name || '题库管理',
name: query.questionBankName || '题库管理',
route: '/quesBank'
},
{
name: '试题列表',
route: '/ques',
query: {
id: this.typeId
questionBankId: query.questionBankId,
questionBankName: query.questionBankName,
questionBankCategory: query.questionBankCategory
}
},
{
@ -234,7 +237,7 @@ export default {
const { data } = await this.$post(this.api.classificationTreeStructure, {
createSource: this.createSource,
keyword: this.keyword,
questionBankId: this.typeId,
questionBankId: this.questionBankId,
})
this.handleType(data)
this.types = data
@ -311,7 +314,7 @@ export default {
this.typeForm.parentId = cas[len - 1]
}
form.createSource = this.createSource
form.questionBankId = this.typeId
form.questionBankId = this.questionBankId
form.type = 0
await this.$post(this.api.knowledgeHierarchySave, form)
Util.successMsg('保存成功')
@ -340,7 +343,7 @@ export default {
isNotJoin: this.isNotJoin || '',
pageNum: this.page,
pageSize: this.pageSize,
questionBankId: this.typeId,
questionBankId: this.questionBankId,
knowledgePointCategoryId: this.$refs.typeTree.getCurrentKey() || '',
})
this.list = res.message.records
@ -411,7 +414,7 @@ export default {
this.submiting = true
form.parentId = form.parentId.length ? form.parentId[form.parentId.length - 1] : 0
form.createSource = 1
form.questionBankId = this.typeId
form.questionBankId = this.questionBankId
form.type = 1
try {
await this.$post(this.api.knowledgeHierarchySave, form)
@ -461,11 +464,8 @@ export default {
width: 100%;
}
.page {
.wrap {
display: flex;
min-height: 100%;
margin-top: 20px;
padding: 0 24px;
.side {
width: 300px;

@ -1,24 +1,31 @@
<template>
<div>
<el-dialog :title="diaTitle" :visible.sync="quesVisible" :modal-append-to-body="false" width="1000px"
:close-on-click-modal="false" custom-class="ques-dia" @closed="closeDia">
<el-form :model="form" :rules="rules" ref="form" label-width="110px" :disabled="detailType === 2">
<div class="page">
<Breadcrumb :data="crumbs" />
<p class="page-name mb">试题</p>
<el-form :model="form" :rules="rules" class="input-form model" ref="form" label-width="110px"
:disabled="detailType === 2">
<div class="item-line">
<el-form-item label="题库分类">
<el-input v-model="questionBankCategory" disabled />
</el-form-item>
<el-form-item label="题库">
<el-input v-model="questionBankName" disabled />
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="specialtyIds" label="所属专业">
<el-select v-model="form.specialtyIds" clearable multiple placeholder="请选择所属专业">
<el-select v-model="form.specialtyIds" clearable multiple filterable placeholder="请选择所属专业">
<el-option v-for="(item, i) in professionals" :key="i" :label="item.professionalName"
:value="item.professionalId" filter></el-option>
</el-select>
</el-form-item>
<el-form-item prop="knowledgePointIds" label="所属知识点">
<el-cascader placeholder="请选择所属知识点" v-model="form.knowledgePointIds" :options="knowledges"
:props="{ value: 'id', label: 'name', multiple: true, checkStrictly: true }" clearable></el-cascader>
:props="{ value: 'id', label: 'name', multiple: true, checkStrictly: true }" :show-all-levels="false"
clearable></el-cascader>
</el-form-item>
</div>
<div class="item-line">
<el-form-item prop="givenYear" label="年份">
<el-date-picker v-model="form.givenYear" type="year" placeholder="请选择年份" format="yyyy" value-format="yyyy">
</el-date-picker>
@ -28,136 +35,135 @@
<el-option v-for="(item, i) in difficults" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="questionType" label="题型">
<el-radio-group v-model="form.questionType" @change="questionTypeChange">
<el-radio v-for="(item, i) in questionTypes" :key="i" :label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="is-required" prop="stem" label="题干">
<UeditorPlus ref="stem" :config="editorConfig" @ready="stemReady" v-model="form.stem" />
<Upload v-if="form.questionType === 'essay'" class="m-t-10"
accept=".csv,.xlsx,.xls,.docx,.doc,.pdf,.jpg,.png,.zip,.rar,.7z" :max-size="50" :file-list="uploadList"
:on-remove="handleRemove" @onSuccess="uploadSuccess">
<div slot="trigger">
<el-button type="primary">上传题干文件</el-button>
</div>
<el-form-item prop="questionType" label="题型">
<el-radio-group v-model="form.questionType" @change="questionTypeChange">
<el-radio v-for="(item, i) in questionTypes" :key="i" :label="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="is-required" prop="stem" label="题干">
<UeditorPlus ref="stem" :config="editorConfig" @ready="stemReady" v-model="form.stem" />
<Upload v-if="form.questionType === 'essay'" class="m-t-10"
accept=".csv,.xlsx,.xls,.docx,.doc,.pdf,.jpg,.png,.zip,.rar,.7z" :max-size="50" :file-list="uploadList"
:on-remove="handleRemove" @onSuccess="uploadSuccess">
<div slot="trigger">
<el-button type="primary">上传题干文件</el-button>
</div>
<template slot="tip">
<p>支持.csv.xlsx .docx .pdf .jpg .zip 等常见文件格式上传文件大小不能超过50MB</p>
</template>
</Upload>
</el-form-item>
<!-- 单选多选判断特有 -->
<el-form-item v-if="form.questionType !== 'fill_blank' && form.questionType !== 'essay'" label="正确答案" required>
<div class="opts">
<div v-for="(item, i) in form.questionAnswerVersions" :key="i" class="opt">
<el-checkbox v-if="form.questionType === 'multiple_choice'" class="correct-check"
v-model="item.answerIsCorrect" :true-label="1">选项{{ numToLetter(i) }}</el-checkbox>
<el-radio v-else v-model="item.answerIsCorrect" :true-label="1" :label="1" @change="correctChange(i)">选项{{
numToLetter(i)
}}</el-radio>
<div v-if="!item.focus" class="opt-input" @click="optFocus(item)">
<div v-if="item.optionText" v-html="item.optionText"></div>
<p v-else class="default">请输入</p>
</div>
<template slot="tip">
<p>支持.csv.xlsx .docx .pdf .jpg .zip 等常见文件格式上传文件大小不能超过50MB</p>
<UeditorPlus v-else class="opt-editor" :ref="'opt' + item.optionNumber" :config="editorConfig"
v-model="item.optionText" @ready="editor => optReady(editor, item)" />
<template v-if="form.questionType !== 'judgement'">
<i class="icon el-icon-circle-plus-outline" @click="addOpt(i)"></i>
<i class="icon el-icon-remove-outline" @click="delOpt(i)"></i>
</template>
</Upload>
</el-form-item>
</div>
</div>
</el-form-item>
<!-- 填空题特有 -->
<template v-if="form.questionType === 'fill_blank'">
<el-form-item label="正确答案" required>
<div class="opts fill-blanks">
<div v-for="(item, i) in fillBlanks" :key="i" class="opt j-between">
<div class="fills">
<span>填空{{ i + 1 }}</span>
<div v-for="(fill, j) in item.fills" :key="j" class="fill-item">
<el-input placeholder="请输入" v-model="fill.val" />
<i v-if="j" class="action-icon el-icon-remove-outline" @click="item.fills.splice(j, 1)"></i>
<span v-if="j !== item.fills.length - 1"></span>
</div>
<!-- 单选多选判断特有 -->
<el-form-item v-if="form.questionType !== 'fill_blank' && form.questionType !== 'essay'" label="正确答案" required>
<div class="opts">
<div v-for="(item, i) in form.questionAnswerVersions" :key="i" class="line">
<el-checkbox v-if="form.questionType === 'multiple_choice'" class="correct-check"
v-model="item.answerIsCorrect" :true-label="1">选项{{ numToLetter(i) }}</el-checkbox>
<el-radio v-else v-model="item.answerIsCorrect" :true-label="1" :label="1" @change="correctChange(i)">选项{{
numToLetter(i)
}}</el-radio>
<div v-if="!item.focus" class="opt-input" @click="optFocus(item)">
<div v-if="item.optionText" v-html="item.optionText"></div>
<p v-else class="default">请输入</p>
<el-button class="add-fill" type="primary" size="small" @click="addFill(item)">新增答案</el-button>
</div>
<div class="score-wrap">
<span>分值占比</span>
<el-input class="score" placeholder="请输入" size="small" v-model="item.scoreProportion" />
<span>%</span>
</div>
<UeditorPlus v-else class="opt-editor" :ref="'opt' + item.optionNumber" :config="editorConfig"
v-model="item.optionText" @ready="editor => optReady(editor, item)" />
<template v-if="form.questionType !== 'judgement'">
<i class="icon el-icon-circle-plus-outline" @click="addOpt(i)"></i>
<i class="icon el-icon-remove-outline" @click="delOpt(i)"></i>
</template>
</div>
</div>
</el-form-item>
<!-- 填空题特有 -->
<template v-if="form.questionType === 'fill_blank'">
<el-form-item label="正确答案" required>
<div class="opts fill-blanks">
<div v-for="(item, i) in fillBlanks" :key="i" class="line j-between">
<div class="fills">
<span>填空{{ i + 1 }}</span>
<div v-for="(fill, j) in item.fills" :key="j" class="fill-item">
<el-input placeholder="请输入" v-model="fill.val" />
<i v-if="j" class="action-icon el-icon-remove-outline" @click="item.fills.splice(j, 1)"></i>
<span v-if="j !== item.fills.length - 1"></span>
</div>
<el-button class="add-fill" type="primary" size="small" @click="addFill(item)">新增答案</el-button>
</div>
<div class="score-wrap">
<span>分值占比</span>
<el-input class="score" placeholder="请输入" size="small" v-model="item.scoreProportion" />
<span>%</span>
</div>
</div>
</div>
</el-form-item>
<el-form-item label="判分标准" class="is-required">
<el-select :value="form.questionAnswerVersions[0].gradingStandard" placeholder="请选择判分标准" disabled>
<el-option label="完全一致" value="exact_match"></el-option>
</el-select>
</el-form-item>
<el-form-item label="判分规则">
<div>
<el-switch disabled active-text="判分时忽略答案中的字母大小写"></el-switch>
</div>
<div>
<el-switch disabled active-text="判分时忽略答案中的空格"></el-switch>
</div>
<div>
<el-switch disabled active-text="允许学生每个填空的答案与正确答案的顺序不一致"></el-switch>
</div>
<div>
<el-switch disabled active-text="判分时允许数值相等"></el-switch>
</div>
</el-form-item>
</template>
<!-- 问答题特有 -->
<template v-if="form.questionType === 'essay'">
<el-form-item prop="allowAttachment" label="支持学生上传附件" label-width="130px">
<el-radio-group v-model="form.allowAttachment">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.allowAttachment" prop="uploadInstructions" label="上传要求说明">
<UeditorPlus ref="uploadInstructions" :config="editorConfig" @ready="uploadInstructionsReady"
v-model="form.uploadInstructions" />
</el-form-item>
<el-form-item label="判分标准" class="is-required">
<el-select :value="form.questionAnswerVersions[0].gradingStandard" placeholder="请选择判分标准" disabled>
<el-option label="人工判分" value="manual"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="referenceAnswer" label="参考答案">
<UeditorPlus ref="referenceAnswer" :config="editorConfig" @ready="referenceAnswerReady"
v-model="form.questionAnswerVersions[0].referenceAnswer" />
</el-form-item>
</template>
<el-form-item prop="answerAnalysis" label="解析">
<UeditorPlus ref="answerAnalysis" :config="editorConfig" @ready="answerAnalysisReady"
v-model="answerAnalysis" />
<el-form-item label="判分标准" class="is-required">
<el-select :value="form.questionAnswerVersions[0].gradingStandard" placeholder="请选择判分标准" disabled>
<el-option label="完全一致" value="exact_match"></el-option>
</el-select>
</el-form-item>
</el-form>
<span v-if="detailType !== 2" slot="footer" class="dialog-footer">
<el-button v-if="detailType === 1" type="primary" :loading="submiting && keep === 0"
@click="submit(1)">保存</el-button>
<template v-else>
<el-button type="primary" :loading="submiting && keep === 0" @click="submit(0)">{{ row.questionId ? '仅更新此题' :
'保存'
}}</el-button>
<el-button type="primary" :loading="submiting && keep === 1" @click="submit(1)">{{ row.questionId ? '同步更新相似题'
:
'保存并继续新增' }}</el-button>
</template>
<el-button @click="quesVisible = false">取消</el-button>
</span>
</el-dialog>
<el-form-item label="判分规则">
<div>
<el-switch disabled active-text="判分时忽略答案中的字母大小写"></el-switch>
</div>
<div>
<el-switch disabled active-text="判分时忽略答案中的空格"></el-switch>
</div>
<div>
<el-switch disabled active-text="允许学生每个填空的答案与正确答案的顺序不一致"></el-switch>
</div>
<div>
<el-switch disabled active-text="判分时允许数值相等"></el-switch>
</div>
</el-form-item>
</template>
<!-- 问答题特有 -->
<template v-if="form.questionType === 'essay'">
<el-form-item prop="allowAttachment" label="支持学生上传附件" label-width="140px">
<el-radio-group v-model="form.allowAttachment">
<el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="form.allowAttachment" prop="uploadInstructions" label="上传要求说明">
<UeditorPlus ref="uploadInstructions" :config="editorConfig" @ready="uploadInstructionsReady"
v-model="form.uploadInstructions" />
</el-form-item>
<el-form-item label="判分标准" class="is-required">
<el-select :value="form.questionAnswerVersions[0].gradingStandard" placeholder="请选择判分标准" disabled>
<el-option label="人工判分" value="manual"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="referenceAnswer" label="参考答案">
<UeditorPlus ref="referenceAnswer" :config="editorConfig" @ready="referenceAnswerReady"
v-model="form.questionAnswerVersions[0].referenceAnswer" />
</el-form-item>
</template>
<el-form-item prop="answerAnalysis" label="解析">
<UeditorPlus ref="answerAnalysis" :config="editorConfig" @ready="answerAnalysisReady"
v-model="answerAnalysis" />
</el-form-item>
</el-form>
<div v-if="detailType !== 2" class="btns">
<el-button v-if="detailType === 1" type="primary" :loading="submiting && keep === 0"
@click="submit(1)">保存</el-button>
<template v-else>
<el-button type="primary" :loading="submiting && keep === 0" @click="submit(0)">{{ questionId ? '仅更新此题' :
'保存'
}}</el-button>
<el-button type="primary" :loading="submiting && keep === 1" @click="submit(1)">{{ questionId ? '同步更新相似题'
:
'保存并继续新增' }}</el-button>
</template>
<el-button @click="back">取消</el-button>
</div>
<el-dialog title="提示" :visible.sync="repeatVisible" width="800px" :close-on-click-modal="false">
<el-alert title="与当前题库中已有的试题重复(如下),是否继续保存?" type="warning" effect="dark" :closable="false" />
@ -194,6 +200,7 @@
<script>
import Setting from '@/setting'
import Util from '@/libs/util'
import Breadcrumb from '@/components/breadcrumb'
import UeditorPlus from '@/components/ueditorPlus'
import Upload from '@/components/upload'
import Oss from '@/components/upload/upload.js'
@ -201,13 +208,16 @@ import dayjs from 'dayjs'
import _ from 'lodash'
import Const from '@/const/ques'
export default {
props: ['visible', 'row', 'detailType'],
components: { UeditorPlus, Upload },
components: { Breadcrumb, UeditorPlus, Upload },
data () {
return {
typeId: this.$route.query.id, // id
crumbs: [],
questionId: this.$route.query.questionId, // id
version: this.$route.query.version, // id
questionBankId: this.$route.query.questionBankId, // id
questionBankName: this.$route.query.questionBankName,
questionBankCategory: this.$route.query.questionBankCategory,
detailType: this.$route.query.detailType,
numToLetter: Util.numToLetter,
detailTypes: ['', '复制', '查看', '编辑', '编辑'],
types: [],
@ -222,9 +232,7 @@ export default {
questionTypes: Const.questionTypes,
knowledges: [],
editorConfig: {
zIndex: 2500,
},
editorConfig: {},
richEditor: {
object: null,
parameterName: '',
@ -249,7 +257,7 @@ export default {
questionAnswerVersions: [],
questionBankId: '',
questionType: 'single_choice',
specialtyIds: [1],
specialtyIds: [],
stem: '',
allowAttachment: 0,
stemAttachment: '',
@ -267,7 +275,6 @@ export default {
],
},
templateVisible: false,
quesVisible: false,
submiting: false,
tempForm: {},
keep: 0,
@ -291,15 +298,24 @@ export default {
'') + '试题'
},
},
watch: {
visible () {
this.quesVisible = this.visible
this.visible && this.init()
}
},
mounted () {
this.crumbs = [
{
name: '试题管理',
route: 'list',
query: {
id: this.questionBankId
}
},
{
name: this.diaTitle
},
]
this.originForm = _.cloneDeep(this.form)
// this.originFillBlank = _.cloneDeep(this.fillBlanks[0])
this.init()
},
methods: {
//
@ -309,18 +325,16 @@ export default {
const type = this.detailType
//
if (type < 4) {
const knowledgeCheck = this.$parent.$refs.typeTree.getCurrentNode()
if (knowledgeCheck && knowledgeCheck.type) this.form.knowledgePointIds = [knowledgeCheck.path.split('/').map(e => +e)]
if (!type) {
const { path } = this.$route.query
if (path) this.form.knowledgePointIds = [path.split('/').map(e => +e)]
} else if (type === 4) {
this.typeId = this.row.questionBankId
// this.questionBankId = this.row.questionBankId
}
//
this.$refs.stem && this.$refs.stem.setText('')
this.$refs.answerAnalysis && this.$refs.answerAnalysis.setText('')
this.$refs.uploadInstructions && this.$refs.uploadInstructions.setText('')
this.$refs.referenceAnswer && this.$refs.referenceAnswer.setText('')
const { stem, answerAnalysis } = this.$refs
stem && stem.instance && stem.setText('')
answerAnalysis && answerAnalysis.instance && answerAnalysis.setText('')
this.answerAnalysis = ''
this.getDetail()
this.getKnowledge()
@ -329,9 +343,9 @@ export default {
//
async getDetail () {
try {
const { row } = this
if (row.questionId) {
const res = await this.$post(`${this.api.findQuestion}?questionId=${this.row.questionId}&version=${this.row.version}`)
const { questionId, version } = this
if (questionId) {
const res = await this.$post(`${this.api.findQuestion}?questionId=${questionId}&version=${version}`)
const r = res.message
const opts = r.questionAnswerVersionsList
@ -352,7 +366,7 @@ export default {
knowledgePointIds: r.knowledgePointList ? r.knowledgePointList.map(e => {
return e.path.split('/').map(n => +n)
}) : [],
specialtyIds: r.professionalList.map(e => e.specialtyId),
specialtyIds: r.professionalList ? r.professionalList.map(e => e.specialtyId) : [],
allowAttachment: r.allowAttachment,
stemAttachment: r.stemAttachment,
uploadInstructions: r.uploadInstructions,
@ -374,11 +388,11 @@ export default {
},
//
async getKnowledge () {
if (this.typeId) {
if (this.questionBankId) {
try {
const { data } = await this.$post(this.api.TreeStructure, {
createSource: 1,
questionBankId: this.typeId,
questionBankId: this.questionBankId,
keyword: '',
})
this.handleType(data)
@ -394,6 +408,7 @@ export default {
pageSize: 1000,
})
this.professionals = res.pageList.records
if (!this.questionId) this.form.specialtyIds = [1]
} catch (e) { }
},
//
@ -456,19 +471,19 @@ export default {
editor.addListener('contentChange', () => {
this.questionItemReset(editor.getContent())
})
this.form.stem && editor.setContent(this.form.stem)
editor.setContent(this.form.stem)
},
//
answerAnalysisReady (editor) {
this.answerAnalysis && editor.setContent(this.answerAnalysis)
editor.setContent(this.answerAnalysis)
},
//
uploadInstructionsReady (editor) {
this.form.uploadInstructions && editor.setContent(this.form.uploadInstructions)
editor.setContent(this.form.uploadInstructions)
},
//
referenceAnswerReady (editor) {
this.form.questionAnswerVersions[0].referenceAnswer && editor.setContent(this.form.questionAnswerVersions[0].referenceAnswer)
editor.setContent(this.form.questionAnswerVersions[0].referenceAnswer)
},
//
correctChange (i) {
@ -588,7 +603,7 @@ export default {
this.submiting = true
try {
form.stem = stem
form.questionBankId = this.typeId
form.questionBankId = this.questionBankId
form.knowledgePointIds = form.knowledgePointIds.map(e => {
return e[e.length - 1]
})
@ -654,16 +669,15 @@ export default {
type === 4 && this.$emit('updateQues', this.tempForm, res.questionVersionId)
Util.successMsg('保存成功')
!form.questionId && this.keep ? this.init() : (this.quesVisible = false)
!form.questionId && this.keep ? this.init() : this.back()
this.repeatVisible = false
} finally {
this.submiting = false
}
},
//
closeDia () {
this.$emit('update:visible', false)
}
back () {
this.$router.back()
},
}
};
</script>
@ -698,83 +712,76 @@ export default {
}
}
.fill-blanks {
.fills {
display: inline-flex;
align-items: center;
}
.fill-item {
display: inline-flex;
align-items: center;
margin-right: 10px;
/deep/.ques-dia {
z-index: 500;
.fill-blanks {
.fills {
display: inline-flex;
align-items: center;
}
.fill-item {
display: inline-flex;
align-items: center;
.el-input {
width: 100px;
margin-right: 10px;
.el-input {
width: 100px;
margin-right: 10px;
}
}
}
.add-fill {
margin-left: 10px;
}
.add-fill {
margin-left: 10px;
}
.score-wrap {
display: inline-flex;
align-items: center;
.score-wrap {
display: inline-flex;
align-items: center;
.el-input {
width: 80px;
margin: 0 10px;
}
.el-input {
width: 80px;
margin: 0 10px;
}
}
}
.opts {
.line {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.el-radio,
.el-checkbox {
margin-right: 15px;
}
.opts {
.opt {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.opt-input {
width: 100%;
min-height: 32px;
padding: 0 15px;
font-size: 13px;
border: 1px solid #DCDEE0;
border-radius: 2px;
cursor: text;
}
.el-radio,
.el-checkbox {
margin-right: 15px;
}
.default {
color: #8f8f8f;
}
.opt-input {
width: 100%;
min-height: 32px;
padding: 0 15px;
font-size: 13px;
border: 1px solid #DCDEE0;
border-radius: 2px;
cursor: text;
}
.opt-editor {
width: calc(100% - 132px);
}
.default {
color: #8f8f8f;
}
.icon {
margin-left: 10px;
font-size: 18px;
cursor: pointer;
}
.opt-editor {
width: calc(100% - 132px);
}
/deep/.correct-check {
margin-right: 15px;
.icon {
margin-left: 10px;
font-size: 18px;
cursor: pointer;
}
}
.correct-check {
margin-right: 15px;
}
</style>

@ -139,8 +139,6 @@
</div>
</div>
<Detail :visible.sync="quesVisible" :row.sync="curRow" :detailType.sync="detailType" />
<el-dialog title="提示" :visible.sync="delVisible" width="400px" :close-on-click-modal="false" custom-class="del-dia">
<div class="del-wrap">
<div class="icon el-icon-warning"></div>
@ -211,18 +209,12 @@ export default {
components: { Breadcrumb, Detail },
data () {
return {
crumbs: [
{
name: this.$route.query.questionBankName || '题库管理',
route: '/quesBank'
},
{
name: '试题管理'
},
],
crumbs: [],
questionBankId: this.$route.query.questionBankId,
questionBankName: this.$route.query.questionBankName,
questionBankCategory: this.$route.query.questionBankCategory,
difficults: Const.difficults,
questionTypes: Const.questionTypes,
typeId: this.$route.query.id,
loading: false,
isNotJoin: 0,
createSource: 1,
@ -264,10 +256,6 @@ export default {
total: 0,
multipleSelection: [],
quesVisible: false,
curRow: {},
detailType: '',
delVisible: false,
curUsePapers: [],
curRow: {},
@ -303,11 +291,17 @@ export default {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initData, 500)
},
quesVisible () {
this.quesVisible || this.getList()
},
},
mounted () {
this.crumbs = [
{
name: this.questionBankName || '题库管理',
route: '/quesBank'
},
{
name: '试题管理'
},
]
this.getType()
this.getProfessional()
this.getKnowledge()
@ -319,7 +313,7 @@ export default {
this.loading = true
const { data } = await this.$post(this.api.TreeStructure, {
createSource: 1,
questionBankId: this.typeId,
questionBankId: this.questionBankId,
keyword: this.keyword,
})
this.types = data
@ -330,7 +324,7 @@ export default {
},
//
toSet () {
this.$router.push(`/knowledge?id=${this.typeId}`)
this.$router.push(`/knowledge?questionBankId=${this.questionBankId}&questionBankName=${this.questionBankName}`)
},
//
typeChange () {
@ -358,7 +352,7 @@ export default {
try {
const { data } = await this.$post(this.api.TreeStructure, {
createSource: 1,
questionBankId: this.typeId,
questionBankId: this.questionBankId,
keyword: ''
})
this.handleType(data)
@ -392,7 +386,7 @@ export default {
isNotJoin: this.isNotJoin || '',
pageNum: this.page,
pageSize: this.pageSize,
questionBankId: this.typeId,
questionBankId: this.questionBankId,
knowledgePointIds: type || [],
})
this.list = Util.removeTag(message.records)
@ -424,15 +418,12 @@ export default {
//
add () {
this.quesVisible = true
this.curRow = {}
this.detailType = ''
const knowledgeCheck = this.$refs.typeTree.getCurrentNode()
this.$router.push(`detail?questionBankId=${this.questionBankId}&questionBankName=${this.questionBankName}&questionBankCategory=${this.questionBankCategory}&path=${knowledgeCheck && knowledgeCheck.type ? knowledgeCheck.path : ''}`)
},
// / type: 123
toDetail (row, type) {
this.quesVisible = true
this.curRow = row
this.detailType = type
this.$router.push(`detail?questionId=${row.questionId}&version=${row.version}&questionBankId=${this.questionBankId}&questionBankName=${this.questionBankName}&questionBankCategory=${this.questionBankCategory}&detailType=${type}`)
},
//
async remove (row) {

@ -270,7 +270,7 @@ export default {
},
//
toQues (row) {
this.$router.push(`/ques?id=${row.id}&questionBankName=${row.questionBankName}&questionBankCategory=${row.questionBankCategory}`)
this.$router.push(`/ques?questionBankId=${row.id}&questionBankName=${row.questionBankName}&questionBankCategory=${row.questionBankCategory}`)
},
// /
async edit (row, isCopy) {

@ -219,7 +219,7 @@ export default {
async switchOff (val, row) {
try {
row.status = val ? 0 : 1 //
if (!val) {
if (!val && row.children && row.children.length) {
await this.$confirm(`<p>确认要禁用【${row.name}】吗?</p><p style="color: #f56c6c;">禁用后,此题库分类及其子分类将被禁用</p>`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',

@ -1,118 +1,120 @@
<template>
<div>
<el-dialog title="自动选题" :visible.sync="quesVisible" width="1200px" :close-on-click-modal="false" @closed="closeDia">
<h6 class="page-name">难度设置</h6>
<div class="tool">
<ul class="filter">
<li>
<label>试卷难度</label>
<el-select v-model="difficult" placeholder="请选择试卷难度" @change="difficultChange">
<el-option v-for="(item, i) in difficults" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</li>
</ul>
</div>
<el-drawer title="自动选题" :visible.sync="quesVisible" size="1200px" :close-on-click-modal="false"
custom-class="ques-dia" @closed="closeDia">
<div class="overflow">
<h6 class="page-name">难度设置</h6>
<div class="tool">
<ul class="filter">
<li>
<label>试卷难度</label>
<el-select v-model="difficult" placeholder="请选择试卷难度" @change="difficultChange">
<el-option v-for="(item, i) in difficults" :key="i" :label="item.name" :value="item.id"></el-option>
</el-select>
</li>
</ul>
</div>
<el-table :data="list" stripe header-align="center" row-key="libraryId">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column label="大题" align="center" min-width="100">
<template slot-scope="scope">{{ arabicToChinese(scope.$index + 1) }}大题</template>
</el-table-column>
<el-table-column prop="name" label="题型" align="center" min-width="90">
<template slot-scope="scope">
<p v-if="scope.row.questionType">{{ questionTypes.find(e => e.id === scope.row.questionType).name }}</p>
</template>
</el-table-column>
<el-table-column prop="questionNum" label="目标题数" align="center" min-width="80"></el-table-column>
<el-table-column label="基础(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.basicDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="普通(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.normalDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="较难(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.hardDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="难(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.veryHardDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="难度随机(道题)" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.number="scope.row.randomDifficulty" type="number" />
</template>
</el-table-column>
</el-table>
<el-table :data="list" stripe header-align="center" row-key="libraryId">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column label="大题" align="center" min-width="100">
<template slot-scope="scope">{{ arabicToChinese(scope.$index + 1) }}大题</template>
</el-table-column>
<el-table-column prop="name" label="题型" align="center" min-width="90">
<template slot-scope="scope">
<p v-if="scope.row.questionType">{{ questionTypes.find(e => e.id === scope.row.questionType).name }}</p>
</template>
</el-table-column>
<el-table-column prop="questionNum" label="目标题数" align="center" min-width="80"></el-table-column>
<el-table-column label="基础(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.basicDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="普通(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.normalDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="较难(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.hardDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="难(道题)" align="center" width="90">
<template slot-scope="scope">
<el-input v-model.number="scope.row.veryHardDifficulty" type="number" />
</template>
</el-table-column>
<el-table-column label="难度随机(道题)" align="center" width="100">
<template slot-scope="scope">
<el-input v-model.number="scope.row.randomDifficulty" type="number" />
</template>
</el-table-column>
</el-table>
<h6 class="page-name m-t-20">知识点设置</h6>
<div class="wrap">
<!-- 题库 -->
<div class="item">
<p class="total m-b-10">题库</p>
<el-input class="m-b-10" placeholder="请输入题库分类/题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword"
clearable />
<el-tree :key="key" node-key="id" default-expand-all highlight-current ref="quesBank" :data="quesBanks"
:props="{ label: 'name' }" @node-click="getKnowledge" @check-change="quesBankCheck"></el-tree>
</div>
<!-- 知识点 -->
<div class="item">
<p class="total m-b-10">知识点框架</p>
<el-input class="m-b-10" placeholder="请输入知识点分类/知识点名称" prefix-icon="el-icon-search" v-model="knowledgeKeyword"
clearable />
<el-tree :data="knowledges" default-expand-all ref="knowledge" node-key="id" highlight-current
:expand-on-click-node="false" show-checkbox @check-change="knowledgeCheck" :props="{ label: 'name' }">
<span class="custom-tree-node" slot-scope="{ node, data }">
<img v-if="data.type" class="m-r-5" src="@/assets/images/knowledge.svg" alt="">
<span class="org-name">{{ data.name }}</span>
</span>
</el-tree>
</div>
<!-- 已选知识点 -->
<div class="item">
<div class="flex j-between a-center m-b-20">
<p class="total m-b-10">已选知识点{{ allKnowledges.length }}</p>
<p class="clear" @click="clearChecked">
<i class="el-icon-delete m-r-5"></i>
清空
</p>
<h6 class="page-name m-t-20">知识点设置</h6>
<div class="wrap">
<!-- 题库 -->
<div class="item">
<p class="total m-b-10">题库</p>
<el-input class="m-b-10" placeholder="请输入题库分类/题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword"
clearable />
<el-tree :key="key" node-key="id" default-expand-all highlight-current ref="quesBank" :data="quesBanks"
:props="{ label: 'name' }" @node-click="getKnowledge" @check-change="quesBankCheck"></el-tree>
</div>
<div v-for="(item, i) in checked" :key="i" class="line j-between">
<div class="flex a-center">
题库{{ item.quesBank.name }}
<i class="el-icon-delete action-icon m-l-10" @click="delQuesBank(i)"></i>
<!-- 知识点 -->
<div class="item">
<p class="total m-b-10">知识点框架</p>
<el-input class="m-b-10" placeholder="请输入知识点分类/知识点名称" prefix-icon="el-icon-search"
v-model="knowledgeKeyword" clearable />
<el-tree :data="knowledges" default-expand-all ref="knowledge" node-key="id" highlight-current
:expand-on-click-node="false" show-checkbox @check-change="knowledgeCheck" :props="{ label: 'name' }">
<span class="custom-tree-node" slot-scope="{ node, data }">
<img v-if="data.type" class="m-r-5" src="@/assets/images/knowledge.svg" alt="">
<span class="org-name">{{ data.name }}</span>
</span>
</el-tree>
</div>
<!-- 已选知识点 -->
<div class="item">
<div class="flex j-between a-center m-b-20">
<p class="total m-b-10">已选知识点{{ allKnowledges.length }}</p>
<p class="clear" @click="clearChecked">
<i class="el-icon-delete m-r-5"></i>
清空
</p>
</div>
<div class="knowledges">
<el-tag v-for="(tag, j) in item.knowledges" :key="tag.name" class="m-r-10" closable
@close="delKnowledge(i, j, item)">
{{ tag.name }}
</el-tag>
<div v-for="(item, i) in checked" :key="i" class="line j-between">
<div class="flex a-center">
题库{{ item.quesBank.name }}
<i class="el-icon-delete action-icon m-l-10" @click="delQuesBank(i)"></i>
</div>
<div class="knowledges">
<el-tag v-for="(tag, j) in item.knowledges" :key="tag.name" class="m-r-10" closable
@close="delKnowledge(i, j, item)">
{{ tag.name }}
</el-tag>
</div>
</div>
</div>
</div>
</div>
<h6 class="page-name m-t-20">年份设置</h6>
<div class="years flex">
<el-checkbox style="margin-right: 20px" v-model="yearAll" @change="yearAllChange">全选</el-checkbox>
<el-checkbox-group v-model="yearCheck" @change="yearChange">
<el-checkbox v-for="(item, i) in years" :key="i" :label="item"></el-checkbox>
</el-checkbox-group>
<h6 class="page-name m-t-20">年份设置</h6>
<div class="years flex">
<el-checkbox style="margin-right: 20px" v-model="yearAll" @change="yearAllChange">全选</el-checkbox>
<el-checkbox-group v-model="yearCheck" @change="yearChange">
<el-checkbox v-for="(item, i) in years" :key="i" :label="item"></el-checkbox>
</el-checkbox-group>
</div>
</div>
<span slot="footer" class="dialog-footer">
<div class="btns">
<el-button @click="quesVisible = false">取消</el-button>
<el-button type="primary" :loading="submiting" @click="submit">自动选题</el-button>
</span>
</el-dialog>
</div>
</el-drawer>
</div>
</template>
<script>
@ -145,6 +147,7 @@ export default {
yearAll: true,
yearCheck: [],
submiting: false,
diaTop: 0,
};
},
computed: {
@ -171,7 +174,9 @@ export default {
}
},
mounted () {
console.log(5555, window.innerHeight)
const height = (window.innerHeight - 600) / 2
this.diaTop = (height > 0 ? height : 0) + 'px'
},
methods: {
//
@ -419,6 +424,18 @@ export default {
</script>
<style lang="scss" scoped>
/deep/.ques-dia {
.el-drawer__header {
margin-bottom: 20px;
}
}
.overflow {
height: calc(100vh - 147px);
padding: 0 20px;
overflow: auto;
}
.wrap {
display: flex;
margin-top: 20px;

@ -32,7 +32,7 @@
</div>
<div class="item-line">
<el-form-item prop="professionals" label="所属专业">
<el-select v-model="form.professionalId" clearable placeholder="请选择所属专业">
<el-select v-model="form.professionalId" multiple clearable placeholder="请选择所属专业">
<el-option v-for="(item, i) in professionals" :key="i" :label="item.professionalName"
:value="item.professionalId" filter></el-option>
</el-select>
@ -122,7 +122,7 @@
<div>
<el-button type="primary" @click="allocation(item)">一键分配分值</el-button>
<el-button type="primary" @click="showManualDia(item)">批量添加</el-button>
<el-button type="danger" @click="batchDelQues(item)">批量除试题</el-button>
<el-button type="danger" @click="batchDelQues(item)">批量除试题</el-button>
<img :class="['shrink', { active: item.shrink }]" src="@/assets/images/shrink.svg" alt=""
@click="item.shrink = !item.shrink">
</div>
@ -137,12 +137,14 @@
{{ ques.repeat }}
<div :class="['ques-info', { disabled: !ques.status, del: ques.isDel, repeat: ques.repeat }]">
<div class="top-line">
<div class="labels">
<span class="label">{{ j + 1 }} / {{ item.examQuestions.length }}</span>
<span class="label">{{ questionTypes.find(e => e.id === item.questionType).name }}</span>
<div class="stem-info">
<div class="labels">
<span class="label">{{ j + 1 }} / {{ item.examQuestions.length }}</span>
<span class="label">{{ questionTypes.find(e => e.id === item.questionType).name }}</span>
</div>
<div class="stem" :id="'stem' + ques.questionVersionId" v-html="getQuesStem(ques)"></div>
</div>
<div class="stem" :id="'stem' + ques.questionVersionId" v-html="getQuesStem(ques)"></div>
<p v-if="item.questionType !== 'fill_blank'"><el-input class="score" placeholder="请输入分值"
<p v-if="item.questionType !== 'fill_blank'"><el-input class="l-input" placeholder="请输入分值"
v-model="ques.score" /></p>
</div>
@ -163,7 +165,7 @@
<div class="actions">
<div class="sort">
<span>排序</span>
<el-input class="score" v-model="ques.serialNumber" />
<el-input class="l-input sort-input" 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>
@ -177,7 +179,6 @@
</div>
</li>
</ul>
</el-form>
<div class="btns">
<el-button @click="submit(1)">保存草稿</el-button>
@ -189,7 +190,6 @@
<Template :visible.sync="templateVisible" />
<Manual :visible.sync="manualVisible" :questionType.sync="curType.questionType" />
<Auto :visible.sync="autoVisible" />
<Detail :visible.sync="quesVisible" :row.sync="curRow" :detailType.sync="detailType" @updateQues="updateQues" />
<RepeatQues :visible.sync="repeatVisible" :list.sync="repeatQues" />
</div>
</template>
@ -201,7 +201,6 @@ import Template from './template'
import Manual from './manual'
import Auto from './auto'
import RepeatQues from './repeatQues'
import Detail from '@/pages/ques/detail'
import Setting from '@/setting'
import Util from '@/libs/util'
import dayjs from 'dayjs'
@ -210,7 +209,7 @@ import TestPaperConst from '@/const/testPaper'
import Decimal from 'decimal.js'
export default {
components: { UeditorPlus, Breadcrumb, Template, Manual, Auto, RepeatQues, Detail, Draggable },
components: { UeditorPlus, Breadcrumb, Template, Manual, Auto, RepeatQues, Draggable },
data () {
return {
crumbs: [],
@ -244,7 +243,7 @@ export default {
paperMethod: '',
paperType: '',
particularYear: new Date(),
professionalId: '',
professionalId: [],
remarks: '',
score: '',
questionCount: 0,
@ -377,6 +376,7 @@ export default {
})
if (r.particularYear) r.particularYear = r.particularYear + ''
if (r.professionalId) r.professionalId = r.professionalId.split(',').map(e => +e)
this.form = r
}
} catch (e) { }
@ -615,7 +615,7 @@ export default {
try {
const checked = item.examQuestions.filter(e => e.check)
if (checked.length) {
await this.$confirm(`确认要除吗?`, '提示', {
await this.$confirm(`确认要除吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -639,9 +639,17 @@ export default {
})
},
//
delQues (item, i) {
item.examQuestions.splice(i, 1)
this.calcDifficult()
async delQues (item, i) {
try {
await this.$confirm(`确认要移除吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
})
item.examQuestions.splice(i, 1)
this.calcDifficult()
} catch (e) { }
},
//
hasRepeatQues (list) {
@ -796,6 +804,7 @@ export default {
}
this.submiting = true
form.professionalId = form.professionalId.join()
form.particularYear = +(dayjs(form.particularYear).format('YYYY'))
form.libraryId = this.libraryId
form.questionCount = this.questionCount
@ -962,11 +971,18 @@ export default {
.top-line {
display: flex;
justify-content: space-between;
align-items: baseline;
margin-bottom: 10px;
line-height: 28px;
}
.stem-info {
display: inline-flex;
align-items: baseline;
flex: 1;
}
.labels {
display: inline-flex;
align-items: center;
@ -984,13 +1000,17 @@ export default {
}
.stem {
max-width: calc(100% - 236px);
max-width: calc(100% - 120px);
}
/deep/.score {
/deep/.l-input {
width: 100px;
margin: 0 10px;
&.sort-input {
width: 56px;
}
.el-input__inner {
height: 28px;
line-height: 28px;

@ -90,8 +90,6 @@
<el-button type="primary" :loading="submiting" @click="submit">确定</el-button>
</span>
</el-dialog>
<Detail :visible.sync="quesVisible" :row.sync="curRow" :detailType.sync="detailType" @updateQues="updateQues" />
</div>
</template>
<script>
@ -99,9 +97,7 @@ import Setting from '@/setting'
import Util from '@/libs/util'
import _ from 'lodash'
import QuesConst from '@/const/ques'
import Detail from '@/pages/ques/detail'
export default {
components: { Detail },
props: ['visible', 'questionType'],
data () {
return {

@ -6,14 +6,14 @@
<ul class="filter">
<li>
<label>题型</label>
<el-select v-model="filter.questionType" clearable placeholder="请选择题目类型" @change="initData">
<el-select v-model="questionType" multiple clearable placeholder="请选择题目类型" @change="initData">
<el-option v-for="(item, i) in questionTypes" :key="i" :value="item.id" :label="item.name"></el-option>
</el-select>
</li>
<li>
<label>搜索</label>
<el-input style="width: 250px;" placeholder="请输入模板名称" prefix-icon="el-icon-search"
v-model="filter.templateName" clearable />
<el-input style="width: 250px;" placeholder="请输入模板名称" prefix-icon="el-icon-search" v-model="templateName"
clearable />
</li>
</ul>
<div>
@ -105,10 +105,8 @@ export default {
listVisible: false,
searchTimer: null,
filter: {
templateName: '',
questionType: '',
},
templateName: '',
questionType: [],
list: [],
page: 1,
pageSize: 10,
@ -174,7 +172,7 @@ export default {
}
},
watch: {
'filter.templateName': function (val) {
templateName: function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initData, 500)
},
@ -193,7 +191,8 @@ export default {
const res = await this.$post(this.api.examPaperTemplateList, {
pageNum: this.page,
pageSize: this.pageSize,
...this.filter
questionType: this.questionType.join(),
templateName: this.templateName
})
const list = res.pageList.records
const types = QuesConst.questionTypes

@ -150,7 +150,7 @@
<el-table-column label="操作" align="center" width="240">
<template slot-scope="scope">
<el-button type="text" @click="toDetail(scope.row, 1)">复制</el-button>
<!-- <el-button type="text" @click="edit(scope.row)">预览</el-button> -->
<el-button type="text" @click="preview(scope.row)">预览</el-button>
<el-button type="text" @click="toDetail(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
<el-switch v-if="!scope.row.status" v-model="scope.row.isDisable" :active-value="false"
@ -474,11 +474,15 @@ export default {
},
//
add () {
this.$router.push(`detail?libraryId=${this.typeId}&classificationId=${this.$refs.typeTree.getCurrentKey() || ''}`)
this.$router.push(`/testPaper/detail?libraryId=${this.typeId}&classificationId=${this.$refs.typeTree.getCurrentKey() || ''}`)
},
//
async toDetail (row, isCopy = '') {
this.$router.push(`detail?paperId=${row.paperId}&libraryId=${this.typeId}&classificationId=${this.$refs.typeTree.getCurrentKey() || ''}&isCopy=${isCopy}`)
this.$router.push(`/testPaper/detail?paperId=${row.paperId}&libraryId=${this.typeId}&classificationId=${this.$refs.typeTree.getCurrentKey() || ''}&isCopy=${isCopy}`)
},
//
preview (row) {
window.open(this.$router.resolve(`preview?id=${row.paperId}`).href)
},
async delAllSelection () {
const list = this.multipleSelection

@ -61,7 +61,7 @@
<el-table-column prop="createUserName" label="创建人" align="center" width="100"></el-table-column>
<el-table-column label="操作" align="center" width="280">
<template slot-scope="scope">
<el-button type="text" @click="toTestPaper(scope.row)">管理</el-button>
<el-button type="text" @click="toTestPaper(scope.row)">管理</el-button>
<el-button type="text" @click="edit(scope.row, 0)">编辑</el-button>
<el-button type="text" @click="edit(scope.row, 1)">复制</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
@ -126,7 +126,7 @@ export default {
],
filter: {
numOrder: '',
timeOrder: '',
timeOrder: 2,
isDisable: '',
keyWord: '',
},
@ -171,7 +171,7 @@ export default {
try {
this.loading = true
const res = await this.$post(this.api.libraryClassificationList, {
keyword: this.keyword,
libraryClassificationName: this.keyword,
createSource: 1,
})
const data = res.treeList

@ -15,5 +15,10 @@ export default {
component: () => import('@/pages/ques/list'),
meta: { title: '试题管理' }
},
{
path: 'detail',
component: () => import('@/pages/ques/detail'),
meta: { title: '试题详情' }
},
]
};

Loading…
Cancel
Save