| | |
| | | |
| | | window.mapapi.forEachFeatureAtPixel(e.pixel, function (feature) { |
| | | console.log(feature.getProperties(), 'aaa'); |
| | | |
| | | //搜索的点位 |
| | | if (window.pointArr.length > 0) { |
| | | let obj = feature.getProperties().desc |
| | |
| | | for (const propertyNames in properties) { |
| | | if (propertyNames.indexOf("监控名") !== -1) { |
| | | const infoM = Message({ |
| | | message: '该点位视频监控查询中,请稍后', |
| | | message: '该点位视频监控加载中,请稍后', |
| | | type: 'info', |
| | | offset: 75, |
| | | center: true, |
| | |
| | | // 请求在线状态 |
| | | window.gisBaseUrl + "BEApi/getCameraDetails?cameraIndexCode=" + |
| | | properties["JK内码"] |
| | | ).then(res => { |
| | | , { |
| | | timeout: 6000 |
| | | }) |
| | | .then(res => { |
| | | if (res.data.data.status == 1) { |
| | | infoM.close(); |
| | | Message({ |
| | |
| | | } else { |
| | | infoM.close(); |
| | | Message({ |
| | | message: '该点位视频监控离线中', |
| | | type: 'errer', |
| | | message: '该视频监控离线中', |
| | | type: 'error', |
| | | offset: 75, |
| | | center: true, |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | infoM.close(); |
| | | Message({ |
| | | message: '该视频监控请求超时', |
| | | type: 'error', |
| | | offset: 75, |
| | | center: true, |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | }) |
| | | return |
| | | } else if (propertyNames.indexOf("部件名称") !== -1) { |
| | |
| | | export function flyToPoint(posisitons) { |
| | | window.mapapi.getView().animate({ |
| | | center: ol.proj.fromLonLat(posisitons), |
| | | projection: "EPSG:3857", |
| | | zoom: 18, |
| | | duration: 1500 |
| | | }) |
| | |
| | | if (len === 2) { |
| | | window.mapapi.getView().animate({ |
| | | center: window.mapapi.getView().getCenter(), |
| | | projection: "EPSG:3857", |
| | | zoom: window.mapapi.getView().getZoom() - 1, |
| | | duration: 1000, |
| | | }); |