diff --git a/src/pages/authority/user/userRoles.vue b/src/pages/authority/user/userRoles.vue index 3550ed2a756f0050d14b6b9508491fc3bf134aa0..dba6085edc659a8c86b81718c8340ba77249f83e 100644 --- a/src/pages/authority/user/userRoles.vue +++ b/src/pages/authority/user/userRoles.vue @@ -128,6 +128,7 @@ export default { setUserRoles() { let add = []; let remove = []; + let requests = []; this.roles.forEach((item) => { if (this.userRoles.indexOf(item) === -1) { @@ -141,8 +142,6 @@ export default { } }); - let requests = []; - if (add.length > 0) { requests.push( this.$http.post(`/apaas/backmgt/user/addRole`, { @@ -168,6 +167,10 @@ export default { message: `分配角色成功.`, type: "success", }); + + setTimeout(() => { + this.$router.push("/authority/users"); + }, 200); }) .catch((error) => { this.$message({ @@ -181,8 +184,6 @@ export default { type: "warning", }); } - - // this.$router.push("/authority/users"); }, }, };