Merge branch 'zcwy_0716_learning' into dev0515

This commit is contained in:
zhangsir
2024-09-19 16:56:09 +08:00
3 changed files with 70 additions and 149 deletions

View File

@@ -123,7 +123,7 @@
<div style="font-weight: 400;font-size: 16px; margin-top: 8px;">{{userInfo.name}}</div> <div style="font-weight: 400;font-size: 16px; margin-top: 8px;">{{userInfo.name}}</div>
</div> </div>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="setCurIdentity(1)"><span @click="goCenter">个人中心</span></el-dropdown-item> <el-dropdown-item @click.native="setCurIdentity(1)"><a :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`">个人中心</a></el-dropdown-item>
<el-dropdown-item><router-link :to="'/home/'+userInfo.aid">个人主页</router-link></el-dropdown-item> <el-dropdown-item><router-link :to="'/home/'+userInfo.aid">个人主页</router-link></el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
@@ -206,100 +206,26 @@ export default {
keyword: '', keyword: '',
isTiao: false, isTiao: false,
sex:'', sex:'',
fistTotals: 0,
pathTotals: 0,
growTotal: 0,
nums: 0,
courseNum: 0,
}; };
}, },
created() {
this.learnTotal()
},
mounted() { mounted() {
this.sex = this.userInfo.sex; this.sex = this.userInfo.sex;
this.$store.dispatch('refrashMsg'); this.$store.dispatch('refrashMsg');
// this.loadBoeData(); this.loadBoeData();
//this.loadPopupConfig(); //this.loadPopupConfig();
}, },
methods: { methods: {
learnTotal(){
let params = {
pageNo: 1,
pageSize: 10,
cmtask_user_status: "",
cmtask_name: ""
}
let reqData={
courseName:'',
courseType:'',
status:'',
progress:'',
pageIndex:1,
pageSize:10
}
const promises = [
//领导力
// apiManage.leadership(params).then(res=>{
// this.fistTotals =parseInt(res.data.total);
// }),
//学习路径
// apiManage.compulsoryList(params).then(res=>{
// this.pathTotals =parseInt(res.data.total);
// }),
getList(this.userInfo.aid).then(res=>{
if(res.code == 200 && Object.keys(res.data).length){
this.growTotal = 1
}else{
this.growTotal = 0
}
}),
apiCourseStudy.myStudysFromES(reqData).then(res=>{
this.courseNum = res.result.count;
sessionStorage.setItem('courseNums',this.courseNum)
})
]
Promise.all(promises).then(() => {
this.nums = this.fistTotals + this.pathTotals + this.growTotal;
console.log(this.nums,'this.nums')
sessionStorage.setItem('fistTotals',this.fistTotals)
sessionStorage.setItem('pathTotals',this.pathTotals)
sessionStorage.setItem('growTotal',this.growTotal)
this.loadBoeData();
});
},
setCurIdentity(iden){ setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden); this.$store.dispatch('SetCurIdentity',iden);
}, },
tomy(){ tomy(){
console.log('lll') console.log('lll')
}, },
goCenter(){
console.log(this.isTiao,'isTiao')
if(this.isTiao){
if(this.nums == 0){
window.location.href = `${this.webBaseUrl}/uc/study/task?type=9`;
return
}
// window.location.href = `${this.webBaseUrl}/uc/study/task?type=${this.fistTotals || this.growTotal || this.pathTotals}`;
if(this.fistTotals != 0){
window.location.href = `${this.webBaseUrl}/uc/study/task?type=1`;
}else if (this.growTotal != 0){
window.location.href = `${this.webBaseUrl}/uc/study/growth`;
}else if (this.pathTotals != 0){
window.location.href = `${this.webBaseUrl}/uc/study/task?type=2`;
}else{
window.location.href = `${this.webBaseUrl}/uc/study/task?type=9`;
}
}else{
window.location.href = `${this.webBaseUrl}/uc/study/courses`;
}
},
loadBoeData() { loadBoeData() {
if(this.nums == 0 && this.courseNum>0){ if(this.studyTaskCount>0){
this.isTiao = false;
}else{
this.isTiao = true; this.isTiao = true;
}else{
this.isTiao = false;
} }
// let params = { // let params = {
// // keyword:this.keyword, // // keyword:this.keyword,

View File

@@ -480,14 +480,11 @@ export default {
overlayShow: false, overlayShow: false,
instructor:0, instructor:0,
fistTotal:0, fistTotal:0,
// fistTotals:1, fistTotals:1,
fistTotals:0,
proTotal: 0, proTotal: 0,
// proTotals: 1, proTotals: 1,
proTotals: 0,
pathTotal:0, pathTotal:0,
// pathTotals:1, pathTotals:1,
pathTotals:0,
growTotal: 1, growTotal: 1,
openedsList:[], openedsList:[],
courseNum: 0, courseNum: 0,
@@ -545,17 +542,17 @@ export default {
} }
const promises = [ const promises = [
//领导力 //领导力
// apiManage.leadership(params).then(res=>{ apiManage.leadership(params).then(res=>{
// this.fistTotals =parseInt(res.data.total); this.fistTotals =parseInt(res.data.total);
// }), }),
//项目 //项目
// apiManage.customized(params).then(res=>{ // apiManage.customized(params).then(res=>{
// this.proTotals =parseInt(res.data.total); // this.proTotals =parseInt(res.data.total);
// }) // })
//学习路径 //学习路径
// apiManage.compulsoryList(params).then(res=>{ apiManage.compulsoryList(params).then(res=>{
// this.pathTotals =parseInt(res.data.total); this.pathTotals =parseInt(res.data.total);
// }), }),
getList(this.userInfo.aid).then(res=>{ getList(this.userInfo.aid).then(res=>{
if(res.code == 200 && Object.keys(res.data).length){ if(res.code == 200 && Object.keys(res.data).length){
this.growTotal = 1 this.growTotal = 1
@@ -578,14 +575,12 @@ export default {
} }
} }
}); });
// apiManage.queryTaskCounts({}).then(res=>{ apiManage.queryTaskCounts({}).then(res=>{
// // this.proTotal =parseInt(res.data.count); //学习项目 // this.proTotal =parseInt(res.data.count); //学习项目
// this.fistTotal =parseInt(res.data.count1); // 领导力必修 this.fistTotal =parseInt(res.data.count1); // 领导力必修
// this.pathTotal =parseInt(res.data.count2); // 学习路径 this.pathTotal =parseInt(res.data.count2); // 学习路径
// // this.growTotal = parseInt(res.data.count3); //成长路径 // this.growTotal = parseInt(res.data.count3); //成长路径
// }) })
this.fistTotal = 1
this.pathTotal = 1
}, },
//讲师认证条数 //讲师认证条数
instructorCertification(){ instructorCertification(){

View File

@@ -198,56 +198,56 @@ export default {
cmtask_name:this.params.cmtask_name, cmtask_name:this.params.cmtask_name,
} }
this.loading=true; this.loading=true;
// if(this.isType == 1){ if(this.isType == 1){
// //领导力必修 //领导力必修
// apiManage.leadership(params).then(res=>{ apiManage.leadership(params).then(res=>{
// if(res.code==200){ if(res.code==200){
// this.total =parseInt(res.data.total); this.total =parseInt(res.data.total);
// this.couresList = res.data.records; this.couresList = res.data.records;
// }else{ }else{
// this.$message.error('查询数据失败:'+res.msg); this.$message.error('查询数据失败:'+res.msg);
// } }
// this.loading=false; this.loading=false;
// }).catch(()=>{ }).catch(()=>{
// this.loading=false; this.loading=false;
// }) })
// }else if (this.isType == 2){ }else if (this.isType == 2){
// //定制化学习 //定制化学习
// apiManage.compulsoryList(params).then(res=>{ apiManage.compulsoryList(params).then(res=>{
// if(res.code==200){ if(res.code==200){
// this.total =parseInt(res.data.total); this.total =parseInt(res.data.total);
// this.couresList = res.data.records; this.couresList = res.data.records;
// }else{ }else{
// this.$message.error('查询数据失败:'+res.msg); this.$message.error('查询数据失败:'+res.msg);
// } }
// this.loading=false; this.loading=false;
// }).catch(()=>{ }).catch(()=>{
// this.loading=false; this.loading=false;
// }) })
// }else{ }else{
// apiManage.leadership(params).then(res=>{ apiManage.leadership(params).then(res=>{
// if(res.code==200){ if(res.code==200){
// this.total =parseInt(res.data.total); this.total =parseInt(res.data.total);
// this.couresList = res.data.records; this.couresList = res.data.records;
// }else{ }else{
// this.$message.error('查询数据失败:'+res.msg); this.$message.error('查询数据失败:'+res.msg);
// } }
// this.loading=false; this.loading=false;
// }).catch(()=>{ }).catch(()=>{
// this.loading=false; this.loading=false;
// }) })
// // apiManage.userTaskList(params).then(res=>{ // apiManage.userTaskList(params).then(res=>{
// // if(res.code==200){ // if(res.code==200){
// // this.total =parseInt(res.data.total); // this.total =parseInt(res.data.total);
// // this.couresList = res.data.records; // this.couresList = res.data.records;
// // }else{ // }else{
// // this.$message.error('查询数据失败:'+res.msg); // this.$message.error('查询数据失败:'+res.msg);
// // } // }
// // this.loading=false; // this.loading=false;
// // }).catch(()=>{ // }).catch(()=>{
// // this.loading=false; // this.loading=false;
// // }) // })
// } }
}, },
search(){ search(){
this.page=1; this.page=1;