|
@@ -127,7 +127,8 @@
|
|
|
<h4>事件分布</h4>
|
|
|
</div>
|
|
|
<div id="event-chart" style="width: 100%;height:26.2vh;"></div>
|
|
|
- <div class="d-l-con" @click="" v-for="(item,index) in todayEventCountDeptList">
|
|
|
+ <div class="d-l-con" @click="" v-for="(item,index) in todayEventCountDeptList"
|
|
|
+ v-on:click="todayEventByDeptIdList(item.deptId)">
|
|
|
<div class="d-l-l-text">
|
|
|
<i class="i-small"></i>
|
|
|
<h4>{{item.deptName}}</h4>
|
|
@@ -420,7 +421,7 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getTodayEvent,getEventStatusList,getEventSourceList
|
|
|
+ getTodayEvent,getEventStatusList,getEventSourceList,getEventListByDeptIdList
|
|
|
} from '@/api/event'
|
|
|
|
|
|
import supermap from '@/components/supermap' //超图
|
|
@@ -861,7 +862,7 @@
|
|
|
},
|
|
|
getTodayEvent() {
|
|
|
let that = this
|
|
|
- //获取左侧菜单列表
|
|
|
+ //获取右侧菜单列表
|
|
|
getTodayEvent().then(res => {
|
|
|
//今日事件
|
|
|
that.todayEventCountList = res.data.eventcountStatus
|
|
@@ -877,7 +878,6 @@
|
|
|
data.value = res.data.eventcountSource[i].count
|
|
|
this.eventChartData.push(data)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
this.eventChart()
|
|
|
})
|
|
@@ -1000,6 +1000,66 @@
|
|
|
// reportTime: "2022-06-27 02:42:04"
|
|
|
})
|
|
|
},
|
|
|
+ todayEventByDeptIdList(deptId) {
|
|
|
+ //点击事件分类
|
|
|
+ let that = this
|
|
|
+ getEventListByDeptIdList(deptId).then(res => {
|
|
|
+ that.$refs.supermap.clearM(false)
|
|
|
+ that.eventList=res.data.eventList;
|
|
|
+ that.markersList = [];
|
|
|
+ let markersMap = {
|
|
|
+ lng: 124.59,
|
|
|
+ lat: 43.02,
|
|
|
+ icon: 'marker',
|
|
|
+ bindPopupHtml: '',
|
|
|
+ click: '',
|
|
|
+ keepBindPopup: false,
|
|
|
+ isAggregation: false
|
|
|
+ }
|
|
|
+ if(res.data.eventList!=null&&res.data.eventList.length>0){
|
|
|
+ for (let i = 0; i < res.data.eventList.length; i++) {
|
|
|
+ markersMap.lng = res.data.eventList[i].longitude
|
|
|
+ markersMap.lat =res.data.eventList[i].latitude
|
|
|
+ markersMap.bindPopupHtml = '<div class="map-tip">' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>经纬度:' +res.data.eventList[i].longitude + ',' +res.data.eventList[i]
|
|
|
+ .latitude + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>事件名称:' +res.data.eventList[i].eventTitle + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '<span>' +
|
|
|
+ ' <div class="d-l-con">' +
|
|
|
+ ' <div class="d-l-l-text">' +
|
|
|
+ ' <h4>事件时间:' +res.data.eventList[i].reportTime + '</h4>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </div>' +
|
|
|
+ ' </span>' +
|
|
|
+ '</div>';
|
|
|
+ that.markersList.push(markersMap)
|
|
|
+ }
|
|
|
+ that.$refs.supermap.setMarkers(that.markersList)
|
|
|
+ }
|
|
|
+ // eventCode: "718b040cf1f747eb8ab4ffc6db643ca0"
|
|
|
+ // eventContent: "集安-东明-可见光2022-06-27 02:42:04烟雾报警"
|
|
|
+ // eventSource: "event_source_2"
|
|
|
+ // eventStatus: "event_event_status_4"
|
|
|
+ // eventTitle: "集安-东明点位2022-06-27 02:42:04烟雾报警"
|
|
|
+ // id: "01458301eb834f3da5be16a75cd38bb6"
|
|
|
+ // latitude: "43.85618180244526"
|
|
|
+ // longitude: "125.31971797326736"
|
|
|
+ // reportBy: "集安-东明点位"
|
|
|
+ // reportTime: "2022-06-27 02:42:04"
|
|
|
+ })
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|