|
@@ -308,18 +308,18 @@ export default {
|
|
|
lng: this.longitude,
|
|
|
lat: this.latitude,
|
|
|
icon: 'marker',
|
|
|
- bindPopupHtml: '定位',
|
|
|
+ bindPopupHtml: '搜索点位',
|
|
|
click: '',
|
|
|
parameter: '',
|
|
|
keepBindPopup: false,
|
|
|
isAggregation: false
|
|
|
}]
|
|
|
let that = this
|
|
|
- getNearEvent(this.longitude, this.latitude).then(res => {
|
|
|
+ getNearEvent(that.longitude, that.latitude).then(res => {
|
|
|
that.markersList = []
|
|
|
that.eventList = res.data
|
|
|
- if (this.eventList != null && this.eventList.length > 0) {
|
|
|
- for (let i = 0; i < this.eventList.length; i++) {
|
|
|
+ if (that.eventList != null && that.eventList.length > 0) {
|
|
|
+ for (let i = 0; i < that.eventList.length; i++) {
|
|
|
let markersMap = {
|
|
|
lng: 124.59,
|
|
|
lat: 43.02,
|
|
@@ -330,58 +330,58 @@ export default {
|
|
|
keepBindPopup: false,
|
|
|
isAggregation: false
|
|
|
}
|
|
|
- if (this.eventList.length > 200) {
|
|
|
+ if (that.eventList.length > 200) {
|
|
|
markersMap.isAggregation = true
|
|
|
}
|
|
|
- if (this.eventList[i].eventStatusValue == 'forest_event_status_1') {
|
|
|
+ if (that.eventList[i].eventStatusValue == 'forest_event_status_1') {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-xinshangbao'
|
|
|
}
|
|
|
- if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
|
|
|
+ if (that.eventList[i].eventStatusValue == 'forest_event_status_1' && that.eventList[i].urgeCount > 0) {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-cuiban'
|
|
|
- } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
|
|
|
+ } else if (that.eventList[i].eventStatusValue == 'forest_event_status_2') {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-qianshou'
|
|
|
markersMap.isAggregation = false
|
|
|
- } else if (this.eventList[i].eventStatusValue == 'forest_event_status_5') {
|
|
|
+ } else if (that.eventList[i].eventStatusValue == 'forest_event_status_5') {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-banjie'
|
|
|
markersMap.isAggregation = false
|
|
|
- } else if (this.eventList[i].eventStatusValue == 'forest_event_status_6') {
|
|
|
+ } else if (that.eventList[i].eventStatusValue == 'forest_event_status_6') {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-guidang'
|
|
|
}
|
|
|
- markersMap.parameter = this.eventList[i].eventCode
|
|
|
- markersMap.lng = this.eventList[i].longitude
|
|
|
- markersMap.lat = this.eventList[i].latitude
|
|
|
+ markersMap.parameter = that.eventList[i].eventCode
|
|
|
+ markersMap.lng = that.eventList[i].longitude
|
|
|
+ markersMap.lat = that.eventList[i].latitude
|
|
|
markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
'<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
|
- ' <h4>经纬度:' + this.eventList[i].longitude + ',' + this.eventList[i].latitude + '</h4>' +
|
|
|
+ ' <h4>经纬度:' + that.eventList[i].longitude + ',' + that.eventList[i].latitude + '</h4>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>' +
|
|
|
'<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
|
- ' <h4>事件名称:' + this.eventList[i].eventName + '</h4>' +
|
|
|
+ ' <h4>事件名称:' + that.eventList[i].eventName + '</h4>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>' +
|
|
|
'<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
|
- ' <h4>事件时间:' + this.eventList[i].reportTime + '</h4>' +
|
|
|
+ ' <h4>事件时间:' + that.eventList[i].reportTime + '</h4>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>'
|
|
|
- if(this.eventList[i].pictureType=='image'&&this.eventList[i].picturePath != null && this.eventList[i].picturePath != ''){
|
|
|
+ if(that.eventList[i].pictureType=='image'&&that.eventList[i].picturePath != null && that.eventList[i].picturePath != ''){
|
|
|
markersMap.bindPopupHtml += '<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
|
- '<img src="' + this.eventList[i].picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
+ '<img src="' + that.eventList[i].picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>'
|
|
@@ -393,12 +393,14 @@ export default {
|
|
|
that.$refs.eventLocationSupermap.clearM(false)
|
|
|
that.$refs.eventLocationSupermap.clearM(true)
|
|
|
that.$refs.eventLocationSupermap.setMarkers(that.markersList)
|
|
|
- }, 2000)
|
|
|
+ that.$refs.eventLocationSupermap.setMarkers(marker)
|
|
|
+ }, 1000)
|
|
|
} else {
|
|
|
setTimeout(() => {
|
|
|
that.$refs.eventLocationSupermap.clearM(false)
|
|
|
that.$refs.eventLocationSupermap.clearM(true)
|
|
|
- }, 2000)
|
|
|
+ that.$refs.eventLocationSupermap.setMarkers(marker)
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -406,8 +408,8 @@ export default {
|
|
|
let that = this
|
|
|
that.$refs.eventLocationSupermap.controlLevel(8)
|
|
|
let marker = [{
|
|
|
- lng: this.longitude,
|
|
|
- lat: this.latitude,
|
|
|
+ lng: that.longitude,
|
|
|
+ lat: that.latitude,
|
|
|
icon: 'marker',
|
|
|
bindPopupHtml: '定位',
|
|
|
click: '',
|
|
@@ -416,13 +418,13 @@ export default {
|
|
|
isAggregation: false
|
|
|
}]
|
|
|
if (tab.name == 'monitor') {
|
|
|
- if (this.longitude == null || this.longitude == '' || this.latitude == null || this.latitude == '') {
|
|
|
- this.$modal.msgError('请输入经纬度!')
|
|
|
+ if (that.longitude == null || that.longitude == '' || that.latitude == null || that.latitude == '') {
|
|
|
+ that.$modal.msgError('请输入经纬度!')
|
|
|
return
|
|
|
}
|
|
|
that.cameraMarkersList = []
|
|
|
that.cameraList = []
|
|
|
- getNearCamera(this.longitude, this.latitude).then(res => {
|
|
|
+ getNearCamera(that.longitude, that.latitude).then(res => {
|
|
|
//根据设备类型查看列表
|
|
|
that.cameraList = res.data
|
|
|
|
|
@@ -479,12 +481,18 @@ export default {
|
|
|
' </div>' +
|
|
|
' </span>' +
|
|
|
'</div>'
|
|
|
- this.cameraMarkersList.push(markersMap)
|
|
|
+ that.cameraMarkersList.push(markersMap)
|
|
|
}
|
|
|
setTimeout(() => {
|
|
|
that.$refs.eventLocationSupermap.clearM(true)
|
|
|
that.$refs.eventLocationSupermap.clearM(false)
|
|
|
- that.$refs.eventLocationSupermap.setMarkersRadius(this.cameraMarkersList)
|
|
|
+ that.$refs.eventLocationSupermap.setMarkersRadius(that.cameraMarkersList)
|
|
|
+ that.$refs.eventLocationSupermap.setMarkers(marker)
|
|
|
+ }, 1000)
|
|
|
+ }else{
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$refs.eventLocationSupermap.clearM(true)
|
|
|
+ that.$refs.eventLocationSupermap.clearM(false)
|
|
|
that.$refs.eventLocationSupermap.setMarkers(marker)
|
|
|
}, 1000)
|
|
|
}
|