diff --git a/.env b/.env index c7f198b9..f13df09b 100644 --- a/.env +++ b/.env @@ -23,3 +23,5 @@ VUE_APP_COURSE_STUDY=//u-pre.boe.com/pc/course/studyindex?id= # 导入学员模板 VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx +# 外部考试导入成绩模板 +VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx \ No newline at end of file diff --git a/.env.boe b/.env.boe index 65a0c556..149de08f 100644 --- a/.env.boe +++ b/.env.boe @@ -7,4 +7,6 @@ VUE_APP_LOGIN_URL=//u-pre.boe.com/web VUE_APP_BOE_API_URL=//u-pre.boe.com # 导入学员模板 -VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx \ No newline at end of file +VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx +# 外部考试导入成绩模板 +VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx \ No newline at end of file diff --git a/.env.prod b/.env.prod index f7f9f813..e1e7bf6a 100644 --- a/.env.prod +++ b/.env.prod @@ -14,3 +14,5 @@ VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc/loading VUE_APP_COURSE_STUDY=//u.boe.com/pc/course/studyindex?id= VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx +# 外部考试导入成绩模板 +VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx \ No newline at end of file diff --git a/.env.release b/.env.release index 55d0b0e4..3614b531 100644 --- a/.env.release +++ b/.env.release @@ -13,4 +13,6 @@ VUE_APP_IFRAME_STUDENT_URL=//u.boe.com/pc-release/loading VUE_APP_COURSE_STUDY=//u.boe.com/pc-release/course/studyindex?id= -VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx \ No newline at end of file +VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx +# 外部考试导入成绩模板 +VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx \ No newline at end of file diff --git a/src/api/index1.js b/src/api/index1.js index 77df3b43..80e1cb71 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -89,6 +89,8 @@ export const editLearnInfo = (obj) => http.post('/admin/router/editInfo', obj) //项目积分榜单 // export const scoreRank = (obj) => http.post("/admin/project/scoreRank", 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 billboard = (obj) => http.post("/admin/project/billboard", obj); //项目基础信息----------------------------------- @@ -210,3 +212,6 @@ export const getTaskList = (obj) => http.get('/admin/project/getTaskList', { par export const stuCertList = (obj) => http.get('/admin/certificate/stuCertList', { params: obj }) //更新学员证书 export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCert', obj) + +// 外部考试导入成绩 +export const ImportExternalExamScore = (obj) => http.post('/admin/external/exam/manage/importExternalExamScore', obj, { headers: { "Content-Type": "multipart/form-data" } }) \ No newline at end of file diff --git a/src/components/drawers/ExportAchievement.vue b/src/components/drawers/ExportAchievement.vue index 42fa5052..e00e50ff 100644 --- a/src/components/drawers/ExportAchievement.vue +++ b/src/components/drawers/ExportAchievement.vue @@ -30,7 +30,7 @@

@@ -199,7 +201,7 @@ type: Boolean, default: false, }, - //type=1 项目 type=2 路径图 + //type=1 路径图 type=2 项目 type: { type: String, default: null, @@ -208,6 +210,18 @@ type: Number, default: null, }, + targetId: { + type: Number, + default: null, + }, + taskId: { + type: Number, + default: null, + }, + chapterId: { + type: Number, + default: null, + }, pid: { type: Number, default: null, @@ -220,8 +234,8 @@ setup(props, ctx) { const state = reactive({ fileType: ["xls", "xlsx"], - importHomeWork: - process.env.VUE_APP_BASE_API + "/admin/student/importHomeWork", + importScore: + process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/importExternalExamScore", uploadpercent: -1, uploadErr: false, //上传失败 addLoading: false, @@ -230,6 +244,10 @@ errNum: 0, //失败数据数 downloadErrUrl: null, //下载失败数据 fileName: "", + locationHref:location.href.indexOf("http://") !== -1 + ? "http://43.143.139.204:12016/" + : location.href.slice(0, location.href.indexOf("/m")) + "/upload/", + template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE }); const closeDrawer = () => { ctx.emit("update:eScorevisibleExternalExternal", false); @@ -365,7 +383,8 @@ } }; function downTemplate() { - window.open(`${process.env.VUE_APP_BASE_API}/admin/student/exportHomeWorkTemplate?taskId=${props.id || ''}&type=${props.type || ''}&pid=${props.pid || ''}&thirdType=3`); + console.log(state.locationHref + state.template) + window.open(state.locationHref + state.template); } return { diff --git a/src/components/drawers/project/ProjectExternalExamManage.vue b/src/components/drawers/project/ProjectExternalExamManage.vue index 0de0c7c7..0c803a56 100644 --- a/src/components/drawers/project/ProjectExternalExamManage.vue +++ b/src/components/drawers/project/ProjectExternalExamManage.vue @@ -115,7 +115,12 @@

