This commit is contained in:
lmj
2022-12-14 22:52:09 +08:00
parent 80104a65dc
commit b8e7812e9c
4 changed files with 44 additions and 11 deletions

View File

@@ -9,6 +9,11 @@ const findByName = function(name) {
return ajax.get('/xboe/teacher/name?name=' + name);
}
const updateTeacher=function(data){
return ajax.postJson('/xboe/teacher/update-teacher',data);
}
/**
* 根据id得到教师的显示信息只是几个基本的显示字段
* @param {Object} id
@@ -21,6 +26,7 @@ const detailTeacher=function (id){
return ajax.get('/xboe/teacher/detail-teacher?id='+id);
}
/**
* 分页查询
* @param {
@@ -218,5 +224,6 @@ export default {
end,
exports,
syncUpdate,
detailTeacher
detailTeacher,
updateTeacher
}

View File

@@ -2,7 +2,7 @@
<div class="interact-bar ranking-interactBar">
<div>
<el-tooltip effect="light" content="评分" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0px;font-size: 22px;flex:1;" ></svg-icon>
<svg-icon style="margin-right: 0px;font-size: 22px;" icon-class="Scoreicon"></svg-icon>
</el-tooltip>
<span class="interact-bar-value"> {{ data.score }} </span>
</div>

View File

@@ -0,0 +1 @@
<svg t="1671028831851" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3466" width="200" height="200"><path d="M511 724.7c-79.5 0-154.3-31-210.5-87.2-56.2-56.2-87.2-131-87.2-210.5s31-154.3 87.2-210.5 131-87.2 210.5-87.2 154.3 31 210.5 87.2 87.2 131 87.2 210.5-31 154.3-87.2 210.5c-56.2 56.3-131 87.2-210.5 87.2z m0-545.4c-136.6 0-247.7 111.1-247.7 247.7S374.4 674.7 511 674.7 758.7 563.6 758.7 427 647.6 179.3 511 179.3z" p-id="3467" fill="#8a8a8a"></path><path d="M243 895.5l59.4-266 48.8 10.9L310.7 822l194.8-60.8 206.4 61.1L663 632.5l48.4-12.5 71 275.3-276.5-81.8zM512 268.8l46.9 94.9L663.7 379l-75.9 73.9 17.9 104.4L512 508l-93.7 49.3 17.9-104.4-75.9-73.9 104.8-15.3z" p-id="3468" fill="#8a8a8a"></path></svg>

After

Width:  |  Height:  |  Size: 757 B

View File

@@ -32,13 +32,13 @@
</div>
<div class="teachphoto" style="height:70px">
<h3>擅长课程</h3>
<div class="teachexcel">
<div v-if="teachtext.courses" class="teachexcel">
{{ teachtext.courses }}
</div>
</div>
<div class="teachphoto" style="height:70px">
<h3>专长</h3>
<div class="teachexcel">
<div v-if="teachtext.expertise" class="teachexcel">
{{ teachtext.expertise }}
</div>
@@ -91,10 +91,10 @@
</ul>
</div> -->
<div >
<div class="interest" v-for="(sys,index) in sysTypeListMap" :key="sys.id">
<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="checkboxGroup" 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-group>
</div>
@@ -106,7 +106,7 @@
<div>
<div style="text-align: center;margin-top:56px">
<el-button @click="Edittearch = true">取消</el-button>
<el-button type="primary" @click="teacherUpdata">保存</el-button>
<el-button type="primary" @click="teacherUpdata()">保存</el-button>
</div>
</div>
</div>
@@ -297,6 +297,7 @@
}
};
return {
sysTypeListtear:[],
teaechswich:false,
props: { multiple: true },
options: [{
@@ -357,11 +358,13 @@
hideHome:false,// 是否隐藏个人主页
cities: cityOptions,
checkboxGroup: [],
checkboxtearGroup: [],
radio: '1',
form:{
account:{}
},
teachform:{
id:'',
photo:'',
courses:'',//擅长课程
workExperience:'', //工作经历
@@ -415,10 +418,14 @@
}
},
Edittearch(){
this.gettearch();
},
// 监听"编辑按钮"事件变化
interestIsEdit(){
this.load();
this.getInfo();
}
@@ -430,18 +437,20 @@
this.hideHome = !this.userInfo.showHome;
this.load();
this.getInfo();
this.gettearch();
this.getSysTypeTree().then(rs => {
this.sysTypeListMap = rs;
// console.log(rs);
this.sysTypeListtear = rs;
});
this.Teacherprofile();
this.Teacherinfo();
},
methods:{
teacherUpdata(){
apiTeach.update(this.teachform).then(res =>{
console.log('编辑成功')
})
gettearch(){
// console.log(this.checkboxtearGroup,'lmj');
},
Teacherinfo(){
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
this.teachtext = res.result;
@@ -525,6 +534,21 @@
return this.sysTypeMap.get(code);
},
teacherUpdata(){
if(this.checkboxtearGroup.length <3 && this.checkboxtearGroup.length>=1) {
this.$message.error('至少选择三个专长!')
return;
}
console.log(this.checkboxtearGroup);
this.teachform.expertise = this.checkboxtearGroup.toString();
console.log(this.teachform.expertise);
this.teachform.id = this.userInfo.aid;
apiTeach.updateTeacher(this.teachform).then(res =>{
console.log('编辑成功')
})
this.Edittearch = true
},
// 更新用户与偏好数据
saveHobby(){
let data = []
@@ -677,6 +701,7 @@
height: 40px;
width: 100%;
h4{
cursor: pointer;
float: left;
font-weight: 400;
margin: 0;