mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 20:36:43 +08:00
修改
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user