|
|
@ -6,33 +6,63 @@ |
|
|
|
<!-- 题库 --> |
|
|
|
<!-- 题库 --> |
|
|
|
<div class="item"> |
|
|
|
<div class="item"> |
|
|
|
<p class="total m-b-10">题库</p> |
|
|
|
<p class="total m-b-10">题库</p> |
|
|
|
<el-input class="m-b-10" placeholder="请输入题库分类/题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword" |
|
|
|
<ul class="filter"> |
|
|
|
clearable /> |
|
|
|
<li class="m-b-10"> |
|
|
|
<el-tree :key="key" node-key="id" default-expand-all ref="quesBank" :data="quesBanks" |
|
|
|
<label>题库分类</label> |
|
|
|
:props="{ label: 'name' }" @node-click="getKnowledge" @check-change="quesBankCheck"></el-tree> |
|
|
|
<el-cascader style="width: 240px;" placeholder="请选择题库分类" v-model="quesBankTypeVal" |
|
|
|
|
|
|
|
:options="quesBankTypes" :props="{ value: 'id', label: 'name', checkStrictly: true }" clearable |
|
|
|
|
|
|
|
@change="initQuesBank"></el-cascader> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<el-input placeholder="请输入题库名称" prefix-icon="el-icon-search" v-model="quesBankKeyword" clearable /> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="quesBanks.length"> |
|
|
|
|
|
|
|
<div class="line"> |
|
|
|
|
|
|
|
<span class="serial">序号</span> |
|
|
|
|
|
|
|
<span>题库名称</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="able-check"> |
|
|
|
|
|
|
|
<div v-for="(item, i) in quesBanks" :key="i" :class="['line', { active: curQuesBank.id === item.id }]" |
|
|
|
|
|
|
|
@click="questionBankClick(item)"> |
|
|
|
|
|
|
|
<span class="serial">{{ i + 1 }}</span> |
|
|
|
|
|
|
|
<p class="quesBank" :title="item.questionBankName">{{ item.questionBankName }}</p> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pagination"> |
|
|
|
|
|
|
|
<el-pagination background @current-change="currentChangeQuesBank" small :current-page="pageQuesBank" |
|
|
|
|
|
|
|
layout="total, prev, pager, next" :total="totalQuesBank"></el-pagination> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div v-else class="empty"> |
|
|
|
|
|
|
|
<img class="icon" src="@/assets/images/empty.svg" alt=""> |
|
|
|
|
|
|
|
<p>暂无数据</p> |
|
|
|
</div> |
|
|
|
</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" @node-click="getQues" @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> |
|
|
|
<!-- 题目 --> |
|
|
|
<!-- 题目 --> |
|
|
|
<div class="item"> |
|
|
|
<div class="item"> |
|
|
|
<p class="total">{{ questionTypeName }}(共{{ ques.length }}道题)</p> |
|
|
|
<p class="total m-b-10">{{ questionTypeName }}(共{{ ques.length }}道题)</p> |
|
|
|
<div class="ques"> |
|
|
|
|
|
|
|
|
|
|
|
<ul class="filter"> |
|
|
|
|
|
|
|
<li class="m-b-10"> |
|
|
|
|
|
|
|
<label>知识点</label> |
|
|
|
|
|
|
|
<el-cascader style="width: 240px;" placeholder="请选择知识点" v-model="knowledgeVal" :options="knowledges" |
|
|
|
|
|
|
|
:props="{ value: 'id', label: 'name', multiple: true }" clearable @change="getQues"></el-cascader> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
<li> |
|
|
|
|
|
|
|
<el-input placeholder="请输入题干" prefix-icon="el-icon-search" v-model="knowledgeKeyword" clearable /> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="ques.length"> |
|
|
|
<div class="line"> |
|
|
|
<div class="line"> |
|
|
|
<el-checkbox v-model="quesAllCheck" @change="quesAllCheckChange"></el-checkbox> |
|
|
|
<el-checkbox v-model="quesAllCheck" @change="quesAllCheckChange"></el-checkbox> |
|
|
|
<span class="serial">序号</span> |
|
|
|
<span class="serial">序号</span> |
|
|
|
<span>题干</span> |
|
|
|
<span class="stem">题干</span> |
|
|
|
|
|
|
|
<span class="kl">知识点</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-for="(item, i) in ques" :key="i" class="line"> |
|
|
|
<div v-for="(item, i) in ques" :key="i" class="line"> |
|
|
@ -40,9 +70,16 @@ |
|
|
|
@change="val => quesChange(val, item)"></el-checkbox> |
|
|
|
@change="val => quesChange(val, item)"></el-checkbox> |
|
|
|
<span class="serial">{{ i + 1 }}</span> |
|
|
|
<span class="serial">{{ i + 1 }}</span> |
|
|
|
<el-tooltip effect="dark" :content="item.stemText" placement="top-start"> |
|
|
|
<el-tooltip effect="dark" :content="item.stemText" placement="top-start"> |
|
|
|
<p class="stem" :title="item.stemText">{{ item.stemText }}</p> |
|
|
|
<p class="stem">{{ item.stemText }}</p> |
|
|
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
<el-tooltip effect="dark" :content="item.knowledgePointName" placement="top-start"> |
|
|
|
|
|
|
|
<p class="kl">{{ item.knowledgePointName }}</p> |
|
|
|
</el-tooltip> |
|
|
|
</el-tooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div v-else class="empty"> |
|
|
|
|
|
|
|
<img class="icon" src="@/assets/images/empty.svg" alt=""> |
|
|
|
|
|
|
|
<p>暂无数据</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 已选试题 --> |
|
|
|
<!-- 已选试题 --> |
|
|
@ -57,30 +94,47 @@ |
|
|
|
<p v-else class="total">已选试题(共{{ checkedLen }}道题)</p> |
|
|
|
<p v-else class="total">已选试题(共{{ checkedLen }}道题)</p> |
|
|
|
<el-button type="text" @click="batchDelChecked">批量移除</el-button> |
|
|
|
<el-button type="text" @click="batchDelChecked">批量移除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-input class="m-t-10 m-b-10" placeholder="请输入题干/知识点" prefix-icon="el-icon-search" v-model="checkedKeyword" |
|
|
|
|
|
|
|
clearable /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="checked.length"> |
|
|
|
<div class="ques"> |
|
|
|
<div class="ques"> |
|
|
|
<div class="line"> |
|
|
|
<div class="line"> |
|
|
|
<el-checkbox v-model="checkedAllCheck" @change="checkedAllCheckChange"></el-checkbox> |
|
|
|
<el-checkbox v-model="checkedAllCheck" @change="checkedAllCheckChange"></el-checkbox> |
|
|
|
<span class="serial">序号</span> |
|
|
|
<span class="serial">序号</span> |
|
|
|
<span>题干</span> |
|
|
|
<span class="stem">题干</span> |
|
|
|
|
|
|
|
<span class="kl">知识点</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div v-for="(item, i) in checked" :key="i" class="line j-between"> |
|
|
|
<template v-for="(item, i) in checked"> |
|
|
|
|
|
|
|
<div v-if="item.stemText.includes(checkedKeyword) || item.knowledgePointName.includes(checkedKeyword)" |
|
|
|
|
|
|
|
:key="i" class="line j-between"> |
|
|
|
<div class="check-left"> |
|
|
|
<div class="check-left"> |
|
|
|
<el-checkbox v-model="item.check"></el-checkbox> |
|
|
|
<el-checkbox v-model="item.check"></el-checkbox> |
|
|
|
<span class="serial">{{ i + 1 }}</span> |
|
|
|
<span class="serial">{{ i + 1 }}</span> |
|
|
|
<el-tooltip effect="dark" :content="item.stemText" placement="top-start"> |
|
|
|
<el-tooltip effect="dark" :content="item.stemText" placement="top-start"> |
|
|
|
<p class="checked-stem" :title="item.stemText">{{ item.stemText }}</p> |
|
|
|
<p class="checked-stem">{{ item.stemText }}</p> |
|
|
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
|
|
<el-tooltip effect="dark" :content="item.knowledgePointName" placement="top-start"> |
|
|
|
|
|
|
|
<p class="kl checked-kl">{{ item.knowledgePointName }}</p> |
|
|
|
</el-tooltip> |
|
|
|
</el-tooltip> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<i class="el-icon-delete action-icon" @click="delChecked(item)"></i> |
|
|
|
<i class="el-icon-delete action-icon" @click="delChecked(item)"></i> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<div v-else class="empty"> |
|
|
|
|
|
|
|
<img class="icon" src="@/assets/images/empty.svg" alt=""> |
|
|
|
|
|
|
|
<p>暂无数据</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="flex j-between p-l-10 p-r-10"> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="flex j-between p-l-20 p-r-20"> |
|
|
|
<p>未找到试题,<a class="link" @click="toAddQues">去新增</a></p> |
|
|
|
<p>未找到试题,<a class="link" @click="toAddQues">去新增</a></p> |
|
|
|
<p>已选题数/目标题数:{{ checkedLen }}/{{ $parent.curType.questionNum }}   |
|
|
|
<p>已选题数/目标题数:{{ checkedLen }}/{{ $parent.curType.questionNum }} |
|
|
|
<!-- <a class="link" @click="toEditQues">修改目标</a> --> |
|
|
|
<!--   <a class="link" @click="toEditQues">修改目标</a> --> |
|
|
|
</p> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -101,17 +155,26 @@ export default { |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
selectQuesVisible: false, |
|
|
|
selectQuesVisible: false, |
|
|
|
|
|
|
|
searchTimer: null, |
|
|
|
quesBankKeyword: '', |
|
|
|
quesBankKeyword: '', |
|
|
|
|
|
|
|
curQuesBank: {}, |
|
|
|
|
|
|
|
quesBankTypeVal: [], |
|
|
|
|
|
|
|
quesBankTypes: [], |
|
|
|
|
|
|
|
quesBanks: [], |
|
|
|
|
|
|
|
pageQuesBank: 1, |
|
|
|
|
|
|
|
pageSizeQuesBank: 10, |
|
|
|
|
|
|
|
totalQuesBank: 0, |
|
|
|
|
|
|
|
|
|
|
|
knowledgeKeyword: '', |
|
|
|
knowledgeKeyword: '', |
|
|
|
searchTimer: null, |
|
|
|
|
|
|
|
key: 1, |
|
|
|
key: 1, |
|
|
|
quesBanks: [], |
|
|
|
knowledgeVal: [], |
|
|
|
knowledges: [], |
|
|
|
knowledges: [], |
|
|
|
quesAllCheck: false, |
|
|
|
quesAllCheck: false, |
|
|
|
ques: [], |
|
|
|
ques: [], |
|
|
|
checkedAllCheck: false, |
|
|
|
checkedAllCheck: false, |
|
|
|
checked: [], |
|
|
|
checked: [], |
|
|
|
curCheckQues: [], |
|
|
|
curCheckQues: [], |
|
|
|
|
|
|
|
checkedKeyword: '', |
|
|
|
submiting: false, |
|
|
|
submiting: false, |
|
|
|
|
|
|
|
|
|
|
|
quesVisible: false, |
|
|
|
quesVisible: false, |
|
|
@ -141,11 +204,11 @@ export default { |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
'quesBankKeyword': function (val) { |
|
|
|
'quesBankKeyword': function (val) { |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
this.searchTimer = setTimeout(this.getQuesBank, 500) |
|
|
|
this.searchTimer = setTimeout(this.initQuesBank, 500) |
|
|
|
}, |
|
|
|
}, |
|
|
|
'knowledgeKeyword': function (val) { |
|
|
|
'knowledgeKeyword': function (val) { |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
this.searchTimer = setTimeout(this.getKnowledge, 500) |
|
|
|
this.searchTimer = setTimeout(this.getQues, 500) |
|
|
|
}, |
|
|
|
}, |
|
|
|
visible () { |
|
|
|
visible () { |
|
|
|
this.selectQuesVisible = this.visible |
|
|
|
this.selectQuesVisible = this.visible |
|
|
@ -171,69 +234,109 @@ export default { |
|
|
|
const parent = this.$parent.curType |
|
|
|
const parent = this.$parent.curType |
|
|
|
this.curCheckQues = parent.examQuestions |
|
|
|
this.curCheckQues = parent.examQuestions |
|
|
|
|
|
|
|
|
|
|
|
this.getQuesBank() |
|
|
|
this.getQuesBankType() |
|
|
|
|
|
|
|
this.initQuesBank() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 获取题库分类 |
|
|
|
|
|
|
|
async getQuesBankType () { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
const { data } = await this.$post(this.api.getAllQuestionBankCategories, { |
|
|
|
|
|
|
|
createSource: 1, |
|
|
|
|
|
|
|
status: 1, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
this.handleList(data) |
|
|
|
|
|
|
|
this.quesBankTypes = data |
|
|
|
|
|
|
|
} catch (e) { } |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取题库 |
|
|
|
// 获取题库 |
|
|
|
async getQuesBank () { |
|
|
|
async getQuesBank () { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const { list } = await this.$post(this.api.questionBankStructureLevel, { |
|
|
|
const type = this.quesBankTypeVal |
|
|
|
keyword: this.quesBankKeyword, |
|
|
|
const res = await this.$post(this.api.questionBankList, { |
|
|
|
createSource: 1, |
|
|
|
|
|
|
|
status: 1, |
|
|
|
status: 1, |
|
|
|
|
|
|
|
pageNum: this.pageQuesBank, |
|
|
|
|
|
|
|
pageSize: this.pageSizeQuesBank, |
|
|
|
|
|
|
|
questionCategoryId: type.length ? type[type.length - 1] : '', |
|
|
|
|
|
|
|
name: this.quesBankKeyword |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.quesBanks = list |
|
|
|
const { records } = res.message |
|
|
|
|
|
|
|
this.quesBanks = records |
|
|
|
|
|
|
|
this.totalQuesBank = res.message.total |
|
|
|
|
|
|
|
records.length && this.questionBankClick(records[0]) |
|
|
|
} catch (e) { } |
|
|
|
} catch (e) { } |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
initQuesBank () { |
|
|
|
|
|
|
|
this.curQuesBank = {} |
|
|
|
|
|
|
|
this.pageQuesBank = 1 |
|
|
|
|
|
|
|
this.getQuesBank() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 切换页码 |
|
|
|
|
|
|
|
currentChangeQuesBank (val) { |
|
|
|
|
|
|
|
this.pageQuesBank = val |
|
|
|
|
|
|
|
this.getQuesBank() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 题目多选回调 |
|
|
|
|
|
|
|
questionBankClick (item) { |
|
|
|
|
|
|
|
this.curQuesBank = item |
|
|
|
|
|
|
|
this.knowledgeCheck = false |
|
|
|
|
|
|
|
this.getKnowledge() |
|
|
|
|
|
|
|
this.getQues() |
|
|
|
|
|
|
|
this.quesAllCheck = false |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理树形 |
|
|
|
|
|
|
|
handleList (list) { |
|
|
|
|
|
|
|
list.map(e => { |
|
|
|
|
|
|
|
if (e.children && e.children.length) { |
|
|
|
|
|
|
|
this.handleList(e.children) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
delete e.children |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取知识点 |
|
|
|
// 获取知识点 |
|
|
|
async getKnowledge () { |
|
|
|
async getKnowledge () { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const id = this.$refs.quesBank.getCurrentKey() |
|
|
|
const { id } = this.curQuesBank |
|
|
|
if (id) { |
|
|
|
if (id) { |
|
|
|
const { data } = await this.$post(this.api.TreeStructure, { |
|
|
|
const { data } = await this.$post(this.api.TreeStructure, { |
|
|
|
createSource: 1, |
|
|
|
createSource: 1, |
|
|
|
questionBankId: id, |
|
|
|
questionBankId: id, |
|
|
|
keyword: this.knowledgeKeyword, |
|
|
|
keyword: '', |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
this.handleList(data) |
|
|
|
this.knowledges = data |
|
|
|
this.knowledges = data |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { } |
|
|
|
} catch (e) { } |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取试题 |
|
|
|
// 获取试题 |
|
|
|
async getQues () { |
|
|
|
async getQues () { |
|
|
|
let k = this.$refs.knowledge.getCurrentNode() // 选中的知识点 |
|
|
|
const { id } = this.curQuesBank |
|
|
|
// debugger |
|
|
|
let k = this.knowledgeVal // 选中的知识点 |
|
|
|
// 选中了知识点才能查询试题 |
|
|
|
k = k.map(e => { |
|
|
|
if (k && k.type) { |
|
|
|
return e[e.length - 1] |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
if (id) { |
|
|
|
const { list } = await this.$post(this.api.findAllByQuestionBank, { |
|
|
|
const { list } = await this.$post(this.api.findAllByQuestionBank, { |
|
|
|
status: 1, |
|
|
|
status: 1, |
|
|
|
questionBankId: this.$refs.quesBank.getCurrentKey(), |
|
|
|
questionBankIds: [id], |
|
|
|
knowledgePointIds: [k.id], |
|
|
|
knowledgePointIds: k, |
|
|
|
questionTypes: this.questionType ? [this.questionType] : [], |
|
|
|
questionTypes: this.questionType ? [this.questionType] : [], |
|
|
|
|
|
|
|
keyword: this.knowledgeKeyword, |
|
|
|
}) |
|
|
|
}) |
|
|
|
const data = list |
|
|
|
const data = list |
|
|
|
const checked = this.curCheckQues |
|
|
|
const { curCheckQues, checked } = this |
|
|
|
data.map(e => { |
|
|
|
data.map(e => { |
|
|
|
const el = document.createElement('div') |
|
|
|
const el = document.createElement('div') |
|
|
|
el.innerHTML = e.stem |
|
|
|
el.innerHTML = e.stem |
|
|
|
e.stemText = el.innerText |
|
|
|
e.stemText = el.innerText |
|
|
|
e.check = !!this.checked.find(n => n.questionVersionId === e.questionVersionId) |
|
|
|
const quesChecked = !!curCheckQues.find(n => n.questionVersionId === e.questionVersionId) |
|
|
|
e.disabled = !!checked.find(n => n.questionVersionId === e.questionVersionId) |
|
|
|
e.disabled = quesChecked |
|
|
|
|
|
|
|
e.check = !!checked.find(n => n.questionVersionId === e.questionVersionId) || quesChecked |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.ques = data |
|
|
|
this.ques = data |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 题库勾选回调 |
|
|
|
|
|
|
|
quesBankCheck (data, checked) { |
|
|
|
|
|
|
|
// debugger |
|
|
|
|
|
|
|
if (checked) { |
|
|
|
|
|
|
|
// this.$refs.quesBank.setCurrentKey(data.id) |
|
|
|
|
|
|
|
this.getKnowledge() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$refs.knowledge.setCheckedNodes(checked ? this.knowledges : []) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 知识点点击回调 |
|
|
|
|
|
|
|
knowledgeClick (data) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 知识点勾选回调 |
|
|
|
// 知识点勾选回调 |
|
|
|
knowledgeCheck () { |
|
|
|
knowledgeCheck () { |
|
|
@ -242,8 +345,10 @@ export default { |
|
|
|
// 题目全选回调 |
|
|
|
// 题目全选回调 |
|
|
|
quesAllCheckChange (val) { |
|
|
|
quesAllCheckChange (val) { |
|
|
|
this.ques.map(e => { |
|
|
|
this.ques.map(e => { |
|
|
|
|
|
|
|
if (!e.disabled) { |
|
|
|
e.check = val |
|
|
|
e.check = val |
|
|
|
this.quesChange(val, e) |
|
|
|
this.quesChange(val, e) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 题目多选回调 |
|
|
|
// 题目多选回调 |
|
|
@ -270,7 +375,7 @@ export default { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const checked = this.checked.filter(e => e.check) |
|
|
|
const checked = this.checked.filter(e => e.check) |
|
|
|
if (checked.length) { |
|
|
|
if (checked.length) { |
|
|
|
await this.$confirm(`确认要删除吗?`, '提示', { |
|
|
|
await this.$confirm(`确认要移除吗?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
type: 'warning', |
|
|
@ -293,12 +398,12 @@ export default { |
|
|
|
// 已选试题单个删除 |
|
|
|
// 已选试题单个删除 |
|
|
|
async delChecked (item) { |
|
|
|
async delChecked (item) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// await this.$confirm(`确认要删除吗?`, '提示', { |
|
|
|
await this.$confirm(`确认要移除吗?`, '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
cancelButtonText: '取消', |
|
|
|
// type: 'warning', |
|
|
|
type: 'warning', |
|
|
|
// closeOnClickModal: false, |
|
|
|
closeOnClickModal: false, |
|
|
|
// }) |
|
|
|
}) |
|
|
|
const cur = this.ques.find(e => e.questionVersionId === item.questionVersionId) |
|
|
|
const cur = this.ques.find(e => e.questionVersionId === item.questionVersionId) |
|
|
|
if (cur) cur.check = false |
|
|
|
if (cur) cur.check = false |
|
|
|
this.checked.splice(this.checked.findIndex(e => e.questionVersionId === item.questionVersionId), 1) |
|
|
|
this.checked.splice(this.checked.findIndex(e => e.questionVersionId === item.questionVersionId), 1) |
|
|
@ -377,16 +482,28 @@ export default { |
|
|
|
margin-bottom: 10px; |
|
|
|
margin-bottom: 10px; |
|
|
|
border: 1px solid #eee; |
|
|
|
border: 1px solid #eee; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.filter { |
|
|
|
|
|
|
|
margin-bottom: 15px; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
li { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
label { |
|
|
|
|
|
|
|
margin-right: 10px; |
|
|
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
|
|
color: #333; |
|
|
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.item { |
|
|
|
.item { |
|
|
|
width: 25%; |
|
|
|
width: 38%; |
|
|
|
max-height: calc(100vh - 190px); |
|
|
|
height: calc(100vh - 173px); |
|
|
|
padding: 15px; |
|
|
|
padding: 15px; |
|
|
|
border-right: 1px solid #eee; |
|
|
|
border-right: 1px solid #eee; |
|
|
|
overflow: auto; |
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
|
|
|
|
&:last-child { |
|
|
|
|
|
|
|
border-right: 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.total { |
|
|
|
.total { |
|
|
@ -394,12 +511,25 @@ export default { |
|
|
|
color: #333; |
|
|
|
color: #333; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.ques { |
|
|
|
|
|
|
|
margin-top: 10px; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.line { |
|
|
|
.line { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
margin: 8px 0; |
|
|
|
padding: 5px 0; |
|
|
|
|
|
|
|
color: #333; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.able-check { |
|
|
|
|
|
|
|
.line { |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
|
|
|
background-color: #f5f5f5; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&.active { |
|
|
|
|
|
|
|
background-color: #e5e5e5; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.serial { |
|
|
|
.serial { |
|
|
@ -409,13 +539,30 @@ export default { |
|
|
|
white-space: nowrap; |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.quesBank { |
|
|
|
|
|
|
|
width: calc(100% - 71px); |
|
|
|
|
|
|
|
@include ellipsis; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.stem { |
|
|
|
.stem { |
|
|
|
max-width: calc(100% - 71px); |
|
|
|
width: calc(100% - 210px); |
|
|
|
|
|
|
|
margin-right: 20px; |
|
|
|
@include ellipsis; |
|
|
|
@include ellipsis; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.kl { |
|
|
|
|
|
|
|
width: 120px; |
|
|
|
|
|
|
|
@include ellipsis; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&.checked-kl { |
|
|
|
|
|
|
|
width: 90px; |
|
|
|
|
|
|
|
margin-right: 10px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.checked-stem { |
|
|
|
.checked-stem { |
|
|
|
max-width: 165px; |
|
|
|
max-width: 165px; |
|
|
|
|
|
|
|
margin-right: 20px; |
|
|
|
@include ellipsis; |
|
|
|
@include ellipsis; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -428,7 +575,6 @@ export default { |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.link { |
|
|
|
.link { |
|
|
|
color: $main-color; |
|
|
|
color: $main-color; |
|
|
|