Jelajahi Sumber

解决批次为空时的查询问题

zhangjie 4 tahun lalu
induk
melakukan
774538689e

+ 1 - 0
src/features/invigilation/ExamReport/ExamReport.vue

@@ -174,6 +174,7 @@ export default {
     ...mapMutations("invigilation", ["setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,

+ 1 - 0
src/features/invigilation/InvigilationDetail/InvigilationDetail.vue

@@ -304,6 +304,7 @@ export default {
     ...mapMutations("invigilation", ["setDetailIds", "setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,

+ 1 - 0
src/features/invigilation/ProgressDetail/ProgressDetail.vue

@@ -172,6 +172,7 @@ export default {
     ...mapMutations("invigilation", ["setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,

+ 1 - 1
src/features/invigilation/ReexamApply/ReexamApply.vue

@@ -174,7 +174,7 @@ export default {
     ...mapMutations("invigilation", ["setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
-      // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,

+ 1 - 0
src/features/invigilation/ReexamChecked/ReexamChecked.vue

@@ -218,6 +218,7 @@ export default {
     ...mapMutations("invigilation", ["setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,

+ 1 - 0
src/features/invigilation/ReexamPending/ReexamPending.vue

@@ -219,6 +219,7 @@ export default {
 
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,

+ 1 - 0
src/features/invigilation/StudentLogManage/StudentLogManage.vue

@@ -163,6 +163,7 @@ export default {
     ...mapMutations("invigilation", ["setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       // this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
       this.updateSelectedExamId({
         exams: this.examBatchs,

+ 1 - 0
src/features/invigilation/WarningManage/WarningManage.vue

@@ -263,6 +263,7 @@ export default {
     ...mapMutations("invigilation", ["setDetailIds", "setSelectedExamId"]),
     async initData() {
       await this.getExamBatchList();
+      if (!this.examBatchs.length) return;
       this.updateSelectedExamId({
         exams: this.examBatchs,
         selectedExamId: this.selectedExamId,