Commit b44811bd by fengzhaoyu

角色增加修改

parent 8cb2c928
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
watch: { watch: {
$route (to, from) { $route (to, from) {
this.title = to.meta.title.split('/') this.title = to.meta.title.split('/')
this.defaultSelectedKeys = this.$route.matched[1] && this.$route.matched[1].name ? this.$route.matched[1].name : '' this.defaultSelectedKeys = this.$route.matched[1] && this.$route.matched[1].name ? this.$route.matched[1].name : ''
} }
}, },
computed: {}, computed: {},
......
...@@ -37,6 +37,7 @@ export default { ...@@ -37,6 +37,7 @@ export default {
} }
}, },
created () { created () {
console.log(this.$store.state.menuList, 11111)
this.defaultSelectedKeys = this.$route.name this.defaultSelectedKeys = this.$route.name
this.chooseMenuList = this.$route.name this.chooseMenuList = this.$route.name
}, },
......
...@@ -132,8 +132,8 @@ export default { ...@@ -132,8 +132,8 @@ export default {
addRole (obj) { addRole (obj) {
// console.log(obj, 111) // console.log(obj, 111)
// this.chooseMenuList = obj.key // this.chooseMenuList = obj.key
if (this.roleList.length > 10) { if (this.roleList.length > 9) {
this.$message.err('最多可添加十个角色') this.$message.error('最多可添加十个角色')
} else { } else {
this.$router.push({ name: 'addOrRights' }) this.$router.push({ name: 'addOrRights' })
} }
......
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