perf[permission]:set role => roles

This commit is contained in:
Pan
2018-01-05 11:38:34 +08:00
parent de08e49f19
commit 54acf1e0d5
6 changed files with 28 additions and 25 deletions

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<div style="margin-bottom:15px;">{{$t('permission.roles')}} {{roles}}</div>
{{$t('permission.switchRoles')}}
<el-radio-group v-model="role">
<el-radio-group v-model="switchRoles">
<el-radio-button label="editor"></el-radio-button>
</el-radio-group>
</div>
@@ -15,7 +15,7 @@ export default{
name: 'permission',
data() {
return {
role: ''
switchRoles: ''
}
},
computed: {
@@ -24,8 +24,8 @@ export default{
])
},
watch: {
role(val) {
this.$store.dispatch('ChangeRole', val).then(() => {
switchRoles(val) {
this.$store.dispatch('ChangeRoles', val).then(() => {
this.$router.push({ path: '/permission/index?' + +new Date() })
})
}