Commit 15e7373a authored by 李苏's avatar 李苏 💬

页面初始化调整

parent 3611ad38
export default{
list:[
{
path:'/baseData',
component: 'Layout',
hidden: false,
alwaysShow:true,
redirect: 'store',
meta: {title: "基础数据", icon: "fa-cog", noCache: false, link: null,mkid:215000000},
children:[
/* 计量单位*/
{
erpComponent:true,
component:'template/index',
hidden:false,
meta:{
"title": "财务",
"icon": "",
"noCache": false,
"link": null,
"mkid": 215060000,
},
redirect: 'meteringUnit',
name:'finance',
path:"finance",
children:[{
erpComponent:true,
component:'template/view/index',
hidden:false,
meta:{
"title": "发票分类",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060100,
},
name:'financeClassification',
path:"financeClassification",
},
{ erpComponent:true,
component:'baseData/finance/period/index',
hidden:false,
meta:{
"title": "会计期间",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060200,
},
name:'financePeriod',
path:"financePeriod",
},
{
erpComponent:true,
component:'template/view/index',
hidden:false,
meta:{
"title": "会计单位",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060300,
},
name:'financeUnit',
path:"financeUnit",
},
{
erpComponent:true,
component:'baseData/finance/store/index',
hidden:false,
meta:{
"title": "仓库财务信息",
"icon": "",
"noCache": false,
"link": null,
"mkid":215060400,
},
name:'financeStore',
path:"financeStore",
},
]
}
]
}
]
}
...@@ -23,7 +23,6 @@ router.beforeEach((to, from, next) => { ...@@ -23,7 +23,6 @@ router.beforeEach((to, from, next) => {
if (store.state.app.isInit==false) { if (store.state.app.isInit==false) {
store.commit('app/changeInit') store.commit('app/changeInit')
store.dispatch('GenerateRoutes').then(accessRoutes => { store.dispatch('GenerateRoutes').then(accessRoutes => {
console.log(accessRoutes,'添加权限accessRoutes')
router.addRoutes(accessRoutes) // 动态添加可访问路由表 router.addRoutes(accessRoutes) // 动态添加可访问路由表
next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
}) })
......
...@@ -36,7 +36,6 @@ export default { ...@@ -36,7 +36,6 @@ export default {
} }
}, },
mounted(){ mounted(){
console.log(this)
}, },
methods: { methods: {
back() { back() {
......
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