|
@@ -170,6 +170,9 @@
|
|
|
<el-button type="primary" @click="changeFilter">{{
|
|
|
showAdvancedFilter ? "隐藏高级查询" : "高级查询"
|
|
|
}}</el-button>
|
|
|
+ <el-button type="primary" :loading="isDownload" @click="toExport"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -244,7 +247,9 @@ import {
|
|
|
examBatchList,
|
|
|
examActivityRoomList,
|
|
|
invigilationHistoryList,
|
|
|
+ exportInvigilationHistory,
|
|
|
} from "@/api/invigilation";
|
|
|
+import { downloadBlob } from "@/utils/utils";
|
|
|
import {
|
|
|
STUDENT_FINISH_EXAM_TYPE,
|
|
|
STUDENT_ONLINE_STATUS,
|
|
@@ -285,6 +290,7 @@ export default {
|
|
|
examRooms: [],
|
|
|
examCourses: [],
|
|
|
dataList: [],
|
|
|
+ isDownload: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -345,6 +351,20 @@ export default {
|
|
|
this.setDetailIds([...new Set(ids)]);
|
|
|
}
|
|
|
},
|
|
|
+ async toExport() {
|
|
|
+ this.isDownload = true;
|
|
|
+ const res = await downloadBlob(() => {
|
|
|
+ return exportInvigilationHistory(this.filter);
|
|
|
+ }).catch(() => {});
|
|
|
+
|
|
|
+ this.isDownload = false;
|
|
|
+
|
|
|
+ if (res) {
|
|
|
+ this.$message.success("导出成功!");
|
|
|
+ } else {
|
|
|
+ this.$message.error("导出失败,请重新尝试!");
|
|
|
+ }
|
|
|
+ },
|
|
|
async getExamBatchList() {
|
|
|
const userId = this.IS_INVIGILATE ? this.user.id : null;
|
|
|
const res = await examBatchList(userId);
|