menu和authority修改父级变为选择模式

This commit is contained in:
pixel
2020-04-15 16:37:53 +08:00
parent ea3f49d68a
commit cd0b1e0336
8 changed files with 206 additions and 33 deletions
+13
View File
@@ -127,6 +127,17 @@ export default {
...mapGetters('user', ['token'])
},
methods: {
getAuthorityList(AuthorityData){
AuthorityData.map(item=>{
this.authOptions.push({
authorityId:item.authorityId,
authorityName:item.authorityName
})
if(item.children){
this.getAuthorityList(item.children)
}
})
},
async enterAddUserDialog() {
this.$refs.userForm.validate(async valid => {
if (valid) {
@@ -160,8 +171,10 @@ export default {
}
},
async created() {
this.getTableData()
const res = await getAuthorityList({ page: 1, pageSize: 999 })
this.authOptions = res.data.list
}