feat:增加外部考试导入成绩

This commit is contained in:
wyx
2023-02-08 15:33:40 +08:00
parent c33cf73819
commit 2dd9298ea4
9 changed files with 99 additions and 9 deletions

2
.env
View File

@@ -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

View File

@@ -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
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
# 外部考试导入成绩模板
VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx

View File

@@ -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

View File

@@ -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
VUE_APP_UP_LOAD_STUDENT_TEMPLATE=导入学员模版-1673963663229.xlsx
# 外部考试导入成绩模板
VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx

View File

@@ -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" } })

View File

@@ -30,7 +30,7 @@
<div style="height: 176px; margin-bottom: 20px">
<a-upload-dragger
v-model:fileList="fileList"
:action="importHomeWork"
:action="importScore"
name="uploadFile"
:multiple="true"
@change="handleChange"
@@ -38,6 +38,8 @@
:data="{
type: type,
targetId: Number(id),
chapterId:chapterId,
taskId:taskId
}"
>
<p class="ant-upload-drag-icon">
@@ -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 {

View File

@@ -115,7 +115,12 @@
</div> -->
</div>
<!-- 导出成绩抽屉 -->
<ExportAchievement v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal" :type="1" />
<ExportAchievement
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
:type="2"
:targetId="datasource.projectId"
:taskId="datasource.projectTaskId"
:chapterId="datasource.stageId" />
</a-drawer>
</template>

View File

@@ -114,7 +114,12 @@
</div>-->
</div>
<!-- 导出成绩抽屉 -->
<ExportAchievement v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal" :type="2" />
<ExportAchievement
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
:type="1"
:targetId="datasource.routerId"
:taskId="datasource.routerTaskId"
:chapterId="datasource.chapterId" />
</a-drawer>
</template>

View File

@@ -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: {
// 整体数据概览