Commit 0f06ae6e by liang ce

router 判断

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