diff --git a/public/index.html b/public/index.html index d10bd3a..8ba324d 100644 --- a/public/index.html +++ b/public/index.html @@ -103,7 +103,7 @@ - + @@ -115,7 +115,7 @@ - + + + {{data.checkStatus == 0 ? `(离线)`:''}}{{ data.name }} + + + + + {{data.checkStatus == 0 ? `(离线)`:''}}{{ data.channelName }} + + + diff --git a/src/views/pages/roadGovernance/components/RoadMain.vue b/src/views/pages/roadGovernance/components/RoadMain.vue index 854441b..a1b89b3 100644 --- a/src/views/pages/roadGovernance/components/RoadMain.vue +++ b/src/views/pages/roadGovernance/components/RoadMain.vue @@ -323,8 +323,20 @@ export default { methods: { // 道路污染数据 昨日 + // async getRoadData() { + // const res = await getRoadData({ dt: this.preTime }); + // //路网数据 + // this.roadData = res.data.data; + // //道路事件 pm>200 + // // const data = res.data.data.filter((item) => item.pm10 > 150); + // // this.tableData = data; + // // this.dateTabs[0].data = data; + // // this.dateTabs[0].dataNum = data.length; + // // this.addToMap(data); + // this.roadOnMap(); + // }, async getRoadData() { - const res = await getRoadData({ dt: this.preTime }); + const res = await getRoadData({ dt: '2022-7-7 00:00:00' }); //路网数据 this.roadData = res.data.data; //道路事件 pm>200 diff --git a/src/views/pages/waterPoints/components/ComplaintEvent.vue b/src/views/pages/waterPoints/components/ComplaintEvent.vue index 0c11b92..e2f2e01 100644 --- a/src/views/pages/waterPoints/components/ComplaintEvent.vue +++ b/src/views/pages/waterPoints/components/ComplaintEvent.vue @@ -1,13 +1,13 @@ + + diff --git a/src/views/pages/waterPoints/components/WaterPointPop.vue b/src/views/pages/waterPoints/components/WaterPointPop.vue new file mode 100644 index 0000000..c3f70cb --- /dev/null +++ b/src/views/pages/waterPoints/components/WaterPointPop.vue @@ -0,0 +1,275 @@ + + + + diff --git a/src/views/pages/waterPoints/index.vue b/src/views/pages/waterPoints/index.vue index 4c59a00..5b0295a 100644 --- a/src/views/pages/waterPoints/index.vue +++ b/src/views/pages/waterPoints/index.vue @@ -8,7 +8,7 @@
-
青岛市积水点地图
+
青岛市易积水点地图
@@ -26,20 +26,20 @@ > -
+
@@ -47,17 +47,17 @@
-
+ -
+ -
+
地图图层
- +
+ +
@@ -95,10 +95,8 @@ import complaintEvent from './components/ComplaintEvent' import VideoList from './components/VideoList' import SiteList from './components/SiteList' import { selectByJdWd } from '@/api/construction/index' -import { - createSiteListPop, - createCameraDetailsPop -} from '@/supermap/createMarkerPopup' +import { createSiteListPop, createCameraDetailsPop,createWaterPointPop } from '@/supermap/createMarkerPopup' +import VideoPlay from './components/VideoPlay' export default { data () { @@ -108,16 +106,21 @@ export default { state: '', constructionSiteData: [], - changeLayerBtnList: ['视频监控', '积水点'], + // changeLayerBtnList: ['视频监控', '易积水点'], + changeLayerBtnList: ['易积水点'], changeLayerBtnGroup: [], - eventCheckList: [] + eventCheckList: [], + openVideo: false, + channelCode:[] + } }, components: { TiledMap, complaintEvent, VideoList, - SiteList + SiteList, + VideoPlay }, created () {}, mounted () { @@ -127,23 +130,15 @@ export default { this.hiMapFun ) - // 根据经纬度查询半径内所有的工地 bus.$off('openCauseAnalysis') bus.$on('openCauseAnalysis', (row) => { - // this.timeRegion = data.data.dt; - // this.hiMapFun.removerPolygon(); - this.hiMapFun.removeLayerByLayerName('constructionSite') - // debugger - // this.circle(latLng); this.hiMap.mapObj.map.flyTo({ lat: row.wd, lng: row.jd }) // this.WithinRadiusSite(latLng); - const dataEvent = [ - { - latLng: { lat: row.wd, lng: row.jd }, - data: row, - type: 'site' - } - ] + const dataEvent = [{ + latLng: { lat: row.wd, lng: row.jd }, + data: row, + type: 'site' + }] this.hiMapFun.addPointsToMap( dataEvent, 'construction.png', @@ -152,9 +147,9 @@ export default { ) }) - bus.$off('roadOnMap') - bus.$on('roadOnMap', (roadData) => { - this.roadOnMap(roadData) + bus.$off('waterPoint') + bus.$on('waterPoint', (waterPointData) => { + this.waterPointOnMap(waterPointData) }) bus.$off('removeCameraLayer') @@ -166,6 +161,30 @@ export default { bus.$on('CameraSingleDataOnMap', (labelName, data) => { this.addResourceTomap(labelName, data) }) + + bus.$off('openWaterPointDialog') + bus.$on('openWaterPointDialog', (item) => { + this.hiMap.mapObj.map.flyTo({ lat: item.latitude, lng: item.longitude },16) + // this.WithinRadiusSite(latLng); + // const dataEvent = [{ + // latLng: { lat: item.latitude, lng: item.longitude }, + // data: item, + // type: 'waterPoint' + // }] + // this.hiMapFun.addPointsToMap( + // dataEvent, + // 'waterPoint.png', + // 'waterPoint', + // createWaterPointPop + // ) + }) + + bus.$off('openCurrentVideoWaterPoint') + bus.$on('openCurrentVideoWaterPoint',channelCode => { + this.openVideo = true; + this.channelCode.unshift(channelCode) + }) + }, methods: { querySearchAsync (queryString, cb) { @@ -273,7 +292,7 @@ export default { case '视频监控': // this.addResourceTomap('全部',this.$refs.videoListRef.cameraAllData) break - case '积水点': + case '易积水点': break default: break @@ -283,7 +302,7 @@ export default { case '视频监控': // this.hiMapFun.removeLayerByLayerName('全部') break - case '积水点': + case '易积水点': break default: break @@ -303,12 +322,22 @@ export default { }) } }) - this.hiMapFun.addResourceOnMapWithoutSuperMapCluster( - dataEvent, - 'videoSurveillance.png', - type, - createCameraDetailsPop - ) + this.hiMapFun.addResourceOnMapWithoutSuperMapCluster(dataEvent, 'videoSurveillance.png', type, createCameraDetailsPop) + }, + + waterPointOnMap (data) { + const dataEvent = [] + data.forEach((item) => { + const arr = [0, 0.0, '', '0', '0.0'] + if (arr.indexOf(item.longitude) == -1) { + dataEvent.push({ + latLng: { lat: Number(item.latitude), lng: Number(item.longitude) }, + data: item, + type: 'waterPoint' + }) + } + }) + this.hiMapFun.addPointsToMap(dataEvent, 'waterPoint.png', 'waterPoint', createWaterPointPop) } }, beforeDestroy () {} @@ -319,7 +348,7 @@ export default { @font-face { font-family: 'Tensentype-ZhiHeiJ-W5'; - src: url('../../../assets/construction/TTZhiHeiJ-W5.ttf'); + src: url("../../../assets/construction/TTZhiHeiJ-W5.ttf"); } .map-box { width: 100%; @@ -338,7 +367,7 @@ export default { z-index: 1000; width: 100%; height: 166px; - background: url('~@/assets/construction/title.png') no-repeat; + background: url("~@/assets/construction/title.png") no-repeat; text-align: center; .title { font-size: 46px; @@ -350,8 +379,8 @@ export default { font-family: 'Tensentype-ZhiHeiJ-W5'; } .title::before { - content: '青岛市积水点地图'; - text-shadow: 0px 3px 10px rgba(0, 0, 0, 0.9); + content: '青岛市易积水点地图'; + text-shadow: 0px 3px 10px rgba(0,0,0,.9); position: absolute; z-index: -1; } @@ -362,20 +391,20 @@ export default { z-index: 1000; left: 496px; top: 90px; - border: 1px solid rgba(31, 254, 253, 0.9); + border: 1px solid rgba(31,254,253,.9); ::v-deep .el-input__inner { color: #fff; - background: rgba($color: #203b5d, $alpha: 0.8); + background: rgba($color: #203b5d, $alpha: .8); width: 226px; height: 36px; - border: none; + border:none; &::placeholder { color: rgba($color: #fff, $alpha: 0.6); } } ::v-deep .el-input__prefix { top: -1px; - color: rgba(31, 254, 253, 0.9); + color: rgba(31,254,253,.9); } ::v-deep .el-input-group__append { width: 54px; @@ -394,7 +423,7 @@ export default { z-index: -1 !important; width: 226px !important; left: 0px !important; - background: rgba(32, 59, 93, 0.8); + background: rgba(32,59,93,.8); border: 1px solid #1ffefd; li { color: #fff; @@ -410,9 +439,9 @@ export default { z-index: 1000; left: 10px; top: 90px; - height: 908px; + height:908px; width: 478px; - background: rgba($color: #05213b, $alpha: 0.85); + background: rgba($color: #05213b, $alpha: .85) } .eventNum { @@ -433,7 +462,7 @@ export default { span { font-size: 46px; font-weight: bold; - background: linear-gradient(0deg, #91f4f8 0%, #ffffff 100%); + background: linear-gradient(0deg, #91f4f8 0%, #ffffff 100% ); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; @@ -449,7 +478,7 @@ export default { top: 92px; width: 398px; // height:460px; - background: rgba($color: #05213b, $alpha: 0.85); + background: rgba($color: #05213b, $alpha: .85); } .siteList { @@ -459,13 +488,13 @@ export default { top: 660px; width: 398px; // height:500px; - background: rgba($color: #05213b, $alpha: 0.85); + background: rgba($color: #05213b, $alpha: .85); } .changeLayer { width: 332px; height: 67px; - background: rgba(7, 26, 44, 0.8); + background: rgba(7,26,44,.8); position: absolute; bottom: 10px; left: 50%; @@ -476,7 +505,7 @@ export default { width: 96px; height: 100%; font-size: 16px; - color: rgba(255, 255, 255, 0.6); + color: rgba(255,255,255,.6); text-align: center; line-height: 67px; } @@ -487,16 +516,17 @@ export default { padding-left: 20px; ::v-deep .el-checkbox-group { - .el-checkbox-button__inner { - padding: 6px 14px; - border: 0; - border-radius: 10px; + .el-checkbox-button__inner{ + padding: 6px 14px; + border: 0; + border-radius: 10px; + } - .el-checkbox-button:first-child .el-checkbox-button__inner { + .el-checkbox-button:first-child .el-checkbox-button__inner{ margin-right: 10px; } - .el-checkbox-button.is-checked .el-checkbox-button__inner { - background: #027db4; + .el-checkbox-button.is-checked .el-checkbox-button__inner{ + background: #027DB4; color: #ffffff; box-shadow: unset; } @@ -504,7 +534,7 @@ export default { } } - .eventSelection { + .eventSelection{ width: 170px; height: 100px; background: rgba(7, 26, 44, 0.8); @@ -515,16 +545,16 @@ export default { display: flex; align-items: center; z-index: 1000; - ::v-deep .el-checkbox__label { + ::v-deep .el-checkbox__label{ color: #ffffff; } - ::v-deep .el-checkbox { - margin: 0 15px; - .el-checkbox__inner { - margin-right: 15px; + ::v-deep .el-checkbox{ + margin:0 15px; + .el-checkbox__inner{ + margin-right: 15px; } } - .eventSelectionIcon { + .eventSelectionIcon{ display: block; width: 14px; height: 14px; @@ -534,13 +564,13 @@ export default { left: 34.5px; top: 21px; } - .eventSelectionIcon:nth-child(2) { + .eventSelectionIcon:nth-child(2){ background: #ffae2b; - position: absolute; + position: absolute; left: 34.5px; top: 42px; } - .eventSelectionIcon:nth-child(3) { + .eventSelectionIcon:nth-child(3){ background: #31d779; position: absolute; left: 34.5px; @@ -549,7 +579,7 @@ export default { } } -