update 路由优化

This commit is contained in:
yoe 2020-05-13 19:02:26 +08:00
parent 31cf5a4560
commit a596df597d
9 changed files with 6 additions and 14 deletions

View File

@ -35,10 +35,6 @@ const mainRoutes = {
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
{ path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } }
// { path: '/staff-manage', component: _import('business/staff/staff-manage/index'), name: 'staff-manage', meta: { title: '员工管理', isTab: true, isNoCard: true } },
// { path: '/staff-profile', component: _import('business/staff/staff-profile/index'), name: 'staff-profile', meta: { title: '员工概述', isTab: true, isNoCard: true } },
// { path: '/staff-archives', component: _import('business/staff/staff-archives/index'), name: 'staff-archives', meta: { title: '员工档案', isTab: true, isNoCard: true } }
// { path: '/sys/user/index', component: _import('modules/sys/user/index'), name: 'staff-archives1', meta: { title: '员工档案', isTab: true, isNoCard: true } }
],
beforeEnter (to, from, next) {
let token = Vue.cookie.get('token')

View File

@ -85,16 +85,12 @@
if (idx !== -1) {
res.role.menuIdList.splice(idx, res.role.menuIdList.length - idx)
}
// this.visible = true
// let menuIdList = res.role.menuIdList
// console.log('res2===', res.role.menuIdList)
console.log('refs=1=', this.$refs)
this.$nextTick(() => {
console.log('refs=2=', this.$refs)
console.log('refs=3=', this.$refs[1])
console.log('refs=4=', this.$refs.menuListTree.setCheckedKeys)
this.$refs.menuListTree.setCheckedKeys([2, 15])
})
this.dataDemo = res.role.menuIdList
setTimeout(() => {
this.$nextTick(() => {
this.$refs.menuListTree.setCheckedKeys(res.role.menuIdList)
})
}, 50)
}
})
},