mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 03:16:42 +08:00
教师设置的修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="personSetting">
|
||||
|
||||
|
||||
<el-button type="text" class="passWard-btn" @click="openPassword"><svg-icon icon-class="passWard-edit" style="margin-right: 10px;font-size: 22px;"></svg-icon>修改密码</el-button>
|
||||
<div class="avatar" title="修改头像" @click="openAvatar">
|
||||
<el-avatar :src="avatar" :size="116" alt=""></el-avatar>
|
||||
@@ -24,7 +24,7 @@
|
||||
<div v-if="Edittearch">
|
||||
<div class="tearchimg">
|
||||
<h3>教师职业照</h3>
|
||||
<img :src="fileBaseUrl + teachform.photo" alt="">
|
||||
<img :src="tearchUrl" alt="">
|
||||
</div>
|
||||
<div class="tearchexperi">
|
||||
<h3>工作经历</h3>
|
||||
@@ -33,14 +33,14 @@
|
||||
<div class="tearchexperi" style="height:70px">
|
||||
<h3>擅长课程</h3>
|
||||
<span>{{ teachform.courses }}</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="teachphoto" style="height:70px">
|
||||
<h3>专长</h3>
|
||||
<div v-for="(item,idx) in workname" :key="idx" class="teachexcel">
|
||||
{{ item }}
|
||||
{{ item.name }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- 编辑教师 -->
|
||||
@@ -63,7 +63,7 @@
|
||||
v-model="teachform.workExperience">
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="tearchexperi" style="margin-top:15px">
|
||||
<h3>擅长课程</h3>
|
||||
@@ -79,18 +79,16 @@
|
||||
<div class="tearchexperi">
|
||||
<h3 >教师专长</h3>
|
||||
<div style="float:left;margin-top:10px;">
|
||||
|
||||
<div>
|
||||
<div class="interest" v-for="(sys,index) in sysTypeListtear" :key="sys.id">
|
||||
<span class="interest-title">{{sys.name}}</span>
|
||||
<div style="width:100%">
|
||||
<el-checkbox-group v-model="checkboxtearGroup" v-if="sys.children.length > 0">
|
||||
<el-checkbox size="medium" border v-for="ch in sys.children" :label="ch.id" :key="ch.id">{{ch.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="interest" v-for="(sys,index) in sysTypeListtear" :key="sys.id">
|
||||
<span class="interest-title">{{sys.name}}</span>
|
||||
<div style="width:100%">
|
||||
<el-checkbox-group v-model="checkboxtearGroup" v-if="sys.children.length > 0">
|
||||
<el-checkbox size="medium" border v-for="ch in sys.children" :label="ch.id" :key="ch.id">{{ch.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
@@ -180,15 +178,15 @@
|
||||
-->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- </div> -->
|
||||
<!-- </el-form> -->
|
||||
<el-dialog
|
||||
@@ -418,7 +416,7 @@
|
||||
interestIsEdit(){
|
||||
this.load();
|
||||
this.getInfo();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -443,30 +441,29 @@
|
||||
gettearch(){
|
||||
// console.log(this.checkboxtearGroup,'lmj');
|
||||
},
|
||||
|
||||
|
||||
Teacherinfo(){
|
||||
this.workname=[];
|
||||
this.checkboxtearGroup=[];
|
||||
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
|
||||
this.teachform.courses = res.result.courses;
|
||||
this.teachform.workExperience = res.result.workExperience;
|
||||
this.tearchUrl = this.fileBaseUrl + res.result.photo;
|
||||
this.teachform.expertise = res.result.expertise.split( ',' );
|
||||
let children=[];
|
||||
this.sysTypeListtear.forEach(nm =>{
|
||||
nm.children.forEach(lk =>{
|
||||
this.childData.push(lk);
|
||||
children.push(lk);
|
||||
})
|
||||
})
|
||||
});
|
||||
this.childData=children;
|
||||
this.teachform.expertise.forEach(item =>{
|
||||
this.childData.forEach(it =>{
|
||||
if(item == it.id){
|
||||
this.workname.push(it.name);
|
||||
|
||||
// this.workname.filter(function (item, index, arr) {
|
||||
// return this.workname.indexOf(item, 0) === index;
|
||||
// });
|
||||
// console.log(this.workname,'ces')
|
||||
this.workname.push(it);
|
||||
this.checkboxtearGroup.push(it.id);
|
||||
//console.log(it,'匹配的数据')
|
||||
}
|
||||
console.log(this.workname,'lmj')
|
||||
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -564,10 +561,13 @@
|
||||
console.log(this.teachform.expertise);
|
||||
this.teachform.id = this.userInfo.aid;
|
||||
apiTeach.updateTeacher(this.teachform).then(res =>{
|
||||
console.log('编辑成功')
|
||||
//console.log('编辑成功')
|
||||
if(res.status==200){
|
||||
this.Edittearch = true;
|
||||
this.Teacherinfo();
|
||||
}
|
||||
})
|
||||
this.Edittearch = true;
|
||||
this.Teacherinfo();
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user