diff --git a/src/views/user/Setting.vue b/src/views/user/Setting.vue index 7f865156..4d700623 100644 --- a/src/views/user/Setting.vue +++ b/src/views/user/Setting.vue @@ -24,22 +24,21 @@

教师职业照

- +

工作经历

- {{ teachtext.workExperience }} + {{ teachform.workExperience }}
-
+

擅长课程

-
- {{ teachtext.courses }} -
+ {{ teachform.courses }} +

专长

-
- {{ teachtext.expertise }} +
+ {{ item }}
@@ -80,17 +79,8 @@

教师专长

- - -
+ +
{{sys.name}}
@@ -297,6 +287,7 @@ } }; return { + fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, sysTypeListtear:[], teaechswich:false, props: { multiple: true }, @@ -386,6 +377,8 @@ sysTypeListMap:[], interestList:[],//已有兴趣爱好列表 interestIsEdit:false, + childData:[], + workname:[], } }, computed: { @@ -453,7 +446,26 @@ Teacherinfo(){ apiTeach.detailTeacher(this.userInfo.aid).then(res =>{ - this.teachtext = res.result; + this.teachform.courses = res.result.courses; + this.teachform.workExperience = res.result.workExperience; + this.teachform.photo = res.result.photo; + this.teachform.expertise = res.result.expertise.split( ',' ); + this.sysTypeListtear.forEach(nm =>{ + nm.children.forEach(lk =>{ + this.childData.push(lk); + }) + }) + this.teachform.expertise.forEach(item =>{ + this.childData.forEach(it =>{ + if(item == it.id){ + this.workname.push(it.name); + console.log(this.workname) + } + }) + + + }) + }) }, Teacherprofile(){ @@ -525,6 +537,7 @@ this.checkboxGroup.push(item.refId); item.name = this.sysTypeName(item.refId) }) + // console.log(res.result); this.interestList = res.result; } }) @@ -546,7 +559,9 @@ apiTeach.updateTeacher(this.teachform).then(res =>{ console.log('编辑成功') }) - this.Edittearch = true + this.Edittearch = true; + this.Teacherinfo(); + }, // 更新用户与偏好数据