From 2dd9298ea4f5032f7bcc1b0edd60603115fd15b2 Mon Sep 17 00:00:00 2001 From: wyx Date: Wed, 8 Feb 2023 15:33:40 +0800 Subject: [PATCH] =?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: { // 整体数据概览