소스 검색

选址结果

maxiaoxiao 11 달 전
부모
커밋
1c02c08e5c
1개의 변경된 파일13개의 추가작업 그리고 12개의 파일을 삭제
  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();
+          });
+        }
+      },
     },
   },
 };