|
@ -61,21 +61,22 @@
|
61
|
61
|
// 路由操作
|
62
|
62
|
routeHandle (route) {
|
63
|
63
|
if (/^\/n\/.*$/.test(route.path)) {
|
64
|
|
var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)
|
|
64
|
var tab = this.$store.state.contentTabs.filter(item => item.name === route.name)[0]
|
65
|
65
|
// tab不存在, 先添加
|
66
|
66
|
if (isEmpty(tab)) {
|
67
|
67
|
var menuNav = this.getMenuNavByRouteName(route.name, this.$store.state.menuNavList)
|
68
|
68
|
if (!isEmpty(menuNav)) {
|
69
|
|
this.menuNavActive = menuNav.menuId + ''
|
70
|
|
this.ADD_CONTENT_TAB({
|
|
69
|
tab = {
|
71
|
70
|
id: menuNav.menuId,
|
72
|
71
|
name: route.name,
|
73
|
72
|
title: menuNav.name,
|
74
|
73
|
type: (window.SITE_CONFIG.nestIframeRouteNameList || []).indexOf(route.name) !== -1 ? 'iframe' : 'module',
|
75
|
74
|
url: menuNav.url
|
76
|
|
})
|
|
75
|
}
|
|
76
|
this.ADD_CONTENT_TAB(tab)
|
77
|
77
|
}
|
78
|
78
|
}
|
|
79
|
this.menuNavActive = tab.id + ''
|
79
|
80
|
this.UPDATE_CONTENT_TABS_ACTIVE_NAME({ name: route.name })
|
80
|
81
|
}
|
81
|
82
|
},
|