|
@@ -264,7 +264,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
- <el-form-item label="角色">
|
|
|
|
|
|
+ <el-form-item label="角色" prop="roleIds">
|
|
<el-select v-model="form.roleIds" multiple placeholder="请选择">
|
|
<el-select v-model="form.roleIds" multiple placeholder="请选择">
|
|
<el-option
|
|
<el-option
|
|
v-for="item in roleOptions"
|
|
v-for="item in roleOptions"
|
|
@@ -393,7 +393,8 @@ const data = reactive({
|
|
nickName: [{ required: true, message: "用户姓名不能为空", trigger: "blur" }],
|
|
nickName: [{ required: true, message: "用户姓名不能为空", trigger: "blur" }],
|
|
password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }, { pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }],
|
|
password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }, { pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur" }],
|
|
email: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }],
|
|
email: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }],
|
|
- phonenumber: [{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }]
|
|
|
|
|
|
+ phonenumber: [{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }],
|
|
|
|
+ roleIds: [{ type: 'array', required: true, message: "请选择用户角色", trigger: "blur" }]
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|