|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div :class="['page', { inQues }]"> |
|
|
|
<el-drawer title="知识点设置" :visible.sync="kpVisible" size="1200px" :close-on-click-modal="false" append-to-body |
|
|
|
<Breadcrumb v-if="!inQues" style="margin-bottom: 0;" :data="crumbs" /> |
|
|
|
custom-class="kp-dia" @closed="closeDia"> |
|
|
|
<div class="wrap"> |
|
|
|
<div class="page"> |
|
|
|
<div class="side"> |
|
|
|
<div class="side"> |
|
|
|
<div class="m-b-20"> |
|
|
|
<div class="m-b-20"> |
|
|
|
<el-radio-group v-model="isNotJoin" @change="changeType"> |
|
|
|
<el-radio-group v-model="isNotJoin" @change="changeType"> |
|
|
@ -22,7 +22,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<el-input class="m-b-10" placeholder="请输入知识点分类" prefix-icon="el-icon-search" size="small" clearable |
|
|
|
<el-input class="m-b-10" placeholder="请输入知识点分类" prefix-icon="el-icon-search" size="small" clearable |
|
|
|
v-model="keyword"></el-input> |
|
|
|
v-model="keyword"></el-input> |
|
|
|
<div style="overflow: auto"> |
|
|
|
<div class="type-wrap"> |
|
|
|
<el-tree v-loading="loading" :data="types" default-expand-all ref="typeTree" node-key="id" highlight-current |
|
|
|
<el-tree v-loading="loading" :data="types" default-expand-all ref="typeTree" node-key="id" highlight-current |
|
|
|
:expand-on-click-node="false" @node-click="handleNodeClick" :props="{ label: 'name', isLeaf: 'leaf' }"> |
|
|
|
:expand-on-click-node="false" @node-click="handleNodeClick" :props="{ label: 'name', isLeaf: 'leaf' }"> |
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
|
<span class="custom-tree-node" slot-scope="{ node, data }"> |
|
|
@ -117,7 +117,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-dialog title="提示" :visible.sync="delVisible" width="400px" :close-on-click-modal="false" append-to-body |
|
|
|
<el-dialog title="提示" :visible.sync="delVisible" width="400px" :close-on-click-modal="false" append-to-body |
|
|
|
custom-class="del-dia"> |
|
|
|
custom-class="del-dia"> |
|
|
|
<div class="del-wrap"> |
|
|
|
<div class="del-wrap"> |
|
|
@ -132,7 +131,7 @@ |
|
|
|
<el-button type="primary" @click="delTypeSubmit">确定</el-button> |
|
|
|
<el-button type="primary" @click="delTypeSubmit">确定</el-button> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</el-drawer> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
@ -140,12 +139,12 @@ import Util from '@/libs/util' |
|
|
|
import _ from 'lodash' |
|
|
|
import _ from 'lodash' |
|
|
|
import Breadcrumb from '@/components/breadcrumb' |
|
|
|
import Breadcrumb from '@/components/breadcrumb' |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
|
|
|
|
props: ['visible'], |
|
|
|
components: { Breadcrumb }, |
|
|
|
components: { Breadcrumb }, |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
crumbs: [], |
|
|
|
kpVisible: false, |
|
|
|
questionBankId: this.$route.query.questionBankId, |
|
|
|
questionBankId: this.$route.query.questionBankId, |
|
|
|
inQues: false, |
|
|
|
|
|
|
|
createSource: 1, |
|
|
|
createSource: 1, |
|
|
|
loading: false, |
|
|
|
loading: false, |
|
|
|
keyword: '', |
|
|
|
keyword: '', |
|
|
@ -209,26 +208,12 @@ export default { |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
clearTimeout(this.searchTimer) |
|
|
|
this.searchTimer = setTimeout(this.getList, 500) |
|
|
|
this.searchTimer = setTimeout(this.getList, 500) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
visible () { |
|
|
|
|
|
|
|
this.kpVisible = this.visible |
|
|
|
|
|
|
|
this.visible && this.getType() |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
mounted () { }, |
|
|
|
const { query } = this.$route |
|
|
|
|
|
|
|
const { referrer1, referrer2 } = this.$store.state.user |
|
|
|
|
|
|
|
this.crumbs = [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: query.questionBankName || '题库管理', |
|
|
|
|
|
|
|
route: referrer1 || '/quesBank' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '试题列表', |
|
|
|
|
|
|
|
route: referrer2 || '/ques', |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: '知识点列表' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
this.inQues = this.$route.path === '/ques/detail' // 当前页面是否在试题详情 |
|
|
|
|
|
|
|
this.getType() |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 获取分类 |
|
|
|
// 获取分类 |
|
|
|
async getType () { |
|
|
|
async getType () { |
|
|
@ -259,7 +244,7 @@ export default { |
|
|
|
name: '', |
|
|
|
name: '', |
|
|
|
} |
|
|
|
} |
|
|
|
this.typeVisible = true |
|
|
|
this.typeVisible = true |
|
|
|
this.cascaderValue = data.path.split('/').map(e => +e) |
|
|
|
this.cascaderValue = data ? data.path.split('/').map(e => +e) : [] |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 编辑分类 |
|
|
|
// 编辑分类 |
|
|
|
editType (node, data) { |
|
|
|
editType (node, data) { |
|
|
@ -403,7 +388,6 @@ export default { |
|
|
|
name: row.name, |
|
|
|
name: row.name, |
|
|
|
parentId: path.slice(0, path.length - 1), |
|
|
|
parentId: path.slice(0, path.length - 1), |
|
|
|
} |
|
|
|
} |
|
|
|
console.log(11, this.form) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 知识点提交 |
|
|
|
// 知识点提交 |
|
|
|
async knowledgeSubmit () { |
|
|
|
async knowledgeSubmit () { |
|
|
@ -446,29 +430,29 @@ export default { |
|
|
|
Util.warningMsg('请选择数据') |
|
|
|
Util.warningMsg('请选择数据') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 弹框关闭回调 |
|
|
|
|
|
|
|
closeDia () { |
|
|
|
|
|
|
|
this.$emit('closed') |
|
|
|
|
|
|
|
this.$emit('update:visible', false) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.m-b-20 { |
|
|
|
|
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.org-name { |
|
|
|
.org-name { |
|
|
|
margin-right: 20px; |
|
|
|
margin-right: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.w-100 { |
|
|
|
|
|
|
|
width: 100%; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.inQues { |
|
|
|
/deep/.kp-dia { |
|
|
|
padding: 0 25px; |
|
|
|
.el-drawer__header { |
|
|
|
} |
|
|
|
margin-bottom: 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.wrap { |
|
|
|
.page { |
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
|
|
|
|
padding: 0 24px; |
|
|
|
|
|
|
|
|
|
|
|
.side { |
|
|
|
.side { |
|
|
|
width: 300px; |
|
|
|
width: 300px; |
|
|
@ -477,9 +461,17 @@ export default { |
|
|
|
border-right: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
border-right: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.type-wrap { |
|
|
|
|
|
|
|
max-height: calc(100vh - 265px); |
|
|
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.right { |
|
|
|
.right { |
|
|
|
width: calc(100% - 324px); |
|
|
|
width: calc(100% - 324px); |
|
|
|
|
|
|
|
max-height: calc(100vh - 53px); |
|
|
|
padding: 24px 0; |
|
|
|
padding: 24px 0; |
|
|
|
|
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |