From a2cf1dafa47139ef92135376db24ece72d2b51d2 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期一, 17 五月 2021 17:19:41 +0800
Subject: [PATCH] 管线分析
---
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js | 432 -----------------------------------------------------
1 files changed, 5 insertions(+), 427 deletions(-)
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
index 63d8e26..933302b 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
@@ -1,427 +1,5 @@
-// export default {
-// handleClick (tab, event) {
-// console.log(tab, event)
-// this.clearLinkPipe()
-// this.clearLX()
-// this.linkClear()
-// this.jdmClear()
-// this.bgFm = []
-// this.bgPipeLine = []
-// this.tableData = []
-// this.tableDataLiuxiang = []
-// this.tableDataLinkStart = []
-// this.tableDataLinkEnd = []
-// this.tableDataLinkResult = []
-// },
-// linkClickStart () {
-// console.log('鍦板浘鐐瑰嚮璧峰绠℃')
-// this.linkType = 1
-// this.selectPipeLine()
-// },
-// linkClickEnd () {
-// console.log('鍦板浘鐐瑰嚮缁撴潫绠℃')
-// this.linkType = 0
-// this.selectPipeLine()
-// },
-// linkSelectStart (e) {
-// console.log('閫夋嫨璧峰绠℃')
-// console.log(e)
-// this.$refs.singleTable.setCurrentRow(e)
-// this.currentSelectStart = e
-// if (this.currentSelectStartLine != null) {
-// this.currentSelectStartLine.remove()
-// this.currentSelectStartLine = null
-// }
-// const geom = JSON.parse(e.geomText)
-// this.currentSelectStartLine = L.geoJSON(geom, {
-// style: function (feature) {
-// return { color: 'rgba(0,255,0,.6)' }
-// }
-// }).addTo(this.map)
-// this.map.panInsideBounds(this.currentSelectStartLine.getBounds())
-// },
-// linkSelectEnd (e) {
-// console.log('閫夋嫨缁撴潫绠℃')
-// console.log(e)
-// this.currentSelectEnd = e
-//
-// if (this.currentSelectEndLine != null) {
-// this.currentSelectEndLine.remove()
-// this.currentSelectEndLine = null
-// }
-//
-// const geom = JSON.parse(e.geomText)
-// this.currentSelectEndLine = L.geoJSON(geom, {
-// style: function (feature) {
-// return { color: 'rgba(200,0,200,.6)' }
-// }
-// }).addTo(this.map)
-// this.map.panInsideBounds(this.currentSelectEndLine.getBounds())
-// },
-// linkResultSelect (e) {
-// console.log('杩為�氭�у垎鏋愮粨鏋滃垪琛ㄧ偣鍑�')
-// console.log(e)
-//
-// const geom = JSON.parse(e.geomText)
-// if (this.currentSelectResultLine != null) {
-// this.currentSelectResultLine.remove()
-// this.currentSelectResultLine = null
-// }
-// this.currentSelectResultLine = L.geoJSON(geom, {
-// style: function (feature) {
-// return {
-// color: 'rgba(255,0,0,.6)',
-// weight: 6
-// }
-// }
-// }).addTo(this.map)
-// this.map.panInsideBounds(this.currentSelectResultLine.getBounds())
-// },
-// // 杩為�氭�ф煡璇�
-// async linkQuery () {
-// this.tableDataLinkResult = []
-// if (this.linkPipeline.length > 1) {
-// this.linkPipeline.forEach((itm) => {
-// itm.remove()
-// })
-// this.linkPipeline = []
-// }
-// if (this.currentSelectStart === null || this.currentSelectEnd === null) {
-// this.$message('璇烽�夋嫨璧峰绠℃鍜岀粨鏉熺娈�')
-// return
-// }
-// const param = {
-// startLineID: this.currentSelectStart.id,
-// endLineID: this.currentSelectEnd.id
-// }
-//
-// const res = await api.findConnectedPipelines(param)
-//
-// if (res.data.length === 0) {
-// this.$message('娌℃湁鎵惧埌杩為�氱殑绠℃')
-// this.currentLinkIsTrue = '涓嶈繛閫�'
-// return
-// }
-// this.tableDataLinkResult = res.data
-// this.currentLinkIsTrue = '杩為��'
-// const linkPipe = []
-// res.data.forEach((itm, idx) => {
-// const geom = JSON.parse(itm.geomText)
-// const points = []
-// geom.coordinates.forEach((it, id) => {
-// points.push(it.reverse())
-// })
-//
-// linkPipe.push(points)
-// })
-//
-// linkPipe.forEach((itm, idx) => {
-// const param1 = {
-// points: itm,
-// option: {
-// dashArray: '15 15',
-// dashSpeed: -30,
-// color: '#ffff00'
-// }
-// }
-// const line = main.createFlowLine(param1)
-// this.linkPipeline.push(line)
-// })
-// },
-//
-// 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
-// }
-// if (this.bgMarker != null) {
-// this.bgMarker.remove()
-// this.bgMarker = null
-// }
-// },
-// lxResultSelect () {
-// console.log('杩為�氭�у垎鏋愮粨鏋滃垪琛ㄧ偣鍑�')
-// console.log(e)
-//
-// const geom = JSON.parse(e.geomText)
-// 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)' }
-// }
-// }).addTo(this.map)
-// this.map.panInsideBounds(this.currentSelectResultLine.getBounds())
-// },
-// async lxQuery (e) {
-// this.clearLinkPipe()
-// const param = {
-// lineNodeID: e.startpoint
-// }
-// const res = await api.findFlowDirection(param)
-//
-// this.lxTableDataResult = res.data
-// const linkPipe = []
-// res.data.forEach((itm, idx) => {
-// const geom = JSON.parse(itm.geomText)
-// const points = []
-// geom.coordinates.forEach((it, id) => {
-// points.push(it.reverse())
-// })
-//
-// linkPipe.push(points)
-// })
-//
-// linkPipe.forEach((itm, idx) => {
-// const param1 = {
-// points: itm,
-// option: {
-// dashArray: '15 15',
-// dashSpeed: -30,
-// color: '#ffff00'
-// }
-// }
-// const line = main.createFlowLine(param1)
-// this.linkPipeline.push(line)
-// })
-// },
-//
-// bgClick () {
-// this.selectPipeLine()
-// },
-// async bgSelect (e) {
-// console.log('閫夋嫨鐖嗙绠℃')
-// console.log(e)
-// this.bgFm = []
-// if (this.bgMarker != null) {
-// this.bgMarker.remove()
-// this.bgMarker = null
-// }
-//
-// if (this.currentSelectEndLine != null) {
-// this.currentSelectEndLine.remove()
-// this.currentSelectEndLine = null
-// }
-// this.clearLinkPipe()
-// const geom = JSON.parse(e.geomText)
-// this.currentSelectEndLine = L.geoJSON(geom, {
-// style: function (feature) {
-// return { color: 'rgba(200,0,200,.6)' }
-// }
-// }).addTo(this.map)
-// this.map.panInsideBounds(this.currentSelectEndLine.getBounds())
-//
-// const param = {
-// lineID: e.id
-// }
-// const res = await api.findLeakages(param)
-// console.log(res)
-//
-// const len = res.data.length
-// if (len === 0) {
-// this.$message('鏈壘鍒伴渶瑕佸叧闂殑闃�闂�')
-//
-// return
-// }
-// res.data.reverse()
-// this.bgFm = res.data
-//
-// this.bgPoint = res.data[0].startControlPoint
-//
-// const point = JSON.parse(this.bgPoint.geomText)
-//
-// const p = [point.coordinates[1], point.coordinates[0]]
-//
-// this.bgMarker = main.createFlowMarker(p)
-// this.bgMarker.bindTooltip(this.bgPoint.pointnumbe)
-// this.bgMarker.addTo(this.map)
-// this.map.flyTo(p)
-//
-// const linkPipe = []
-// res.data.forEach((itm, idx) => {
-// const geom = JSON.parse(itm.geomText)
-// const points = []
-// geom.coordinates.forEach((it, id) => {
-// points.push(it.reverse())
-// })
-//
-// linkPipe.push(points)
-// })
-//
-// linkPipe.forEach((itm, idx) => {
-// const param1 = {
-// points: itm,
-// option: {
-// dashArray: '15 15',
-// dashSpeed: -30,
-// color: '#ffff00'
-// }
-// }
-// const line = main.createFlowLine(param1)
-// this.linkPipeline.push(line)
-// })
-// },
-// bgFmClick (e) {
-// console.log('鐐瑰嚮褰卞搷鐨勯榾闂�')
-// console.log(e)
-// const point = [e.data[0][0], e.data[0][1]]
-// const marker = main.createFlowMarker(point)
-// marker.addTo(this.map)
-// this.map.flyTo(point, 16)
-// },
-// // 娴佸悜鍦板浘涓婄偣鍑�
-// selectPipeLine () {
-// this.map.on('click', this.selectClick)
-// },
-// // 鍦板浘涓婄偣鍑诲洖璋�
-// selectClick (e) {
-// this.map.off('click', this.selectClick)
-// const point = [e.latlng.lng, e.latlng.lat]
-// console.log(point)
-// this.getPipeLine(point)
-// },
-//
-// // 娴佸悜鏁版嵁璇锋眰
-// async getPipeLine (point) {
-// const param = {
-// x: point[0],
-// y: point[1],
-// radius: 3
-// }
-//
-// const res = await api.getPipeline(param)
-// // 3 娴佸悜
-//
-// if (this.activeName === 'first') {
-// if (this.linkType) {
-// this.tableDataLinkStart = res.data
-// } else {
-// this.tableDataLinkEnd = res.data
-// }
-// } else if (this.activeName === 'second') {
-// this.bgPipeLine = res.data
-// } else if (this.activeName === 'third') {
-// this.tableDataLiuxiang = res.data
-// } else if (this.activeName === 'fourth') {
-//
-// }
-//
-// console.log(res)
-// },
-// // 娴佸悜-绠$嚎閫夋嫨
-// selectRowLiuXiang (e) {
-// // 閫夋嫨瑕佹樉绀虹殑娴佸悜绾�
-// console.log('閫夋嫨瑕佹樉绀虹殑娴佸悜绾�')
-// console.log(e)
-// },
-// lxHandleClick (e) {
-// console.log('姝f祦鍚戞樉绀�')
-// console.log(e)
-//
-// this.clearLX()
-// const param = {
-// points: e.data,
-// option: {
-// dashArray: '15 15',
-// dashSpeed: -30
-// }
-// }
-// this.flowPipeLine = main.createFlowLine(param)
-// },
-// clearLinkPipe () {
-// if (this.linkPipeline.length > 0) {
-// this.linkPipeline.forEach((itm, idx) => {
-// itm.remove()
-// })
-// }
-// this.linkPipeline = []
-// },
-// clearLX () {
-// if (this.flowPipeLine != null) {
-// this.flowPipeLine.remove()
-// this.flowPipeLine = null
-// }
-// },
-// lxHandleClick2 (e) {
-// console.log('閫嗘祦鍚戞樉绀�')
-// console.log(e)
-// if (this.flowPipeLine != null) {
-// this.flowPipeLine.remove()
-// this.flowPipeLine = null
-// }
-// const param = {
-// points: e.data,
-// option: {
-// dashArray: '15 15',
-// dashSpeed: 30
-// }
-// }
-// this.flowPipeLine = main.createFlowLine(param)
-// },
-// // 妯柇闈㈡暟鎹姹�
-// async getHdmPoint (line) {
-// console.log('妯柇闈㈢殑缁樺埗绾�')
-// console.table(line)
-// this.hdmParam = {
-// x1: line[0].lng,
-// y1: line[0].lat,
-// x2: line[1].lng,
-// y2: line[1].lat
-// }
-// },
-// // 妯柇闈㈤�夋嫨鍚� 鍥捐〃灞曠ず
-// async selectRow (e) {
-// console.log(e)
-// // 3. 浣跨敤鍒氭寚瀹氱殑閰嶇疆椤瑰拰鏁版嵁锛屾樉绀哄浘琛�
-//
-// const option = {
-// xAxis: {
-// type: 'category',
-// data: ['浜�1', '浜�2', '浜�3', '浜�4', '浜�5', '浜�6', '浜�7']
-// },
-// yAxis: {
-// type: 'value'
-// },
-// series: [{
-// data: [820, 932, 901, 934, 1290, 1330, 1320],
-// type: 'line'
-// }]
-// }
-//
-// this.myChartShow = true
-// this.myChart.setOption(option)
-// },
-// drawLine () {
-// console.log('drawLine')
-// if (this.measure === null) {
-// this.measure = new DrawLine(this.map)
-// }
-// this.measure.destory()
-// this.measure.init()
-// },
-// async jdmQuery () {
-// if (this.hdmParam == null) {
-// this.$message('璇峰厛鍦ㄥ湴鍥句笂缁樺埗鎴柇绾�')
-// return
-// }
-// const res = await api.getCrossSection(this.hdmParam)
-// console.log(res)
-// // debugger
-// },
-// jdmClear () {
-// this.hdmParam = null
-// if (this.measure != null) {
-// this.measure.destory()
-// }
-// }
-// }
+export function createFlowLine (param) {
+ const flowLine = window.L.polyline(param.points, param.option)
+ flowLine.addTo(window.map)
+ return flowLine
+}
--
Gitblit v1.8.0