From bb588bddeaee7ea617f8ad019ba9f5e1825d9e27 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期五, 21 五月 2021 14:39:21 +0800
Subject: [PATCH] 管线分析横断面数据图表展示
---
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue | 49 +++++++++++++++++++++++++++++++++++++------------
1 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue
index caaf56b..9addf11 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 () {
@@ -171,7 +192,11 @@
const geom = JSON.parse(itm.geomText)
const points = []
geom.coordinates.forEach((it, id) => {
- points.push(it.reverse())
+ const item = it.reverse()
+ if (it.length > 2) {
+ item.shift()
+ }
+ points.push(item)
})
linkPipe.push(points)
})
--
Gitblit v1.8.0