| | |
| | | method: 'get' |
| | | }); |
| | | |
| | | export const getRoutes = (topMenuId) => request({ |
| | | export const getRoutes = (parentOid) => request({ |
| | | url: 'api/smFunctionController/treeMyMenu', |
| | | method: 'get', |
| | | params: { |
| | | topMenuId, |
| | | parentOid, |
| | | } |
| | | }); |
| | |
| | | /** |
| | | * 首页左侧树 |
| | | */ |
| | | export const treeMenu = (params) => { |
| | | export const treeMenu = (parentOid) => { |
| | | return request({ |
| | | url: 'api/smFunctionController/treeMyMenu', |
| | | method: 'get', |
| | | ...params |
| | | params:{ |
| | | parentOid |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .el-menu-item:focus, .el-menu-item:hover { |
| | | outline: 0; |
| | | background-color: #060708; |
| | | } |
| | | </style> |
| | | |
| | | |
| | |
| | | //获取系统菜单 |
| | | GetMenu({commit, dispatch}, topMenuId) { |
| | | return new Promise(resolve => { |
| | | getRoutes(topMenuId).then((res) => { |
| | | const data = res.data.data |
| | | getRoutes('modelManagmentNode').then((res) => { |
| | | const data = res.data.obj; |
| | | let menu = deepClone(data); |
| | | menu.forEach(ele => { |
| | | addPath(ele, true); |