Merge branch 'master' of codeup.aliyun.com:6265f483e4166464dc2f9c14/boeu/portal

This commit is contained in:
dongruihua
2023-01-18 19:32:31 +08:00
6 changed files with 127 additions and 42 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -191,7 +191,8 @@
}else{ }else{
this.tearchUrl =''; this.tearchUrl ='';
} }
this.teachtext.expertise = res.result.expertise.split( ',' );
this.convertExpertise(this.teachtext.expertise);
//通过用户的sysId原系统中的kid去取用户 //通过用户的sysId原系统中的kid去取用户
apiBoeTeahcer.simpleInfo(res.result.sysId).then(sinfo=>{ apiBoeTeahcer.simpleInfo(res.result.sysId).then(sinfo=>{
if(sinfo.status=='200'){ if(sinfo.status=='200'){
@@ -205,25 +206,46 @@
this.teachtext.photo = sinfo.result.photo; this.teachtext.photo = sinfo.result.photo;
this.tearchUrl = this.fileBaseUrl + sinfo.result.photo; this.tearchUrl = this.fileBaseUrl + sinfo.result.photo;
} }
if(!res.result.expertise && sinfo.result.expertise){
this.teachtext.expertise = sinfo.result.expertise.split( ',' );
this.convertExpertise(this.teachtext.expertise);
}
} }
}) })
this.teachtext.expertise = res.result.expertise.split( ',' ); // this.teachtext.expertise = res.result.expertise.split( ',' );
// this.convertExpertise(this.teachtext.expertise);
//console.log(this.teachtext,"this.teachtext"); //console.log(this.teachtext,"this.teachtext");
this.childData=[]; // this.childData=[];
this.sysTypeListtear.forEach(nm =>{ // this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{ // nm.children.forEach(lk =>{
this.childData.push(lk); // this.childData.push(lk);
}) // })
}); // });
this.teachtext.expertise.forEach(item =>{ // this.teachtext.expertise.forEach(item =>{
this.childData.forEach(it =>{ // this.childData.forEach(it =>{
if(item == it.id){ // if(item == it.id){
//console.log(item) // //console.log(item)
this.workname.push(it.name); // this.workname.push(it.name);
} // }
}) // })
}) // })
})
},
convertExpertise(expertises){
this.childData=[];
this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{
this.childData.push(lk);
})
});
expertises.forEach(item =>{
this.childData.forEach(it =>{
if(item == it.id){
//console.log(item)
this.workname.push(it.name);
}
})
}) })
}, },
teacherProfile(){ //检查是否是教师 teacherProfile(){ //检查是否是教师

View File

@@ -332,7 +332,12 @@ export default {
// if(this.domain.length==0){ // if(this.domain.length==0){
// this.getdomain(); // this.getdomain();
// } // }
let isBack=false;
if(window.history && window.history.pushState) {
history.pushState(null, null, document.URL); //这里有没有都无所谓,最好是有以防万一
isBack=true;
}
console.log(isBack,'isBack');
Promise.all([apiDict.items("org_domain"),apiCase.majorTypes()]).then(rs=>{ Promise.all([apiDict.items("org_domain"),apiCase.majorTypes()]).then(rs=>{
if(rs[0].status==200){ if(rs[0].status==200){
rs[0].result.forEach(item =>{ rs[0].result.forEach(item =>{

View File

@@ -469,7 +469,8 @@ export default {
courseList: [], courseList: [],
searchRecords: [], searchRecords: [],
hotList: [], hotList: [],
totalPages: 1 totalPages: 1,
localSessionKey:this.$xpage.constants.localCourseFiltersKey
}; };
}, },
@@ -538,6 +539,41 @@ export default {
window.removeEventListener("scroll", this.handleScroll); window.removeEventListener("scroll", this.handleScroll);
}, },
methods: { methods: {
saveLocalFilters(){
let typeCodeList=[];
this.stagList.forEach(item=>{
typeCodeList.push({
type:item.type,
id:item.id,
name:item.name
})
});
let typeCodeString=JSON.stringify(typeCodeList);
//console.log(typeCodeString);
sessionStorage.setItem(this.localSessionKey,typeCodeString);
},
loadLocalFilters(){
let hasData=sessionStorage.getItem(this.localSessionKey);
let $this=this;
if(hasData){
// let typeCodeList=JSON.parse(hasData);
// typeCodeList.forEach(item=>{
// if(item.type==0){
// this.keyword=item.name;
// }else if(item.type==1){
// if(item.id==20){
// $this.ctypeList[0].checked=true;
// }else if(item.id==30){
// $this.ctypeList[1].checked=true;
// }else if(item.id==40){
// $this.ctypeList[2].checked=true;
// }
// }else{ //三级分类的处理,如果一个分类选中多个,显示哪个,显示第一个,是否可以
// }
// })
}
},
stagClose(tag,tagIndex){ stagClose(tag,tagIndex){
tag.checked=false; tag.checked=false;
if(tag.type==0){ if(tag.type==0){
@@ -732,7 +768,7 @@ export default {
} }
$this.oneList.push(newItem); $this.oneList.push(newItem);
}); });
this.loadLocalFilters();
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@@ -932,7 +968,7 @@ export default {
// let s=1650973801; // let s=1650973801;
// var d = new Date(1650973801*1000); // var d = new Date(1650973801*1000);
// console.log(formatDateByFmt(d,'yyyy-MM-dd hh:mm'),'data'); // console.log(formatDateByFmt(d,'yyyy-MM-dd hh:mm'),'data');
this.saveLocalFilters();
let that = this; let that = this;
if (this.keyword) { if (this.keyword) {
apiSearchterm.save({ keyword: this.course.keyword, type: 1 }); apiSearchterm.save({ keyword: this.course.keyword, type: 1 });

View File

@@ -396,6 +396,15 @@
loadTeacherinfo(){ loadTeacherinfo(){
this.workname=[]; this.workname=[];
this.checkboxtearGroup=[]; this.checkboxtearGroup=[];
let children=[];
this.sysTypeListtear.forEach(nm =>{
nm.children.forEach(lk =>{
children.push(lk);
})
});
this.childData=children;
apiTeach.detailTeacher(this.userInfo.aid).then(res =>{ apiTeach.detailTeacher(this.userInfo.aid).then(res =>{
if(res.result.courses){ if(res.result.courses){
this.teachform.courses = res.result.courses; this.teachform.courses = res.result.courses;
@@ -407,6 +416,8 @@
this.teachform.photo = res.result.photo; this.teachform.photo = res.result.photo;
this.tearchUrl = this.fileBaseUrl + res.result.photo; this.tearchUrl = this.fileBaseUrl + res.result.photo;
} }
this.teachform.expertise = res.result.expertise.split( ',' );
this.convertExpertise(this.teachform.expertise);
apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{ apiBoeTeahcer.simpleInfo(this.userInfo.sysId).then(sinfo=>{
if(sinfo.status=='200'){ if(sinfo.status=='200'){
@@ -420,33 +431,44 @@
this.teachform.photo = sinfo.result.photo; this.teachform.photo = sinfo.result.photo;
this.tearchUrl = this.fileBaseUrl + sinfo.result.photo; this.tearchUrl = this.fileBaseUrl + sinfo.result.photo;
} }
if(!res.result.expertise && sinfo.result.expertise){
this.teachform.expertise = sinfo.result.expertise.split( ',' );
this.convertExpertise(this.teachform.expertise);
}
} }
}) })
this.teachform.expertise = res.result.expertise.split( ',' );
let children=[];
this.sysTypeListtear.forEach(nm =>{ // this.teachform.expertise.forEach(item =>{
nm.children.forEach(lk =>{ // this.childData.forEach(it =>{
children.push(lk); // if(item == it.id){
}) // this.workname.push(it);
}); // this.checkboxtearGroup.push(it.id);
this.childData=children; // //console.log(it,'匹配的数据')
this.teachform.expertise.forEach(item =>{ // }
this.childData.forEach(it =>{ // })
if(item == it.id){ // })
this.workname.push(it);
this.checkboxtearGroup.push(it.id);
//console.log(it,'匹配的数据')
}
})
})
}) })
}, },
// Teacherprofile(){ convertExpertise(expertises){
// apiTeach.has(this.userInfo.aid).then(res =>{ let children=[];
// this.teaechswich = res.result.isTeacher; this.sysTypeListtear.forEach(nm =>{
// }) nm.children.forEach(lk =>{
// }, children.push(lk);
})
});
this.childData=children;
expertises.forEach(item =>{
this.childData.forEach(it =>{
if(item == it.id){
//console.log(item)
this.workname.push(it);
this.checkboxtearGroup.push(it.id);
}
})
})
},
// 保存个人主页选项的编辑 // 保存个人主页选项的编辑
saveHideHome(){ saveHideHome(){
//执行隐藏操作 //执行隐藏操作