Browse Source

修改tree默认选中bug

main
pixel 5 years ago
parent
commit
8f558cbb98
  1. 5
      QMPlusVuePage/src/view/superAdmin/authority/authority.vue

5
QMPlusVuePage/src/view/superAdmin/authority/authority.vue

@ -154,7 +154,10 @@ export default {
const menus = res1.data.menus const menus = res1.data.menus
const arr = [] const arr = []
menus.map(item => { menus.map(item => {
arr.push(Number(item.menuId))
//
if(!menus.some(same=>same.parentId === item.menuId)){
arr.push(Number(item.menuId))
}
}) })
this.treeIds = arr this.treeIds = arr
const res2 = await getBaseMenuTree() const res2 = await getBaseMenuTree()

Loading…
Cancel
Save