|
|
|
@ -40,25 +40,8 @@ export default {
|
|
|
|
|
// 当前全部侧边栏
|
|
|
|
|
let sidebarRouters = this.sidebarRouters
|
|
|
|
|
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
|
|
|
|
|
let matchedquery = this.$route.query
|
|
|
|
|
matched[0].query = matchedquery
|
|
|
|
|
|
|
|
|
|
const first = matched[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// sidebarRouters.forEach(element => {
|
|
|
|
|
// if (element.children && element.children.length != 0) {
|
|
|
|
|
// // 提取带childen的侧边栏
|
|
|
|
|
// if (element.children.find(item => item.name == this.$route.name)) {
|
|
|
|
|
// // 插入
|
|
|
|
|
// matched.splice(1, 0, element); // 在索引为 1 的位置插入 newObj
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
if (!this.isDashboard(first)) {
|
|
|
|
|
// matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
|
|
|
|
|
}
|
|
|
|
|
console.log(matched[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(matched[0].path == "/assetsAuth" ) {
|
|
|
|
|
// 管理端--资产管理--新增资产
|
|
|
|
|
const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'assets')
|
|
|
|
@ -103,7 +86,6 @@ export default {
|
|
|
|
|
return name.trim() === 'Index'
|
|
|
|
|
},
|
|
|
|
|
handleLink(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
|
|
|
|
|
const { redirect, path } = item
|
|
|
|
|
if (redirect) {
|
|
|
|
|