From 275e59987ff3d54001b078bd04e41c8dd9015436 Mon Sep 17 00:00:00 2001 From: zhangsir Date: Mon, 8 Jul 2024 10:42:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=B2=E8=AF=BB=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/manage/manage.js | 7 +++++- src/components/UserCenter/menu.vue | 37 ++++++++++++++++++++++++++---- src/views/study/TaskList.vue | 6 +++++ 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/src/api/manage/manage.js b/src/api/manage/manage.js index 25f7bd8f..0b156d1b 100644 --- a/src/api/manage/manage.js +++ b/src/api/manage/manage.js @@ -20,6 +20,10 @@ const getTaskNum = function(){ const userTaskList = function(data){ return ajax.postJson(baseURL,'/todoTask/queryTodoTaskDetail',data); } +//已读 +const userRead = function(data){ + return ajax.postJson(baseURL,'/todoTask/read',data); +} //查询未读数量 const queryTaskCounts = function(){ return ajax.get(baseURL,'/todoTask/queryTaskCounts'); @@ -56,5 +60,6 @@ export default { compulsoryList, userDeleteStudy, userRsSginupCourse, - queryTaskCounts + queryTaskCounts, + userRead } diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index 3404c8f5..add84021 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -277,19 +277,19 @@ - + - + 领导力必修 专业力必修 - + 定制化学习 @@ -426,6 +426,7 @@ import {pageList} from "@/api/modules/lecturer" import courseImage from "@/components/Course/courseImage.vue" import testUser from '@/utils/testUsers.js' import apiManage from '@/api/manage/manage.js' +import {getList} from '@/api/growth' export default { name: 'UcMenu', components: { @@ -458,8 +459,11 @@ export default { overlayShow: false, instructor:0, fistTotal:0, + fistTotals:0, proTotal: 0, + proTotals: 0, pathTotal:0, + pathTotals:0, growTotal: 0, openedsList:[] }; @@ -484,11 +488,34 @@ export default { }, methods: { learnTotal(){ + let params = { + pageNo: 1, + pageSize: 10, + 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 ){ + this.growTotal = 1 + } + }) apiManage.queryTaskCounts().then(res=>{ this.proTotal =parseInt(res.data.count); //学习项目 this.fistTotal =parseInt(res.data.count1); // 领导力必修 this.pathTotal =parseInt(res.data.count2); // 学习路径 - this.growTotal = parseInt(res.data.count3); //成长路径 + // this.growTotal = parseInt(res.data.count3); //成长路径 }) }, //讲师认证条数 diff --git a/src/views/study/TaskList.vue b/src/views/study/TaskList.vue index 8a093af3..740fdffd 100644 --- a/src/views/study/TaskList.vue +++ b/src/views/study/TaskList.vue @@ -147,6 +147,12 @@ export default { //let urlPre=window.location.protocol+'//'+window.location.host; let studentPath=process.env.VUE_APP_STUDENT_PATH; + // type: 0 新任管理者,1 学习项目 2 学习路径图 3 成长路径 + let type = {1:'2',2:'1',3:'0'}[item.cmtask_type] + if(this.$route.query.type==1 || !this.$route.query.type){ + type = '0' + } + apiManage.userRead({type,id:item.cmtask_id}) if(item.cmtask_type==1){ //学习路径图 let params=encodeURIComponent('routerId='+item.cmtask_id); //this.$router.push('/forward?to='+studentPath+'/pathdetails¶ms='+params);