Browse Source

选址结果

maxiaoxiao 10 tháng trước cách đây
mục cha
commit
1c02c08e5c
1 tập tin đã thay đổi với 13 bổ sung12 xóa
  1. 13 12
      src/views/siteselection/index.vue

+ 13 - 12
src/views/siteselection/index.vue

@@ -78,11 +78,7 @@ export default {
     };
   },
   created() {},
-  computed: {
-    query() {
-      return this.$route.query.rwbsm;
-    },
-  },
+  computed: {},
   mounted() {},
   methods: {
     changeData(name, updata) {
@@ -108,13 +104,18 @@ export default {
         });
       }
     },
-    query(newVal, oldVal) {
-      if (newVal) {
-        this.rwBsm = newVal;
-        this.$refs.xzjg.reset();
-        this.activeTabs = "xzjg";
-        this.$refs.xzjg.GetXzjg();
-      }
+    "$route.query.rwbsm": {
+      immediate: true,
+      handler(newVal, oldVal) {
+        if (newVal) {
+          this.rwBsm = newVal;
+          this.activeTabs = "xzjg";
+          this.$nextTick(() => {
+            this.$refs.xzjg.reset();
+            this.$refs.xzjg.GetXzjg();
+          });
+        }
+      },
     },
   },
 };