diff --git a/src/assets/yanAnRQoverindex.json b/src/assets/yanAnRQoverindex.json new file mode 100644 index 0000000..770cd33 --- /dev/null +++ b/src/assets/yanAnRQoverindex.json @@ -0,0 +1,175 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + 109.47703137026298, + 36.604780540997091 + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50074188675987, + 36.610927553865999 + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 3, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50966702364099, + 36.608659271055707 + ] + }, + "properties": { + "FID": 3, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 4, + "geometry": { + "type": "Point", + "coordinates": [ + 109.52458521484911, + 36.621424190986275 + ] + }, + "properties": { + "FID": 4, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 5, + "geometry": { + "type": "Point", + "coordinates": [ + 109.5323377920256, + 36.628436349136372 + ] + }, + "properties": { + "FID": 5, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 6, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48352007284414, + 36.596086929258945 + ] + }, + "properties": { + "FID": 6, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 7, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48348502857735, + 36.576354674733949 + ] + }, + "properties": { + "FID": 7, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 8, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49717114036713, + 36.582371729974177 + ] + }, + "properties": { + "FID": 8, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 9, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49267900992983, + 36.642299369812385 + ] + }, + "properties": { + "FID": 9, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/yanAnRQoverindex.json b/src/assets/yanAnRQoverindex.json new file mode 100644 index 0000000..770cd33 --- /dev/null +++ b/src/assets/yanAnRQoverindex.json @@ -0,0 +1,175 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + 109.47703137026298, + 36.604780540997091 + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50074188675987, + 36.610927553865999 + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 3, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50966702364099, + 36.608659271055707 + ] + }, + "properties": { + "FID": 3, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 4, + "geometry": { + "type": "Point", + "coordinates": [ + 109.52458521484911, + 36.621424190986275 + ] + }, + "properties": { + "FID": 4, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 5, + "geometry": { + "type": "Point", + "coordinates": [ + 109.5323377920256, + 36.628436349136372 + ] + }, + "properties": { + "FID": 5, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 6, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48352007284414, + 36.596086929258945 + ] + }, + "properties": { + "FID": 6, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 7, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48348502857735, + 36.576354674733949 + ] + }, + "properties": { + "FID": 7, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 8, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49717114036713, + 36.582371729974177 + ] + }, + "properties": { + "FID": 8, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 9, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49267900992983, + 36.642299369812385 + ] + }, + "properties": { + "FID": 9, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/yanAnWarring.json b/src/assets/yanAnWarring.json new file mode 100644 index 0000000..f2c5863 --- /dev/null +++ b/src/assets/yanAnWarring.json @@ -0,0 +1,22 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "2" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/yanAnRQoverindex.json b/src/assets/yanAnRQoverindex.json new file mode 100644 index 0000000..770cd33 --- /dev/null +++ b/src/assets/yanAnRQoverindex.json @@ -0,0 +1,175 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + 109.47703137026298, + 36.604780540997091 + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50074188675987, + 36.610927553865999 + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 3, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50966702364099, + 36.608659271055707 + ] + }, + "properties": { + "FID": 3, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 4, + "geometry": { + "type": "Point", + "coordinates": [ + 109.52458521484911, + 36.621424190986275 + ] + }, + "properties": { + "FID": 4, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 5, + "geometry": { + "type": "Point", + "coordinates": [ + 109.5323377920256, + 36.628436349136372 + ] + }, + "properties": { + "FID": 5, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 6, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48352007284414, + 36.596086929258945 + ] + }, + "properties": { + "FID": 6, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 7, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48348502857735, + 36.576354674733949 + ] + }, + "properties": { + "FID": 7, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 8, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49717114036713, + 36.582371729974177 + ] + }, + "properties": { + "FID": 8, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 9, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49267900992983, + 36.642299369812385 + ] + }, + "properties": { + "FID": 9, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/yanAnWarring.json b/src/assets/yanAnWarring.json new file mode 100644 index 0000000..f2c5863 --- /dev/null +++ b/src/assets/yanAnWarring.json @@ -0,0 +1,22 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "2" + } + } + ] +} \ No newline at end of file diff --git a/src/views/oneMap/components/ZHRQ.vue b/src/views/oneMap/components/ZHRQ.vue index d4d71cd..a60e291 100644 --- a/src/views/oneMap/components/ZHRQ.vue +++ b/src/views/oneMap/components/ZHRQ.vue @@ -170,6 +170,8 @@ import xiaXian from '@/assets/xiaXian.json'; import yiBian from '@/assets/yiBian.json'; import zaWuDuiFang from '@/assets/zaWuDuiFang.json'; +import yanAnRQoverindex from '@/assets/yanAnRQoverindex.json'; +import yanAnWarring from '@/assets/yanAnWarring.json'; const AllData = reactive({ ChangeData: [ @@ -496,6 +498,33 @@ if (!newfiberMapbox) return; if (!newfiberMapbox.map.getLayer('rq_pipeline_info')) return; if (!newfiberMapbox.map.getLayer('sx_ya_smx_rq_point')) return; + //燃气超标 + //let key = 'warning_monitor'; + // bus.emit('getGeojsonByType', { + // type: key, + // callback: geojson => { + // if (!!!geojson.features.length) bus.emit('setGeoJSON', { json: yanAnRQoverindex, key: 'warning_monitor' }); + // bus.emit('setLayerVisible', { type: 'point', layername: key, isCheck: true }); + // }, + // }); + //燃气告警 + // let key = 'warning_monitor'; + // bus.emit('getGeojsonByType', { + // type: key, + // callback: geojson => { + // if (!!!geojson.features.length) bus.emit('setGeoJSON', { json: yanAnWarring, key: 'warning_monitor' }); + // bus.emit('setLayerVisible', { type: 'point', layername: key, isCheck: true }); + // }, + // }); + //告警点事件 + // let warningPoint = newfiberMapbox.getLayers().filter(feature => feature.newfiberId == 'warning_monitor')[0]; + // if (warningPoint) { + // warningPoint.on('click', e => { + // let popupData = e.feature.properties; + + // console.log('popupData---', '告警---------', popupData); + // }); + // } bus.emit('setLayerVisible', { layername: 'rq_all', isCheck: true }); //所有管网rq_all、市政rq_SZLH、庭院rq_TYLH、立管rq_LGLH、其他rq_other // //杂物堆放 diff --git a/src/assets/yanAnRQoverindex.json b/src/assets/yanAnRQoverindex.json new file mode 100644 index 0000000..770cd33 --- /dev/null +++ b/src/assets/yanAnRQoverindex.json @@ -0,0 +1,175 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 1, + "geometry": { + "type": "Point", + "coordinates": [ + 109.47703137026298, + 36.604780540997091 + ] + }, + "properties": { + "FID": 1, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 2, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50074188675987, + 36.610927553865999 + ] + }, + "properties": { + "FID": 2, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 3, + "geometry": { + "type": "Point", + "coordinates": [ + 109.50966702364099, + 36.608659271055707 + ] + }, + "properties": { + "FID": 3, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 4, + "geometry": { + "type": "Point", + "coordinates": [ + 109.52458521484911, + 36.621424190986275 + ] + }, + "properties": { + "FID": 4, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 5, + "geometry": { + "type": "Point", + "coordinates": [ + 109.5323377920256, + 36.628436349136372 + ] + }, + "properties": { + "FID": 5, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 6, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48352007284414, + 36.596086929258945 + ] + }, + "properties": { + "FID": 6, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 7, + "geometry": { + "type": "Point", + "coordinates": [ + 109.48348502857735, + 36.576354674733949 + ] + }, + "properties": { + "FID": 7, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 8, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49717114036713, + 36.582371729974177 + ] + }, + "properties": { + "FID": 8, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + }, + { + "type": "Feature", + "id": 9, + "geometry": { + "type": "Point", + "coordinates": [ + 109.49267900992983, + 36.642299369812385 + ] + }, + "properties": { + "FID": 9, + "Id": 0, + "size": 250, + "gaojingType": "1" + } + } + ] +} \ No newline at end of file diff --git a/src/assets/yanAnWarring.json b/src/assets/yanAnWarring.json new file mode 100644 index 0000000..f2c5863 --- /dev/null +++ b/src/assets/yanAnWarring.json @@ -0,0 +1,22 @@ +{ + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "id": 0, + "geometry": { + "type": "Point", + "coordinates": [ + 109.46151447379528, + 36.617683363671475 + ] + }, + "properties": { + "FID": 0, + "Id": 0, + "size": 250, + "gaojingType": "2" + } + } + ] +} \ No newline at end of file diff --git a/src/views/oneMap/components/ZHRQ.vue b/src/views/oneMap/components/ZHRQ.vue index d4d71cd..a60e291 100644 --- a/src/views/oneMap/components/ZHRQ.vue +++ b/src/views/oneMap/components/ZHRQ.vue @@ -170,6 +170,8 @@ import xiaXian from '@/assets/xiaXian.json'; import yiBian from '@/assets/yiBian.json'; import zaWuDuiFang from '@/assets/zaWuDuiFang.json'; +import yanAnRQoverindex from '@/assets/yanAnRQoverindex.json'; +import yanAnWarring from '@/assets/yanAnWarring.json'; const AllData = reactive({ ChangeData: [ @@ -496,6 +498,33 @@ if (!newfiberMapbox) return; if (!newfiberMapbox.map.getLayer('rq_pipeline_info')) return; if (!newfiberMapbox.map.getLayer('sx_ya_smx_rq_point')) return; + //燃气超标 + //let key = 'warning_monitor'; + // bus.emit('getGeojsonByType', { + // type: key, + // callback: geojson => { + // if (!!!geojson.features.length) bus.emit('setGeoJSON', { json: yanAnRQoverindex, key: 'warning_monitor' }); + // bus.emit('setLayerVisible', { type: 'point', layername: key, isCheck: true }); + // }, + // }); + //燃气告警 + // let key = 'warning_monitor'; + // bus.emit('getGeojsonByType', { + // type: key, + // callback: geojson => { + // if (!!!geojson.features.length) bus.emit('setGeoJSON', { json: yanAnWarring, key: 'warning_monitor' }); + // bus.emit('setLayerVisible', { type: 'point', layername: key, isCheck: true }); + // }, + // }); + //告警点事件 + // let warningPoint = newfiberMapbox.getLayers().filter(feature => feature.newfiberId == 'warning_monitor')[0]; + // if (warningPoint) { + // warningPoint.on('click', e => { + // let popupData = e.feature.properties; + + // console.log('popupData---', '告警---------', popupData); + // }); + // } bus.emit('setLayerVisible', { layername: 'rq_all', isCheck: true }); //所有管网rq_all、市政rq_SZLH、庭院rq_TYLH、立管rq_LGLH、其他rq_other // //杂物堆放 diff --git a/src/views/oneMap/map/newfiberMapBox.vue b/src/views/oneMap/map/newfiberMapBox.vue index e3216ab..5514425 100644 --- a/src/views/oneMap/map/newfiberMapBox.vue +++ b/src/views/oneMap/map/newfiberMapBox.vue @@ -10,6 +10,7 @@ import buildingGeojson from '@/assets/yanAnBuilding.json'; import yanAnRoad from '@/assets/yanAnRoad.json'; import yanAnWater from '@/assets/yanAnWater.json'; +import { buffer } from 'ol/size'; export default { components: {}, props: { @@ -383,6 +384,7 @@ const setGeoJSON = ({ json, key }) => { let layer = newfiberMapbox.getLayers().filter(i => i.newfiberId == key)[0]; + console.log('layer----', layer); if (!!!layer) { layer = newfiberMapbox.unLoadLayers.filter(i => i.newfiberId == key)[0]; layer && layer.setData(json);