|
@@ -658,32 +658,48 @@ export default {
|
|
|
return p1 - p2;
|
|
|
},
|
|
|
exportOrg() {
|
|
|
- this.exportOrgLoading = true;
|
|
|
- this.$http
|
|
|
- .get("/api/ecs_oe_admin/exam/student/statistic/by/org/export", {
|
|
|
- params: {
|
|
|
- examId: this.examId,
|
|
|
- examStageId: this.examStageId,
|
|
|
- orgId: this.orgId,
|
|
|
- },
|
|
|
- responseType: "arraybuffer",
|
|
|
- timeout: 20 * 60 * 1000, //限时20分钟
|
|
|
- })
|
|
|
- .then((response) => {
|
|
|
- if (response.data) {
|
|
|
- var blob = new Blob([response.data], {
|
|
|
- type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
|
- });
|
|
|
- var url = URL.createObjectURL(blob);
|
|
|
- var a = document.createElement("a");
|
|
|
- a.href = url;
|
|
|
- a.download = "学习中心完成进度.xlsx";
|
|
|
- a.target = "_blank";
|
|
|
- a.click();
|
|
|
- URL.revokeObjectURL(url);
|
|
|
- }
|
|
|
- this.exportOrgLoading = false;
|
|
|
+ if (!this.examId) {
|
|
|
+ this.$notify({
|
|
|
+ title: "警告",
|
|
|
+ message: "请选择考试",
|
|
|
+ type: "warning",
|
|
|
+ duration: 1000,
|
|
|
});
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ this.$confirm("确定执行导出?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ this.exportOrgLoading = true;
|
|
|
+ this.$http
|
|
|
+ .get("/api/ecs_oe_admin/exam/student/statistic/by/org/export", {
|
|
|
+ params: {
|
|
|
+ examId: this.examId,
|
|
|
+ examStageId: this.examStageId,
|
|
|
+ orgId: this.orgId,
|
|
|
+ },
|
|
|
+ responseType: "arraybuffer",
|
|
|
+ timeout: 20 * 60 * 1000, //限时20分钟
|
|
|
+ })
|
|
|
+ .then((response) => {
|
|
|
+ if (response.data) {
|
|
|
+ var blob = new Blob([response.data], {
|
|
|
+ type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
|
+ });
|
|
|
+ var url = URL.createObjectURL(blob);
|
|
|
+ var a = document.createElement("a");
|
|
|
+ a.href = url;
|
|
|
+ a.download = "学习中心完成进度.xlsx";
|
|
|
+ a.target = "_blank";
|
|
|
+ a.click();
|
|
|
+ URL.revokeObjectURL(url);
|
|
|
+ }
|
|
|
+ this.exportOrgLoading = false;
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
exportCourse() {
|
|
|
this.exportCourseLoading = true;
|