Sfoglia il codice sorgente

综合分析分页数目不对应bug修复

Bella 2 anni fa
parent
commit
e6730d61b4
1 ha cambiato i file con 24 aggiunte e 30 eliminazioni
  1. 24 30
      src/views/ComprehensiveAnalysis.vue

+ 24 - 30
src/views/ComprehensiveAnalysis.vue

@@ -228,8 +228,7 @@
                     {{
                       v.title +
                       "_" +
-                      ((paginationData.currentPage - 1) *
-                        paginationData.pageSize +
+                      ((paginationData.currentPage - 1) * currentPageSize +
                         (i + 1))
                     }}
                   </div>
@@ -404,16 +403,14 @@ export default {
           let panelId = this.enteredPanelId;
           let mainType = this.enteredMainType;
           let sourceType = this.enteredSourceType;
-          if (mainType === "所有图层") {
-            this.changeSingleLayer(
-              val,
-              currentPageSize,
-              columnId,
-              panelId,
-              mainType,
-              sourceType
-            );
-          }
+          this.changeSingleLayer(
+            val,
+            currentPageSize,
+            columnId,
+            panelId,
+            mainType,
+            sourceType
+          );
         },
         handleSizeChange: (val) => {
           this.handleSizeChange(val);
@@ -842,16 +839,17 @@ export default {
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`);
       this.currentPageSize = val;
-      if (this.enteredMainType === "所有图层") {
-        this.changeSingleLayer(
-          this.currentPage,
-          this.currentPageSize,
-          this.enteredColumnId,
-          this.enteredPanelId,
-          this.enteredMainType,
-          this.enteredColumnId
-        );
-      }
+      this.changeSingleLayer(
+        this.currentPage,
+        this.currentPageSize,
+        this.enteredColumnId,
+        this.enteredPanelId,
+        this.enteredMainType,
+        this.enteredColumnId
+      );
+      // if (this.enteredMainType === "所有图层") {
+
+      // }
     },
     getMapData(uniqueId, columnId, mainType, sourceType) {
       let layerParams = new FormData();
@@ -1090,14 +1088,10 @@ export default {
         this.paginationData.currentPage = val;
         this.originalData[uniqueId] = [];
         let oldData = this.originalDataMap.get(uniqueId);
-        if (val * currentPageSize <= oldData.length - 1) {
-          this.originalData[uniqueId] = oldData.slice(
-            (val - 1) * currentPageSize,
-            val * currentPageSize
-          );
-        } else {
-          this.originalData[uniqueId] = oldData.slice(val - 1, oldData.length);
-        }
+        this.originalData[uniqueId] = oldData.slice(
+          (val - 1) * currentPageSize,
+          val * currentPageSize
+        );
 
         this.originalData[uniqueId] = this.originalData[uniqueId].map((ele) => {
           return {