|
|
|
@ -9,7 +9,7 @@ |
|
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
|
|
<el-tree :data="nakadais" default-expand-all ref="nakadais" node-key="id" highlight-current |
|
|
|
|
:expand-on-click-node="false" @node-click="getNakadaiUser" |
|
|
|
|
:expand-on-click-node="false" @node-click="depClick" |
|
|
|
|
:props="{ children: 'children', label: 'organizationName', isLeaf: 'leaf' }"></el-tree> |
|
|
|
|
</div> |
|
|
|
|
<div class="item"> |
|
|
|
@ -82,6 +82,7 @@ export default { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
nakadais: [], |
|
|
|
|
curDep: {}, |
|
|
|
|
searchTimer: null, |
|
|
|
|
|
|
|
|
|
userType: 0, |
|
|
|
@ -106,11 +107,12 @@ export default { |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
mounted () { |
|
|
|
|
this.getNakadais() |
|
|
|
|
this.getNakadaiDep() |
|
|
|
|
this.getNakadaiUser() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取中台部门 |
|
|
|
|
async getNakadais () { |
|
|
|
|
async getNakadaiDep () { |
|
|
|
|
const res = await this.$post(this.api.treeListArch) |
|
|
|
|
const list = res.treeList |
|
|
|
|
this.handleList(list) |
|
|
|
@ -126,53 +128,29 @@ export default { |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
async getNakadaiUser (data) { |
|
|
|
|
console.log(11, data) |
|
|
|
|
// 部门点击 |
|
|
|
|
depClick (data) { |
|
|
|
|
this.curDep = data |
|
|
|
|
this.userCheck = false |
|
|
|
|
this.getNakadaiUser() |
|
|
|
|
}, |
|
|
|
|
// 查询中台用户 |
|
|
|
|
async getNakadaiUser () { |
|
|
|
|
const { page } = await this.$post(this.api.staffList, { |
|
|
|
|
type: 1, |
|
|
|
|
staffArchitectureId: data.id || '', |
|
|
|
|
staffArchitectureId: this.curDep.id || '', |
|
|
|
|
keyWord: this.userKeyword, |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000 |
|
|
|
|
}) |
|
|
|
|
this.users = page.records |
|
|
|
|
}, |
|
|
|
|
nakadaiClick () { |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// 获取题库 |
|
|
|
|
async getQuesBank () { |
|
|
|
|
try { |
|
|
|
|
const type = this.quesBankTypeVal |
|
|
|
|
const res = await this.$post(this.api.questionBankList, { |
|
|
|
|
status: 1, |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 1000, |
|
|
|
|
questionCategoryId: type.length ? type[type.length - 1] : '', |
|
|
|
|
name: this.quesBankKeyword |
|
|
|
|
const list = page.records |
|
|
|
|
const { checked } = this |
|
|
|
|
list.forEach(e => { |
|
|
|
|
e.check = !!checked.find(n => n.userId === e.userId) |
|
|
|
|
}) |
|
|
|
|
this.quesBanks = res.message.records |
|
|
|
|
this.totalQuesBank = res.message.total |
|
|
|
|
} catch (e) { } |
|
|
|
|
}, |
|
|
|
|
// 题目多选回调 |
|
|
|
|
questionBankClick (item) { |
|
|
|
|
this.curQuesBank = item |
|
|
|
|
this.userCheck = false |
|
|
|
|
this.getKnowledgeType() |
|
|
|
|
this.getKnowledge() |
|
|
|
|
this.users = list |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 处理树形 |
|
|
|
|
handleList (list) { |
|
|
|
|
list.map(e => { |
|
|
|
|
if (e.children && e.children.length) { |
|
|
|
|
this.handleList(e.children) |
|
|
|
|
} else { |
|
|
|
|
delete e.children |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 用户全选回调 |
|
|
|
|
userAllCheckChange (val) { |
|
|
|
|
this.users.map(e => { |
|
|
|
@ -195,10 +173,6 @@ export default { |
|
|
|
|
cur >= 0 && this.checked.splice(cur, 1) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 处理大纲列表 |
|
|
|
|
handleQuesList () { |
|
|
|
|
this.list = _.cloneDeep(this.$parent.form.paperOutline) |
|
|
|
|
}, |
|
|
|
|
// 已选全选回调 |
|
|
|
|
checkedAllCheckChange (val) { |
|
|
|
|
this.checked.map(e => e.check = val) |
|
|
|
|