--> - + diff --git a/src/components/drawers/router/RouterExaminationExternalManage.vue b/src/components/drawers/router/RouterExaminationExternalManage.vue index a27c753d..6a88cf5b 100644 --- a/src/components/drawers/router/RouterExaminationExternalManage.vue +++ b/src/components/drawers/router/RouterExaminationExternalManage.vue @@ -114,7 +114,12 @@ --> - + diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index a10af873..b45a4ef7 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -877,11 +877,11 @@
-
+
搜索
-
+
重置
@@ -896,12 +896,14 @@
@@ -912,7 +914,7 @@
@@ -937,7 +940,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}
; } }, }, @@ -2507,91 +2458,43 @@ export default { { title: "进度", - dataIndex: "jd", - key: "jd", + dataIndex: "rateStr", + key: "rateStr", width: 50, align: "center", className: "h", }, ], + scoreRankLoading:true, + processRankLoading:true, //学分排行表 xuefentabledata: [ - { - rank: "1", - name: "哈哈", - jd: "80", - }, - - { - rank: "2", - name: "哈哈", - jd: "70", - }, - { - rank: "3", - name: "哈哈", - jd: "70", - }, - { - rank: "4", - name: "哈哈", - jd: "70", - }, - { - rank: "5", - name: "哈哈", - jd: "70", - }, - { - rank: "6", - name: "哈哈", - jd: "70", - }, - { - rank: "7", - name: "哈哈", - jd: "70", - }, - { - rank: "8", - name: "哈哈", - jd: "70", - }, - { - rank: "9", - name: "哈哈", - jd: "70", - }, - { - rank: "10", - name: "哈哈", - jd: "7", - }, + ], xuefentablecolumns: [ { title: "排名", - dataIndex: "rank", - key: "rank", + dataIndex: "index", + key: "index", width: 50, align: "center", className: "h", customRender: (text) => { - 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}
; } }, }, @@ -2614,8 +2517,8 @@ export default { { title: "积分", - dataIndex: "jd", - key: "jd", + dataIndex: "pointsCountStr", + key: "pointsCountStr", width: 50, align: "center", className: "h", @@ -2887,6 +2790,103 @@ export default { fileUrl: process.env.VUE_APP_FILE_PATH, }); + // 排行榜 - start + + // 积分排行榜 Top10 + // 项目积分切换查询 -- 学员 小组 + const jfSelectChange = (e) => { + console.log(e) + scoreRank(); + } + const jdSelectChange = (e) => { + console.log(e) + completionRank(); + } + const jdSelectChange1 = (e) => { + console.log(e) + completionRank(); + } + //项目积分榜单 + const scoreRank = (period, type) => { + state.scoreRankLoading = true; + state.datascore = []; + state.datascoreg = []; + console.log("projectId----->", state.projectId,period, type); + console.log('我是查询榜单传递的数据',{ + projectId: state.projectId, // 项目id + name: "", // 名字,没有则传空字符串 + startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime?state.rankEndTime:0, + size: 10, // 前多少名 + type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 + }) + let obj = { + projectId: 290, // 项目id + name: "", // 名字,没有则传空字符串 + startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime?state.rankEndTime:0, + size: 10, // 前多少名 + type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 + }; + + api + .scoreRank(obj) + .then((res) => { + console.log("获取项目积分-榜单", res); + if(res.data.code==200){ + state.datascore = res.data.data; + state.datascoreg = res.data.data; + state.xuefentabledata = res.data.data; + state.scoreRankLoading = false; + }else{ + state.datascore = []; + state.datascoreg = []; + state.xuefentabledata = []; + state.scoreRankLoading = false; + } + }) + .catch((err) => { + console.log("获取项目积分-榜单失败", err); + message.destroy(); + message.error('榜单获取失败'); + state.datascore = []; + state.datascoreg = []; + state.xuefentabledata = []; + state.scoreRankLoading = false; + }); + }; + + // 项目进度榜单 + const completionRank = () => { + state.processRankLoading = true; + let obj = { + projectId: 290, // 项目id + startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 + endTime: state.rankEndTime?state.rankEndTime:0, + stageId: state.valuestu2, // 阶段ID + type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 + } + + console.log('我是获取得项目进度排行榜--》', obj) + api.completionRank(obj).then(res=>{ + console.log('项目进度榜单获取',res) + if(res.data.datas){ + state.jindutabledata = res.data.datas; + state.processRankLoading = false; + }else{ + state.jindutabledata = []; + state.processRankLoading = false; + } + + }).catch(err=>{ + console.log(err) + state.jindutabledata = []; + state.processRankLoading = false; + }) + } + + // 排行榜 - end + const levelList = reactive({ projectInfoOverview: { // 整体数据概览 @@ -2948,6 +2948,28 @@ export default { } } levelList.stageList = res.data.data.stageList; + + if(levelList.stageList.length==1){ + // 无解段任务 + state.rankjieduan = [{value:0, label:'无阶段'}]; + state.valuestu2 = 0; + }else{ + // 有阶段任务 + let arrStage = [] + for(let i=0; i', res.data.data.stageList) + //暂时传个固定的id用 到时候看数据里面是否有在更换 // state.projectTaskId = res.data.data.stageList[0].taskList[0].projectTaskId let leng = res.data.data.stageList.length; @@ -3601,11 +3623,17 @@ export default { //排行榜 if (e == 6) { //获取进度榜 - getbillboard(1, 1); + // getbillboard(1, 1); //获取学分榜 - getbillboard(2, 1); + // getbillboard(2, 1); //获取学时榜 - getbillboard(3, 1); + // getbillboard(3, 1); + + // 获取积分排行榜 + scoreRank(); + // 获取项目进度排行榜 + completionRank(); + } else if (e == 3) { state.tabFlag = true; } else { @@ -3652,11 +3680,16 @@ state.ischeckCertificate=false //搜索 const rankSearch = () => { //获取进度榜 - getbillboard(1, 1); + // getbillboard(1, 1); //获取学分榜 - getbillboard(2, 1); + // getbillboard(2, 1); //获取学时榜 - getbillboard(3, 1); + // getbillboard(3, 1); + + // 获取积分排行 + scoreRank(); + // 获取项目进度排行榜 + completionRank(); }; //重置 const rankReset = () => { @@ -3664,6 +3697,11 @@ state.ischeckCertificate=false state.rankEndTime = null; state.valueDate = null; state.valueName = null; + + // 获取积分排行 + scoreRank(); + // 获取项目进度排行榜 + completionRank(); }; // end -----排行榜----------------排行榜----------------------排行榜-----------排行榜---------- @@ -4776,6 +4814,14 @@ state.ischeckCertificate=false previewPic, getCertificate, checkCertificate, + + scoreRank, + jfSelectChange, + + completionRank, + jdSelectChange, + jdSelectChange1, + }; }, };