diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue
index 001cd067..bfa452e3 100644
--- a/src/components/PortalHeader.vue
+++ b/src/components/PortalHeader.vue
@@ -147,6 +147,9 @@ import yearMedal from '@/components/Popup/China2023.vue';
import apiBoeCourse from '@/api/boe/course.js';
import {userAvatarText} from "@/utils/tools.js";
import apiCase from "@/api/modules/cases.js";
+import apiManage from '@/api/manage/manage.js'
+import {getList} from '@/api/growth'
+import apiCourseStudy from '@/api/modules/courseStudy.js';
export default {
props: {
current: {
@@ -202,16 +205,64 @@ 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;
+ this.loadBoeData();
+ });
+ },
setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden);
},
@@ -219,10 +270,11 @@ export default {
console.log('lll')
},
loadBoeData() {
- if(this.studyTaskCount>0){
+ if(this.nums>0){
this.isTiao = true;
+ }else if (this.nums == 0 && this.courseNum>0){
+ this.isTiao = false;
}else{
- // this.isTiao = false;
this.isTiao = true;
}
// let params = {
diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue
index 4ac046f8..c7986897 100644
--- a/src/components/UserCenter/menu.vue
+++ b/src/components/UserCenter/menu.vue
@@ -298,7 +298,7 @@
我的必修
-
+
我的选修
@@ -307,6 +307,11 @@
自选学习
+
+
+
+ 我的选修
+
@@ -421,7 +426,7 @@