Compare commits

...

2 Commits

  1. 70
      src/layout/loginPage.vue

@ -424,35 +424,69 @@ const formModel = ref({
const FacultiesList = ref([]); const FacultiesList = ref([]);
const getFacultiesList = async (data: any) => { const getFacultiesList = async (data: any) => {
const res: any = await getFaculties(data); const res: any = await getFaculties(data)
console.log(res, "res11"); console.log(res, 'res11')
FacultiesList.value = res.result; if (data.primaryType == 3){
}; FacultiesList.value = res.result.map((res:any) => {
const deepValues = ref([]); return {
value: res.id,
label: res.name,
isLeaf: true
}
})
}else{
FacultiesList.value = res.result.map((res: any) => {
return {
value: res.id,
label: res.name,
isLeaf: false
}
})
}
}
const deepValues = ref([])
// //
const props = { const props = {
lazy: true, lazy: true,
checkStrictly: true, checkStrictly: true,
emitPath: false, emitPath: false,
isLeaf: 'isLeaf',
async lazyLoad(node: any, resolve: any) { async lazyLoad(node: any, resolve: any) {
console.log(node); console.log(node);
deepValues.value = node.pathValues; deepValues.value = node.pathValues;
await getFacultiesList({ await getFacultiesList({
primaryType: node.level + 1, primaryType: node.level + 1,
pid: node.value, pid: node.value,
}); })
const nodes = FacultiesList.value.map((item: any) => ({ const nodes = FacultiesList.value.map((item: any) => {
value: item.id, if (!item.isLeaf) {
label: item.name, return {
})); value: item.value,
resolve(nodes); label: item.label,
isLeaf: item.isLeaf,
disabled:true
}
} else {
return {
value: item.value,
label: item.label,
isLeaf: item.isLeaf
}
}
})
console.log(nodes,'nodes');
resolve(nodes)
}, },
}; }
const cascader = ref(null)
const handleChange = (e: any) => { const handleChange = (e: any) => {
console.log(e); console.log(e);
formModel.value.clssid = e; formModel.value.clssid = e
}; cascader.value.togglePopperVisible()
}
// //
const rules = { const rules = {
@ -538,6 +572,11 @@ const register = async () => {
studentNumb: "", studentNumb: "",
mobile: "", mobile: "",
captcha: "", captcha: "",
}
ElMessage.success(`注册成功`)
isRegister.value = false
}; };
ElMessage.success(`注册成功`); ElMessage.success(`注册成功`);
isRegister.value = false; isRegister.value = false;
@ -622,6 +661,7 @@ onMounted(() => {
align-items: center; align-items: center;
height: 1000px; height: 1000px;
min-height: 100vh; min-height: 100vh;
// margin: 0; // margin: 0;
.middle-content { .middle-content {
position: relative; position: relative;

Loading…
Cancel
Save