mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 06:16:46 +08:00
fix:外部考试导入成绩参数调整
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
:showUploadList="false"
|
||||
:data="{
|
||||
type: type,
|
||||
targetId: Number(id),
|
||||
targetId: Number(targetId),
|
||||
chapterId:chapterId,
|
||||
taskId:taskId
|
||||
}"
|
||||
@@ -250,6 +250,7 @@
|
||||
template: process.env.VUE_APP_UP_LOAD_STUDENT_SCORE_TEMPLATE
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("closeDraw",true);
|
||||
ctx.emit("update:eScorevisibleExternalExternal", false);
|
||||
state.fileList = [];
|
||||
state.uploadpercent = -1;
|
||||
@@ -286,6 +287,13 @@
|
||||
if (status === "done") {
|
||||
state.fileName = info.file.name;
|
||||
let i = 0;
|
||||
let timeouts = setTimeout(() => {
|
||||
clearInterval(timer)
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}, 30000);
|
||||
|
||||
let timer = setInterval(() => {
|
||||
let uid = info.file.response.data;
|
||||
api
|
||||
@@ -306,25 +314,18 @@
|
||||
state.downloadErrUrl = res.data.data.url;
|
||||
console.log("props.getStudent", props.getStudent);
|
||||
clearInterval(timer);
|
||||
clearTimeout(timeouts);
|
||||
}
|
||||
}else{
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
state.addLoading = false;
|
||||
clearInterval(timer);
|
||||
clearTimeout(timeouts);
|
||||
console.log("查询导入状态失败", err);
|
||||
});
|
||||
}, 500);
|
||||
setTimeout(() => {
|
||||
clearInterval(timer)
|
||||
state.addLoading = false;
|
||||
message.destroy();
|
||||
message.error(`文件导入超时`);
|
||||
}, 30000);
|
||||
|
||||
} else if (status === "error") {
|
||||
state.uploadErr = true;
|
||||
message.error(`${info.file.name}上传失败`);
|
||||
|
||||
@@ -116,10 +116,11 @@
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<ExportAchievement
|
||||
@closeDraw="closeDraw"
|
||||
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
|
||||
:type="2"
|
||||
:targetId="datasource.projectId"
|
||||
:taskId="datasource.projectTaskId"
|
||||
:taskId="datasource.courseId"
|
||||
:chapterId="datasource.stageId" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -368,6 +369,7 @@
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
state.loadingData = true;
|
||||
api.QueryExternalExamManageDetail({
|
||||
chapterId: props.datasource.stageId,
|
||||
pageNo: state.currentPage,
|
||||
@@ -410,6 +412,11 @@
|
||||
window.open(`${process.env.VUE_APP_BASE_API}/admin/external/exam/manage/exportExternalExam?chapterId=${props.datasource.stageId}&type=${2}&targetId=${props.datasource.projectId}&taskId=${props.datasource.projectTaskId}`)
|
||||
}
|
||||
|
||||
const closeDraw = (e) => {
|
||||
console.log('我关闭了导入成绩弹框吗', e)
|
||||
getData();
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -422,7 +429,8 @@
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu,
|
||||
exportData
|
||||
exportData,
|
||||
closeDraw
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -115,10 +115,11 @@
|
||||
</div>
|
||||
<!-- 导出成绩抽屉 -->
|
||||
<ExportAchievement
|
||||
@closeDraw="closeDraw"
|
||||
v-model:eScorevisibleExternalExternal="eScorevisibleExternalExternal"
|
||||
:type="1"
|
||||
:targetId="datasource.routerId"
|
||||
:taskId="datasource.routerTaskId"
|
||||
:taskId="datasource.courseId"
|
||||
:chapterId="datasource.chapterId" />
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -368,9 +369,14 @@
|
||||
const clearLine = () => {
|
||||
state.selectedRowKeys = [];
|
||||
};
|
||||
const closeDraw = (e) => {
|
||||
console.log('我关闭了导入成绩弹框吗', e)
|
||||
getData();
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
function getData() {
|
||||
state.loadingData = true;
|
||||
api.QueryExternalExamManageDetail({
|
||||
chapterId: props.datasource.chapterId,
|
||||
pageNo: state.currentPage,
|
||||
@@ -425,7 +431,8 @@
|
||||
searchTableData,
|
||||
reseatTableData,
|
||||
changePaginationStu,
|
||||
exportData
|
||||
exportData,
|
||||
closeDraw
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user