From 95aff9b8753b0c916937af0621d30391cd325e54 Mon Sep 17 00:00:00 2001
From: 陈泽平 <chenzeping>
Date: 星期五, 28 五月 2021 17:06:40 +0800
Subject: [PATCH] 企业应急-事件上报-经纬度定位
---
src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue | 3 ++-
src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue | 4 ++--
src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue | 12 ++++++++++++
3 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
index 7e8c447..3e8e096 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocation.vue
@@ -37,6 +37,8 @@
import ReportLocationSection from './ReportLocationSection'
import ReportLocationSearch from './ReportLocationSearch'
+import iconUrl from '../../../../../public/assets/images/map/loc.png'
+
export default {
name: 'ReportLocation',
components: {
@@ -82,6 +84,16 @@
console.log(e)
this.LongLatPos.longPos = e.latlng.lng
this.LongLatPos.latPos = e.latlng.lat
+ const as = [e.latlng.lat, e.latlng.lng]
+ // console.log(as)
+ const marker = window.L.marker(as, {
+ icon: window.L.icon({
+ iconUrl: iconUrl,
+ iconSize: [30, 30],
+ iconAnchor: [15, 15]
+ })
+ })
+ window.map.addLayer(marker)
},
// 鑾峰緱鐒︾偣 杩涜瀹氫綅
focusLocation () {
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
index 77ed826..3bb4744 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSearch.vue
@@ -12,7 +12,7 @@
<script>
import { reportLocationSearch } from '../../../../api/request'
-// import { pulseEffect } from '../../../../utils/utils'
+import { pulseEffect } from '../../../../utils/utils'
export default {
name: 'ReportLocationSearch',
data () {
@@ -45,6 +45,7 @@
// console.log(res)
const as = res.pois[0].lonlat.trim().split(' ')
window.map.setView([as[1], as[0]], 17)
+ pulseEffect([as[1], as[0]])
// for (let i = 0; i < res.pois.length; i++) {
// const as = res.pois[i].lonlat.trim().split(' ')
// window.map.flyTo([as[0], as[1]], 16)
diff --git a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
index 3b46417..a468238 100644
--- a/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
+++ b/src/components/base-page/enterprise-emergency/events-reported/ReportLocationSection.vue
@@ -202,11 +202,11 @@
this.wfsHelper = new WfsHelper()
// 闄勫睘璁炬柦鏌ヨ
this.tableDataAffFac = []
- const AffFacSearch = val.properties.mediumtype
+ const AffFacSearch = val.properties.pipecode
console.log(AffFacSearch)
this.wfsHelper.clearFilter()
this.wfsHelper.setTypeName(['sewer:view_pipeline'])
- this.wfsHelper.addLike('type', AffFacSearch)
+ this.wfsHelper.addLike('code', AffFacSearch)
// this.wfsHelper.addEquals('type', '\'' + AffFacSearch + '\'')
const resAffFac = await AjaxUtils.GetDataAsynByUrl(this.wfsHelper.getUrl(), {})
console.log(resAffFac)
--
Gitblit v1.8.0