|  | @@ -38,7 +38,6 @@
 | 
	
		
			
				|  |  |                     accordion
 | 
	
		
			
				|  |  |                     highlight-current
 | 
	
		
			
				|  |  |                     :default-checked-keys="result.menuIds"
 | 
	
		
			
				|  |  | -                   :filter-node-method="seachRole"
 | 
	
		
			
				|  |  |                     :props="defaultProps">
 | 
	
		
			
				|  |  |              <div slot-scope="{ node, data }">
 | 
	
		
			
				|  |  |                {{ node.label }}
 | 
	
	
		
			
				|  | @@ -82,6 +81,7 @@ export default {
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        checkAll: false,
 | 
	
		
			
				|  |  |        splice: [],
 | 
	
		
			
				|  |  | +      silderList: [],
 | 
	
		
			
				|  |  |        allChildIds: [], // 所有子编号
 | 
	
		
			
				|  |  |        slideCount: 0,
 | 
	
		
			
				|  |  |        seachRoleValue: '' //权限搜索字段
 | 
	
	
		
			
				|  | @@ -142,6 +142,7 @@ export default {
 | 
	
		
			
				|  |  |        let silderList = await getSilder({ hid: 0 })
 | 
	
		
			
				|  |  |        let tempData = []
 | 
	
		
			
				|  |  |        if (silderList.code == 200) {
 | 
	
		
			
				|  |  | +        this.silderList = silderList.data
 | 
	
		
			
				|  |  |          tempData = this.setTableData(silderList.data)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          this.data = tempData
 | 
	
	
		
			
				|  | @@ -242,15 +243,21 @@ export default {
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |        })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    seachRole (value, data) {
 | 
	
		
			
				|  |  | -      // console.log(value, data)
 | 
	
		
			
				|  |  | -      if (!value) return true;
 | 
	
		
			
				|  |  | -      return data.label.indexOf(value) !== -1;
 | 
	
		
			
				|  |  | +    filterRole(list) {
 | 
	
		
			
				|  |  | +      return list.filter(item => {
 | 
	
		
			
				|  |  | +        if (item.children) {
 | 
	
		
			
				|  |  | +          item.children = this.filterRole(item.children)
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        return item.label.indexOf(this.seachRoleValue) > -1
 | 
	
		
			
				|  |  | +      })
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |      seachRoles () {
 | 
	
		
			
				|  |  | -      console.log(this.$refs.tree.filter(this.seachRoleValue))
 | 
	
		
			
				|  |  | +      this.data = this.filterRole(this.data)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    onReSetRole () { }
 | 
	
		
			
				|  |  | +    onReSetRole () {
 | 
	
		
			
				|  |  | +      this.seachRoleValue = ''
 | 
	
		
			
				|  |  | +      this.data = this.setTableData(this.silderList)
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  |  </script>
 | 
	
	
		
			
				|  | @@ -284,4 +291,4 @@ export default {
 | 
	
		
			
				|  |  |  /deep/.el-tree-node__content {
 | 
	
		
			
				|  |  |    height: 40px !important;
 | 
	
		
			
				|  |  |  }
 | 
	
		
			
				|  |  | -</style>
 | 
	
		
			
				|  |  | +</style>
 |