mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
角色管理 分配权限 数据权限 封装pd-tree
This commit is contained in:
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user