فهرست منبع

提交题库,页数值回填问题

weiwenhai 6 سال پیش
والد
کامیت
b00a3ae6d8

+ 2 - 0
src/modules/questions/views/BluePaperStructure.vue

@@ -199,12 +199,14 @@ export default {
     },
     //查询所有
     searchAll() {
+      var pageNo = Number(this.currentPage);
       this.loading = true;
       var url =
         QUESTION_API + "/paperStruct/" + this.currentPage + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
+        this.currentPage = pageNo;
       });
       this.loading = false;
     },

+ 0 - 1
src/modules/questions/views/CourseProperty.vue

@@ -265,7 +265,6 @@ export default {
       this.searchCourProperty();
     },
     searchCourProperty() {
-      console.log("page:", this.currentPage);
       var pageNo = Number(this.currentPage);
       this.loading = true;
       var url =

+ 2 - 0
src/modules/questions/views/ExtractPaperRule.vue

@@ -338,6 +338,7 @@ export default {
       }
       this.loading = true;
       let currentPage = this.currentPage;
+      this.currentPage = 1;
       this.$http
         .get(
           QUESTION_API +
@@ -353,6 +354,7 @@ export default {
         .then(response => {
           this.tableData = response.data.content;
           this.total = response.data.totalElements;
+          this.currentPage = Number(currentPage);
           this.loading = false;
         })
         .catch(error => {

+ 4 - 2
src/modules/questions/views/GenPaper.vue

@@ -415,12 +415,14 @@ export default {
       this.searchGenPaper();
     },
     searchGenPaper() {
+      var pageNo = this.currentPage;
+      this.currentPage = 1;
       this.loading = true;
-      var url =
-        QUESTION_API + "/genPaper/" + this.currentPage + "/" + this.pageSize;
+      var url = QUESTION_API + "/genPaper/" + pageNo + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
+        this.currentPage = Number(pageNo);
       });
       this.loading = false;
     },

+ 6 - 3
src/modules/questions/views/ImportPaper.vue

@@ -419,12 +419,14 @@ export default {
       this.searchImportPaper();
     },
     searchImportPaper() {
+      var pageNo = Number(this.currentPage);
+      this.currentPage = 1;
       this.loading = true;
-      var url =
-        QUESTION_API + "/importPaper/" + this.currentPage + "/" + this.pageSize;
+      var url = QUESTION_API + "/importPaper/" + pageNo + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
+        this.currentPage = pageNo;
         this.loading = false;
       });
     },
@@ -774,6 +776,7 @@ export default {
           level: "",
           name: ""
         };
+        this.currentPage = 1;
       } else {
         this.formSearch = JSON.parse(sessionStorage.getItem("import_paper"));
         this.currentPage =
@@ -784,7 +787,7 @@ export default {
       if (this.formSearch.courseName) {
         this.getCourses(this.formSearch.courseName);
       }
-      this.searchImportPaper();
+      this.handleCurrentChange(this.currentPage);
     }
   },
   computed: {

+ 2 - 0
src/modules/questions/views/PaperStructure.vue

@@ -209,12 +209,14 @@ export default {
       this.searchPaperStructs();
     },
     searchPaperStructs() {
+      var pageNo = Number(this.currentPage);
       this.loading = true;
       var url =
         QUESTION_API + "/paperStruct/" + this.currentPage + "/" + this.pageSize;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
+        this.currentPage = pageNo;
       });
       this.loading = false;
     },

+ 5 - 3
src/modules/questions/views/Question.vue

@@ -409,13 +409,16 @@ export default {
       this.searchQues();
     },
     searchQues() {
+      var pageNo = Number(this.currentPage);
+      console.log("pageNo:", pageNo);
+      this.currentPage = 1;
       this.tableData = [];
-      var url =
-        QUESTION_API + "/question/" + this.currentPage + "/" + this.pageSize;
+      var url = QUESTION_API + "/question/" + pageNo + "/" + this.pageSize;
       this.loading = true;
       this.$http.get(url, { params: this.formSearch }).then(response => {
         this.tableData = response.data.content;
         this.total = response.data.totalElements;
+        this.currentPage = Number(pageNo);
         this.loading = false;
       });
     },
@@ -716,7 +719,6 @@ export default {
           firstPropertyId: "",
           secondPropertyId: ""
         };
-        this.currentPage = 1;
       }
       this.searchQues();
     }