Sfoglia il codice sorgente

部分页面复选框交互后重新查询的分页问题的优化

刘洋 1 anno fa
parent
commit
6740458666

+ 7 - 0
src/modules/basic/view/data_previllege.vue

@@ -454,6 +454,13 @@ export default {
           type: "success",
           message: "删除成功",
         });
+        if (
+          this["tableData" + type].length == refIds.length &&
+          (this["currentPage" + type] + 1) * this["pageSize" + type] >
+            this["total" + type]
+        ) {
+          this["currentPage" + type] = 1;
+        }
         await this.init();
       } catch (error) {
         console.log(error);

+ 6 - 0
src/modules/questions/views/GenPaperDetail.vue

@@ -867,6 +867,12 @@ export default {
         this.tempPapers.push(Object.assign({}, element));
         this.tempPaperIds.push(element.id);
       });
+      if (
+        val.length == this.selectPapers.length &&
+        (this.curSelect + 1) * this.pageSize > this.totalSelect
+      ) {
+        this.curSelect = 1;
+      }
       this.searchPaper();
     },
     searchPaper() {