|
|
|
|
@ -312,9 +312,11 @@ export default { |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
submit() { |
|
|
|
|
const menuList = this.$refs.treeMenu.getCheckedKeys(); |
|
|
|
|
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys(); |
|
|
|
|
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys(); |
|
|
|
|
|
|
|
|
|
const menuList = this.$refs.treeMenu ? this.$refs.treeMenu.getCheckedKeys() : []; |
|
|
|
|
const dataScopeList = this.$refs.treeDataScope ? this.$refs.treeDataScope.getCheckedKeys() : []; |
|
|
|
|
const apiScopeList = this.$refs.treeApiScope ? this.$refs.treeApiScope.getCheckedKeys() : []; |
|
|
|
|
|
|
|
|
|
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => { |
|
|
|
|
this.box = false; |
|
|
|
|
this.$message({ |
|
|
|
|
@ -411,13 +413,14 @@ export default { |
|
|
|
|
this.dataScopeTreeObj = []; |
|
|
|
|
this.apiScopeTreeObj = []; |
|
|
|
|
grantTree().then((res) => { |
|
|
|
|
this.menuGrantList = res.data.data.menu; |
|
|
|
|
this.dataScopeGrantList = res.data.data.dataScope; |
|
|
|
|
this.apiScopeGrantList = res.data.data.apiScope; |
|
|
|
|
const data = res.data.result |
|
|
|
|
this.menuGrantList = data.menu; |
|
|
|
|
this.dataScopeGrantList = data.dataScope || []; |
|
|
|
|
this.apiScopeGrantList = data.apiScope || []; |
|
|
|
|
getRole(this.ids).then((res) => { |
|
|
|
|
this.menuTreeObj = res.data.data.menu; |
|
|
|
|
this.dataScopeTreeObj = res.data.data.dataScope; |
|
|
|
|
this.apiScopeTreeObj = res.data.data.apiScope; |
|
|
|
|
this.menuTreeObj = res.data.result.menu; |
|
|
|
|
this.dataScopeTreeObj = res.data.result.dataScope || []; |
|
|
|
|
this.apiScopeTreeObj = res.data.result.apiScope || []; |
|
|
|
|
this.box = true; |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
@ -427,13 +430,14 @@ export default { |
|
|
|
|
this.dataScopeTreeObj = []; |
|
|
|
|
this.apiScopeTreeObj = []; |
|
|
|
|
grantTree().then((res) => { |
|
|
|
|
this.menuGrantList = res.data.data.menu; |
|
|
|
|
this.dataScopeGrantList = res.data.data.dataScope; |
|
|
|
|
this.apiScopeGrantList = res.data.data.apiScope; |
|
|
|
|
const data = res.data.result |
|
|
|
|
this.menuGrantList = data.menu; |
|
|
|
|
this.dataScopeGrantList = data.dataScope || []; |
|
|
|
|
this.apiScopeGrantList = data.apiScope || []; |
|
|
|
|
getRole(row.id).then((res) => { |
|
|
|
|
this.menuTreeObj = res.data.data.menu; |
|
|
|
|
this.dataScopeTreeObj = res.data.data.dataScope; |
|
|
|
|
this.apiScopeTreeObj = res.data.data.apiScope; |
|
|
|
|
this.menuTreeObj = res.data.result.menu; |
|
|
|
|
this.dataScopeTreeObj = res.data.result.dataScope; |
|
|
|
|
this.apiScopeTreeObj = res.data.result.apiScope; |
|
|
|
|
this.selectionList.push(row); |
|
|
|
|
this.box = true; |
|
|
|
|
}); |
|
|
|
|
|