|
@@ -61,6 +61,7 @@ export default {
|
|
|
},
|
|
|
checkAll: false,
|
|
|
splice: [],
|
|
|
+ slideCount: 0
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -112,9 +113,8 @@ export default {
|
|
|
getRoleInfo({ id: this.id }).then(res => {
|
|
|
if(res.code == 200) {
|
|
|
let roleData = res.data
|
|
|
- this.checkAll = roleData.menuIds.length >= 239
|
|
|
- this.isIndeterminate = roleData.menuIds.length > 0 && roleData.menuIds.length < 239
|
|
|
-
|
|
|
+ this.checkAll = roleData.menuIds.length >= this.slideCount
|
|
|
+ this.isIndeterminate = roleData.menuIds.length > 0 && roleData.menuIds.length < this.slideCount
|
|
|
this.getParent(roleData.menuIds, s.data)
|
|
|
let checkIds = this.spliceParent(this.splice, roleData.menuIds)
|
|
|
roleData.menuIds = checkIds
|
|
@@ -129,8 +129,8 @@ export default {
|
|
|
},
|
|
|
onTreeCheck() {
|
|
|
let checkTree = this.$refs.tree.getCheckedKeys()
|
|
|
- this.checkAll = checkTree.length >= 239
|
|
|
- this.isIndeterminate = checkTree.length > 0 && checkTree.length < 239
|
|
|
+ this.checkAll = checkTree.length >= this.slideCount
|
|
|
+ this.isIndeterminate = checkTree.length > 0 && checkTree.length < this.slideCount
|
|
|
},
|
|
|
onCheckAll(val) {
|
|
|
if(val) {
|
|
@@ -177,6 +177,7 @@ export default {
|
|
|
icon: res.icon,
|
|
|
parentId: res.parentId
|
|
|
}
|
|
|
+ this.slideCount++
|
|
|
if(res.sysMenus && res.sysMenus.length > 0) {
|
|
|
tempList.children = this.setTableData(res.sysMenus)
|
|
|
}
|