Commit 8055c500 authored by 杨硕's avatar 杨硕

解决tag问题

parent b6265c9a
...@@ -41,7 +41,7 @@ router.beforeEach((to, from, next) => { ...@@ -41,7 +41,7 @@ router.beforeEach((to, from, next) => {
// 根据roles权限生成可访问的路由表 // 根据roles权限生成可访问的路由表
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表 router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
// TODO: clear this log // TODO: clear this log
console.log(`routers.accessedRoutes`, routers.accessedRoutes) // console.log(`routers.accessedRoutes`, routers.accessedRoutes)
// 如果是从中间页面跳转系统首页,默认打开第一个菜单 // 如果是从中间页面跳转系统首页,默认打开第一个菜单
if (to.path === '/welcome') { if (to.path === '/welcome') {
next({ path: routers.accessedRoutes[0].children[0].path, replace: true }) next({ path: routers.accessedRoutes[0].children[0].path, replace: true })
......
...@@ -87,6 +87,7 @@ const user = { ...@@ -87,6 +87,7 @@ const user = {
commit('SET_MENUNAME', menuName) // 存入菜单名 commit('SET_MENUNAME', menuName) // 存入菜单名
const b = menuName.join(',') const b = menuName.join(',')
Cookies.set('menuname', b) Cookies.set('menuname', b)
store.dispatch('tagsView/delAllViews').then(r => {})
resolve(menuName) resolve(menuName)
}) })
}, },
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<span class="card-title">生产管理</span> <span class="card-title">生产管理</span>
</div> </div>
</div> </div>
<div class="home-const" @click="gotoIndex(equipmentManage)"> <div class="home-const1" @click="gotoIndex(equipmentManage)">
<div> <div>
<img src="../assets/image/img8@2x.png" style="width: 100%;height: 392px"> <img src="../assets/image/img8@2x.png" style="width: 100%;height: 392px">
</div> </div>
...@@ -81,15 +81,13 @@ export default { ...@@ -81,15 +81,13 @@ export default {
}) })
if (index > 0) { if (index > 0) {
this.routerPath = routerItem[0].children[0].path this.routerPath = routerItem[0].children[0].path
// TODO: clear this log
console.log(`router`, this.routerPath)
// this.$message.success('用户有权限') // this.$message.success('用户有权限')
// 存入点击的菜单名,便于后边路由跳转 // 存入点击的菜单名,便于后边路由跳转
this.$store.dispatch('GetInfoMessage', menuName).then(() => { this.$store.dispatch('GetInfoMessage', menuName).then(() => {
// this.$nextTick(() => { // this.$nextTick(() => {
// this.$router.push(this.routerPath) // this.$router.push(this.routerPath)
// }, 5000) // }, 5000)
console.log('路由跳转') // console.log('路由跳转')
this.$router.push('/welcome') this.$router.push('/welcome')
}) })
} else { } else {
...@@ -113,7 +111,7 @@ export default { ...@@ -113,7 +111,7 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
.home-const{ .home-const{
width: 394px; width: 20%;
height: 461px; height: 461px;
margin-right: 40px; margin-right: 40px;
background: #FFFFFF; background: #FFFFFF;
...@@ -130,6 +128,23 @@ export default { ...@@ -130,6 +128,23 @@ export default {
color: #363535; color: #363535;
} }
} }
.home-const1{
width: 20%;
height: 461px;
background: #FFFFFF;
border-radius: 8px 8px 8px 8px;
.card-bottom{
height: 70px;
display: flex;
align-items: center;
}
.card-title{
font-size: 18px;
font-family: Microsoft YaHei-Bold, Microsoft YaHei;
font-weight: bold;
color: #363535;
}
}
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment