教师设置的修改

This commit is contained in:
daihh
2022-12-27 16:15:38 +08:00
parent a7600712bd
commit b8dc64eb47

View File

@@ -24,7 +24,7 @@
<div v-if="Edittearch"> <div v-if="Edittearch">
<div class="tearchimg"> <div class="tearchimg">
<h3>教师职业照</h3> <h3>教师职业照</h3>
<img :src="fileBaseUrl + teachform.photo" alt=""> <img :src="tearchUrl" alt="">
</div> </div>
<div class="tearchexperi"> <div class="tearchexperi">
<h3>工作经历</h3> <h3>工作经历</h3>
@@ -38,7 +38,7 @@
<div class="teachphoto" style="height:70px"> <div class="teachphoto" style="height:70px">
<h3>专长</h3> <h3>专长</h3>
<div v-for="(item,idx) in workname" :key="idx" class="teachexcel"> <div v-for="(item,idx) in workname" :key="idx" class="teachexcel">
{{ item }} {{ item.name }}
</div> </div>
</div> </div>
@@ -79,7 +79,6 @@
<div class="tearchexperi"> <div class="tearchexperi">
<h3 >教师专长</h3> <h3 >教师专长</h3>
<div style="float:left;margin-top:10px;"> <div style="float:left;margin-top:10px;">
<div> <div>
<div class="interest" v-for="(sys,index) in sysTypeListtear" :key="sys.id"> <div class="interest" v-for="(sys,index) in sysTypeListtear" :key="sys.id">
<span class="interest-title">{{sys.name}}</span> <span class="interest-title">{{sys.name}}</span>
@@ -90,7 +89,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div> <div>
@@ -445,28 +443,27 @@
}, },
Teacherinfo(){ Teacherinfo(){
this.workname=[];
this.checkboxtearGroup=[];
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{ apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
this.teachform.courses = res.result.courses; this.teachform.courses = res.result.courses;
this.teachform.workExperience = res.result.workExperience; this.teachform.workExperience = res.result.workExperience;
this.tearchUrl = this.fileBaseUrl + res.result.photo; this.tearchUrl = this.fileBaseUrl + res.result.photo;
this.teachform.expertise = res.result.expertise.split( ',' ); this.teachform.expertise = res.result.expertise.split( ',' );
let children=[];
this.sysTypeListtear.forEach(nm =>{ this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{ nm.children.forEach(lk =>{
this.childData.push(lk); children.push(lk);
})
}) })
});
this.childData=children;
this.teachform.expertise.forEach(item =>{ this.teachform.expertise.forEach(item =>{
this.childData.forEach(it =>{ this.childData.forEach(it =>{
if(item == it.id){ if(item == it.id){
this.workname.push(it.name); this.workname.push(it);
this.checkboxtearGroup.push(it.id);
// this.workname.filter(function (item, index, arr) { //console.log(it,'匹配的数据')
// return this.workname.indexOf(item, 0) === index;
// });
// console.log(this.workname,'ces')
} }
console.log(this.workname,'lmj')
}) })
}) })
}) })
@@ -564,10 +561,13 @@
console.log(this.teachform.expertise); console.log(this.teachform.expertise);
this.teachform.id = this.userInfo.aid; this.teachform.id = this.userInfo.aid;
apiTeach.updateTeacher(this.teachform).then(res =>{ apiTeach.updateTeacher(this.teachform).then(res =>{
console.log('编辑成功') //console.log('编辑成功')
}) if(res.status==200){
this.Edittearch = true; this.Edittearch = true;
this.Teacherinfo(); this.Teacherinfo();
}
})
}, },