用户管理多选限制为单选
This commit is contained in:
parent
d83d8af18e
commit
f108ded0e2
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="角色" prop="roleIds">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色" multiple-limit="1">
|
||||
<el-option
|
||||
v-for="item in roleOptions"
|
||||
:key="item.roleId"
|
||||
|
|
|
|||
Loading…
Reference in New Issue