diff --git a/src/api/index1.js b/src/api/index1.js index 9c103b32..574be75b 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -91,6 +91,8 @@ export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj) export const scoreRank = (params) => http.get('/points/top/list', { params }) // 项目进度排行 export const completionRank = (params) => http.get('/stu/project/rank_list/completion_list', { params }) +// 项目学时排行榜 +export const studytimeRank = (params) => http.get('/stu/project/rank_list/study_time_list', { params }) //排行榜 export const billboard = (obj) => http.post("/admin/project/billboard", obj); //项目基础信息----------------------------------- diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index fe36f710..61fd6582 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -955,6 +955,7 @@
@@ -965,7 +966,7 @@ { - if (text.record.rank == "1") { + if (text.record.index == "1") { return ( ); - } else if (text.record.rank == "2") { + } else if (text.record.index == "2") { return ( ); - } else if (text.record.rank == "3") { + } else if (text.record.index == "3") { return ( ); } else { - return
{text.record.rank}
; + return
{text.record.index}
; } }, }, @@ -2624,8 +2574,8 @@ export default { { title: "时长", - dataIndex: "jd", - key: "jd", + dataIndex: "timeStr", + key: "timeStr", width: 50, align: "center", className: "h", @@ -2806,6 +2756,10 @@ export default { console.log(e) completionRank(); } + const xsSelectChange = (e) => { + console.log(e) + studytimeRank(); + } //项目积分榜单 const scoreRank = (period, type) => { state.scoreRankLoading = true; @@ -2821,7 +2775,7 @@ export default { type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 }) let obj = { - projectId: 290, // 项目id + projectId: state.projectId, // 项目id name: "", // 名字,没有则传空字符串 startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 endTime: state.rankEndTime?state.rankEndTime:0, @@ -2860,7 +2814,7 @@ export default { const completionRank = () => { state.processRankLoading = true; let obj = { - projectId: 290, // 项目id + projectId: state.projectId, // 项目id startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 endTime: state.rankEndTime?state.rankEndTime:0, stageId: state.valuestu2, // 阶段ID @@ -2885,6 +2839,34 @@ export default { }) } + // 项目学时榜单 + const studytimeRank = () => { + state.studytimeRankLoading = true; + let obj = { + projectId: state.projectId, // 项目id + startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime?state.rankEndTime:0, + type: Number(state.valuestu4), // 查询类型 0 学员积分榜 1 小组积分榜 + } + + console.log('我是获取得项目学时排行榜--》', obj) + api.studytimeRank(obj).then(res=>{ + console.log('项目学时榜单获取',res) + if(res.data.datas){ + state.xueshitabledata = res.data.datas; + state.studytimeRankLoading = false; + }else{ + state.xueshitabledata = []; + state.studytimeRankLoading = false; + } + + }).catch(err=>{ + console.log(err) + state.xueshitabledata = []; + state.studytimeRankLoading = false; + }) + } + // 排行榜 - end const levelList = reactive({ @@ -3633,6 +3615,8 @@ export default { scoreRank(); // 获取项目进度排行榜 completionRank(); + // 获取学时排行榜 + studytimeRank(); } else if (e == 3) { state.tabFlag = true; @@ -3690,6 +3674,8 @@ state.ischeckCertificate=false scoreRank(); // 获取项目进度排行榜 completionRank(); + // 获取学时排行榜 + studytimeRank(); }; //重置 const rankReset = () => { @@ -3702,6 +3688,8 @@ state.ischeckCertificate=false scoreRank(); // 获取项目进度排行榜 completionRank(); + // 获取学时排行榜 + studytimeRank(); }; // end -----排行榜----------------排行榜----------------------排行榜-----------排行榜---------- @@ -4822,6 +4810,9 @@ state.ischeckCertificate=false jdSelectChange, jdSelectChange1, + studytimeRank, + xsSelectChange + }; }, };