From 1f619887452d6c0faaf4c509b9e1725a02db990c Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期五, 21 五月 2021 14:59:57 +0800
Subject: [PATCH] 企业应急搜索setTypeName更改
---
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Connectivity.vue | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Connectivity.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Connectivity.vue
index 3d4167b..623cfca 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Connectivity.vue
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Connectivity.vue
@@ -56,10 +56,12 @@
<script>
import mapApi from '../../../../../api/mapApi'
+import eventBus from '../../../../../eventBus'
import { createFlowLine } from './PublicWay'
export default {
name: 'Connectivity',
+ props: ['tableData'],
data () {
return {
// 杩為�氭�� // 1 杩為�氭�ц捣濮嬬娈� 0 杩為�氭�х粨鏉熺娈� 鐢ㄦ潵鍒ゆ柇鏄偣鍑讳簡璧峰 杩樻槸缁撴潫绠℃
@@ -81,15 +83,25 @@
flowPipeLine: null
}
},
+ mounted () {
+ this.$nextTick(() => {
+ eventBus.$on('tabData-change', (obj) => {
+ if (obj) {
+ this.handleClick()
+ }
+ })
+ })
+ },
methods: {
// 鍦板浘涓婄偣鍑�
selectPipeLine () {
+ // window.mapManager.clickDialogSwitch = false
window.map.on('click', this.selectClick)
- // 鍏抽棴寮圭獥
- window.layerFactory.clickSwitch = false
+ // window.mapManager.clickDialogSwitch = true
},
// 鍦板浘涓婄偣鍑诲洖璋�
selectClick (e) {
+ // console.log(e)
window.map.off('click', this.selectClick)
const point = [e.latlng.lng, e.latlng.lat]
this.getPipeLine(point)
@@ -103,7 +115,7 @@
}
// 鏍规嵁鍙傛暟璇锋眰鎺ュ彛鏁版嵁
const res = await mapApi.findPipelineByClickPoint(param)
- // console.log(res)
+ console.log(res)
if (this.linkType === 1) {
this.tableDataLinkStart = res.data
} else {
@@ -112,7 +124,6 @@
},
// 杩為�氭�� ===> 鍦板浘鐐瑰嚮璧峰绠℃e
linkClickStart (e) {
- // console.log('鍦板浘鐐瑰嚮璧峰绠℃')
this.linkType = 1
this.selectPipeLine()
},
@@ -203,7 +214,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