diff --git a/src/api/area.js b/src/api/area.js index 74aff6d..bc5e7a2 100644 --- a/src/api/area.js +++ b/src/api/area.js @@ -15,4 +15,49 @@ export function selectKeyAreaList(params) { params, }) } + +// 重点区域根据区域名称进行查询 +export function selectByLikeName(params) { + return request({ + url: 'api/project/keyArea/selectByLikeName', + method: 'get', + params + }) +} +// 重点区域根据类型进行筛选 +export function selectKeyArea(params) { + return request({ + url: 'api/project/keyArea/selectKeyArea', + method: 'get', + params + }) +} + +// 重点区域--视频所有事件 +export function selectByAreaEvent(params) { + return request({ + url: 'api/project/keyArea/selectByAreaEvent', + method: 'get', + params + }) +} + +// 重点区域--视频当天事件 +export function selectByDayAreaEvent(params) { + return request({ + url: 'api/project/keyArea/selectByDayAreaEvent', + method: 'get', + params + }) +} + +// 数据统计--事件趋势 +export function selectMonthAreaEvent(params) { + return request({ + url: 'api/project/keyArea/selectMonthAreaEvent', + method: 'get', + params + }) +} + \ No newline at end of file diff --git a/src/api/construction/index.js b/src/api/construction/index.js index ab51994..9f93432 100644 --- a/src/api/construction/index.js +++ b/src/api/construction/index.js @@ -21,6 +21,14 @@ export function selectMonthNoice() { method: 'get', }) } +//噪声 +export function selectNoiceEvent(params) { + return request({ + url: 'api/project/building/selectNoiceEvent', + method: 'get', + params, + }) +} // 扬尘今日 export function selectDayPm10() { return request({ @@ -42,6 +50,14 @@ export function selectMonthPm10() { method: 'get', }) } +//扬尘 +export function selectRaise(params) { + return request({ + url: 'api/project/building/selectRaise', + method: 'get', + params, + }) +} // 根据工地名搜索工地 export function selectByProjectName(params) { return request({ @@ -90,19 +106,19 @@ export function selectMonthAll(params) { }) } -//扬尘 -export function selectRaise(params) { +// 查询当天工地视频感知事件 +export function selectDayVideo(params) { return request({ - url: 'api/project/building/selectRaise', + url: 'api/project/building/selectByEvent', method: 'get', params, }) } -//噪声 -export function selectNoiceEvent(params) { +// 查询全部工地视频感知事件 +export function selectAllVideo(params) { return request({ - url: 'api/project/building/selectNoiceEvent', + url: 'api/project/building/selectByAllEvent', method: 'get', params, }) @@ -150,4 +166,103 @@ export function selectByDayRoadData(params) { }) } +// 数据统计--查询七天扬尘事件 +export function selectByWeekNaise(params) { + return request({ + url: 'api/project/building/selectByWeekNaise', + method: 'get', + params, + }) +} +// 数据统计--查询30天扬尘事件 +export function selectByMonthNaise(params) { + return request({ + url: 'api/project/building/selectByMonthNaise', + method: 'get', + params, + }) +} + +// 数据统计--查询七天噪声事件 +export function selectByWeekNoice(params) { + return request({ + url: 'api/project/building/selectByWeekNoice', + method: 'get', + params, + }) +} +// 数据统计--查询30天噪声事件 +export function selectByMonthNoice(params) { + return request({ + url: 'api/project/building/selectByMonthNoice', + method: 'get', + params, + }) +} + +// 数据统计--查询七天视频事件 +export function selectByWeekEvent(params) { + return request({ + url: 'api/project/building/selectByWeekEvent', + method: 'get', + params, + }) +} +// 数据统计--查询30天视频事件 +export function selectByMonthEvent(params) { + return request({ + url: 'api/project/building/selectByMonthEvent', + method: 'get', + params, + }) +} + +// 数据统计-视频事件时间趋势 +export function selectMonthCurrentByEvent(params) { + return request({ + url: 'api/project/building/selectMonthCurrentByEvent', + method: 'get', + params, + }) +} +// 数据统计-物联事件时间趋势 +export function selectMonthCurrentByBuilding(params) { + return request({ + url: 'api/project/building/selectMonthCurrentByBuilding', + method: 'get', + params, + }) +} +// 数据统计-走航表格数据--全部 +export function selectRoadDataCountEvent(params) { + return request({ + url: 'api/project/building/selectRoadDataCountEvent', + method: 'get', + params, + }) +} +// 数据统计-走航表格数据--近7天 +export function selectRoadDataWeekEvent(params) { + return request({ + url: 'api/project/building/selectRoadDataWeekEvent', + method: 'get', + params, + }) +} +// 数据统计-走航表格数据--近30天 +export function selectRoadDataMonthEvent(params) { + return request({ + url: 'api/project/building/selectRoadDataMonthEvent', + method: 'get', + params, + }) +} +// 数据统计-走航事件时间趋势 +export function selectMonthCurrentByRoadData(params) { + return request({ + url: 'api/project/building/selectMonthCurrentByRoadData', + method: 'get', + params, + }) +} diff --git a/src/supermap/createMarkerPopup.js b/src/supermap/createMarkerPopup.js index 76018cd..8cce470 100644 --- a/src/supermap/createMarkerPopup.js +++ b/src/supermap/createMarkerPopup.js @@ -34,6 +34,7 @@ import EventListDetailsPop from '@/views/pages/civilizedCity/components/EventLis import SiteListPop from '@/views/pages/construction/components/SiteListPop' import WaterPointPop from '@/views/pages/waterPoints/components/WaterPointPop' import SiteRoadPop from '@/views/pages/construction/components/SiteRoadPop' +import ImportantAreaPop from '@/views/pages/area/components/ImportantAreaPop' import bus from "@/views/layout/bus"; @@ -226,6 +227,25 @@ function createSiteRoadPop(feature) { }) return popupDom.initDom() } +// 重点区域弹窗 +function createImportantAreaPop(feature) { + bus.$emit('areaCauseAnalysis',feature.data) + + const popupDom = new Dom({ + template: '', + data() { + return { + feature: feature, + } + }, + created() { + }, + components: { + ImportantAreaPop + } + }) + return popupDom.initDom() +} /** * 生成专题企业信息通用弹窗Dom * @param resourceTitle @@ -696,4 +716,5 @@ export { createSiteListPop, createWaterPointPop, createSiteRoadPop, + createImportantAreaPop } diff --git a/src/views/pages/area/components/ComplaintEvent.vue b/src/views/pages/area/components/ComplaintEvent.vue index beff71b..aa61d65 100644 --- a/src/views/pages/area/components/ComplaintEvent.vue +++ b/src/views/pages/area/components/ComplaintEvent.vue @@ -45,7 +45,7 @@ --> - +
@@ -72,20 +72,21 @@

