From 2dd9298ea4f5032f7bcc1b0edd60603115fd15b2 Mon Sep 17 00:00:00 2001 From: wyx Date: Wed, 8 Feb 2023 15:33:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E5=A4=96=E9=83=A8?= =?UTF-8?q?=E8=80=83=E8=AF=95=E5=AF=BC=E5=85=A5=E6=88=90=E7=BB=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 + .env.boe | 4 +- .env.prod | 2 + .env.release | 4 +- src/api/index1.js | 3 ++ src/components/drawers/ExportAchievement.vue | 29 +++++++++-- .../project/ProjectExternalExamManage.vue | 7 ++- .../RouterExaminationExternalManage.vue | 7 ++- src/views/projectcenter/TaskPage.vue | 50 +++++++++++++++++++ 9 files changed, 99 insertions(+), 9 deletions(-) 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..a5974970 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -210,3 +210,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..bf4f1fce 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -2887,6 +2887,56 @@ export default { fileUrl: process.env.VUE_APP_FILE_PATH, }); + // 排行榜 - start + + // 积分排行榜 Top10 + //项目积分榜单 + // const scoreRank = (period, type) => { + // state.scoreRankLoading = true; + // state.datascore = []; + // state.datascoreg = []; + // console.log("projectId----->", props.projectId,period, type); + // console.log('我是查询榜单传递的数据',{ + // projectId: props.projectId, // 项目id + // name: state.searchRankName, // 名字,没有则传空字符串 + // startTime:state.startTime, // 数据查询的起始时间 10位时间戳 + // size: 5, // 前多少名 + // type: Number(state.stuValue), // 查询类型 0 学员积分榜 1 小组积分榜 + // }) + // let obj = { + // projectId: props.projectId, // 项目id + // name: state.searchRankName, // 名字,没有则传空字符串 + // startTime: state.startTime, // 数据查询的起始时间 10位时间戳 + // size: 5, // 前多少名 + // type: Number(state.stuValue), // 查询类型 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.scoreRankLoading = false; + // }else{ + // state.datascore = []; + // state.datascoreg = []; + // state.scoreRankLoading = false; + // } + // }) + // .catch((err) => { + // console.log("获取项目积分-榜单失败", err); + // message.destroy(); + // message.error('榜单获取失败'); + // state.datascore = []; + // state.datascoreg = []; + // state.scoreRankLoading = false; + // }); + // }; + + // 排行榜 - end + const levelList = reactive({ projectInfoOverview: { // 整体数据概览 From e32ec87fd33480d2147da3a3fa32dbe4ca1bffe8 Mon Sep 17 00:00:00 2001 From: wyx Date: Wed, 8 Feb 2023 16:07:35 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE-?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C-=E7=A7=AF=E5=88=86=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=A6=9C-=E5=88=97=E8=A1=A8/=E6=90=9C=E7=B4=A2/?= =?UTF-8?q?=E9=87=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/projectcenter/TaskPage.vue | 201 ++++++++++++--------------- 1 file changed, 87 insertions(+), 114 deletions(-) diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index bf4f1fce..0fd89212 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -877,11 +877,11 @@
-
+
搜索
-
+
重置
@@ -928,6 +928,7 @@
@@ -937,7 +938,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}
; } }, }, @@ -2614,8 +2566,8 @@ export default { { title: "积分", - dataIndex: "jd", - key: "jd", + dataIndex: "pointsCountStr", + key: "pointsCountStr", width: 50, align: "center", className: "h", @@ -2890,50 +2842,57 @@ export default { // 排行榜 - start // 积分排行榜 Top10 + // 项目积分切换查询 -- 学员 小组 + const jfSelectChange = (e) => { + console.log(e) + scoreRank(); + } //项目积分榜单 - // const scoreRank = (period, type) => { - // state.scoreRankLoading = true; - // state.datascore = []; - // state.datascoreg = []; - // console.log("projectId----->", props.projectId,period, type); - // console.log('我是查询榜单传递的数据',{ - // projectId: props.projectId, // 项目id - // name: state.searchRankName, // 名字,没有则传空字符串 - // startTime:state.startTime, // 数据查询的起始时间 10位时间戳 - // size: 5, // 前多少名 - // type: Number(state.stuValue), // 查询类型 0 学员积分榜 1 小组积分榜 - // }) - // let obj = { - // projectId: props.projectId, // 项目id - // name: state.searchRankName, // 名字,没有则传空字符串 - // startTime: state.startTime, // 数据查询的起始时间 10位时间戳 - // size: 5, // 前多少名 - // type: Number(state.stuValue), // 查询类型 0 学员积分榜 1 小组积分榜 - // }; + 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: 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 小组积分榜 + }; - // api - // .scoreRank(obj) - // .then((res) => { - // console.log("获取项目积分-榜单", res); - // if(res.data.code==200){ - // state.datascore = res.data.data; - // state.datascoreg = res.data.data; - // state.scoreRankLoading = false; - // }else{ - // state.datascore = []; - // state.datascoreg = []; - // state.scoreRankLoading = false; - // } - // }) - // .catch((err) => { - // console.log("获取项目积分-榜单失败", err); - // message.destroy(); - // message.error('榜单获取失败'); - // state.datascore = []; - // state.datascoreg = []; - // state.scoreRankLoading = false; - // }); - // }; + api + .scoreRank(obj) + .then((res) => { + console.log("获取项目积分-榜单", res); + if(res.data.code==200){ + state.datascore = res.data.data; + state.datascoreg = res.data.data; + state.scoreRankLoading = false; + }else{ + state.datascore = []; + state.datascoreg = []; + state.scoreRankLoading = false; + } + }) + .catch((err) => { + console.log("获取项目积分-榜单失败", err); + message.destroy(); + message.error('榜单获取失败'); + state.datascore = []; + state.datascoreg = []; + state.scoreRankLoading = false; + }); + }; // 排行榜 - end @@ -3651,11 +3610,15 @@ export default { //排行榜 if (e == 6) { //获取进度榜 - getbillboard(1, 1); + // getbillboard(1, 1); //获取学分榜 - getbillboard(2, 1); + // getbillboard(2, 1); //获取学时榜 - getbillboard(3, 1); + // getbillboard(3, 1); + + // 获取积分排行榜 + scoreRank(); + } else if (e == 3) { state.tabFlag = true; } else { @@ -3702,11 +3665,14 @@ state.ischeckCertificate=false //搜索 const rankSearch = () => { //获取进度榜 - getbillboard(1, 1); + // getbillboard(1, 1); //获取学分榜 - getbillboard(2, 1); + // getbillboard(2, 1); //获取学时榜 - getbillboard(3, 1); + // getbillboard(3, 1); + + // 获取积分排行 + scoreRank(); }; //重置 const rankReset = () => { @@ -3714,6 +3680,9 @@ state.ischeckCertificate=false state.rankEndTime = null; state.valueDate = null; state.valueName = null; + + // 获取积分排行 + scoreRank() }; // end -----排行榜----------------排行榜----------------------排行榜-----------排行榜---------- @@ -4826,6 +4795,10 @@ state.ischeckCertificate=false previewPic, getCertificate, checkCertificate, + + scoreRank, + jfSelectChange, + }; }, }; From fbe511c3589183b9b37b094da88126ecac2a5c21 Mon Sep 17 00:00:00 2001 From: wyx Date: Wed, 8 Feb 2023 18:44:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E9=A1=B9=E7=9B=AE-?= =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C-=E8=BF=9B=E5=BA=A6=E6=8E=92?= =?UTF-8?q?=E8=A1=8C=E6=A6=9C-=E5=88=97=E8=A1=A8/=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index1.js | 2 + src/views/projectcenter/TaskPage.vue | 161 +++++++++++++++------------ 2 files changed, 94 insertions(+), 69 deletions(-) diff --git a/src/api/index1.js b/src/api/index1.js index a5974970..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); //项目基础信息----------------------------------- diff --git a/src/views/projectcenter/TaskPage.vue b/src/views/projectcenter/TaskPage.vue index 0fd89212..b45a4ef7 100644 --- a/src/views/projectcenter/TaskPage.vue +++ b/src/views/projectcenter/TaskPage.vue @@ -896,12 +896,14 @@
@@ -912,7 +914,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}
; } }, }, @@ -2508,14 +2458,15 @@ export default { { title: "进度", - dataIndex: "jd", - key: "jd", + dataIndex: "rateStr", + key: "rateStr", width: 50, align: "center", className: "h", }, ], scoreRankLoading:true, + processRankLoading:true, //学分排行表 xuefentabledata: [ @@ -2847,6 +2798,14 @@ export default { 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; @@ -2862,7 +2821,7 @@ export default { type: Number(state.valuestu3), // 查询类型 0 学员积分榜 1 小组积分榜 }) let obj = { - projectId: state.projectId, // 项目id + projectId: 290, // 项目id name: "", // 名字,没有则传空字符串 startTime: state.rankStartTime?state.rankStartTime:0, // 数据查询的起始时间 10位时间戳 endTime: state.rankEndTime?state.rankEndTime:0, @@ -2877,10 +2836,12 @@ export default { 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; } }) @@ -2890,10 +2851,40 @@ export default { 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({ @@ -2957,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; @@ -3618,6 +3631,8 @@ export default { // 获取积分排行榜 scoreRank(); + // 获取项目进度排行榜 + completionRank(); } else if (e == 3) { state.tabFlag = true; @@ -3673,6 +3688,8 @@ state.ischeckCertificate=false // 获取积分排行 scoreRank(); + // 获取项目进度排行榜 + completionRank(); }; //重置 const rankReset = () => { @@ -3682,7 +3699,9 @@ state.ischeckCertificate=false state.valueName = null; // 获取积分排行 - scoreRank() + scoreRank(); + // 获取项目进度排行榜 + completionRank(); }; // end -----排行榜----------------排行榜----------------------排行榜-----------排行榜---------- @@ -4799,6 +4818,10 @@ state.ischeckCertificate=false scoreRank, jfSelectChange, + completionRank, + jdSelectChange, + jdSelectChange1, + }; }, };