展示方式

This commit is contained in:
zhangsir
2024-07-11 15:01:38 +08:00
parent d9bc4603af
commit 3e57c4bedb
2 changed files with 33 additions and 20 deletions

View File

@@ -277,7 +277,7 @@
<!-- <span slot="title" class="textl">历史记录</span> <!-- <span slot="title" class="textl">历史记录</span>
</el-menu-item> --> </el-menu-item> -->
<!-- </el-submenu> --> <!-- </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"> <template slot="title">
<!-- <svg-icon icon-class="mystudy"></svg-icon> --> <!-- <svg-icon icon-class="mystudy"></svg-icon> -->
<i style="margin-right: 8px;width: 19px;color:#303133;" class="el-icon-collection"></i> <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'){ if(path == '/uc/study/task' || path == '/uc/study/growth'){
this.openedsList = ['mystudy'] this.openedsList = ['mystudy']
} }
if(sessionStorage.getItem('totalNums') == 0){
return '/uc/study/task?type=9'
}
if(path == '/uc/study/task'){ if(path == '/uc/study/task'){
return '/uc/study/task?type=' + (route.query.type || 1) return '/uc/study/task?type=' + (route.query.type || 1)
} }
@@ -498,10 +501,11 @@ export default {
cmtask_user_status: "", cmtask_user_status: "",
cmtask_name: "" cmtask_name: ""
} }
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);
@@ -509,7 +513,7 @@ export default {
//学习路径 //学习路径
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
@@ -517,6 +521,10 @@ export default {
this.growTotal = 0 this.growTotal = 0
} }
}) })
]
Promise.all(promises).then(() => {
sessionStorage.setItem('totalNums', this.fistTotals + this.pathTotals + this.growTotal);
});
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); // 领导力必修

View File

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