|
@ -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 => { |
|
|
|
|
|
// 防止直接选中父级造成全选 |
|
|
|
|
|
if(!menus.some(same=>same.parentId === item.menuId)){ |
|
|
arr.push(Number(item.menuId)) |
|
|
arr.push(Number(item.menuId)) |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.treeIds = arr |
|
|
this.treeIds = arr |
|
|
const res2 = await getBaseMenuTree() |
|
|
const res2 = await getBaseMenuTree() |
|
|