| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getMenuTreeByRole} from "@/api/menus/index" |
| | | export default { |
| | | name: "AppSidebar", |
| | | props: {}, |
| | |
| | | }, |
| | | methods: { |
| | | getMenuTreeByRole(){ |
| | | getMenuTreeByRole().then((res)=>{ |
| | | console.log(res.data.list,"crm菜单") |
| | | res.data.list.map((item)=>{ |
| | | if(item.systemType===2){ |
| | | let newList= JSON.parse(JSON.stringify([...item.menus])) |
| | | let newList=this.$store.state.menus |
| | | console.log(newList,"newList") |
| | | // 隐藏了 生成计划 和 服务收费管理模块 |
| | | if(newList[1]){ |
| | | const found = newList[1].children.find(obj => obj.title === "生成计划") |
| | |
| | | } |
| | | } |
| | | this.menus=newList |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | // 监听路由 |
| | | initNavMenu() { |