mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-16 22:36:43 +08:00
教师专业选项的处理
This commit is contained in:
@@ -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(){
|
||||
//执行隐藏操作
|
||||
|
||||
Reference in New Issue
Block a user