| | |
| | | ) |
| | | // axios.get(window.gisBaseUrl + '/gisserver/wfsserver/qiyelianqiye?version=1.3.0&request=GetFeature&format=json&typename=企业链企业') |
| | | .then(dataSource => { |
| | | console.log(dataSource); |
| | | // console.log(dataSource); |
| | | store.qiyeJsonInfo = dataSource |
| | | }) |
| | | .catch((err) => { |
| | |
| | | axios |
| | | .get( |
| | | // "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + |
| | | window.gisBaseUrl + "yzxncsApi/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + |
| | | window.gisBaseUrl + "BEApi/cs/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + |
| | | window.clickPOI.lon + |
| | | "&lat=" + |
| | | window.clickPOI.lat + |
| | |
| | | axios |
| | | .get( |
| | | // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + |
| | | window.gisBaseUrl + "yzxncsApi/poisearch/guihuacon/getInfo?ydbm=" + |
| | | window.gisBaseUrl + "BEApi/cs/poisearch/guihuacon/getInfo?ydbm=" + |
| | | response.data.NO |
| | | ) |
| | | .then( |
| | |
| | | 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 |
| | | .get( |
| | | // "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + |
| | | window.gisBaseUrl + "yzxncsApi/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + |
| | | window.gisBaseUrl + "BEApi/cs/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" + |
| | | // window.gisBaseUrl + "cs/geowinmap_xncs/ds?&lng=" + |
| | | e.coordinate[0] + |
| | | "&lat=" + |
| | | e.coordinate[1] + |
| | |
| | | window.tdglLine = new ol.layer.Vector({ |
| | | source: new ol.source.Vector({ |
| | | features: [feature] // 将要素对象加入到图层源中 |
| | | }), |
| | | style: new ol.style.Style({ |
| | | stroke: new ol.style.Stroke({ |
| | | color: 'red', |
| | | width: 3 |
| | | }), |
| | | }) |
| | | }); |
| | | window.mapapi.addLayer(window.tdglLine) |
| | | |
| | | |
| | | axios |
| | | .get( |
| | | // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + |
| | | window.gisBaseUrl + "yzxncsApi/poisearch/guihuacon/getInfo?ydbm=" + |
| | | response.data.NO |
| | | ) |
| | | .then( |
| | | info => { |
| | | let data = info.data.data; |
| | | if (data.yongdishuju === null) { |
| | | objdata = { |
| | | POITYPE: "NOTDGL", |
| | | zwxx: "暂无信息", |
| | | lon: window.clickPOI.lon, |
| | | lat: window.clickPOI.lat, |
| | | } |
| | | } else { |
| | | qiyexinxi = info.data.data.qiyexinxi; |
| | | qysl = data.qiyexinxi.length; |
| | | if (qysl > 0) { |
| | | ydbm = data.qiyexinxi[0]["地块编号"]; |
| | | } else { |
| | | ydbm = data.churangxinxi["ydbh"]; |
| | | } |
| | | try { |
| | | ydlx = data.yongdishuju["ydlxmc"]; |
| | | } catch (e) { } |
| | | try { |
| | | cyfx = data.yongdishuju["cyfx"]; |
| | | } catch (e) { } |
| | | try { |
| | | // this.crzt = response.data["ZT"]; |
| | | switch (response.data["ZT"]) { |
| | | case 3: |
| | | crzt = "已出让"; |
| | | break; |
| | | case 4: |
| | | crzt = "未出让"; |
| | | break; |
| | | } |
| | | } catch (e) { } |
| | | try { |
| | | ydmj = parseFloat( |
| | | "" + data.yongdishuju["ydmj"] |
| | | ).toFixed(0); |
| | | } catch (e) { } |
| | | try { |
| | | crnx = data.churangxinxi["crnx"]; |
| | | } catch (e) { } |
| | | try { |
| | | crnf = data.churangxinxi["crnf"]; |
| | | } catch (e) { } |
| | | try { |
| | | rjl = data.yongdishuju["rjl"]; |
| | | } catch (e) { } |
| | | try { |
| | | jzxg = data.yongdishuju["jzxg"]; |
| | | } catch (e) { } |
| | | try { |
| | | jzmd = data.yongdishuju["jzmd"]; |
| | | } catch (e) { } |
| | | objdata = { |
| | | POITYPE: "TDGL", |
| | | ydbm, |
| | | ydlx, |
| | | cyfx, |
| | | crzt, |
| | | ydmj, |
| | | ydbm, |
| | | crnx, |
| | | crnf, |
| | | rjl, |
| | | jzxg, |
| | | jzmd, |
| | | lon: e.coordinate[0], |
| | | lat: e.coordinate[1], |
| | | } |
| | | } |
| | | |
| | | store.setTdglShow(false); |
| | | store.setTdlgInfo({}); |
| | | store.setTdglShow(true); |
| | | store.setTdlgInfo(objdata); |
| | | axios.get( |
| | | // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + |
| | | window.gisBaseUrl + "BEApi/cs/poisearch/guihuacon/getInfo?ydbm=" + response.data.NO |
| | | ).then((info) => { |
| | | let data = info.data.data; |
| | | if (data.yongdishuju === null) { |
| | | objdata = { |
| | | POITYPE: "NOTDGL", |
| | | zwxx: "暂无信息", |
| | | lon: e.coordinate[0], |
| | | lat: e.coordinate[1], |
| | | } |
| | | ); |
| | | } else { |
| | | qiyexinxi = info.data.data.qiyexinxi; |
| | | qysl = data.qiyexinxi.length; |
| | | if (qysl > 0) { |
| | | ydbm = data.qiyexinxi[0]["地块编号"]; |
| | | } else { |
| | | ydbm = data.churangxinxi["ydbh"]; |
| | | } |
| | | try { |
| | | ydlx = data.yongdishuju["ydlxmc"]; |
| | | } catch (e) { } |
| | | try { |
| | | cyfx = data.yongdishuju["cyfx"]; |
| | | } catch (e) { } |
| | | try { |
| | | // this.crzt = response.data["ZT"]; |
| | | switch (response.data["ZT"]) { |
| | | case 3: |
| | | crzt = "已出让"; |
| | | break; |
| | | case 4: |
| | | crzt = "未出让"; |
| | | break; |
| | | } |
| | | } catch (e) { } |
| | | try { |
| | | ydmj = parseFloat( |
| | | "" + data.yongdishuju["ydmj"] |
| | | ).toFixed(0); |
| | | } catch (e) { } |
| | | try { |
| | | crnx = data.churangxinxi["crnx"]; |
| | | } catch (e) { } |
| | | try { |
| | | crnf = data.churangxinxi["crnf"]; |
| | | } catch (e) { } |
| | | try { |
| | | rjl = data.yongdishuju["rjl"]; |
| | | } catch (e) { } |
| | | try { |
| | | jzxg = data.yongdishuju["jzxg"]; |
| | | } catch (e) { } |
| | | try { |
| | | jzmd = data.yongdishuju["jzmd"]; |
| | | } catch (e) { } |
| | | objdata = { |
| | | POITYPE: "TDGL", |
| | | ydbm, |
| | | ydlx, |
| | | cyfx, |
| | | crzt, |
| | | ydmj, |
| | | ydbm, |
| | | crnx, |
| | | crnf, |
| | | rjl, |
| | | jzxg, |
| | | jzmd, |
| | | lon: e.coordinate[0], |
| | | lat: e.coordinate[1], |
| | | } |
| | | } |
| | | |
| | | store.setTdglShow(false); |
| | | store.setTdlgInfo({}); |
| | | store.setTdglShow(true); |
| | | store.setTdlgInfo(objdata); |
| | | } |
| | | ); |
| | | |
| | | }) |
| | | return; |
| | | } |
| | | |
| | | window.mapapi.forEachFeatureAtPixel(e.pixel, function (feature) { |
| | | console.log(feature.getProperties(), 'aaa'); |
| | | |
| | | console.log(feature,'feature') |
| | | if (feature && feature.values_.desc) { |
| | | let obj = feature.values_.desc |
| | | //搜索的点位 |
| | | if (window.pointArr.length > 0) { |
| | | let obj = feature.getProperties().desc |
| | | objdata = { |
| | | POITYPE: "POINT", |
| | | name: obj.name, |
| | | address: obj.address, |
| | | // lon: obj.lng, |
| | | // lat: obj.lat |
| | | } |
| | | } else { |
| | | let properties = feature.getProperties().features[0].values_; |
| | | for (const propertyNames in properties) { |
| | | if (propertyNames.indexOf("监控名") !== -1) { |
| | | const infoM = Message({ |
| | | message: '该点位视频监控查询中,请稍后', |
| | | type: 'info', |
| | | offset: 75, |
| | | center: true, |
| | | duration: 0, |
| | | }); |
| | | axios |
| | | .get( |
| | | // 请求在线状态 |
| | | window.gisBaseUrl + "BEApi/getCameraDetails?cameraIndexCode=" + |
| | | properties["JK内码"] |
| | | ).then(res => { |
| | | if (res.data.data.status == 1) { |
| | | infoM.close(); |
| | | Message({ |
| | | message: '视频监控在线中', |
| | | type: 'success', |
| | | offset: 75, |
| | | center: true, |
| | | duration: 2000, |
| | | }); |
| | | layerOpen(properties["JK名称"], { |
| | | width: "100%", |
| | | height: "40%", |
| | | // offset: [offsetTop + "px", "380px"], |
| | | url: "../../static/video/video.html?code=" + properties["JK内码"], |
| | | fn: { |
| | | success: (layero, index) => { |
| | | SmartEarthPopupData.layerContainer = layero; |
| | | }, |
| | | end: () => { |
| | | |
| | | store.setTdglShow(false); |
| | | store.setTdlgInfo({}); |
| | | store.setdwShow(true); |
| | | store.setdwInfo(objdata); |
| | | // if (window.instance) { |
| | | // window.instance.$destroy(); |
| | | // } |
| | | // window.instance = new PoiLayerConstructor({ |
| | | // data: { |
| | | // list: objdata |
| | | // } |
| | | // }); |
| | | // window.instance.$mount(); |
| | | }, |
| | | cancel: () => { |
| | | |
| | | }, |
| | | }, |
| | | }); |
| | | } else { |
| | | infoM.close(); |
| | | Message({ |
| | | message: '该点位视频监控离线中', |
| | | type: 'errer', |
| | | offset: 75, |
| | | center: true, |
| | | duration: 2000, |
| | | }); |
| | | return |
| | | } |
| | | }) |
| | | 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"], |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | store.setTdglShow(false); |
| | | store.setTdlgInfo({}); |
| | | store.setdwShow(true); |
| | | store.setdwInfo(objdata); |
| | | }); |
| | | } |
| | | if (state) { |
| | |
| | | zoom: 15, |
| | | duration: 1500 |
| | | }) |
| | | } |
| | | } |
| | | |
| | | //监听地图双击事件 |
| | | |
| | | export function touchClick() { |
| | | let dom = document.getElementById('openlayerContainer'); |
| | | dom.addEventListener('touchstart', onTouchStart); |
| | | function onTouchStart(e) { |
| | | let len = e.touches.length; |
| | | if (len === 2) { |
| | | window.mapapi.getView().animate({ |
| | | center: window.mapapi.getView().getCenter(), |
| | | zoom: window.mapapi.getView().getZoom() - 1, |
| | | duration: 1000, |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |