| | |
| | | lon: lon, |
| | | lat: lat, |
| | | } |
| | | } else if (propertyNames.includes("id")) { |
| | | } |
| | | |
| | | else if (propertyNames.includes("id")) { |
| | | objdata = { |
| | | POITYPE: "POINT", |
| | | name: properties["_name"]._value, |
| | |
| | | //openlayer 地图点击事件 |
| | | export function setClick(state) { |
| | | function handleClick(e) { |
| | | |
| | | console.log(e,'111') |
| | | |
| | | store.setLayerPanelShow(false); |
| | | |
| | | // 土地管理 |
| | | if (store.tdglInfo.flag) { |
| | | axios |
| | |
| | | } |
| | | |
| | | window.mapapi.forEachFeatureAtPixel(e.pixel, function (feature) { |
| | | let properties = feature.getProperties().features[0].values_; |
| | | console.log(properties, 'aaa'); |
| | | console.log(properties.values_, 'bbb'); |
| | | for (const propertyNames in properties) { |
| | | if (propertyNames.indexOf("监控名") !== -1) { |
| | | // objdata = { |
| | | // POITYPE: "SPJK", |
| | | // name: properties["JK名称"]._value, |
| | | // type: properties["JK类型"]._value, |
| | | // function: properties["功能"]._value, |
| | | // area: properties["所在区"]._value, |
| | | // number: properties["JK编号"]._value, |
| | | // code: properties["JK内码"]._value, |
| | | // lon: lon, |
| | | // lat: lat, |
| | | // } |
| | | Message({ |
| | | message: '连接状态查询中', |
| | | type: 'info', |
| | | offset: 60, |
| | | center: true, |
| | | duration: 1000, |
| | | }); |
| | | layerOpen(properties["JK名称"]._value, { |
| | | width: "100%", |
| | | height: "40%", |
| | | // offset: [offsetTop + "px", "380px"], |
| | | url: "../../static/video/video.html?code=" + properties["JK内码"]._value, |
| | | fn: { |
| | | success: (layero, index) => { |
| | | SmartEarthPopupData.layerContainer = layero; |
| | | }, |
| | | end: () => { |
| | | |
| | | console.log(feature,'feature') |
| | | }, |
| | | cancel: () => { |
| | | |
| | | }, |
| | | }, |
| | | }); |
| | | return |
| | | } else if (propertyNames.indexOf("部件名称") !== -1) { |
| | | objdata = { |
| | | // 点位类型(中英文配置表poiKeys.js) |
| | | POITYPE: "CSBJ", |
| | | // 展示字段 |
| | | name: properties["部件名称"], |
| | | address: properties["安装地址"], |
| | | code: properties["部件编码"], |
| | | type: properties["部件类型"], |
| | | // 弹框经纬度 |
| | | lon: properties["Longtitude"], |
| | | lat: properties["Latitude"], |
| | | } |
| | | } else if (propertyNames.indexOf("井编号") !== -1) { |
| | | objdata = { |
| | | POITYPE: "YINJ", |
| | | name: properties["井名称"], |
| | | depth: properties["井深"], |
| | | type: properties["井类型"], |
| | | location: properties["位置"], |
| | | code: properties["井编号"], |
| | | lon: properties["Longtitude"], |
| | | lat: properties["Latitude"], |
| | | } |
| | | } else if (propertyNames.indexOf("QYMC") !== -1) { |
| | | objdata = { |
| | | POITYPE: "QY", |
| | | QYMC: properties["QYMC"], |
| | | XYDM: properties["XYDM"], |
| | | BZDZ: properties["BZDZ"], |
| | | DZ: properties["DZ"], |
| | | lon: properties["Longtitude"], |
| | | lat: properties["Latitude"], |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (feature && feature.values_.desc) { |
| | | let obj = feature.values_.desc |
| | | objdata = { |
| | | POITYPE: "POINT", |
| | | name: obj.name, |
| | | address: obj.address, |
| | | // lon: obj.lng, |
| | | // lat: obj.lat |
| | | } |
| | | |
| | | store.setTdglShow(false); |
| | | store.setTdlgInfo({}); |
| | | store.setdwShow(true); |
| | | store.setdwInfo(objdata); |
| | | |
| | | // if (window.instance) { |
| | | // window.instance.$destroy(); |
| | | // } |
| | |
| | | // }); |
| | | // window.instance.$mount(); |
| | | } |
| | | |
| | | store.setTdglShow(false); |
| | | store.setTdlgInfo({}); |
| | | store.setdwShow(true); |
| | | store.setdwInfo(objdata); |
| | | }); |
| | | } |
| | | if (state) { |