Merge branch 'zcwy-master' into dev0515

This commit is contained in:
zhangsir
2024-07-11 15:02:05 +08:00
2 changed files with 33 additions and 20 deletions

View File

@@ -277,7 +277,7 @@
<!-- <span slot="title" class="textl">历史记录</span>
</el-menu-item> -->
<!-- </el-submenu> -->
<el-submenu v-if="fistTotals+pathTotals+proTotals+growTotal" index="mystudy" v-show="curIdentity == 1">
<el-submenu v-if="fistTotals+pathTotals+growTotal" index="mystudy" v-show="curIdentity == 1">
<template slot="title">
<!-- <svg-icon icon-class="mystudy"></svg-icon> -->
<i style="margin-right: 8px;width: 19px;color:#303133;" class="el-icon-collection"></i>
@@ -441,6 +441,9 @@ export default {
if(path == '/uc/study/task' || path == '/uc/study/growth'){
this.openedsList = ['mystudy']
}
if(sessionStorage.getItem('totalNums') == 0){
return '/uc/study/task?type=9'
}
if(path == '/uc/study/task'){
return '/uc/study/task?type=' + (route.query.type || 1)
}
@@ -498,25 +501,30 @@ export default {
cmtask_user_status: "",
cmtask_name: ""
}
//领导力
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);
})
getList(this.userInfo.aid).then(res=>{
if(res.code == 200 && Object.keys(res.data).length){
this.growTotal = 1
}else{
this.growTotal = 0
}
})
const promises = [
//领导力
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);
}),
getList(this.userInfo.aid).then(res=>{
if(res.code == 200 && Object.keys(res.data).length){
this.growTotal = 1
}else{
this.growTotal = 0
}
})
]
Promise.all(promises).then(() => {
sessionStorage.setItem('totalNums', this.fistTotals + this.pathTotals + this.growTotal);
});
apiManage.queryTaskCounts().then(res=>{
// this.proTotal =parseInt(res.data.count); //学习项目
this.fistTotal =parseInt(res.data.count1); // 领导力必修

View File

@@ -126,6 +126,10 @@ export default {
handler(to, from) {
console.log('type变化了', to.query.type);
this.isType = to.query.type;
this.totalNums = sessionStorage.getItem('totalNums')
if(this.totalNums == 0){
this.isType = 9
}
if(this.isType != 9){
this.loadBoeData();
}
@@ -136,6 +140,7 @@ export default {
mounted() {
this.loadBoeData();
this.getPossData()
this.totalNums = sessionStorage.getItem('totalNums')
},
methods: {
learnType(item){