|
@@ -274,9 +274,13 @@
|
|
|
<el-input
|
|
|
placeholder="请输入内容"
|
|
|
prefix-icon="el-icon-search"
|
|
|
- v-model="eventSearch" @change="searchEvent(eventSearch)">
|
|
|
+ v-model="eventSearch" @change="getEventList(calendarDay,10,1,eventSearch)">
|
|
|
</el-input>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <el-button type="button" @click="getEventList(calendarDay,10,pageNum-1)">上一页</el-button>
|
|
|
+ <el-button type="button" @click="getEventList(calendarDay,10,pageNum+1)">下一页</el-button>
|
|
|
+ </div>
|
|
|
<div class="d-l-con padding-box nowrap" v-for="(item,index) in eventList"
|
|
|
@click="dropLocation(item.latitude,item.longitude)" data-html2canvas-ignore>
|
|
|
<div class="bgt-img">
|
|
@@ -411,6 +415,9 @@ import {
|
|
|
getEventByReportorOrder,
|
|
|
getExposureStage
|
|
|
} from '@/api/forest'
|
|
|
+import {
|
|
|
+ getNearEvent
|
|
|
+} from '@/api/event'
|
|
|
import supermap from '@/components/supermap' //超图
|
|
|
import supermapNotProcessed from '@/components/supermap' //超图
|
|
|
import supermapProcessed from '@/components/supermap' //超图
|
|
@@ -462,10 +469,11 @@ export default {
|
|
|
this.getTodayEvents(this.getCurrentDataStr())
|
|
|
this.getDeptEventCount(this.getCurrentDataStr())
|
|
|
this.getWeather(this.getCurrentDataStr())
|
|
|
- this.getEventList(this.getCurrentDataStr())
|
|
|
+ this.getEventList(this.getCurrentDataStr(),this.pageSize,this.pageNum)
|
|
|
this.getEventByEventType(this.getCurrentDataStr())
|
|
|
this.getEventByReportorOrder(this.getCurrentDataStr())
|
|
|
this.getExposureStage(this.getCurrentDataStr())
|
|
|
+ this.getSupermap(this.getCurrentDataStr())
|
|
|
/** ----------------------------------weosocket开始------------------------------------- */
|
|
|
// this.initWebSocket()
|
|
|
/** ----------------------------------weosocket结束------------------------------------- */
|
|
@@ -474,10 +482,11 @@ export default {
|
|
|
if(this.calendarDay == this.getCurrentDataStr()){
|
|
|
this.getTodayEvents(this.getCurrentDataStr(),true);
|
|
|
this.getDeptEventCount(this.getCurrentDataStr(),true);
|
|
|
- this.getEventList(this.getCurrentDataStr(),true);
|
|
|
+ this.getEventList(this.getCurrentDataStr(),this.pageSize,this.pageNum,'',true);
|
|
|
this.getEventByEventType(this.getCurrentDataStr(),true);
|
|
|
this.getEventByReportorOrder(this.getCurrentDataStr(),true);
|
|
|
this.getExposureStage(this.getCurrentDataStr(),true);
|
|
|
+ this.getSupermap(this.getCurrentDataStr(),true);
|
|
|
}
|
|
|
}, 10000)
|
|
|
},
|
|
@@ -519,6 +528,9 @@ export default {
|
|
|
exposureStageList: [],
|
|
|
//右侧事件列表
|
|
|
eventList: [],
|
|
|
+ pageSize:10,
|
|
|
+ pageNum:1,
|
|
|
+
|
|
|
eventListnew: [],
|
|
|
eventListAll: [],
|
|
|
eventSearch: '',//事件列表搜索
|
|
@@ -555,103 +567,23 @@ export default {
|
|
|
},
|
|
|
/** ----------------------------------weosocket结束------------------------------------- */
|
|
|
methods: {
|
|
|
- searchEvent(eventSearch) {
|
|
|
- let that = this
|
|
|
- //事件列表搜索
|
|
|
- this.eventListnew = []
|
|
|
- if (eventSearch != null && eventSearch != '') {
|
|
|
- for (var i = 0; i < this.eventListAll.length; i++) {
|
|
|
- if (this.eventListAll[i].reportor.indexOf(eventSearch) > -1) {
|
|
|
- this.eventListnew.push(this.eventListAll[i])
|
|
|
- }
|
|
|
- }
|
|
|
- this.eventList = this.eventListnew
|
|
|
- } else {
|
|
|
- this.eventList = this.eventListAll
|
|
|
- }
|
|
|
- if (this.eventList != null && this.eventList.length > 0) {
|
|
|
- for (let i = 0; i < this.eventList.length; i++) {
|
|
|
- let markersMap = {
|
|
|
- lng: 124.59,
|
|
|
- lat: 43.02,
|
|
|
- icon: 'marker',
|
|
|
- bindPopupHtml: '',
|
|
|
- click: '',
|
|
|
- parameter: '',
|
|
|
- keepBindPopup: false,
|
|
|
- isAggregation: false
|
|
|
- }
|
|
|
- if (this.eventList.length > 200) {
|
|
|
- markersMap.isAggregation = true
|
|
|
- }
|
|
|
- if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
|
|
|
- markersMap.click = 'showEventDialog'
|
|
|
- markersMap.icon = 'sj-icon-map-xinshangbao'
|
|
|
- }
|
|
|
- if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
|
|
|
- markersMap.click = 'showEventDialog'
|
|
|
- markersMap.icon = 'sj-icon-map-cuiban'
|
|
|
- } else if (this.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') {
|
|
|
- markersMap.click = 'showEventDialog'
|
|
|
- markersMap.icon = 'sj-icon-map-banjie'
|
|
|
- markersMap.isAggregation = false
|
|
|
- } else if (this.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.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>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>' +
|
|
|
- '<span>' +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- ' <h4>事件名称:' + this.eventList[i].eventName + '</h4>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>' +
|
|
|
- '<span>' +
|
|
|
- ' <div class="d-l-con">' +
|
|
|
- ' <div class="d-l-l-text">' +
|
|
|
- ' <h4>事件时间:' + this.eventList[i].createTime + '</h4>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>'
|
|
|
- if(this.eventList[i].pictureType=='image'&&this.eventList[i].picturePath != null && this.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"/>' +
|
|
|
- ' </div>' +
|
|
|
- ' </div>' +
|
|
|
- ' </span>'
|
|
|
- }
|
|
|
- markersMap.bindPopupHtml += '</div>'
|
|
|
- that.markersList.push(markersMap)
|
|
|
- }
|
|
|
- setTimeout(() => {
|
|
|
- that.$refs.supermap.clearM(false)
|
|
|
- that.$refs.supermap.clearM(true)
|
|
|
- that.$refs.supermap.setMarkers(that.markersList)
|
|
|
- }, 2000)
|
|
|
- } else {
|
|
|
- setTimeout(() => {
|
|
|
- that.$refs.supermap.clearM(false)
|
|
|
- that.$refs.supermap.clearM(true)
|
|
|
- }, 2000)
|
|
|
- }
|
|
|
- },
|
|
|
+ // searchEvent(pageSize,pageNum,eventSearch) {
|
|
|
+ // this.pageSize = pageSize;
|
|
|
+ // this.pageNum = pageNum;
|
|
|
+ // let that = this
|
|
|
+ // //事件列表搜索
|
|
|
+ // this.eventList = []
|
|
|
+ // //右侧获取事件列表
|
|
|
+ // getEventList({ day: that.calendarDay,pageSize:pageSize,pageNum: pageNum ,eventName:eventSearch}).then(res => {
|
|
|
+ // this.eventList = res.data
|
|
|
+ // if (this.eventList != null && this.eventList.length > 0) {
|
|
|
+ // if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
|
|
|
+ // that.$refs.bottomMenu.updateAlert();
|
|
|
+ // that.$refs.up.play();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // },
|
|
|
dropLocation(lat, lng) {
|
|
|
this.$refs.supermap.dropLocation(lat, lng)
|
|
|
},
|
|
@@ -675,10 +607,11 @@ export default {
|
|
|
this.getTodayEvents(day)
|
|
|
this.getDeptEventCount(day)
|
|
|
this.getWeather(day)
|
|
|
- this.getEventList(day)
|
|
|
+ this.getEventList(day,10,1)
|
|
|
this.getEventByEventType(day)
|
|
|
this.getEventByReportorOrder(day)
|
|
|
this.getExposureStage(day)
|
|
|
+ this.getSupermap(day);
|
|
|
this.calendarDay = day
|
|
|
},
|
|
|
|
|
@@ -922,21 +855,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- getEventList(day,loading) {
|
|
|
+ getSupermap(day,loading){
|
|
|
let that = this
|
|
|
- this.eventList = []
|
|
|
- this.eventListAll = []
|
|
|
- //右侧获取事件列表
|
|
|
- getEventList({ day: day },loading).then(res => {
|
|
|
- this.eventList = res.data
|
|
|
- this.eventListAll = res.data
|
|
|
+ getNearEvent('','',day,loading).then(res => {
|
|
|
that.markersList = [];
|
|
|
- if (this.eventList != null && this.eventList.length > 0) {
|
|
|
- if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
|
|
|
- that.$refs.bottomMenu.updateAlert();
|
|
|
- that.$refs.up.play();
|
|
|
- }
|
|
|
- for (let i = 0; i < this.eventList.length; i++) {
|
|
|
+ if (res.data != null && res.data.length > 0) {
|
|
|
+ for (let i = 0; i < res.data.length; i++) {
|
|
|
let markersMap = {
|
|
|
lng: 124.59,
|
|
|
lat: 43.02,
|
|
@@ -947,58 +871,58 @@ export default {
|
|
|
keepBindPopup: false,
|
|
|
isAggregation: false
|
|
|
}
|
|
|
- if (this.eventList.length > 200) {
|
|
|
+ if (res.data.length > 200) {
|
|
|
markersMap.isAggregation = true
|
|
|
}
|
|
|
- if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount == 0) {
|
|
|
+ if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount == 0) {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-xinshangbao'
|
|
|
}
|
|
|
- if (this.eventList[i].eventStatusValue == 'forest_event_status_1' && this.eventList[i].urgeCount > 0) {
|
|
|
+ if (res.data[i].eventStatusValue == 'forest_event_status_1' && res.data[i].urgeCount > 0) {
|
|
|
markersMap.click = 'showEventDialog'
|
|
|
markersMap.icon = 'sj-icon-map-cuiban'
|
|
|
- } else if (this.eventList[i].eventStatusValue == 'forest_event_status_2') {
|
|
|
+ } else if (res.data[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 (res.data[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 (res.data[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 = res.data[i].eventCode
|
|
|
+ markersMap.lng = res.data[i].longitude
|
|
|
+ markersMap.lat = res.data[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>经纬度:' + res.data[i].longitude + ',' + res.data[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>事件名称:' + res.data[i].eventName + '</h4>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>' +
|
|
|
'<span>' +
|
|
|
' <div class="d-l-con">' +
|
|
|
' <div class="d-l-l-text">' +
|
|
|
- ' <h4>事件时间:' + this.eventList[i].createTime + '</h4>' +
|
|
|
+ ' <h4>事件时间:' + res.data[i].createTime + '</h4>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>';
|
|
|
- if(this.eventList[i].pictureType=='image'&&this.eventList[i].picturePath != null && this.eventList[i].picturePath != ''){
|
|
|
+ if(res.data[i].pictureType=='image'&&res.data[i].picturePath != null && res.data[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="' + res.data[i].picturePath + '" style="width: 150px;height: 100px"/>' +
|
|
|
' </div>' +
|
|
|
' </div>' +
|
|
|
' </span>'
|
|
@@ -1019,6 +943,26 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getEventList(day,pageSize,pageNum,eventSearch,loading) {
|
|
|
+ if(pageNum < 1){
|
|
|
+ this.$modal.msg('当前已是第一页')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.pageSize = pageSize;
|
|
|
+ this.pageNum = pageNum;
|
|
|
+ let that = this
|
|
|
+ this.eventList = []
|
|
|
+ //右侧获取事件列表
|
|
|
+ getEventList({ day: day,pageSize:pageSize,pageNum: pageNum,eventName:eventSearch },loading).then(res => {
|
|
|
+ this.eventList = res.data
|
|
|
+ if (this.eventList != null && this.eventList.length > 0) {
|
|
|
+ if(this.eventList[0].eventStatusValue == 'forest_event_status_1'){
|
|
|
+ that.$refs.bottomMenu.updateAlert();
|
|
|
+ that.$refs.up.play();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getEventByEventType(day,loading) {
|
|
|
let that = this
|
|
|
//右侧获取事件分类
|