mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
教师介绍
This commit is contained in:
@@ -81,13 +81,10 @@
|
|||||||
width="42%"
|
width="42%"
|
||||||
class="teardiabox"
|
class="teardiabox"
|
||||||
>
|
>
|
||||||
<div class="teachbox" style="height:100px">
|
|
||||||
<div class="tearch-img"><img :src="fileBaseUrl+userData.avatar" alt=""></div>
|
|
||||||
<span> {{ teachtext.name }} </span>
|
|
||||||
</div>
|
|
||||||
<div class="teachphoto">
|
<div class="teachphoto">
|
||||||
<h6>教师职业照</h6>
|
<h6>教师职业照</h6>
|
||||||
<img src="../../../public/images/Avatarman.png" alt="">
|
<img :src="tearchUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="teachphoto">
|
<div class="teachphoto">
|
||||||
<h6>教师经历</h6>
|
<h6>教师经历</h6>
|
||||||
@@ -95,27 +92,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="teachphoto" style="height:70px">
|
<div class="teachphoto" style="height:70px">
|
||||||
<h6>擅长课程</h6>
|
<h6>擅长课程</h6>
|
||||||
<div class="teachexcel">
|
<div v-for="(item,idx) in teachtext.courses" :key="idx" class="teachexcel">
|
||||||
通用力
|
{{ item }}
|
||||||
</div>
|
|
||||||
<div class="teachexcel">
|
|
||||||
产品经理培训
|
|
||||||
</div>
|
|
||||||
<div class="teachexcel">
|
|
||||||
规章制度
|
|
||||||
</div>
|
|
||||||
<div class="teachexcel">
|
|
||||||
职业操守与道德
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="teachphoto" style="height:70px">
|
<div class="teachphoto" style="height:70px">
|
||||||
<h6>专长</h6>
|
<h6>专长</h6>
|
||||||
<div class="teachexcel">
|
<div v-for="(item,idx) in workname" :key="idx" class="teachexcel">
|
||||||
通用力
|
{{ item }}
|
||||||
</div>
|
|
||||||
<div class="teachexcel">
|
|
||||||
产品经理培训
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -124,7 +111,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters,mapActions } from 'vuex'
|
||||||
import apiTeach from '@/api/modules/teacher.js';
|
import apiTeach from '@/api/modules/teacher.js';
|
||||||
import apiStart from '@/api/phase2/stat.js';
|
import apiStart from '@/api/phase2/stat.js';
|
||||||
import apiFollow from "@/api/phase2/userfollow.js"
|
import apiFollow from "@/api/phase2/userfollow.js"
|
||||||
@@ -132,14 +119,17 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'UcHeader',
|
name: 'UcHeader',
|
||||||
computed:{
|
computed:{
|
||||||
...mapGetters(['curIdentity','identity','userInfo']),
|
...mapGetters(['curIdentity','identity','sysTypeMap','userInfo']),
|
||||||
avatarText(){
|
avatarText(){
|
||||||
return userAvatarText(this.userInfo.name);
|
return userAvatarText(this.userInfo.name);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
teachtext:[],
|
workname:[],
|
||||||
|
childData:[],
|
||||||
|
sysTypeListtear:[],
|
||||||
|
teachtext:{},
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
teaechswich:false,
|
teaechswich:false,
|
||||||
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
|
||||||
@@ -168,7 +158,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
||||||
this.pageId = this.$xpage.getHomeId(this.$route);
|
this.pageId = this.$xpage.getHomeId(this.$route);
|
||||||
this.sex = this.userInfo.sex;
|
this.sex = this.userInfo.sex;
|
||||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||||
@@ -176,7 +165,9 @@
|
|||||||
this.setCurIdentity(1);
|
this.setCurIdentity(1);
|
||||||
}
|
}
|
||||||
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
||||||
|
this.getSysTypeTree().then(rs => {
|
||||||
|
this.sysTypeListtear = rs;
|
||||||
|
});
|
||||||
this.loadUserStat();
|
this.loadUserStat();
|
||||||
if(this.pageId !== this.userInfo.aid) {
|
if(this.pageId !== this.userInfo.aid) {
|
||||||
this.followHas();
|
this.followHas();
|
||||||
@@ -184,10 +175,37 @@
|
|||||||
this.Teacherprofile();
|
this.Teacherprofile();
|
||||||
this.Teacherinfo();
|
this.Teacherinfo();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods:{
|
||||||
|
...mapActions({
|
||||||
|
getResOwnerTree: 'resOwner/getResOwnerTree',
|
||||||
|
loadResOwners: 'resOwner/loadResOwners',
|
||||||
|
getSysTypeTree: 'sysType/getSysTypeTree',
|
||||||
|
loadSysTypes: 'sysType/loadSysTypes'
|
||||||
|
}),
|
||||||
Teacherinfo(){
|
Teacherinfo(){
|
||||||
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
|
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
|
||||||
this.teachtext = res.result;
|
this.teachtext.workExperience = res.result.workExperience;
|
||||||
|
this.teachtext.courses = res.result.courses.split( ',' );
|
||||||
|
this.tearchUrl = this.fileBaseUrl + res.result.photo;
|
||||||
|
this.teachtext.expertise = res.result.expertise.split( ',' );
|
||||||
|
console.log(this.teachtext);
|
||||||
|
this.sysTypeListtear.forEach(nm =>{
|
||||||
|
nm.children.forEach(lk =>{
|
||||||
|
this.childData.push(lk);
|
||||||
|
})
|
||||||
|
});
|
||||||
|
this.teachtext.expertise.forEach(item =>{
|
||||||
|
this.childData.forEach(it =>{
|
||||||
|
if(item == it.id){
|
||||||
|
console.log(item)
|
||||||
|
this.workname.push(it.name);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
Teacherprofile(){
|
Teacherprofile(){
|
||||||
|
|||||||
Reference in New Issue
Block a user