角色管理 分配权限 数据权限 封装pd-tree

This commit is contained in:
吕金泽
2022-01-13 23:31:04 +08:00
parent e275ae841c
commit c954eb5eed
14 changed files with 672 additions and 114 deletions
@@ -7,7 +7,7 @@
</span>
</div>
<logo v-if="showLogo" :collapse="isCollapse" />
<el-form>
<el-form v-if="!isCollapse">
<el-form-item>
<treeselect
style="width: 90%;margin: 0px 5%"
@@ -99,20 +99,10 @@ export default {
mounted() {
this.$get('menu/search').then(res => {
this.menuTree = res.data.list
this.deleteEmptyChildren(this.menuTree)
this.$treeTable.deleteEmptyChildren(this.menuTree)
})
},
methods: {
deleteEmptyChildren(children) {
for(var i in children){
var chi = children[i]
if(chi.children && chi.children.length == 0){
delete chi.children
}else{
this.deleteEmptyChildren(chi.children)
}
}
},
selectMenu(node) {
if(node.url){
this.$router.push({ path: node.url })