事件描述:{{ item.eventCnName || ''}}

- - + --> @@ -96,7 +97,7 @@
- - + + + + diff --git a/src/views/pages/area/components/SiteList.vue b/src/views/pages/area/components/SiteList.vue index 3854ac5..b2c1ee9 100644 --- a/src/views/pages/area/components/SiteList.vue +++ b/src/views/pages/area/components/SiteList.vue @@ -5,13 +5,13 @@
- + { - console.log(res.data.data) + let params = { + type1: "'公园广场','窗口单位'", + type2: "'景区景点','海水浴场'", + type3: "'商业街区'" + } + selectKeyAreaList(params).then((res) => { + this.siteDataAll = res.data.data this.siteData = res.data.data }) }, methods: { - - - searchSite() { - if (this.searchValue == "") { + if (!this.searchValue && this.selectValue !== '全部') { + selectKeyArea({ type: this.selectValue }).then((res) => { + this.siteData = res.data.data + }) + } else if (!this.searchValue) { this.siteData = this.siteDataAll; - } else { + }else { const params = { - projectName: this.searchValue, + areaName: this.searchValue, }; - // selectByProjectName(params).then((res) => { - // this.siteData = res.data.data - // }); + selectByLikeName(params).then((res) => { + this.siteData = res.data.data + }); } }, fliterSiteByArea(val) { - selectKeyAreaList({type:val}).then((res) => { - this.siteData = res.data.data - }) + if(val === '全部') { + let params = { + type1: "'公园广场','窗口单位'", + type2: "'景区景点','海水浴场'", + type3: "'商业街区'" + } + selectKeyAreaList(params).then((res) => { + this.siteData = res.data.data + }) + } else { + selectKeyArea({ type: val}).then((res) => { + this.siteData = res.data.data + }) + } + }, // 行点击 analyse(row) { // bus.$emit("openCauseAnalysis", row); - this.$parent.hiMapFun.removerPolygon() - selectByAreaName({areaName:row.areaName}).then((res) => { + if(row.latitude && row.longitude) { + this.$parent.hiMapFun.removerPolygon() + this.$parent.removeRoadCauseAnalysis() + this.$parent.hiMapFun.removeLayerByLayerName("roadPoint"); + this.$parent.hiMap.mapObj.map.flyTo({ lat: row.latitude, lng: row.longitude }); + let dataEvent = [{ + latLng: { lat: row.latitude, lng: row.longitude }, + data: row, + type: "site", + }] + this.$parent.hiMapFun.addPointsToMap( + dataEvent, + "poi-red.png", + "roadPoint", + createImportantAreaPop + ); + } else { + selectByAreaName({areaName:row.areaName}).then((res) => { if(res.data.data){ let areaLatLng = [] res.data.data.forEach((item) => { let lonLat = gcjLL2wgs84LL(item.longitude, item.latitude); areaLatLng.push([lonLat[1],lonLat[0]]) }) + this.$parent.hiMapFun.removerPolygon() + this.$parent.removeRoadCauseAnalysis() this.$parent.hiMapFun.addAreaToMap(areaLatLng) } }) + } }, // 关闭基本信息窗口 informationClose() { diff --git a/src/views/pages/area/components/StatisticalAnalysis.vue b/src/views/pages/area/components/StatisticalAnalysis.vue index c7f4701..d95403d 100644 --- a/src/views/pages/area/components/StatisticalAnalysis.vue +++ b/src/views/pages/area/components/StatisticalAnalysis.vue @@ -28,7 +28,7 @@
-->
- 000件 + {{ totalEventCount }}
@@ -75,9 +75,11 @@ + + diff --git a/src/views/pages/area/index.vue b/src/views/pages/area/index.vue index 0ca3ba1..88aa406 100644 --- a/src/views/pages/area/index.vue +++ b/src/views/pages/area/index.vue @@ -37,8 +37,8 @@
- 累计事件数量 -

1236

+ 累计事件数量(2022.05.25-至今) +

{{ allListDataNum }}

@@ -81,6 +81,10 @@
+ @@ -91,11 +95,13 @@ import TiledMap from "./components/tiledMap"; import { searchCamera } from "@/api/videoSurveillance/index"; import bus from "@/views/layout/bus"; import complaintEvent from "./components/ComplaintEvent"; +import VideoPlay from './components/VideoPlay' import VideoList from "./components/VideoList"; import SiteList from "./components/SiteList"; import { selectByJdWd } from "@/api/construction/index"; -import { createSiteListPop,createCameraDetailsPop,createEventListDetailsPop } from "@/supermap/createMarkerPopup"; +import { createSiteListPop,createCameraDetailsPop,createEventListDetailsPop,createImportantAreaPop } from "@/supermap/createMarkerPopup"; import { listPassengerFlow, selectByTime, } from "@/api/civilizedCity.js"; +import { selectByAreaEvent, selectKeyArea } from "@/api/area"; export default { data() { @@ -114,8 +120,9 @@ export default { thermodynamicPeopleAll: [], thermodynamicPeopleLocal: [], thermodynamicPeopleNoLocal: [], - - + allListDataNum: '', + openVideo: false, + channelCode: [], }; }, components: { @@ -123,6 +130,7 @@ export default { complaintEvent, VideoList, SiteList, + VideoPlay }, created() {}, mounted() { @@ -132,8 +140,11 @@ export default { this.hiMapFun ); - - + bus.$off('openCurrentVideoSurveillance') + bus.$on('openCurrentVideoSurveillance', (channelCode) => { + this.openVideo = true + this.channelCode.unshift(channelCode) + }) // 根据经纬度查询半径内所有的工地 bus.$off("openCauseAnalysis"); bus.$on("openCauseAnalysis", (row) => { @@ -173,12 +184,6 @@ export default { }) this.thermodynamic() - - selectByTime().then((res)=>{ - if(res.data.data){ - this.todayListNum = res.data.data.length - } - }) }, methods: { querySearchAsync(queryString, cb) { @@ -281,16 +286,14 @@ export default { }, layerHandleChange(item) { + console.log('this.changeLayerBtnGroup---', this.changeLayerBtnGroup) if (this.changeLayerBtnGroup.indexOf(item) !== -1) { switch (item) { - case "道路": - this.roadOnMap(this.$refs.complaintEventRef.roadData); - break; case "AI事件": this.hiMapFun.removeLayerByLayerName('EventListDetail') - selectByTime().then((res) => { + selectByAreaEvent().then((res) => { const dataEvent = []; - res.data.data.forEach((item) => { + res.data.data.events.forEach((item) => { dataEvent.push( { latLng: { lat: item.latitude, lng: item.longitude }, @@ -305,16 +308,44 @@ export default { case "视频监控": this.addResourceTomap('全部',this.$refs.videoListRef.cameraAllData) break; + case "公园广场": + case "商业街区": + case "景区景点": + case "海水浴场": + case "窗口单位": + this.hiMapFun.removeLayerByLayerName(item) + selectKeyArea({ type: item}).then((res) => { + const dataEvent = []; + console.log('res.data.data----', res.data.data) + res.data.data.forEach((item) => { + dataEvent.push( + { + latLng: { lat: item.latitude, lng: item.longitude }, + data: item, + type: "site", + } + ) + }) + this.hiMapFun.addPointsToMap( + dataEvent, + "poi-red.png", + item, + createImportantAreaPop + ); + }) + break; default: break; } } else { switch (item) { - case "道路": - this.hiMapFun.removerPolyline(); - break; + case "公园广场": + case "商业街区": + case "景区景点": + case "海水浴场": + case "窗口单位": case "AI事件": - this.hiMapFun.removeLayerByLayerName('EventListDetail') + this.hiMapFun.removeLayerByLayerName(item) break; case "视频监控": this.hiMapFun.removeLayerByLayerName('全部') @@ -414,6 +445,12 @@ export default { } }, + removeRoadCauseAnalysis () { + this.hiMapFun.removerPolygon() + this.hiMapFun.removeLayerByLayerName('roadPoint') + this.hiMapFun.removeLayerByLayerName('EventListDetail') + this.hiMapFun.removeLayerByLayerName('全部') + } }, beforeDestroy() {}, }; diff --git a/src/views/pages/construction/components/ComplaintEvent.vue b/src/views/pages/construction/components/ComplaintEvent.vue index 3fa7ec1..32b7545 100644 --- a/src/views/pages/construction/components/ComplaintEvent.vue +++ b/src/views/pages/construction/components/ComplaintEvent.vue @@ -24,7 +24,7 @@
统计分析 >
-
+
+
+
+
+ {{item.eventNewName||''}} + {{item.captureTime||''}} + +
+
+
事件地址:{{item.district||''}}
+

摄像头名称:{{item.cameraName||''}}

+

事件描述:{{item.eventCnName||''}}

+ + +
+
+
@@ -89,10 +105,10 @@
diff --git a/src/views/pages/construction/index.vue b/src/views/pages/construction/index.vue index b1dcbf1..ea39faf 100644 --- a/src/views/pages/construction/index.vue +++ b/src/views/pages/construction/index.vue @@ -37,7 +37,7 @@
- 累计事件数量 + 累计事件数量(2022.05.25-至今)

{{allListDataNum}}

@@ -81,8 +81,8 @@ import bus from '@/views/layout/bus' import complaintEvent from './components/ComplaintEvent' import VideoList from './components/VideoList' import SiteList from './components/SiteList' -import { selectByJdWd, selectByDayRaise, selectByDayNoice, selectByDayRoadData } from '@/api/construction/index' -import { createSiteListPop, createCameraDetailsPop } from '@/supermap/createMarkerPopup' +import { selectByJdWd, selectDayVideo, selectByDayRaise, selectByDayNoice, selectByDayRoadData } from '@/api/construction/index' +import { createSiteListPop, createCameraDetailsPop, createImportantAreaPop } from '@/supermap/createMarkerPopup' import VideoPlay from './components/VideoPlay' import { selectAllByGps } from '@/api/road' @@ -119,6 +119,10 @@ export default { this.hiMap.mapObj, this.hiMapFun ) + this.todayListNum = 0 + selectDayVideo().then((res) => { + this.todayListNum += res.data.data.sum + }) selectByDayRaise().then((res) => { this.todayListNum += res.data.data.sum @@ -396,6 +400,7 @@ export default { this.hiMapFun.removeLayerByLayerName('videoSurveillance') this.hiMapFun.removeLayerByLayerName('constructionSite') this.hiMapFun.removeLayerByLayerName('roadPoint') + this.hiMapFun.removeLayerByLayerName('videoNotice') } }, beforeDestroy () {} diff --git a/src/views/pages/roadGovernance/components/RoadMain.vue b/src/views/pages/roadGovernance/components/RoadMain.vue index ff61d9b..344b9fd 100644 --- a/src/views/pages/roadGovernance/components/RoadMain.vue +++ b/src/views/pages/roadGovernance/components/RoadMain.vue @@ -248,7 +248,8 @@ export default { const yDate = currentDate.getDate() > 9 ? currentDate.getDate() : '0' + currentDate.getDate() this.preTime = currentDate.getFullYear() + '-' + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : '0' + (currentDate.getMonth() + 1)) + '-' + yDate + ' ' + '00:00:00' currentDate.setDate(currentDate.getDate() - currentDate.getDay() + 1) - this.weekTime = currentDate.getFullYear() + '-' + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : '0' + (currentDate.getMonth() + 1)) + '-' + yDate + ' ' + '00:00:00' + // this.weekTime = currentDate.getFullYear() + '-' + ((currentDate.getMonth() + 1) > 10 ? (currentDate.getMonth() + 1) : '0' + (currentDate.getMonth() + 1)) + '-' + yDate + ' ' + '00:00:00' + this.weekTime = this.getWeekDate() }, // 生命周期 - 挂载完成(访问DOM元素) mounted () { @@ -305,6 +306,25 @@ export default { }, methods: { + // 获取本周一日期 + getWeekDate() { + let now = new Date() + let nowTime = now.getTime(); + let day = now.getDay(); + let oneDayTime = 1000 * 60 * 60 * 24; + let mondayTime = nowTime - (day - 1) * oneDayTime; + let lw = new Date(mondayTime); + let lastY = lw.getFullYear(); + let lastM = lw.getMonth() + 1; + let lastD = lw.getDate(); + let startData = + lastY + + "-" + + (lastM < 10 ? "0" + lastM : lastM) + + "-" + + (lastD < 10 ? "0" + lastD : lastD); + return startData + ' ' + '00:00:00' + }, // 道路污染数据 昨日 async getRoadData () { const res = await getRoadData({ dt: this.preTime }) diff --git a/src/views/pages/videoSurveillance/components/CameraDetailsPop.vue b/src/views/pages/videoSurveillance/components/CameraDetailsPop.vue index 98b9113..e4bfca0 100644 --- a/src/views/pages/videoSurveillance/components/CameraDetailsPop.vue +++ b/src/views/pages/videoSurveillance/components/CameraDetailsPop.vue @@ -72,6 +72,7 @@ export default { }, methods: { openCurrentVideo(channelCode){ + console.log('channelCode-----', channelCode) bus.$emit('openCurrentVideoSurveillance',channelCode) // getStreamByChannelCode({channelCode:channelCode}).then(res => { // let newVideoStream = this.IntelliURLReplaceIP(res.data.data)