From 6365c2e81f2c61ff6236798316f44d60b5a06d55 Mon Sep 17 00:00:00 2001 From: xuyiming Date: Tue, 30 Jun 2020 16:49:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=85=8D=E8=A7=92=E8=89=B2=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/authority/user/userRoles.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/authority/user/userRoles.vue b/src/pages/authority/user/userRoles.vue index 3550ed2..dba6085 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"); }, }, }; -- 2.26.0