This commit is contained in:
zhangsir
2024-07-11 19:09:02 +08:00
parent 3e57c4bedb
commit 2dc9bcdbd3
5 changed files with 227 additions and 141 deletions

View File

@@ -147,6 +147,9 @@ import yearMedal from '@/components/Popup/China2023.vue';
import apiBoeCourse from '@/api/boe/course.js'; import apiBoeCourse from '@/api/boe/course.js';
import {userAvatarText} from "@/utils/tools.js"; import {userAvatarText} from "@/utils/tools.js";
import apiCase from "@/api/modules/cases.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 { export default {
props: { props: {
current: { current: {
@@ -202,16 +205,64 @@ export default {
keyword: '', keyword: '',
isTiao: false, isTiao: false,
sex:'', sex:'',
fistTotals: 0,
pathTotals: 0,
growTotal: 0,
nums: 0,
courseNum: 0,
}; };
}, },
created() {
this.learnTotal()
},
mounted() { mounted() {
this.sex = this.userInfo.sex; this.sex = this.userInfo.sex;
this.$store.dispatch('refrashMsg'); this.$store.dispatch('refrashMsg');
this.loadBoeData(); // this.loadBoeData();
//this.loadPopupConfig(); //this.loadPopupConfig();
}, },
methods: { 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){ setCurIdentity(iden){
this.$store.dispatch('SetCurIdentity',iden); this.$store.dispatch('SetCurIdentity',iden);
}, },
@@ -219,10 +270,11 @@ export default {
console.log('lll') console.log('lll')
}, },
loadBoeData() { loadBoeData() {
if(this.studyTaskCount>0){ if(this.nums>0){
this.isTiao = true; this.isTiao = true;
}else if (this.nums == 0 && this.courseNum>0){
this.isTiao = false;
}else{ }else{
// this.isTiao = false;
this.isTiao = true; this.isTiao = true;
} }
// let params = { // let params = {

View File

@@ -298,7 +298,7 @@
<i style="margin-right: 8px;width: 19px;" :style="{color:activeMenu == '/uc/study/task?type=9'?'rgb(51, 121, 251)':'#303133'}" class="el-icon-collection"></i> <i style="margin-right: 8px;width: 19px;" :style="{color:activeMenu == '/uc/study/task?type=9'?'rgb(51, 121, 251)':'#303133'}" class="el-icon-collection"></i>
<span slot="title">我的必修</span> <span slot="title">我的必修</span>
</el-menu-item> </el-menu-item>
<el-submenu index="myelective" v-show="curIdentity == 1"> <el-submenu v-if="courseNum" index="myelective" v-show="curIdentity == 1">
<template slot="title"> <template slot="title">
<svg-icon icon-class="mystudy"></svg-icon> <svg-icon icon-class="mystudy"></svg-icon>
<span>我的选修</span> <span>我的选修</span>
@@ -307,6 +307,11 @@
<span slot="title" class="study textl">自选学习</span> <span slot="title" class="study textl">自选学习</span>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
<el-menu-item v-else index="/uc/study/courses" v-show="curIdentity == 1">
<!-- <svg-icon :icon-class="activeMenu == '/exam/mytask'?'mybiji-active':'mybiji'"></svg-icon> -->
<svg-icon icon-class="mystudy"></svg-icon>
<span slot="title">我的选修</span>
</el-menu-item>
<el-menu-item index="/exam/mytask" v-show="curIdentity == 1"> <el-menu-item index="/exam/mytask" v-show="curIdentity == 1">
<!-- <svg-icon :icon-class="activeMenu == '/exam/mytask'?'mybiji-active':'mybiji'"></svg-icon> --> <!-- <svg-icon :icon-class="activeMenu == '/exam/mytask'?'mybiji-active':'mybiji'"></svg-icon> -->
<i style="margin-right: 8px;width: 19px;" :style="{color:activeMenu == '/exam/mytask'?'rgb(51, 121, 251)':'#303133'}" class="el-icon-reading"></i> <i style="margin-right: 8px;width: 19px;" :style="{color:activeMenu == '/exam/mytask'?'rgb(51, 121, 251)':'#303133'}" class="el-icon-reading"></i>
@@ -421,7 +426,7 @@
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import apicourseStudy from "../../api/modules/courseStudy.js" import apiCourseStudy from '@/api/modules/courseStudy.js'
import {pageList} from "@/api/modules/lecturer" import {pageList} from "@/api/modules/lecturer"
import courseImage from "@/components/Course/courseImage.vue" import courseImage from "@/components/Course/courseImage.vue"
import testUser from '@/utils/testUsers.js' import testUser from '@/utils/testUsers.js'
@@ -441,7 +446,10 @@ 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){ if(path == '/uc/study/courses'){
'/uc/study/courses'
}
if(sessionStorage.getItem('totalNums') == 0&&path == '/uc/study/task'){
return '/uc/study/task?type=9' return '/uc/study/task?type=9'
} }
if(path == '/uc/study/task'){ if(path == '/uc/study/task'){
@@ -472,7 +480,8 @@ export default {
pathTotal:0, pathTotal:0,
pathTotals:1, pathTotals:1,
growTotal: 1, growTotal: 1,
openedsList:[] openedsList:[],
courseNum: 0,
}; };
}, },
created() { created() {
@@ -482,8 +491,10 @@ export default {
this.getLastStudy(); this.getLastStudy();
//获取讲师认证中条数 //获取讲师认证中条数
this.instructorCertification() this.instructorCertification()
this.courseNumsData()
}, },
mounted() { mounted() {
// this.courseNum = sessionStorage.getItem('courseNums')
//console.log(this.userInfo.loginName,'this.userInfo.loginName'); //console.log(this.userInfo.loginName,'this.userInfo.loginName');
let flag=testUser.isTest(this.userInfo.loginName); let flag=testUser.isTest(this.userInfo.loginName);
//console.log(flag,'this.isTest22'); //console.log(flag,'this.isTest22');
@@ -494,6 +505,23 @@ export default {
// } // }
}, },
methods: { methods: {
courseNumsData(){
let reqData={
courseName:'',
courseType:'',
status:'',
progress:'',
pageIndex:1,
pageSize:10
}
if(sessionStorage.getItem('courseNums') === null || sessionStorage.getItem('courseNums') === ''){
apiCourseStudy.myStudysFromES(reqData).then(res=>{
this.courseNum = res.result.count;
})
}else{
this.courseNum = sessionStorage.getItem('courseNums')
}
},
learnTotal(){ learnTotal(){
let params = { let params = {
pageNo: 1, pageNo: 1,
@@ -552,7 +580,7 @@ export default {
return ''; return '';
}, },
getLastStudy() { getLastStudy() {
apicourseStudy.lastStudy().then(res => { apiCourseStudy.lastStudy().then(res => {
if (res.status === 200) { if (res.status === 200) {
this.lastStudy = res.result; this.lastStudy = res.result;
if (res.result != '' && res.result.courseId) { if (res.result != '' && res.result.courseId) {

View File

@@ -73,10 +73,11 @@
<!-- // 成绩控制需要结束状态 --> <!-- // 成绩控制需要结束状态 -->
<el-button type="text" v-if="scope.row.published" @click="viewResults(scope.row)">成绩</el-button> <el-button type="text" v-if="scope.row.published" @click="viewResults(scope.row)">成绩</el-button>
<el-button type="text" v-if="scope.row.published" @click="pushResults(scope.row)">推送</el-button> <el-button type="text" v-if="scope.row.refType == 14" @click="deleteData(scope.row)">删除</el-button>
<el-button type="text" v-if="scope.row.published&&scope.row.refType !== 14" @click="pushResults(scope.row)">推送</el-button>
<!-- <el-button type="text" v-if="scope.row.published" @click="creatQrCode(scope.row)">二维码</el-button> --> <!-- <el-button type="text" v-if="scope.row.published" @click="creatQrCode(scope.row)">二维码</el-button> -->
<el-button type="text" v-if="scope.row.published" @click="releaseData(scope.row,false)">取消发布</el-button> <el-button type="text" v-if="scope.row.published&&scope.row.refType !== 14" @click="releaseData(scope.row,false)">取消发布</el-button>
<el-dropdown type="text" style="margin-left:10px"> <el-dropdown v-if="scope.row.refType !== 14" type="text" style="margin-left:10px">
<el-button type="text" > 更多 <i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-button type="text" > 更多 <i class="el-icon-arrow-down el-icon--right"></i> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item command="a">查看</el-dropdown-item> --> <!-- <el-dropdown-item command="a">查看</el-dropdown-item> -->

View File

@@ -1,5 +1,9 @@
<template> <template>
<div> <div>
<div style="margin-top: 50px;" v-if="page.count==0">
<el-empty description="您还没有学习数据"></el-empty>
</div>
<div v-else>
<div style="display: flex;justify-content:space-between; padding: 12px 32px 10px 18px;"> <div style="display: flex;justify-content:space-between; padding: 12px 32px 10px 18px;">
<div style="display: flex;justify-content: flex-start;"> <div style="display: flex;justify-content: flex-start;">
<span class="title-myqalist">我报名的</span> <span class="title-myqalist">我报名的</span>
@@ -131,6 +135,7 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>

View File

@@ -70,15 +70,15 @@
</div> </div>
</div> </div>
</div> </div>
<!-- v-if="experience.data.rankingNo>5" -->
<div v-if="experience.data.rankingNo>5" style="margin-top:20px;border-bottom: 1px solid #ddd;padding-bottom:40px"> <div style="margin-top:20px;border-bottom: 1px solid #ddd;padding-bottom:40px">
<div v-if="experience.data.rankingNo>5" class="omit"> <div class="omit">
<div>.</div> <div>.</div> <div>.</div> <div>.</div> <div>.</div> <div>.</div>
</div> </div>
</div> </div>
<!-- v-if="experience.data.rankingNo>5" -->
<div v-if="experience.data.rankingNo>5" class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px"> <div class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px">
<div style="color: #0059FF;line-height: 40px;padding-left:14px;font-size: 16px;" class="tab-rank" >{{experience.data.rankingNo}}</div> <div style="color: #0059FF;line-height: 40px;padding-left:14px;font-size: 16px;" class="tab-rank" >{{experience.data.rankingNo}}</div>
<div class="tab-name" v-if="userInfo.aid"> <div class="tab-name" v-if="userInfo.aid">
<author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img> <author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img>
@@ -161,13 +161,13 @@
</div> </div>
</div> </div>
<div v-if="learningDuration.data.rankingNo>5" style="margin-top:20px;border-bottom: 1px solid #ddd;padding-bottom:40px"> <div style="margin-top:20px;border-bottom: 1px solid #ddd;padding-bottom:40px">
<div v-if="learningDuration.data.rankingNo>5" class="omit"> <div class="omit">
<div>.</div> <div>.</div> <div>.</div> <div>.</div> <div>.</div> <div>.</div>
</div> </div>
</div> </div>
<div v-if="learningDuration.data.rankingNo>5" class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px"> <div class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px">
<div style="color: #0059FF;line-height: 40px;padding-left:14px;font-size: 16px;" class="tab-rank" >{{learningDuration.data.rankingNo}}</div> <div style="color: #0059FF;line-height: 40px;padding-left:14px;font-size: 16px;" class="tab-rank" >{{learningDuration.data.rankingNo}}</div>
<div class="tab-name" v-if="userInfo.aid"> <div class="tab-name" v-if="userInfo.aid">
<author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img> <author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img>
@@ -250,14 +250,14 @@
</div> </div>
</div> </div>
<div v-if="learningDays.data.rankingNo>5" style="margin-top:20px;border-bottom: 1px solid #ddd;padding-bottom:40px"> <div style="margin-top:20px;border-bottom: 1px solid #ddd;padding-bottom:40px">
<div v-if="learningDays.data.rankingNo>5" class="omit"> <div class="omit">
<div>.</div> <div>.</div> <div>.</div> <div>.</div> <div>.</div> <div>.</div>
</div> </div>
</div> </div>
<div v-if="learningDays.data.rankingNo>5" class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px"> <div class="table-hear" style="margin-top:40px;border-bottom: 1px solid #ddd;padding-bottom:20px">
<div style="color: #0059FF;line-height: 40px;padding-left:14px;font-size: 16px;" class="tab-rank" >{{learningDays.data.rankingNo}}</div> <div style="color: #0059FF;line-height: 40px;padding-left:14px;font-size: 16px;" class="tab-rank" >{{learningDays.data.rankingNo}}</div>
<div class="tab-name" v-if="userInfo.aid"> <div class="tab-name" v-if="userInfo.aid">
<author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img> <author-img :avatar="userInfo.avatar" :aid="userInfo.aid" :sex="userInfo.sex"></author-img>