diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index 6bf22922..16b2fc52 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -123,7 +123,7 @@
{{userInfo.name}}
- 个人中心 + 个人中心 个人主页 @@ -206,100 +206,26 @@ export default { keyword: '', isTiao: false, sex:'', - fistTotals: 0, - pathTotals: 0, - growTotal: 0, - nums: 0, - courseNum: 0, }; }, - created() { - this.learnTotal() - }, mounted() { this.sex = this.userInfo.sex; this.$store.dispatch('refrashMsg'); - // this.loadBoeData(); + this.loadBoeData(); //this.loadPopupConfig(); }, 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){ this.$store.dispatch('SetCurIdentity',iden); }, tomy(){ 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() { - if(this.nums == 0 && this.courseNum>0){ - this.isTiao = false; - }else{ + if(this.studyTaskCount>0){ this.isTiao = true; + }else{ + this.isTiao = false; } // let params = { // // keyword:this.keyword, diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index 8562fe43..ac32d60f 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -480,14 +480,11 @@ export default { overlayShow: false, instructor:0, fistTotal:0, - // fistTotals:1, - fistTotals:0, + fistTotals:1, proTotal: 0, - // proTotals: 1, - proTotals: 0, + proTotals: 1, pathTotal:0, - // pathTotals:1, - pathTotals:0, + pathTotals:1, growTotal: 1, openedsList:[], courseNum: 0, @@ -545,17 +542,17 @@ export default { } const promises = [ //领导力 - // apiManage.leadership(params).then(res=>{ - // this.fistTotals =parseInt(res.data.total); - // }), + apiManage.leadership(params).then(res=>{ + this.fistTotals =parseInt(res.data.total); + }), //项目 // apiManage.customized(params).then(res=>{ // this.proTotals =parseInt(res.data.total); // }) //学习路径 - // apiManage.compulsoryList(params).then(res=>{ - // this.pathTotals =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 @@ -578,14 +575,12 @@ export default { } } }); - // apiManage.queryTaskCounts({}).then(res=>{ - // // this.proTotal =parseInt(res.data.count); //学习项目 - // this.fistTotal =parseInt(res.data.count1); // 领导力必修 - // this.pathTotal =parseInt(res.data.count2); // 学习路径 - // // this.growTotal = parseInt(res.data.count3); //成长路径 - // }) - this.fistTotal = 1 - this.pathTotal = 1 + apiManage.queryTaskCounts({}).then(res=>{ + // this.proTotal =parseInt(res.data.count); //学习项目 + this.fistTotal =parseInt(res.data.count1); // 领导力必修 + this.pathTotal =parseInt(res.data.count2); // 学习路径 + // this.growTotal = parseInt(res.data.count3); //成长路径 + }) }, //讲师认证条数 instructorCertification(){ diff --git a/src/views/study/TaskList.vue b/src/views/study/TaskList.vue index 9f5db23d..dbf224d7 100644 --- a/src/views/study/TaskList.vue +++ b/src/views/study/TaskList.vue @@ -198,56 +198,56 @@ export default { cmtask_name:this.params.cmtask_name, } this.loading=true; - // if(this.isType == 1){ - // //领导力必修 - // apiManage.leadership(params).then(res=>{ - // if(res.code==200){ - // this.total =parseInt(res.data.total); - // this.couresList = res.data.records; - // }else{ - // this.$message.error('查询数据失败:'+res.msg); - // } - // this.loading=false; - // }).catch(()=>{ - // this.loading=false; - // }) - // }else if (this.isType == 2){ - // //定制化学习 - // apiManage.compulsoryList(params).then(res=>{ - // if(res.code==200){ - // this.total =parseInt(res.data.total); - // this.couresList = res.data.records; - // }else{ - // this.$message.error('查询数据失败:'+res.msg); - // } - // this.loading=false; - // }).catch(()=>{ - // this.loading=false; - // }) - // }else{ - // apiManage.leadership(params).then(res=>{ - // if(res.code==200){ - // this.total =parseInt(res.data.total); - // this.couresList = res.data.records; - // }else{ - // this.$message.error('查询数据失败:'+res.msg); - // } - // this.loading=false; - // }).catch(()=>{ - // this.loading=false; - // }) - // // apiManage.userTaskList(params).then(res=>{ - // // if(res.code==200){ - // // this.total =parseInt(res.data.total); - // // this.couresList = res.data.records; - // // }else{ - // // this.$message.error('查询数据失败:'+res.msg); - // // } - // // this.loading=false; - // // }).catch(()=>{ - // // this.loading=false; - // // }) - // } + if(this.isType == 1){ + //领导力必修 + apiManage.leadership(params).then(res=>{ + if(res.code==200){ + this.total =parseInt(res.data.total); + this.couresList = res.data.records; + }else{ + this.$message.error('查询数据失败:'+res.msg); + } + this.loading=false; + }).catch(()=>{ + this.loading=false; + }) + }else if (this.isType == 2){ + //定制化学习 + apiManage.compulsoryList(params).then(res=>{ + if(res.code==200){ + this.total =parseInt(res.data.total); + this.couresList = res.data.records; + }else{ + this.$message.error('查询数据失败:'+res.msg); + } + this.loading=false; + }).catch(()=>{ + this.loading=false; + }) + }else{ + apiManage.leadership(params).then(res=>{ + if(res.code==200){ + this.total =parseInt(res.data.total); + this.couresList = res.data.records; + }else{ + this.$message.error('查询数据失败:'+res.msg); + } + this.loading=false; + }).catch(()=>{ + this.loading=false; + }) + // apiManage.userTaskList(params).then(res=>{ + // if(res.code==200){ + // this.total =parseInt(res.data.total); + // this.couresList = res.data.records; + // }else{ + // this.$message.error('查询数据失败:'+res.msg); + // } + // this.loading=false; + // }).catch(()=>{ + // this.loading=false; + // }) + } }, search(){ this.page=1;