From f425c4dd7d48529f7f2e50bba8188463f8d60ee2 Mon Sep 17 00:00:00 2001
From: 徐旺旺 <11530253@qq.com>
Date: 星期五, 21 五月 2021 11:35:06 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop
---
/dev/null | 54 ------------------
src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue | 7 +
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue | 39 +++++++++---
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue | 43 ++++++++++---
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js | 11 +++
src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue | 15 +++-
src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue | 5 -
7 files changed, 89 insertions(+), 85 deletions(-)
diff --git a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
index 8db99ba..fdad5d6 100644
--- a/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
+++ b/src/components/panel/topicSearch/EnterpriseEmergency/ResourcesQuery.vue
@@ -44,9 +44,11 @@
:class="activeNum===index?'hover':''" @click="handleLocation(item,index)">
<img class="state" :src="getImgSrc(item.properties.type)" style="background: none"/>
<h3>{{changeAmount}}绫诲瀷:{{item.properties.type}}</h3>
- <h5>{{changeAmount}}鍚嶇О:{{item.properties.companyname}}</h5>
+ <h5>{{changeAmount}}鍚嶇О:{{item.properties.name}}</h5>
<p>璐熻矗浜�:<span>{{item.properties.resperson}}</span></p>
<p>鐢佃瘽:<span>{{item.properties.telephone}}</span></p>
+ <p v-if="item.properties.address">鍦板潃:<span>{{item.properties.address}}</span></p>
+ <p v-else>鍦板潃:<span>{{item.properties.adminzonename}}</span></p>
</div>
</el-scrollbar>
</div>
@@ -131,12 +133,13 @@
this.wfsHelper.clearFilter()
this.wfsHelper.setTypeName(['sewer:emergency'])
this.wfsHelper.setMaxFeatures(100)
+ // form琛ㄥ崟閫夋嫨鎼滅储
if (this.form.dataType) {
this.wfsHelper.addEquals('orgname', '\'' + this.form.eventName + '\'')
this.wfsHelper.addEquals('type', '\'' + this.form.dataType.name + '\'')
}
+ // 鎼滅储妗唊eyword
if (this.form.keyword) {
- this.wfsHelper.setFilter(this.form.keyword)
this.wfsHelper.addLike('name', this.form.keyword)
}
const res = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
index 918f08e..a0c7fce 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/CrossSectional.vue
@@ -12,7 +12,7 @@
<el-table-column prop="mediumtype" label="浠嬭川绫诲瀷" :show-overflow-tooltip="true"></el-table-column>
<el-table-column prop="x" label="鏂潰(缁忓害)" :show-overflow-tooltip="true" width="80"></el-table-column>
<el-table-column prop="y" label="鏂潰(绾害)" :show-overflow-tooltip="true" width="80"></el-table-column>
- <el-table-column prop="z" label="鏂潰(楂樼▼)" :show-overflow-tooltip="true" width="80"></el-table-column>
+ <el-table-column prop="z" label="鏂潰楂樼▼(m)" :show-overflow-tooltip="true" width="80"></el-table-column>
<el-table-column prop="spacing" label="闂磋窛(m)" width="80"></el-table-column>
</el-table>
<span class="fixed-style">鏂潰鍥�</span>
@@ -47,6 +47,13 @@
// 浣跨敤 DrwLine鏂规硶
eventBus.$on('draw-hdm-line', (points) => {
this.getHdmPoint(points)
+ })
+ this.$nextTick(() => {
+ eventBus.$on('tabData-change', (obj) => {
+ if (obj) {
+ this.jdmClear()
+ }
+ })
})
},
methods: {
@@ -86,9 +93,9 @@
for (let i = 0; i < dataPoint.length; i++) {
const obj = {
mediumtype: dataPoint[i].pipelines.extraData.mediumtype,
- x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(4),
- y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(4),
- z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(4),
+ x: parseFloat(dataPoint[i].crossPoint3D.x).toFixed(8),
+ y: parseFloat(dataPoint[i].crossPoint3D.y).toFixed(8),
+ z: parseFloat(dataPoint[i].crossPoint3D.z).toFixed(2),
spacing: spacingList[i - 1]
}
this.tableData.push(obj)
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js
deleted file mode 100644
index 386bdb3..0000000
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/DrawLine.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import L from 'leaflet'
-import eventBus from '../../../../../eventBus'
-
-class DrawLine {
- constructor (map) {
- this.points = []
- this.color = 'red'
- this.layers = L.layerGroup()
- this.polyline = null
- this.marker = null
- this.points = []
- this.polyline = null
- this.marker = null
- this.map = map
- }
-
- init = () => {
- this.map.on('click', this.click)
- this.map.on('mousemove', this.mousemove)
- this.map.on('dblclick', this.dbClick)
- }
-
- click = (e) => {
- this.map.doubleClickZoom.disable()
- this.points.push(e.latlng)
- if (this.points.length > 1) {
- this.dbClick()
- }
- }
-
- mousemove = (e) => {
- this.points.push(e.latlng)
- if (this.polyline) { this.map.removeLayer(this.polyline) }
- this.polyline = L.polyline(this.points, { showMeasurements: false, color: 'red' })
- this.polyline.addTo(this.layers)
- this.layers.addTo(this.map)
- this.points.pop()
- }
-
- dbClick = (e) => {
- this.polyline.addTo(this.layers)
- this.map.off('click', this.click).off('mousemove', this.mousemove).off('dblclick', this.dbClick)
- eventBus.$emit('draw-hdm-line', this.points)
- }
-
- destory () {
- if (this.polyline) { this.map.removeLayer(this.polyline) }
- if (this.marker) { this.marker.remove() }
- this.points = []
- this.layers.clearLayers()
- }
-}
-
-export default DrawLine
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
index f32daad..aead8c4 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Flow.vue
@@ -39,6 +39,7 @@
<script>
import mapApi from '../../../../../api/mapApi'
import { createFlowLine } from './PublicWay'
+import eventBus from '../../../../../eventBus'
export default {
name: 'Flow',
@@ -48,27 +49,43 @@
tableDataLiuxiang: [],
// 娴佸悜 鍒嗘瀽缁撴灉 鐨則able琛ㄦ牸鏁版嵁
lxTableDataResult: [],
- linkPipeline: []
+ linkPipeline: [],
+ currentSelectResultLine: null
}
+ },
+ mounted () {
+ this.$nextTick(() => {
+ eventBus.$on('tabData-change', (obj) => {
+ if (obj) {
+ this.handleClick()
+ }
+ })
+ })
},
methods: {
// tab鍒囨崲
- handleClick (tab, event) {
- console.log(event)
- // console.log(tab)
- this.clearLinkPipe()
+ handleClick () {
this.clearLX()
this.linkClear()
- this.jdmClear()
- this.currentLinkIsTrue = ''
- 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
+ }
},
// 瀹氫綅鏂规硶浜嬩欢
linkResultSelect (e) {
@@ -145,7 +162,7 @@
},
// 鐐瑰嚮鏄剧ず娴佸悜 table鍒楄〃涓殑鏁版嵁 => 杩涜瀹樼綉娴佸悜鐨勬樉绀�
async lxQuery (e) {
- console.log(e)
+ // console.log(e)
this.clearLinkPipe()
const param = {
// lineNodeID: e.startpoint
@@ -182,6 +199,10 @@
this.flowPipeLine.remove()
this.flowPipeLine = null
}
+ if (this.currentSelectResultLine != null) {
+ this.currentSelectResultLine.remove()
+ this.currentSelectResultLine = null
+ }
}
}
}
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
index 933302b..81573d0 100644
--- a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
+++ b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/PublicWay.js
@@ -1,5 +1,16 @@
+export function selectPipeLine () {
+ window.map.on('click', this.selectClick)
+}
+
export function createFlowLine (param) {
const flowLine = window.L.polyline(param.points, param.option)
flowLine.addTo(window.map)
return flowLine
}
+
+export function linkClear (linkClear) {
+ if (this.linkClear != null) {
+ this.linkClear.remove()
+ this.linkClear = null
+ }
+}
diff --git a/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue b/src/components/panel/topicSearch/SewersSelect/AnalysisChoose/Tube.vue
index 5f49873..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,26 +59,38 @@
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
}
},
// 鍦板浘涓婄偣鍑�
@@ -113,6 +126,10 @@
})
}
this.linkPipeline = []
+ if (this.currentSelectEndLine != null) {
+ this.currentSelectEndLine.remove()
+ this.currentSelectEndLine = null
+ }
},
// 鐖嗙 ===> 閫夋嫨绠℃
bgClick () {
diff --git a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
index b163263..dba9bd3 100644
--- a/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
+++ b/src/components/panel/topicSearch/SewersSelect/SewersAnalysis.vue
@@ -36,13 +36,12 @@
return {
// 鍦板浘鐐瑰嚮绫诲瀷 first杩為�氭�х偣鍑� second鐖嗙鐐瑰嚮 third娴佸悜鐐瑰嚮 fourth妯柇闈�
activeName: 'first',
- tableData: false,
- tableDataList: []
+ tableData: false
}
},
methods: {
// tab鍒囨崲
- handleClick (tab, event) {
+ handleClick () {
eventBus.$emit('tabData-change', true)
}
}
--
Gitblit v1.8.0