diff --git a/src/views/system/user/authRole.vue b/src/views/system/user/authRole.vue index b282fd32..c1057be1 100644 --- a/src/views/system/user/authRole.vue +++ b/src/views/system/user/authRole.vue @@ -102,10 +102,14 @@ export default { submitForm() { const userId = this.form.userId; const roleIds = this.roleIds.join(","); + if(this.roleIds.length>1){ + this.$modal.msgError('最多只能勾选一个角色!!!') + }else{ updateAuthRole({ userId: userId, roleIds: roleIds }).then((response) => { this.$modal.msgSuccess("授权成功"); this.close(); }); + } }, /** 关闭按钮 */ close() { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 21890c37..df0dd11a 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -242,7 +242,7 @@ - +