From 4d265afb3419bd5cedc6f31ab78d570f6917b520 Mon Sep 17 00:00:00 2001
From: seatonwan9 <seatonwan9@163.com>
Date: 星期五, 21 五月 2021 14:30:44 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue |   43 ++++++++++++++++++++++++++++++++-----------
 1 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
index f32daad..aead8c4 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
@@ -39,6 +39,7 @@
 <script>
 import mapApi from '../../../../../api/mapApi'
 import { createFlowLine } from './PublicWay'
+import eventBus from '../../../../../eventBus'
 
 export default {
   name: 'Flow',
@@ -48,27 +49,43 @@
       tableDataLiuxiang: [],
       // 娴佸悜 鍒嗘瀽缁撴灉 鐨則able琛ㄦ牸鏁版嵁
       lxTableDataResult: [],
-      linkPipeline: []
+      linkPipeline: [],
+      currentSelectResultLine: null
     }
+  },
+  mounted () {
+    this.$nextTick(() => {
+      eventBus.$on('tabData-change', (obj) => {
+        if (obj) {
+          this.handleClick()
+        }
+      })
+    })
   },
   methods: {
     // tab鍒囨崲
-    handleClick (tab, event) {
-      console.log(event)
-      // console.log(tab)
-      this.clearLinkPipe()
+    handleClick () {
       this.clearLX()
       this.linkClear()
-      this.jdmClear()
-      this.currentLinkIsTrue = ''
-      this.bgFm = []
-      this.bgPipeLine = []
-      this.tableData = []
       this.tableDataLiuxiang = []
       this.tableDataLinkStart = []
       this.tableDataLinkEnd = []
       this.tableDataLinkResult = []
       this.lxTableDataResult = []
+    },
+    linkClear () {
+      if (this.currentSelectStartLine != null) {
+        this.currentSelectStartLine.remove()
+        this.currentSelectStartLine = null
+      }
+      if (this.currentSelectEndLine != null) {
+        this.currentSelectEndLine.remove()
+        this.currentSelectEndLine = null
+      }
+      if (this.currentSelectResultLine != null) {
+        this.currentSelectResultLine.remove()
+        this.currentSelectResultLine = null
+      }
     },
     // 瀹氫綅鏂规硶浜嬩欢
     linkResultSelect (e) {
@@ -145,7 +162,7 @@
     },
     // 鐐瑰嚮鏄剧ず娴佸悜 table鍒楄〃涓殑鏁版嵁 => 杩涜瀹樼綉娴佸悜鐨勬樉绀�
     async lxQuery (e) {
-      console.log(e)
+      // console.log(e)
       this.clearLinkPipe()
       const param = {
         // lineNodeID: e.startpoint
@@ -182,6 +199,10 @@
         this.flowPipeLine.remove()
         this.flowPipeLine = null
       }
+      if (this.currentSelectResultLine != null) {
+        this.currentSelectResultLine.remove()
+        this.currentSelectResultLine = null
+      }
     }
   }
 }

--
Gitblit v1.8.0