mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
教师设置的修改
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="personSetting">
|
<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>
|
<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">
|
<div class="avatar" title="修改头像" @click="openAvatar">
|
||||||
<el-avatar :src="avatar" :size="116" alt=""></el-avatar>
|
<el-avatar :src="avatar" :size="116" alt=""></el-avatar>
|
||||||
@@ -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>
|
||||||
@@ -33,14 +33,14 @@
|
|||||||
<div class="tearchexperi" style="height:70px">
|
<div class="tearchexperi" style="height:70px">
|
||||||
<h3>擅长课程</h3>
|
<h3>擅长课程</h3>
|
||||||
<span>{{ teachform.courses }}</span>
|
<span>{{ teachform.courses }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
<!-- 编辑教师 -->
|
<!-- 编辑教师 -->
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
v-model="teachform.workExperience">
|
v-model="teachform.workExperience">
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="tearchexperi" style="margin-top:15px">
|
<div class="tearchexperi" style="margin-top:15px">
|
||||||
<h3>擅长课程</h3>
|
<h3>擅长课程</h3>
|
||||||
@@ -79,18 +79,16 @@
|
|||||||
<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>
|
<div style="width:100%">
|
||||||
<div style="width:100%">
|
<el-checkbox-group v-model="checkboxtearGroup" v-if="sys.children.length > 0">
|
||||||
<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 size="medium" border v-for="ch in sys.children" :label="ch.id" :key="ch.id">{{ch.name}}</el-checkbox>
|
</el-checkbox-group>
|
||||||
</el-checkbox-group>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -180,15 +178,15 @@
|
|||||||
-->
|
-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<!-- </el-form> -->
|
<!-- </el-form> -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -418,7 +416,7 @@
|
|||||||
interestIsEdit(){
|
interestIsEdit(){
|
||||||
this.load();
|
this.load();
|
||||||
this.getInfo();
|
this.getInfo();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -443,30 +441,29 @@
|
|||||||
gettearch(){
|
gettearch(){
|
||||||
// console.log(this.checkboxtearGroup,'lmj');
|
// console.log(this.checkboxtearGroup,'lmj');
|
||||||
},
|
},
|
||||||
|
|
||||||
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.Teacherinfo();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.Edittearch = true;
|
|
||||||
this.Teacherinfo();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user