فهرست منبع

智能选址范围清除

maxiaoxiao 11 ماه پیش
والد
کامیت
a6e455752d
1فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 9 3
      src/views/siteselection/index.vue

+ 9 - 3
src/views/siteselection/index.vue

@@ -13,7 +13,7 @@
         @tab-click="tabClick"
       >
         <el-tab-pane label="辅助选址" name="fzxz">
-          <FZXZ v-loading="loading" @updateParent="changeData"></FZXZ>
+          <FZXZ v-loading="loading" @updateParent="changeData" ref="fzxz"></FZXZ>
         </el-tab-pane>
         <el-tab-pane label="历史记录" name="lsju">
           <Lsjl
@@ -21,6 +21,7 @@
             :activeTabs="activeTabs"
             :historyList="historyList"
             @updateParent="changeData"
+            ref="lsju"
           ></Lsjl>
         </el-tab-pane>
         <!-- :disabled="activeTabs != 'scjg'" -->
@@ -93,8 +94,13 @@ export default {
   },
   watch: {
     activeTabs(newValue) {
-      if (newValue != "lsju") {
-        viewer.dataSources.removeAll();
+      
+      if (newValue != "fzxz")  this.$refs.fzxz.reset();
+      if (newValue != "lsju")  this.$refs.lsju.reset();
+      
+      if (newValue == "lsju") {
+        this.$refs.lsju.reset();
+        this.$refs.lsju.changeForm();
       }
     },
   },