Jelajahi Sumber

下一页BUG

彭宇 2 tahun lalu
induk
melakukan
10a2c495c3
1 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 4 2
      src/views/forest.vue

+ 4 - 2
src/views/forest.vue

@@ -275,7 +275,7 @@
                   </el-input>
               </div>
               <div class="i-list-con small-bottom-margin" style="height: 24vh;">
-                
+
                 <div class="d-l-con padding-box nowrap" v-for="(item, index) in eventList"
                   @click="dropLocation(item.latitude, item.longitude,item.eventCode)" data-html2canvas-ignore>
                   <div class="bgt-img">
@@ -496,6 +496,7 @@ export default {
       forestInfo: '', //基本情况
       //左侧获取事件信息统计
       totalStr: '000000',
+      totalAllEvent: 0,
       aiTotal: '',
       newReport: '',
       otherTotal: '',
@@ -837,6 +838,7 @@ export default {
         this.readySure = res.data.readySure
         this.readySure_pre = res.data.readySure_pre
         this.totalStr = res.data.totalStr
+        this.totalAllEvent = +res.data.totalStr
         this.total = res.data.total
         this.eventChartAi(this.aiTotal_pre, this.otherTotal_pre)
       })
@@ -985,7 +987,7 @@ export default {
       if (pageNum < 1) {
         this.$modal.msg('当前已是第一页')
         return
-      } else if(pageNum>num)
+      } else if(pageNum>this.totalAllEvent/10+1)
       {
         this.$modal.msg('当前已是最后一页')
         return;