zhangjie 1 年間 前
コミット
aa6155b656

+ 21 - 0
src/api/invigilation.js

@@ -373,6 +373,13 @@ export function reportStatisticsData(datas) {
     {}
   );
 }
+export function exportReportStatisticsData(datas) {
+  const data = pickBy(datas, paramFilter);
+  return httpApp.post(
+    "/api/admin/report/exam_view_count/export?" + object2QueryString(data),
+    {}
+  );
+}
 // report-absent
 export function reportAbsentData(datas) {
   const data = pickBy(datas, paramFilter);
@@ -381,6 +388,13 @@ export function reportAbsentData(datas) {
     {}
   );
 }
+export function exportReportAbsentData(datas) {
+  const data = pickBy(datas, paramFilter);
+  return httpApp.post(
+    "/api/admin/report/exam_deficiency_list/export?" + object2QueryString(data),
+    {}
+  );
+}
 // report-exception
 export function reportExceptionData(datas) {
   const data = pickBy(datas, paramFilter);
@@ -420,6 +434,13 @@ export function reportBreachDetail(datas) {
     {}
   );
 }
+export function exportReportBreachData(datas) {
+  const data = pickBy(datas, paramFilter);
+  return httpApp.post(
+    "/api/admin/report/exam_breach_list/export?" + object2QueryString(data),
+    {}
+  );
+}
 // report-cancel-breach
 export function reportCancelBreachData(datas) {
   const data = pickBy(datas, paramFilter);

+ 1 - 1
src/features/Login/Login.vue

@@ -135,7 +135,7 @@ export default {
           password: this.user.password,
           code: ORG_CODE,
         });
-        if (!this.$store.state.user.pwdForce) {
+        if (this.$store.state.user.pwdForce) {
           this.$refs.ResetPwd.open();
           return;
         }

+ 14 - 1
src/features/invigilation/ExamReport/ReportAbsent.vue

@@ -1,5 +1,12 @@
 <template>
   <div class="report-absent">
+    <el-button
+      type="primary"
+      icon="el-icon-download"
+      style="margin: 0 0 10px"
+      @click="exportData"
+      >导出数据</el-button
+    >
     <el-table ref="TableList" :data="dataList">
       <el-table-column type="index" label="排序"></el-table-column>
       <el-table-column prop="examName" label="批次名称(ID)"></el-table-column>
@@ -36,7 +43,7 @@
 </template>
 
 <script>
-import { reportAbsentData } from "@/api/invigilation";
+import { reportAbsentData, exportReportAbsentData } from "@/api/invigilation";
 
 export default {
   name: "report-absent",
@@ -79,6 +86,12 @@ export default {
     getData() {
       this.toPage(1);
     },
+    async exportData() {
+      await exportReportAbsentData({
+        ...this.filter,
+      });
+      this.$notify({ title: "导入任务已成功启动", type: "success" });
+    },
   },
 };
 </script>

+ 14 - 1
src/features/invigilation/ExamReport/ReportBreach.vue

@@ -1,5 +1,12 @@
 <template>
   <div class="report-breach">
+    <el-button
+      type="primary"
+      icon="el-icon-download"
+      style="margin: 0 0 10px"
+      @click="exportData"
+      >导出数据</el-button
+    >
     <el-table ref="TableList" :data="dataList">
       <el-table-column type="index" label="排序"></el-table-column>
       <el-table-column prop="examName" label="批次名称(ID)"></el-table-column>
@@ -53,7 +60,7 @@
 </template>
 
 <script>
-import { reportBreachData } from "@/api/invigilation";
+import { reportBreachData, exportReportBreachData } from "@/api/invigilation";
 import BreachDetailDialog from "./BreachDetailDialog";
 
 export default {
@@ -103,6 +110,12 @@ export default {
       this.detailId = row.examStudentId;
       this.$refs.BreachDetailDialog.open();
     },
+    async exportData() {
+      await exportReportBreachData({
+        ...this.filter,
+      });
+      this.$notify({ title: "导入任务已成功启动", type: "success" });
+    },
   },
 };
 </script>

+ 18 - 1
src/features/invigilation/ExamReport/ReportStatistics.vue

@@ -1,5 +1,12 @@
 <template>
   <div class="report-statistics">
+    <el-button
+      type="primary"
+      icon="el-icon-download"
+      style="margin: 0 0 10px"
+      @click="exportData"
+      >导出数据</el-button
+    >
     <el-table ref="TableList" :data="dataList">
       <el-table-column type="index" label="排序"></el-table-column>
       <el-table-column prop="examName" label="批次名称(ID)"></el-table-column>
@@ -50,7 +57,11 @@
 </template>
 
 <script>
-import { reportOverviewData, reportStatisticsData } from "@/api/invigilation";
+import {
+  reportOverviewData,
+  reportStatisticsData,
+  exportReportStatisticsData,
+} from "@/api/invigilation";
 
 export default {
   name: "report-statistics",
@@ -108,6 +119,12 @@ export default {
       this.toPage(1);
       this.getTotalCount();
     },
+    async exportData() {
+      await exportReportStatisticsData({
+        ...this.filter,
+      });
+      this.$notify({ title: "导入任务已成功启动", type: "success" });
+    },
   },
 };
 </script>