From b187fa62b3e02d8417d73139dcf3e2271268788d Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期五, 21 五月 2021 09:00:42 +0800
Subject: [PATCH] 管线分析功能问题修改

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

diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue
index caaf56b..11ae76b 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue
@@ -46,6 +46,7 @@
 import mapApi from '../../../../../api/mapApi'
 import { pulseEffect } from '../../../../../utils/utils'
 import { createFlowLine } from './PublicWay'
+import eventBus from '../../../../../eventBus'
 
 export default {
   name: 'Tube',
@@ -58,23 +59,39 @@
       bgPipeLine: [],
       // 鐖嗙 闇�瑕佸叧闂殑闃�闂� table琛ㄦ牸鏁版嵁
       bgFm: [],
-      linkPipeline: []
+      linkPipeline: [],
+      currentSelectEndLine: null
     }
   },
+  mounted () {
+    this.$nextTick(() => {
+      eventBus.$on('tabData-change', (obj) => {
+        if (obj) {
+          this.handleClick()
+        }
+      })
+    })
+  },
   methods: {
-    handleClick (tab, event) {
-      console.log(event)
-      // console.log(tab)
+    handleClick () {
       this.clearLinkPipe()
-      this.currentLinkIsTrue = ''
+      this.linkClear()
       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
+      }
     },
     // 鍦板浘涓婄偣鍑�
     selectPipeLine () {
@@ -109,6 +126,10 @@
         })
       }
       this.linkPipeline = []
+      if (this.currentSelectEndLine != null) {
+        this.currentSelectEndLine.remove()
+        this.currentSelectEndLine = null
+      }
     },
     // 鐖嗙 ===> 閫夋嫨绠℃
     bgClick () {

--
Gitblit v1.8.0