@@ -268,7 +268,7 @@ const formModel = ref({
password: "",
repassword: "",
name: "",
- department: '',
+ clssid: '',
studentNumb: "",
mobile: '',
captcha: "",
@@ -280,14 +280,15 @@ const getFacultiesList = async (data: any) => {
console.log(res, 'res11')
FacultiesList.value = res.result
}
+const deepValues = ref([])
// 配置部门级联选择器
const props = {
lazy: true,
checkStrictly: true,
emitPath: false,
async lazyLoad(node: any, resolve: any) {
- // console.log(node);
-
+ console.log(node);
+ deepValues.value = node.pathValues
await getFacultiesList({
primaryType: node.level + 1,
pid: node.value,
@@ -319,7 +320,7 @@ const rules = {
{
min: 5,
max: 11,
- message: "学号长度最小五位最大三十位",
+ message: "学号长度最小五位最大十一位",
trigger: ["change", "blur"],
},
],
@@ -352,12 +353,20 @@ const rules = {
trigger: "blur",
},
],
+ mobile:[
+ { required: true, message: "请输入手机号", trigger: "blur" },
+ {
+ pattern: /^1[3-9]\d{9}$/,
+ message: "手机号长度最小六位最大十五位",
+ trigger: ["change", "blur"],
+ },
+ ]
};
const register = async () => {
await formRef.value.validate();
console.log("开始注册请求");
let data = {
- department: formModel.value.department,
+ clssid: formModel.value.clssid,
mobile: formModel.value.mobile,
captcha: formModel.value.captcha,
checkKey: 1629428467008,
@@ -365,6 +374,7 @@ const register = async () => {
username: formModel.value.username,
realname: formModel.value.name,
workno: formModel.value.studentNumb,
+ depid: deepValues.value.splice(0, 2).join(',')
};
const res: any = await sturegister(data)
if (res.code === 200) {