|
@@ -8,6 +8,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="auth-wrap">
|
|
|
+ <el-checkbox v-model="checkAll" style="margin-bottom: 20px;">全选</el-checkbox>
|
|
|
<el-tree
|
|
|
v-loading="treeLoading"
|
|
|
ref="checkboxTree"
|
|
@@ -29,9 +30,20 @@ export default {
|
|
|
return {
|
|
|
authList:[],
|
|
|
defaultCheckedKeys:[],
|
|
|
- treeLoading:false
|
|
|
+ treeLoading:false,
|
|
|
+ checkAll:false
|
|
|
};
|
|
|
},
|
|
|
+ watch:{
|
|
|
+ checkAll(newVal){
|
|
|
+ if(newVal){
|
|
|
+ const topLevelNodes = this.authList.map(i=>i.MenuId)
|
|
|
+ this.$refs.checkboxTree.setCheckedKeys(topLevelNodes)
|
|
|
+ }else{
|
|
|
+ this.$refs.checkboxTree.setCheckedKeys([])
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
getBusinessAuthList(){
|
|
|
const EtaBusinessId = this.$route.query.id
|