|
|
@ -35,7 +35,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="right"> |
|
|
|
<el-input type="password" v-model="formModel.password" style="border-color: #20bec8" |
|
|
|
<el-input type="password" v-model="formModel.password" style="border-color: #20bec8" |
|
|
|
placeholder="请输入密码"></el-input> |
|
|
|
placeholder="请输入密码" show-password></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -51,7 +51,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="right"> |
|
|
|
<el-input type="password" v-model="formModel.repassword" style="border-color: #20bec8" |
|
|
|
<el-input type="password" v-model="formModel.repassword" style="border-color: #20bec8" |
|
|
|
placeholder="请再次输入密码"></el-input> |
|
|
|
placeholder="请再次输入密码" show-password></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
@ -83,11 +83,11 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="right"> |
|
|
|
<div class="right"> |
|
|
|
<el-cascader placeholder="请选择所属班级" :props="props" style="width: 142%; height: 0.2344rem" |
|
|
|
<el-cascader placeholder="请选择所属班级" :props="props" style="width: 142%; height: 0.2344rem" |
|
|
|
v-model="formModel.department" /> |
|
|
|
v-model="formModel.clssid" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<!-- <el-cascader :props="props" style="width: 100%; height: 0.2344rem" v-model="formModel.department" /> --> |
|
|
|
<!-- <el-cascader :props="props" style="width: 100%; height: 0.2344rem" v-model="formModel.clssid" /> --> |
|
|
|
<el-form-item prop="studentNumb"> |
|
|
|
<el-form-item prop="studentNumb"> |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
@ -104,7 +104,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item prop="mobile"> |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
<div style="display: flex; align-items: center;"> |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
<div class="left" style="display: flex; align-items: center ;width: 90px;"> |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
|
<div style="padding-right: 10px; color: #1084c1"> |
|
|
@ -268,7 +268,7 @@ const formModel = ref({ |
|
|
|
password: "", |
|
|
|
password: "", |
|
|
|
repassword: "", |
|
|
|
repassword: "", |
|
|
|
name: "", |
|
|
|
name: "", |
|
|
|
department: '', |
|
|
|
clssid: '', |
|
|
|
studentNumb: "", |
|
|
|
studentNumb: "", |
|
|
|
mobile: '', |
|
|
|
mobile: '', |
|
|
|
captcha: "", |
|
|
|
captcha: "", |
|
|
@ -280,14 +280,15 @@ const getFacultiesList = async (data: any) => { |
|
|
|
console.log(res, 'res11') |
|
|
|
console.log(res, 'res11') |
|
|
|
FacultiesList.value = res.result |
|
|
|
FacultiesList.value = res.result |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const deepValues = ref([]) |
|
|
|
// 配置部门级联选择器 |
|
|
|
// 配置部门级联选择器 |
|
|
|
const props = { |
|
|
|
const props = { |
|
|
|
lazy: true, |
|
|
|
lazy: true, |
|
|
|
checkStrictly: true, |
|
|
|
checkStrictly: true, |
|
|
|
emitPath: false, |
|
|
|
emitPath: false, |
|
|
|
async lazyLoad(node: any, resolve: any) { |
|
|
|
async lazyLoad(node: any, resolve: any) { |
|
|
|
// console.log(node); |
|
|
|
console.log(node); |
|
|
|
|
|
|
|
deepValues.value = node.pathValues |
|
|
|
await getFacultiesList({ |
|
|
|
await getFacultiesList({ |
|
|
|
primaryType: node.level + 1, |
|
|
|
primaryType: node.level + 1, |
|
|
|
pid: node.value, |
|
|
|
pid: node.value, |
|
|
@ -319,7 +320,7 @@ const rules = { |
|
|
|
{ |
|
|
|
{ |
|
|
|
min: 5, |
|
|
|
min: 5, |
|
|
|
max: 11, |
|
|
|
max: 11, |
|
|
|
message: "学号长度最小五位最大三十位", |
|
|
|
message: "学号长度最小五位最大十一位", |
|
|
|
trigger: ["change", "blur"], |
|
|
|
trigger: ["change", "blur"], |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
@ -352,12 +353,20 @@ const rules = { |
|
|
|
trigger: "blur", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
|
|
|
|
mobile:[ |
|
|
|
|
|
|
|
{ required: true, message: "请输入手机号", trigger: "blur" }, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
pattern: /^1[3-9]\d{9}$/, |
|
|
|
|
|
|
|
message: "手机号长度最小六位最大十五位", |
|
|
|
|
|
|
|
trigger: ["change", "blur"], |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
] |
|
|
|
}; |
|
|
|
}; |
|
|
|
const register = async () => { |
|
|
|
const register = async () => { |
|
|
|
await formRef.value.validate(); |
|
|
|
await formRef.value.validate(); |
|
|
|
console.log("开始注册请求"); |
|
|
|
console.log("开始注册请求"); |
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
department: formModel.value.department, |
|
|
|
clssid: formModel.value.clssid, |
|
|
|
mobile: formModel.value.mobile, |
|
|
|
mobile: formModel.value.mobile, |
|
|
|
captcha: formModel.value.captcha, |
|
|
|
captcha: formModel.value.captcha, |
|
|
|
checkKey: 1629428467008, |
|
|
|
checkKey: 1629428467008, |
|
|
@ -365,6 +374,7 @@ const register = async () => { |
|
|
|
username: formModel.value.username, |
|
|
|
username: formModel.value.username, |
|
|
|
realname: formModel.value.name, |
|
|
|
realname: formModel.value.name, |
|
|
|
workno: formModel.value.studentNumb, |
|
|
|
workno: formModel.value.studentNumb, |
|
|
|
|
|
|
|
depid: deepValues.value.splice(0, 2).join(',') |
|
|
|
}; |
|
|
|
}; |
|
|
|
const res: any = await sturegister(data) |
|
|
|
const res: any = await sturegister(data) |
|
|
|
if (res.code === 200) { |
|
|
|
if (res.code === 200) { |
|
|
|