教师专业选项的处理

This commit is contained in:
daihh
2023-01-18 11:24:41 +08:00
parent 58377363b6
commit d360b96bc0
4 changed files with 127 additions and 42 deletions

View File

@@ -396,6 +396,15 @@
loadTeacherinfo(){
this.workname=[];
this.checkboxtearGroup=[];
let children=[];
this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{
children.push(lk);
})
});
this.childData=children;
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
if(res.result.courses){
this.teachform.courses = res.result.courses;
@@ -407,6 +416,8 @@
this.teachform.photo = res.result.photo;
this.tearchUrl = this.fileBaseUrl + res.result.photo;
}
this.teachform.expertise = res.result.expertise.split( ',' );
this.convertExpertise(this.teachform.expertise);
apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{
if(sinfo.status=='200'){
@@ -420,33 +431,44 @@
this.teachform.photo = sinfo.result.photo;
this.tearchUrl = this.fileBaseUrl + sinfo.result.photo;
}
if(!res.result.expertise && sinfo.result.expertise){
this.teachform.expertise = sinfo.result.expertise.split( ',' );
this.convertExpertise(this.teachform.expertise);
}
}
})
this.teachform.expertise = res.result.expertise.split( ',' );
let children=[];
this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{
children.push(lk);
})
});
this.childData=children;
this.teachform.expertise.forEach(item =>{
this.childData.forEach(it =>{
if(item == it.id){
this.workname.push(it);
this.checkboxtearGroup.push(it.id);
//console.log(it,'匹配的数据')
}
})
})
// this.teachform.expertise.forEach(item =>{
// this.childData.forEach(it =>{
// if(item == it.id){
// this.workname.push(it);
// this.checkboxtearGroup.push(it.id);
// //console.log(it,'匹配的数据')
// }
// })
// })
})
},
// Teacherprofile(){
// apiTeach.has(this.userInfo.aid).then(res =>{
// this.teaechswich = res.result.isTeacher;
// })
// },
convertExpertise(expertises){
let children=[];
this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{
children.push(lk);
})
});
this.childData=children;
expertises.forEach(item =>{
this.childData.forEach(it =>{
if(item == it.id){
//console.log(item)
this.workname.push(it);
this.checkboxtearGroup.push(it.id);
}
})
})
},
// 保存个人主页选项的编辑
saveHideHome(){
//执行隐藏操作