sunran 3 anos atrás
pai
commit
b8b9146577
1 arquivos alterados com 14 adições e 1 exclusões
  1. 14 1
      src/views/weibao/views/followUp/director.vue

+ 14 - 1
src/views/weibao/views/followUp/director.vue

@@ -51,6 +51,19 @@ export default {
     this.loading = true
     this.followUpPage()
     this.historyFollowUp()
+    console.log('1')
+  },
+  beforeRouteEnter(to, from, next) {
+    next((vm) => {
+      //  这里的vm指的就是vue实例,可以用来当做this使用
+      console.log(to, 'to')
+      console.log(from, 'from')
+      if (from.name == 'Home') {
+        vm.active = 0
+        vm.followUpform.pageNum = 1
+        vm.historyform.pageNum = 1
+      }
+    })
   },
   methods: {
     async followUpPage() {
@@ -63,7 +76,7 @@ export default {
         this.planList = this.planList.concat(res.data.records)
         console.log(this.planList)
       }
-      if (this.planList.length >= res.data.total) {
+      if (this.planList.length == res.data.total) {
         this.finished = true
       } else {
         this.finished = false