zhangjie hai 1 ano
pai
achega
8ee93e6463

+ 21 - 15
src/features/invigilation/InvigilationDetail/InvigilationDetail.vue

@@ -332,21 +332,27 @@ export default {
     ...mapMutations("invigilation", ["setDetailIds", "setSelectedExamId"]),
     async initData() {
       this.dataReady = false;
-      await this.getExamBatchList();
-      if (!this.examBatchs.length) return;
-      this.updateSelectedExamId({
-        exams: this.examBatchs,
-        selectedExamId: this.selectedExamId,
-      });
-      this.filter.examId = this.selectedExamId;
-      // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
-      const curExamBatch = this.examBatchs.find(
-        (item) => item.id === this.filter.examId
-      );
-      this.curExamBatch = curExamBatch || {};
-      await this.getExamActivityRoomList();
-      this.toSearch();
-      this.dataReady = true;
+      try {
+        await this.getExamBatchList();
+        if (!this.examBatchs.length) {
+          this.dataReady = true;
+          return;
+        }
+        this.updateSelectedExamId({
+          exams: this.examBatchs,
+          selectedExamId: this.selectedExamId,
+        });
+        this.filter.examId = this.selectedExamId;
+        // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
+        const curExamBatch = this.examBatchs.find(
+          (item) => item.id === this.filter.examId
+        );
+        this.curExamBatch = curExamBatch || {};
+        await this.getExamActivityRoomList();
+        this.toSearch();
+      } catch (error) {
+        this.dataReady = true;
+      }
     },
     async getList() {
       const datas = {

+ 18 - 12
src/features/invigilation/ProgressDetail/ProgressDetail.vue

@@ -250,18 +250,24 @@ export default {
     ...mapMutations("invigilation", ["setSelectedExamId"]),
     async initData() {
       this.dataReady = false;
-      await this.getExamBatchList();
-      if (!this.examBatchs.length) return;
-      this.updateSelectedExamId({
-        exams: this.examBatchs,
-        selectedExamId: this.selectedExamId,
-      });
-      this.form.examId = this.selectedExamId;
-      // this.form.examId = this.examBatchs[0] && this.examBatchs[0].id;
-      await this.getExamActivityRoomList();
-      this.toPage(1);
-      window.sessionStorage.removeItem("studentManageCache");
-      this.dataReady = true;
+      try {
+        await this.getExamBatchList();
+        if (!this.examBatchs.length) {
+          this.dataReady = true;
+          return;
+        }
+        this.updateSelectedExamId({
+          exams: this.examBatchs,
+          selectedExamId: this.selectedExamId,
+        });
+        this.form.examId = this.selectedExamId;
+        // this.form.examId = this.examBatchs[0] && this.examBatchs[0].id;
+        await this.getExamActivityRoomList();
+        this.toPage(1);
+        window.sessionStorage.removeItem("studentManageCache");
+      } catch (error) {
+        this.dataReady = true;
+      }
     },
     async getList() {
       const datas = {

+ 17 - 11
src/features/invigilation/WarningManage/WarningManage.vue

@@ -302,17 +302,23 @@ export default {
     ...mapMutations("invigilation", ["setDetailIds", "setSelectedExamId"]),
     async initData() {
       this.dataReady = false;
-      await this.getExamBatchList();
-      if (!this.examBatchs.length) return;
-      this.updateSelectedExamId({
-        exams: this.examBatchs,
-        selectedExamId: this.selectedExamId,
-      });
-      this.filter.examId = this.selectedExamId;
-      // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
-      await this.getExamActivityRoomList();
-      this.toSearch();
-      this.dataReady = true;
+      try {
+        await this.getExamBatchList();
+        if (!this.examBatchs.length) {
+          this.dataReady = true;
+          return;
+        }
+        this.updateSelectedExamId({
+          exams: this.examBatchs,
+          selectedExamId: this.selectedExamId,
+        });
+        this.filter.examId = this.selectedExamId;
+        // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
+        await this.getExamActivityRoomList();
+        this.toSearch();
+      } catch (error) {
+        this.dataReady = true;
+      }
     },
     async getList() {
       const datas = {