Commit a2716207 by liang ce

router 判断

parent e0438335
...@@ -43,12 +43,16 @@ export default { ...@@ -43,12 +43,16 @@ export default {
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
if (this.$store.state.menuList.indexOf('4100') > -1) { if (this.$store.state.menuList.indexOf('4100') > -1) {
router.push({path: '/classificationOfDishes'})
this.chooseMenuList = 'classificationOfDishes' this.chooseMenuList = 'classificationOfDishes'
} else if (this.$store.state.menuList.indexOf('4200') > -1) { } else if (this.$store.state.menuList.indexOf('4200') > -1) {
router.push({path: '/menuManagement'})
this.chooseMenuList = 'menuManagement' this.chooseMenuList = 'menuManagement'
} else if (this.$store.state.menuList.indexOf('4300') > -1) { } else if (this.$store.state.menuList.indexOf('4300') > -1) {
router.push({path: '/consumptionOrder'})
this.chooseMenuList = 'consumptionOrder' this.chooseMenuList = 'consumptionOrder'
} else if (this.$store.state.menuList.indexOf('4400') > -1) { } else if (this.$store.state.menuList.indexOf('4400') > -1) {
router.push({path: '/consumptionStatistics'})
this.chooseMenuList = 'consumptionStatistics' this.chooseMenuList = 'consumptionStatistics'
} }
}, },
......
...@@ -38,18 +38,25 @@ export default { ...@@ -38,18 +38,25 @@ export default {
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
if (this.$store.state.menuList.indexOf('3100') > -1) { if (this.$store.state.menuList.indexOf('3100') > -1) {
router.push({path: '/accountManagement'})
this.chooseMenuList = 'accountManagement' this.chooseMenuList = 'accountManagement'
} else if (this.$store.state.menuList.indexOf('3200') > -1) { } else if (this.$store.state.menuList.indexOf('3200') > -1) {
router.push({path: '/rechargeRecord'})
this.chooseMenuList = 'rechargeRecord' this.chooseMenuList = 'rechargeRecord'
} else if (this.$store.state.menuList.indexOf('3300') > -1) { } else if (this.$store.state.menuList.indexOf('3300') > -1) {
router.push({path: '/allowancePayment'})
this.chooseMenuList = 'allowancePayment' this.chooseMenuList = 'allowancePayment'
} else if (this.$store.state.menuList.indexOf('3400') > -1) { } else if (this.$store.state.menuList.indexOf('3400') > -1) {
router.push({path: '/recordsOfConsumption'})
this.chooseMenuList = 'recordsOfConsumption' this.chooseMenuList = 'recordsOfConsumption'
} else if (this.$store.state.menuList.indexOf('3500') > -1) { } else if (this.$store.state.menuList.indexOf('3500') > -1) {
router.push({path: '/systemReconciliation'})
this.chooseMenuList = 'systemReconciliation' this.chooseMenuList = 'systemReconciliation'
} else if (this.$store.state.menuList.indexOf('3600') > -1) { } else if (this.$store.state.menuList.indexOf('3600') > -1) {
router.push({path: '/paymentManagementSetting'})
this.chooseMenuList = 'paymentManagementSetting' this.chooseMenuList = 'paymentManagementSetting'
} else if (this.$store.state.menuList.indexOf('3700') > -1) { } else if (this.$store.state.menuList.indexOf('3700') > -1) {
router.push({path: '/operationLog'})
this.chooseMenuList = 'operationLog' this.chooseMenuList = 'operationLog'
} }
}, },
......
...@@ -34,6 +34,7 @@ export default { ...@@ -34,6 +34,7 @@ export default {
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
if (this.$store.state.menuList.indexOf('9100') > -1) { if (this.$store.state.menuList.indexOf('9100') > -1) {
router.push({path: '/rightsManagement'})
this.chooseMenuList = 'rightsManagement' this.chooseMenuList = 'rightsManagement'
} }
}, },
......
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