Преглед изворни кода

页面跳转没有调接口

liuxiangqi пре 1 година
родитељ
комит
3bbb712a8b

+ 6 - 0
src/views/admin/project/index.vue

@@ -146,6 +146,12 @@
       this.getProvinceData()
 
     },
+    watch:{
+      $route(){
+        this.getList()
+        this.getProvinceData()
+      }
+    },
     methods: {
       checkRole,
       getList() {

+ 3 - 5
src/views/enterprise/project/components/year-edit.vue

@@ -527,7 +527,7 @@ export default {
                   confirmButtonText: '确定',
                   callback: action => {
                     _self.loading = false
-                    _self.$store.dispatch("tagsView/delView", _self.$route);
+                    // _self.$store.dispatch("tagsView/delView", _self.$route);
                     _self.$router.go(-1);
                   }
                 })
@@ -538,7 +538,7 @@ export default {
                   confirmButtonText: '确定',
                   callback: action => {
                     _self.loading = false
-                    _self.$store.dispatch("tagsView/delView", _self.$route);
+                    // _self.$store.dispatch("tagsView/delView", _self.$route);
                     _self.$router.go(-1);
                   }
                 })
@@ -558,7 +558,6 @@ export default {
           this.form.techRate = ((val.invest / val.sales)*100).toFixed(2)
         }
       }
-
     },
     info: {
       immediate: true,
@@ -568,8 +567,7 @@ export default {
           this.getList(obj.projectYear)
         }
       }
-    },
-
+    }
   }
 };
 </script>

+ 6 - 0
src/views/enterprise/project/index.vue

@@ -142,6 +142,12 @@
       this.getList()
       this.getProvinceData()
     },
+    watch:{
+      $route(){
+        this.getList()
+        this.getProvinceData()
+      }
+    },
     methods: {
       checkRole,
       // 多选框选中数据

+ 7 - 0
src/views/index.vue

@@ -196,6 +196,13 @@ export default {
     this.getData()
     this.getList()
     this.getDeclareList()
+  },
+  watch:{
+    $route(){
+      this.getData()
+      this.getList()
+      this.getDeclareList()
+    }
   },
   methods: {
     goTarget(href) {