|
@@ -329,6 +329,16 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.taskRunning = true;
|
|
|
+ // 获取导出任务详情数据
|
|
|
+ const dataList = await exportDataList({
|
|
|
+ ...this.scoreFilter,
|
|
|
+ workId: this.scoreFilter.examId
|
|
|
+ }).catch(() => {});
|
|
|
+ if (!dataList || !dataList.length) {
|
|
|
+ this.taskRunning = false;
|
|
|
+ this.$Message.error("当前没有需要下载的数据!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
this.scoreFilter.savePathRule = this.SAVE_PATH_RULES.filter(
|
|
|
item => item.seleted
|
|
@@ -342,6 +352,7 @@ export default {
|
|
|
message: "正在下载任务数据"
|
|
|
};
|
|
|
const exam = this.exams.find(item => item.id === this.scoreFilter.examId);
|
|
|
+
|
|
|
// 保存本地导出任务
|
|
|
this.curExportTask = {
|
|
|
...this.scoreFilter,
|
|
@@ -352,14 +363,12 @@ export default {
|
|
|
const taskId = await addExportTask(this.curExportTask).catch(() => {});
|
|
|
|
|
|
if (!taskId) {
|
|
|
- console.log("本地添加任务失败!");
|
|
|
+ this.$Message.error("本地添加任务失败!");
|
|
|
this.taskRunning = false;
|
|
|
return;
|
|
|
}
|
|
|
this.curExportTask.id = taskId;
|
|
|
|
|
|
- // 获取导出任务详情数据
|
|
|
- const dataList = await exportDataList(this.curExportTask);
|
|
|
// 记录导出任务详情数据
|
|
|
const len = dataList.length;
|
|
|
const pageCount = Math.ceil(len / this.pageSize);
|