This commit is contained in:
zhutianqi
2021-12-17 17:31:05 +08:00
parent 9805f424ea
commit b3ecd95964
30 changed files with 145 additions and 127 deletions
+5 -3
View File
@@ -2,6 +2,7 @@
<div class="roleTree">
<el-drawer
:title="isTitle"
v-if="isVisible2"
:visible.sync="isVisible2"
:wrapperClosable="false"
@close="handleTreeDrawerCancel"
@@ -22,11 +23,12 @@
<el-tree
class="filter-tree tree-line"
:data="treeData"
v-if="isVisible2"
:props="defaultProps"
icon-class="icon-tree"
:check-strictly="true"
:current-node-key="nodeKeyId"
node-key="name"
node-key="id"
:filter-node-method="filterNode"
:default-checked-keys="nodeList"
highlight-current
@@ -109,8 +111,9 @@ export default {
this.isVisible2 = false
},
saveUserInfo() {
let arr = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
this.$emit('checkedRole', arr)
},
loadNode(node, resolve) {
if (node.level === 0) {
@@ -138,7 +141,6 @@ export default {
loading: 'treeLoading'
}, res => {
this.treeData = res.data
console.log(this.treeData);
this.nodeKeyId = this.treeData[0].id
this.id = res.data[0].id
}, e => {