From a1640b0c9fff81dfc7f9d2411891fcfc662fe9fd Mon Sep 17 00:00:00 2001
From: chenzeping <ChenZeping02609@163.com>
Date: 星期一, 19 四月 2021 21:09:47 +0800
Subject: [PATCH] 管线分析及弹框问题
---
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue | 42 +++++++++++++++++++++++++-----------------
1 files changed, 25 insertions(+), 17 deletions(-)
diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
index 67f5666..e5fd270 100644
--- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
+++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -16,7 +16,7 @@
<el-button type="primary" @click="linkClear" size="mini" style="margin-bottom: 5px;"
title="鏍规嵁璧峰銆佺粨鏉熺娈佃繘琛岃繛閫氭�у垎鏋�">娓呴櫎
</el-button>
- <el-scrollbar style="height:400px">
+ <el-scrollbar style="height:450px">
<el-card shadow="hover"> <!-- style="height: 300px"-->
<span class="clearfixs">璧峰绠℃</span>
<el-table
@@ -293,9 +293,7 @@
</template>
</el-table-column>
</el-table>
-
<span>鍒嗘瀽缁撴灉</span>
- <!-- </div>-->
<el-table
highlight-current-row
max-height="200"
@@ -337,7 +335,6 @@
</el-table-column>
</el-table>
-
</el-tab-pane>
<el-tab-pane label="妯柇闈�" name="fourth">
<el-button type="primary" @click="drawLine" size="mini" style="margin-bottom: 5px;" title="鍦板浘涓婄粯鍒惰杩涜鍒嗘瀽鎴柇闈㈢殑绾�">
@@ -414,8 +411,11 @@
// 杩為�氭��
linkType: 1, // 1 杩為�氭�ц捣濮嬬娈� 0 杩為�氭�х粨鏉熺娈� 鐢ㄦ潵鍒ゆ柇鏄偣鍑讳簡璧峰 杩樻槸缁撴潫绠℃
+ // 璧峰绠℃琛ㄦ牸鏁版嵁
tableDataLinkStart: [],
+ // 缁撴潫绠℃琛ㄦ牸鏁版嵁
tableDataLinkEnd: [],
+ // 杩為�氭�у垎鏋愮粨鏋滆〃鏍�
tableDataLinkResult: [],
currentSelectStart: null,
@@ -545,6 +545,7 @@
},
// 杩為�氭�ф煡璇�
async linkQuery () {
+ // 璁剧疆鍒嗘瀽缁撴灉涓虹┖
this.tableDataLinkResult = []
if (this.linkPipeline.length > 1) {
this.linkPipeline.forEach((itm) => {
@@ -552,6 +553,7 @@
})
this.linkPipeline = []
}
+ // 鍒ゆ柇 濡傛灉璧峰绠℃ 缁撴潫绠℃娌℃湁鏁版嵁 鍒欒繑鍥瀎alse 鎻愮ず杩樻湭閫夋嫨璧峰/缁撴潫绠℃
if (this.currentSelectStart === null || this.currentSelectEnd === null) {
this.$message('璇烽�夋嫨璧峰绠℃鍜岀粨鏉熺娈�')
return false
@@ -563,7 +565,7 @@
}
// 璇锋眰鎺ュ彛鍜屾暟鎹�
const res = await mapApi.findConnectedPipelines(param)
- // 鍒ゆ柇鏁版嵁缁撴灉
+ // 鍒ゆ柇鏁版嵁缁撴灉 === 0 鍒欐病鏈夎姹傚埌鏁版嵁
if (res.data.length === 0) {
this.$message('娌℃湁鎵惧埌杩為�氱殑绠℃')
this.currentLinkIsTrue = '涓嶈繛閫�'
@@ -619,15 +621,16 @@
}
},
- lxResultSelect () {
+ // 娴佸悜鍒嗘瀽缁撴灉table鍒楄〃鏁版嵁鐐瑰嚮
+ lxResultSelect (e) {
console.log('杩為�氭�у垎鏋愮粨鏋滃垪琛ㄧ偣鍑�')
- // console.log(e)
+ console.log(e)
// const geom = JSON.parse(e.geomText)
- if (this.currentSelectResultLine != null) {
- this.currentSelectResultLine.remove()
- this.currentSelectResultLine = null
- }
+ // if (this.currentSelectResultLine != null) {
+ // this.currentSelectResultLine.remove()
+ // this.currentSelectResultLine = null
+ // }
// this.currentSelectResultLine = L.geoJSON(geom, {
// style: function (feature) {
// return { color: 'rgba(0,250,255,.6)' }
@@ -635,7 +638,9 @@
// }).addTo(this.map)
// this.map.panInsideBounds(this.currentSelectResultLine.getBounds())
},
+ // 鐐瑰嚮鏄剧ず娴佸悜 table鍒楄〃鏁版嵁
async lxQuery (e) {
+ console.log(e)
this.clearLinkPipe()
// const param = {
// lineNodeID: e.startpoint
@@ -667,6 +672,14 @@
// // this.linkPipeline.push(line)
// })
},
+ // 娓呴櫎娴佸悜
+ clearLX () {
+ if (this.flowPipeLine != null) {
+ this.flowPipeLine.remove()
+ this.flowPipeLine = null
+ }
+ },
+
// 鐖嗙 ===> 閫夋嫨绠℃
bgClick () {
this.selectPipeLine()
@@ -798,6 +811,7 @@
// }
// this.flowPipeLine = main.createFlowLine(param)
},
+
clearLinkPipe () {
if (this.linkPipeline.length > 0) {
this.linkPipeline.forEach((itm, idx) => {
@@ -805,12 +819,6 @@
})
}
this.linkPipeline = []
- },
- clearLX () {
- if (this.flowPipeLine != null) {
- this.flowPipeLine.remove()
- this.flowPipeLine = null
- }
},
lxHandleClick2 (e) {
console.log('閫嗘祦鍚戞樉绀�')
--
Gitblit v1.8.0