Browse Source

Merge branch 'master' of http://114.244.114.158:8802/siwei/real3d-portalsite

zpf 1 year ago
parent
commit
f88f1cd528

+ 2 - 10
src/views/complianceAnalysis/components/hgxsc.vue

@@ -68,11 +68,7 @@ export default {
   components: {
     range,
   },
-  props: {
-    activeTabs: {
-      type: String,
-    },
-  },
+  props: {},
 
   data() {
     return {
@@ -268,11 +264,7 @@ export default {
       });
     },
   },
-  watch: {
-    activeTabs(newValue) {
-      if (newValue != "hgxsc") this.reset();
-    },
-  },
+  watch: {},
 };
 </script>
 

+ 0 - 8
src/views/complianceAnalysis/components/lsjl.vue

@@ -86,9 +86,6 @@ export default {
     rzBsm: {
       type: String,
     },
-    activeTabs: {
-      type: String,
-    },
     historyList: {
       type: Array,
     },
@@ -202,11 +199,6 @@ export default {
     },
   },
   watch: {
-    activeTabs(newValue) {
-      if (newValue != "lsjl") {
-        viewer.dataSources.removeAll();
-      }
-    },
     rzBsm() {
       this.changeForm();
     },

+ 5 - 8
src/views/complianceAnalysis/components/scjg.vue

@@ -129,6 +129,10 @@ export default {
         "_blank"
       );
     },
+    reset() {
+      this.dataSources = {};
+      viewer.dataSources.removeAll();
+    },
   },
 
   // watch(
@@ -140,14 +144,7 @@ export default {
   //       });
   //     }
   //   );
-  watch: {
-    activeTabs(newValue) {
-      if (newValue != "scjg") {
-        this.dataSources = {};
-        viewer.dataSources.removeAll();
-      }
-    },
-  },
+  watch: {},
 };
 </script>
 

+ 10 - 7
src/views/complianceAnalysis/index.vue

@@ -9,14 +9,14 @@
       </h2>
       <el-tabs type="border-card" class="xz_box" v-model="activeTabs" stretch>
         <el-tab-pane label="合规性分析" name="hgxsc">
-          <Hgxsc :activeTabs="activeTabs" @updateParent="changeData"></Hgxsc>
+          <Hgxsc @updateParent="changeData" ref="hgxfx"></Hgxsc>
         </el-tab-pane>
         <el-tab-pane label="历史记录" name="lsju">
           <Lsjl
             type="hgxfx"
-            :activeTabs="activeTabs"
             :rzBsm="rzBsm"
             @updateParent="changeData"
+            ref="lsju"
           ></Lsjl>
         </el-tab-pane>
         <el-tab-pane
@@ -24,11 +24,7 @@
           name="scjg"
           :disabled="activeTabs != 'scjg'"
         >
-          <Scjg
-            :activeTabs="activeTabs"
-            :scjgObj="scjgObj"
-            :jgTable="jgTable"
-          ></Scjg
+          <Scjg :scjgObj="scjgObj" :jgTable="jgTable" ref="scjg"></Scjg
         ></el-tab-pane>
       </el-tabs>
     </div>
@@ -93,6 +89,13 @@ export default {
       this[name] = updata;
     },
   },
+  watch: {
+    activeTabs(newValue) {
+      if (newValue != "hgxfx") this.$refs.scjg.reset();
+      else if (newValue != "lsju") this.$refs.scjg.reset();
+      else if (newValue != "scjg") this.$refs.scjg.reset();
+    },
+  },
 };
 </script>