mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 19:36:46 +08:00
feat:增加外部考试导入成绩
This commit is contained in:
2
.env
2
.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_TEMPLATE=导入学员模版-1673963663229.xlsx
|
||||||
|
# 外部考试导入成绩模板
|
||||||
|
VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE=导入成绩模版-1673963663229.xlsx
|
||||||
2
.env.boe
2
.env.boe
@@ -8,3 +8,5 @@ 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
|
||||||
@@ -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_COURSE_STUDY=//u.boe.com/pc/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
|
||||||
@@ -14,3 +14,5 @@ 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_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
|
||||||
@@ -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 stuCertList = (obj) => http.get('/admin/certificate/stuCertList', { params: obj })
|
||||||
//更新学员证书
|
//更新学员证书
|
||||||
export const updateStuCert = (obj) => http.post('/admin/certificate/updateStuCert', 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" } })
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<div style="height: 176px; margin-bottom: 20px">
|
<div style="height: 176px; margin-bottom: 20px">
|
||||||
<a-upload-dragger
|
<a-upload-dragger
|
||||||
v-model:fileList="fileList"
|
v-model:fileList="fileList"
|
||||||
:action="importHomeWork"
|
:action="importScore"
|
||||||
name="uploadFile"
|
name="uploadFile"
|
||||||
:multiple="true"
|
:multiple="true"
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
@@ -38,6 +38,8 @@
|
|||||||
:data="{
|
:data="{
|
||||||
type: type,
|
type: type,
|
||||||
targetId: Number(id),
|
targetId: Number(id),
|
||||||
|
chapterId:chapterId,
|
||||||
|
taskId:taskId
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<p class="ant-upload-drag-icon">
|
<p class="ant-upload-drag-icon">
|
||||||
@@ -199,7 +201,7 @@
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
//type=1 项目 type=2 路径图
|
//type=1 路径图 type=2 项目
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
@@ -208,6 +210,18 @@
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
targetId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
taskId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
chapterId: {
|
||||||
|
type: Number,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
pid: {
|
pid: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
@@ -220,8 +234,8 @@
|
|||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
fileType: ["xls", "xlsx"],
|
fileType: ["xls", "xlsx"],
|
||||||
importHomeWork:
|
importScore:
|
||||||
process.env.VUE_APP_BASE_API + "/admin/student/importHomeWork",
|
process.env.VUE_APP_BASE_API + "/admin/external/exam/manage/importExternalExamScore",
|
||||||
uploadpercent: -1,
|
uploadpercent: -1,
|
||||||
uploadErr: false, //上传失败
|
uploadErr: false, //上传失败
|
||||||
addLoading: false,
|
addLoading: false,
|
||||||
@@ -230,6 +244,10 @@
|
|||||||
errNum: 0, //失败数据数
|
errNum: 0, //失败数据数
|
||||||
downloadErrUrl: null, //下载失败数据
|
downloadErrUrl: null, //下载失败数据
|
||||||
fileName: "",
|
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 = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:eScorevisibleExternalExternal", false);
|
ctx.emit("update:eScorevisibleExternalExternal", false);
|
||||||
@@ -365,7 +383,8 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
function downTemplate() {
|
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 {
|
return {
|
||||||
|
|||||||
@@ -115,7 +115,12 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</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>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,12 @@
|
|||||||
</div>-->
|
</div>-->
|
||||||
</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>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -2887,6 +2887,56 @@ export default {
|
|||||||
fileUrl: process.env.VUE_APP_FILE_PATH,
|
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({
|
const levelList = reactive({
|
||||||
projectInfoOverview: {
|
projectInfoOverview: {
|
||||||
// 整体数据概览
|
// 整体数据概览
|
||||||
|
|||||||
Reference in New Issue
Block a user