From 1de23a596f1457db2ea9861645a568e779d7664f Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期五, 19 一月 2024 17:33:52 +0800 Subject: [PATCH] 20240119 --- src/components/leftMenu/sousuo.vue | 58 +++++++++++++++---- src/utils/map.js | 8 +- src/components/sideMenu/layerTreePanel/layerTreePanel.vue | 2 static/config.json | 2 src/utils/store.js | 14 +++- static/img/image/ddrf.png | 0 src/components/sideMenu/layerMenu/layerPanel.vue | 53 +++++++++++++++-- src/components/login.vue | 3 src/components/sideMenu/roamPanel/roamPanel.vue | 12 +++ src/components/rightNavigation/NavigationBar.vue | 7 ++ 10 files changed, 124 insertions(+), 35 deletions(-) diff --git a/src/components/leftMenu/sousuo.vue b/src/components/leftMenu/sousuo.vue index 180f6f6..993092d 100644 --- a/src/components/leftMenu/sousuo.vue +++ b/src/components/leftMenu/sousuo.vue @@ -80,8 +80,8 @@ <div style="font-size: 0.12rem; color: black"> <!-- <span>鍦板潃:{{ item.address ? item.address : "鏆傛棤璇︾粏鍦板潃" }}</span><br /> <span>鐢佃瘽:{{ item.telphone ? item.telphone : "鏆傛棤鑱旂郴鏂瑰紡" }}</span> --> - <span>鍖哄煙:{{ item.area ? item.area : "鏆傛棤鍖哄煙淇℃伅" }}</span - ><br /> + <!-- <span>鍖哄煙:{{ item.area ? item.area : "鏆傛棤鍖哄煙淇℃伅" }}</span> --> + <!-- <br /> --> <span >鍦板潃:{{ item.address ? item.address : "鏆傛棤璇︾粏鍦板潃" }}</span > @@ -283,15 +283,26 @@ pname: "", resType: "", }), - // 甯傜骇骞冲彴 + // // 甯傜骇骞冲彴锛堢櫨搴︼細浼氭煡鍒板鍦帮級 + // axios.get(common.poiserve, { + // params: { + // request: "bdPoi", + // query: this.poi_text, + // output: "json", + // coord: "cgcs2000", + // page_num: 0, + // page_size: 20, + // }, + // }), + // 甯傜骇骞冲彴锛堥珮寰凤級 axios.get(common.poiserve, { params: { - request: "bdPoi", - query: this.poi_text, + request: "GdPoi", + keywords: this.poi_text, output: "json", coord: "cgcs2000", - page_num: 0, - page_size: 20, + offset: 20, + page: 1, }, }), ]) @@ -311,22 +322,43 @@ }); } // 甯傜骇骞冲彴 - if (data[1].data.status == 0) { - data[1].data.results.forEach((val) => { + // // 鐧惧害 + // if (data[1].data.status == 0) { + // data[1].data.results.forEach((val) => { + // let obj = { + // address: val.address, + // adname: val.area, + // cityname: val.city, + // id: val.uid, + // lat: val.location.lat, + // lng: val.location.lng, + // name: val.name, + // pname: val.province, + // }; + // Allresults.push(obj); + // }); + // } + // 楂樺痉 + if (data[1].data.status == 1) { + data[1].data.pois.forEach((val) => { + let poiarr = val.location.split(","); + let poi = { + lon: parseFloat(poiarr[0]), + lat: parseFloat(poiarr[1]), + }; let obj = { address: val.address, adname: val.area, cityname: val.city, id: val.uid, - lat: val.location.lat, - lng: val.location.lng, + lat: poi.lat, + lng: poi.lon, name: val.name, pname: val.province, }; Allresults.push(obj); }); } - this.total = Allresults.length; this.poiList = Allresults; this.showList = true; @@ -363,11 +395,11 @@ billboard: { verticalOrigin: Cesium.VerticalOrigin.BOTTOM, scale: 1, - // image: window.SmartEarthRootUrl + "/Workers/image/mark.png", image: window.SmartEarthRootUrl + "/Workers/image/mark.png", heightReference: 1, disableDepthTestDistance: Number.POSITIVE_INFINITY, }, + properties:item }); // 濡傛灉鏄湴鍧楋紝娣诲姞鑼冨洿绾� if (item.type == "澶у叴鐢ㄥ湴") { diff --git a/src/components/login.vue b/src/components/login.vue index 9903b92..5ccfd93 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -16,8 +16,7 @@ // ) { // this.passFree(); // } - // console.log(1); - + // // 浜姙鍏嶅瘑鐧诲綍锛坲rl甯﹀弬"focus-open-code"锛� // if (this.$route.query["focus-open-code"]) { // this.passJBFree(); diff --git a/src/components/rightNavigation/NavigationBar.vue b/src/components/rightNavigation/NavigationBar.vue index c294563..54c3244 100644 --- a/src/components/rightNavigation/NavigationBar.vue +++ b/src/components/rightNavigation/NavigationBar.vue @@ -107,7 +107,12 @@ }, methods: { handleMenuListShow() { - //娓呴櫎鐐� + // 娓呴櫎瀹氱偣缁曢 + if (window.pointerFly) { + window.pointerFly && window.pointerFly.end(); + window.pointerFly = null; + } + //娓呴櫎鎼滅储鐐� flyPoint && Viewer.entities.remove(flyPoint); flyPoint = undefined; this.showMenuList.show = !this.showMenuList.show; diff --git a/src/components/sideMenu/layerMenu/layerPanel.vue b/src/components/sideMenu/layerMenu/layerPanel.vue index 741b953..efcbde4 100644 --- a/src/components/sideMenu/layerMenu/layerPanel.vue +++ b/src/components/sideMenu/layerMenu/layerPanel.vue @@ -117,7 +117,6 @@ </template> <script> -let tdglLayer; import { loadHXQ, loadJKQ, @@ -252,6 +251,7 @@ curFuncIndex: -1, curZTIndex: -1, state: store.thematicLayer, + basicMapChecked: store.basicMapChecked.val, }; }, mounted() { @@ -268,10 +268,14 @@ 1 ); loadEnterprise(); - }, 1000); + }, 2000); }); }, methods: { + changeLayerView(max, enableTilt) { + window.Viewer.scene.screenSpaceCameraController.maximumZoomDistance = max; + window.Viewer.scene.screenSpaceCameraController.enableTilt = enableTilt; + }, handleMapClick(result, index) { const val = layers.filter((res) => { if (res.name == result.name) { @@ -300,6 +304,13 @@ }, // 浜岀淮搴曞浘閫夋嫨 handleEMapClick(result, index) { + // 璁剧疆鐩告満 + if (result.name == "浜岀淮鍦板浘") { + this.changeLayerView(25000, false); + } else if (result.name == "褰卞儚鍦板浘") { + this.changeLayerView(50000, false); + } + // 鍒囨崲鍥惧眰 const val = layers.filter((res) => { if (res.name == result.name) { return res; @@ -325,6 +336,13 @@ }, // 涓夌淮妯″瀷閫夋嫨 handleSMapClick(result, index) { + // 璁剧疆鐩告満 + if (result.name == "3D鍩庡競") { + this.changeLayerView(45000, true); + } else if (result.name == "涓夌淮妯″瀷") { + this.changeLayerView(80000, true); + } + // 鍒囨崲鍥惧眰 const val = layers.filter((res) => { if (res.name == result.name) { return res; @@ -468,8 +486,8 @@ } this.curFuncIndex = -1; window.clusterLayer && window.clusterLayer.clear(); - if (tdglLayer) { - sgworld.Creator.DeleteObject(tdglLayer); + if (window.tdglLayer) { + sgworld.Creator.DeleteObject(window.tdglLayer); } } else { // 闅愯棌搴曢儴鍥惧眰闈㈢増 @@ -481,7 +499,7 @@ this.curFuncIndex = index; switch (index) { case 0: - tdglLayer = sgworld.Creator.createImageryProvider( + window.tdglLayer = sgworld.Creator.createImageryProvider( layers[8].name, "tms", { @@ -504,12 +522,13 @@ "" ); store.setTdglFlag(true); + break; case 1: this.curFuncIndex = -1; store.setTdglFlag(false); - if (tdglLayer) { - sgworld.Creator.DeleteObject(tdglLayer); + if (window.tdglLayer) { + sgworld.Creator.DeleteObject(window.tdglLayer); } store.setHistoryShow(true); break; @@ -523,7 +542,6 @@ watch: { "state.itemId": { handler: function (newVal, oldVal) { - debugger; let that = this; if (newVal == "") { this.curAreaTypeIndex = -1; @@ -542,6 +560,25 @@ } }, }, + // 鍩虹鍥惧眰 + "basicMapChecked.val": { + handler: function (newVal, oldVal) { + if (newVal == "涓夌淮妯″瀷") { + this.handleSMapClick( + { + id: "swmx", + name: "涓夌淮妯″瀷", + active: false, + type: "san", + src: require("@/assets/img/layer/swmx.png"), + }, + 1 + ); + } + }, + immediate: true, //鍒锋柊鍔犺浇 绔嬮┈瑙﹀彂涓�娆andler + deep: true, // 鍙互娣卞害妫�娴嬪埌 obj 瀵硅薄鐨勫睘鎬у�肩殑鍙樺寲 + }, }, }; </script> diff --git a/src/components/sideMenu/layerTreePanel/layerTreePanel.vue b/src/components/sideMenu/layerTreePanel/layerTreePanel.vue index d0da650..a9609ba 100644 --- a/src/components/sideMenu/layerTreePanel/layerTreePanel.vue +++ b/src/components/sideMenu/layerTreePanel/layerTreePanel.vue @@ -2064,7 +2064,7 @@ qiyeCluster(treeNode) { let dataSource; if (treeNode.layer == "浼佷笟閾句紒涓�") { - console.log(store.qiyeJsonInfo); + // console.log(store.qiyeJsonInfo); dataSource = store.qiyeJsonInfo; } Viewer.dataSources.add(dataSource); diff --git a/src/components/sideMenu/roamPanel/roamPanel.vue b/src/components/sideMenu/roamPanel/roamPanel.vue index 6ddb505..97f3d4e 100644 --- a/src/components/sideMenu/roamPanel/roamPanel.vue +++ b/src/components/sideMenu/roamPanel/roamPanel.vue @@ -68,6 +68,7 @@ }; }, methods: { + // 瀹氱偣缁曢 handleAroundClick() { this.closeCurrentOperator(); store.setRoamPanelShow(false); @@ -82,9 +83,18 @@ // //缁撴潫璺緞婕父 // this.ljmy(); // } - sgworld.drawObj = window.currentOperator = sgworld.Analysis.setPointFly(); + window.pointerFly=sgworld.drawObj = window.currentOperator = sgworld.Analysis.setPointFly(); }, + // 缁撴潫椤剁偣缁曢 + setClearPointFly() { + if (this.pointerFly) { + this.pointerFly && this.pointerFly.end(); + this.pointerFly = null; + } + }, + // 婕父 handleRoamClick(result) { + store.setBasicMap("涓夌淮褰卞儚"); store.setRoamPanelShow(false); store.setSearchPanelShow(false); const val = roman.filter((res) => { diff --git a/src/utils/map.js b/src/utils/map.js index f66741d..048a329 100644 --- a/src/utils/map.js +++ b/src/utils/map.js @@ -614,7 +614,7 @@ }) } let nPickFeature = sgworld.Viewer.scene.pick(event.position); - // console.log(nPickFeature); + console.log(nPickFeature); // console.log(event.position);//灞忓箷浣嶇疆 if (!nPickFeature || !nPickFeature.id) { return @@ -660,11 +660,10 @@ nPickFeature.primitive.scale = 1; nPickFeature.primitive.image = window.SmartEarthRootUrl + "Workers/image/point.png"; - //鐐瑰嚮寮规 + //鐐瑰嚮寮规(閮ㄤ欢銆佷紒涓氥�佺洃鎺�) if (nPickFeature.id.tag) { let properties = nPickFeature.id.properties; let propertyNames = nPickFeature.id.properties.propertyNames; - if (propertyNames.indexOf("鐩戞帶鍚�") !== -1) { // objdata = { // POITYPE: "SPJK", @@ -742,8 +741,6 @@ lat: lat, } } - - divPoint3 && divPoint3.deleteObject(); store.setPoplayerShowAction(false); store.setPoplayerListAction({}); @@ -782,6 +779,7 @@ }); return; } + // } // if (nPickFeature.id && nPickFeature.id.name.indexOf('YINJ') != -1) { // divPoint3 && divPoint3.deleteObject(); diff --git a/src/utils/store.js b/src/utils/store.js index b9e7cd6..1cf3288 100644 --- a/src/utils/store.js +++ b/src/utils/store.js @@ -38,7 +38,7 @@ MenuList: { show: false }, - setMenuListShow(val){ + setMenuListShow(val) { this.MenuList.show = val; }, /**鍥惧眰椤甸潰 */ @@ -151,8 +151,16 @@ setHistoryShow(val) { this.history.show = val; }, - qiyeJsonInfo:{} - + qiyeJsonInfo: {}, + /* + 鍩虹鍥惧眰閫夋嫨鎯呭喌 + */ + basicMapChecked: { + val: "", + }, + setBasicMap(val) { + this.basicMapChecked.val = val; + } }; export default store; \ No newline at end of file diff --git a/static/config.json b/static/config.json index af2e525..7bf4d55 100644 --- a/static/config.json +++ b/static/config.json @@ -6,7 +6,7 @@ "traffic": "http://www.map.zj.cn:8899/geoserver/zjplatform/wms", "poi_search11": "http://10.10.4.116:8085/yzAdapter/Navigation", "poi_search22": "http://10.10.4.115:8022/poisearch/qgpoi/POIQuery", - "poi_search": "https://skyzt.bda.gov.cn/yzAdapter/Navigation", + "poi_search": "https://skyzt.bda.gov.cn/service/NavigationService", "poi_search2": "https://skyzt.bda.gov.cn/yzxncsApi/poisearch/qgpoi/POIQuery", "space_query": "http://10.20.55.133:3866/zjchys/query/list", "gis_base_url": "https://skyzt.bda.gov.cn/" diff --git a/static/img/image/ddrf.png b/static/img/image/ddrf.png index 61ce6f3..d6f5689 100644 --- a/static/img/image/ddrf.png +++ b/static/img/image/ddrf.png Binary files differ -- Gitblit v1.9.3