From 5a56e66be3532e97436ac6d54bd8d66b84203e06 Mon Sep 17 00:00:00 2001 From: ZhAkps <46207005+ZhAkps@users.noreply.github.com> Date: 星期五, 02 二月 2024 14:56:12 +0800 Subject: [PATCH] Merge branch 'master' of http://106.120.22.35:48888/r/PM20221203225_MobileWeb --- src/components/leftMenu/sousuo.vue | 433 ++++++++++++++++++++++++----------------------- src/utils/map.js | 7 src/components/viewer.vue | 4 src/assets/GLOBAL.vue | 2 src/components/sideMenu/layerMenu/layerPanel.vue | 6 src/components/login.vue | 13 src/components/sideMenu/roamPanel/roamPanel.vue | 1 src/components/sideMenu/sliderAlpha/alpha.vue | 41 --- 8 files changed, 244 insertions(+), 263 deletions(-) diff --git a/src/assets/GLOBAL.vue b/src/assets/GLOBAL.vue index 326d563..1baf20d 100644 --- a/src/assets/GLOBAL.vue +++ b/src/assets/GLOBAL.vue @@ -1,6 +1,8 @@ <script> const layers = []; +const alpha = 1; export default { layers, //鏀堕泦鍣� + alpha, }; </script> \ No newline at end of file diff --git a/src/components/leftMenu/sousuo.vue b/src/components/leftMenu/sousuo.vue index a7740c9..0841a64 100644 --- a/src/components/leftMenu/sousuo.vue +++ b/src/components/leftMenu/sousuo.vue @@ -136,7 +136,7 @@ height: 100%; top: 0; background-color: #f3f3f3; - z-index: 99; + z-index: 99999; } .el-select { width: 80px; @@ -282,6 +282,100 @@ rectangle.maxy > 31.182515322 && (rectangle.maxy = 31.182515322); return `RECT(${rectangle.minx} ${rectangle.miny},${rectangle.maxx} ${rectangle.maxy})`; }, + getPoi() { + axios + .get(common.poiserve, { + params: { + request: "GdPoi", + keywords: this.poi_text, + output: "json", + coord: "cgcs2000", + offset: 20, + page: 1, + }, + }) + .then((res) => { + // 楂樺痉 + if (res.data.status == 1) { + res.data.pois && + res.data.pois + .filter((item) => { + var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); + return ( + item.pname.includes("鍖椾含") && + item.name.includes(this.poi_text) && + !reg.test(item.typecode) + ); + }) + .forEach((val) => { + let poiarr = val.location.split(","); + let poi = { + lon: parseFloat(poiarr[0]), + lat: parseFloat(poiarr[1]), + }; + let obj = { + adcode: val.adcode, + address: val.address, + adname: val.area, + citycode: val.citycode, + cityname: val.cityname, + id: val.uid, + lat: poi.lat, + lng: poi.lon, + name: val.name, + pcode: val.pcode, + pname: val.province, + type: val.type, + typecode: val.typecode, + }; + Allresults.push(obj); + }); + } + this.total = Allresults.length; + this.poiList = Allresults; + this.showList = true; + }); + }, + getData() { + axios + .post(common.poiserve2, { + adcode: "110115", + address: { + name: "", + type: "", + }, + adname: "澶у叴鍖�", + cityname: "鍖椾含甯�", + name: { + name: this.poi_text, + type: "", + }, + page: 1, + perPageCount: 20, + pcode: "110000", + pname: "", + resType: "", + }) + .then((res) => { + if (res.status == 200) { + res.data.data.res && + res.data.data.res + .filter((item) => { + // 鍒ゆ柇鍦板潡鏄惁鏈夋眽瀛� + var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); + return ( + item.name.includes(this.poi_text) && reg.test(item.typecode) + ); + }) + .forEach((val) => { + Allresults.push(val); + }); + } + this.total = Allresults.length; + this.poiList = Allresults; + this.showList = true; + }); + }, search() { if (this.poi_text === "") { this.poiList = []; @@ -292,221 +386,136 @@ this.poiList = []; switch (this.select) { case "鍏ㄩ儴": - axios - .all([ - // 115鎺ュ彛锛堝彲鏌ュ湴鍧楀悕锛� - axios.post(common.poiserve2, { - adcode: "110115", - address: { - name: "", - type: "", - }, - adname: "澶у叴鍖�", - cityname: "鍖椾含甯�", - name: { - name: this.poi_text, - type: "", - }, - page: 1, - perPageCount: 20, - pcode: "110000", - 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: "GdPoi", - keywords: this.poi_text, - output: "json", - coord: "cgcs2000", - offset: 20, - page: 1, - }, - }), - ]) - .then( - (data) => { - // this.total = data.data.pois.length; - // this.poiList = - // data.data && data.data.pois; - //115鎺ュ彛 - if (data[0].status == 200) { - data[0].data.data.res && - data[0].data.data.res - .filter((item) => { - return item.name.includes(this.poi_text); - }) - .forEach((val) => { - Allresults.push(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 && - data[1].data.pois - .filter((item) => { - return ( - item.pname.includes("鍖椾含") && - item.name.includes(this.poi_text) - ); - }) - .forEach((val) => { - let poiarr = val.location.split(","); - let poi = { - lon: parseFloat(poiarr[0]), - lat: parseFloat(poiarr[1]), - }; - let obj = { - adcode: val.adcode, - address: val.address, - adname: val.area, - citycode: val.citycode, - cityname: val.cityname, - id: val.uid, - lat: poi.lat, - lng: poi.lon, - name: val.name, - pcode: val.pcode, - pname: val.province, - type: val.type, - typecode: val.typecode, - }; - Allresults.push(obj); - }); - } - this.total = Allresults.length; - this.poiList = Allresults; - this.showList = true; - console.log(Allresults); - }, - (response) => { - console.log("error"); - } - ); + this.getPoi(); + this.getData(); + // axios + // .all([ + // // 115鎺ュ彛锛堝彲鏌ュ湴鍧楀悕锛� + // axios.post(common.poiserve2, { + // adcode: "110115", + // address: { + // name: "", + // type: "", + // }, + // adname: "澶у叴鍖�", + // cityname: "鍖椾含甯�", + // name: { + // name: this.poi_text, + // type: "", + // }, + // page: 1, + // perPageCount: 20, + // pcode: "110000", + // 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: "GdPoi", + // keywords: this.poi_text, + // output: "json", + // coord: "cgcs2000", + // offset: 20, + // page: 1, + // }, + // }), + // ]) + // .then( + // (data) => { + // // this.total = data.data.pois.length; + // // this.poiList = + // // data.data && data.data.pois; + // //115鎺ュ彛 + // if (data[0].status == 200) { + // data[0].data.data.res && + // data[0].data.data.res + // .filter((item) => { + // return item.name.includes(this.poi_text); + // }) + // .forEach((val) => { + // Allresults.push(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); + // // }); + // // } + // // 楂樺痉 + + // console.log(data, "鏁版嵁"); + // if (data[0].data.status == 1) { + // data[0].data.pois && + // data[0].data.pois + // .filter((item) => { + // return ( + // item.pname.includes("鍖椾含") && + // item.name.includes(this.poi_text) + // ); + // }) + // .forEach((val) => { + // let poiarr = val.location.split(","); + // let poi = { + // lon: parseFloat(poiarr[0]), + // lat: parseFloat(poiarr[1]), + // }; + // let obj = { + // adcode: val.adcode, + // address: val.address, + // adname: val.area, + // citycode: val.citycode, + // cityname: val.cityname, + // id: val.uid, + // lat: poi.lat, + // lng: poi.lon, + // name: val.name, + // pcode: val.pcode, + // pname: val.province, + // type: val.type, + // typecode: val.typecode, + // }; + // Allresults.push(obj); + // }); + // } + // this.total = Allresults.length; + // this.poiList = Allresults; + // this.showList = true; + // console.log(Allresults); + // }, + // (response) => { + // console.log("error"); + // } + // ); break; case "POI": - axios - .get(common.poiserve, { - params: { - request: "GdPoi", - keywords: this.poi_text, - output: "json", - coord: "cgcs2000", - offset: 20, - page: 1, - }, - }) - .then((res) => { - // 楂樺痉 - if (res.data.status == 1) { - res.data.pois && - res.data.pois - .filter((item) => { - var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); - return ( - item.pname.includes("鍖椾含") && - item.name.includes(this.poi_text) && - !reg.test(item.typecode) - ); - }) - .forEach((val) => { - let poiarr = val.location.split(","); - let poi = { - lon: parseFloat(poiarr[0]), - lat: parseFloat(poiarr[1]), - }; - let obj = { - adcode: val.adcode, - address: val.address, - adname: val.area, - citycode: val.citycode, - cityname: val.cityname, - id: val.uid, - lat: poi.lat, - lng: poi.lon, - name: val.name, - pcode: val.pcode, - pname: val.province, - type: val.type, - typecode: val.typecode, - }; - Allresults.push(obj); - }); - } - this.total = Allresults.length; - this.poiList = Allresults; - this.showList = true; - }); + this.getPoi(); break; case "鍦板潡": - axios - .post(common.poiserve2, { - adcode: "110115", - address: { - name: "", - type: "", - }, - adname: "澶у叴鍖�", - cityname: "鍖椾含甯�", - name: { - name: this.poi_text, - type: "", - }, - page: 1, - perPageCount: 20, - pcode: "110000", - pname: "", - resType: "", - }) - .then((res) => { - if (res.status == 200) { - res.data.data.res && - res.data.data.res - .filter((item) => { - // 鍒ゆ柇鍦板潡鏄惁鏈夋眽瀛� - var reg = new RegExp("[\\u4E00-\\u9FFF]+", "g"); - return ( - item.name.includes(this.poi_text) && - reg.test(item.typecode) - ); - }) - .forEach((val) => { - Allresults.push(val); - }); - } - this.total = Allresults.length; - this.poiList = Allresults; - this.showList = true; - }); + this.getData(); break; } } diff --git a/src/components/login.vue b/src/components/login.vue index 9fccbff..9651c5c 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -26,13 +26,12 @@ methods: { getQueryString(name) { - this.$router.push("/index"); - // var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); - // var r = window.location.search.substr(1).match(reg); - // if (r != null) { - // this.$router.push("/index"); - // } - // return null; + var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + var r = window.location.search.substr(1).match(reg); + if (r != null) { + this.$router.push("/index"); + } + return null; }, // 浜姙鍏嶅瘑鐧诲綍 // passJBFree() { diff --git a/src/components/sideMenu/layerMenu/layerPanel.vue b/src/components/sideMenu/layerMenu/layerPanel.vue index d52cfd3..10bb101 100644 --- a/src/components/sideMenu/layerMenu/layerPanel.vue +++ b/src/components/sideMenu/layerMenu/layerPanel.vue @@ -513,7 +513,7 @@ sgworld.Creator.DeleteObject(window.tdglLayer); } } else { - // 闅愯棌搴曢儴鍥惧眰闈㈢増 + // 闅愯棌搴曢儴鍥惧眰闈㈢増tdglLayer store.setLayerPanelShow(false); // 闅愯棌鍙充笂瑙掕彍鍗曢潰鏉� store.setMenuListShow(false); @@ -538,15 +538,13 @@ layers[8].children[0].tileType === "Geo" ? new Cesium.GeographicTilingScheme() : new Cesium.WebMercatorTilingScheme(), - // alpha: layers[8].children[0].alpha, - alpha: this.alpha, + alpha: layers[8].children[0].alpha, }, "0", layers[8].children[0].zIndex, true, "" ); - //鏄剧ず婊戝姩鏉� store.setTdglFlag(true); break; case 1: diff --git a/src/components/sideMenu/roamPanel/roamPanel.vue b/src/components/sideMenu/roamPanel/roamPanel.vue index a20b53e..b336e18 100644 --- a/src/components/sideMenu/roamPanel/roamPanel.vue +++ b/src/components/sideMenu/roamPanel/roamPanel.vue @@ -156,7 +156,6 @@ content: SmartEarthRootUrl + "Workers/path/Path.html", end: function () { document.querySelector("#drop").style.display = "none"; - document.querySelector("#drop").style.display = "none"; PathAnimationData.fly && PathAnimationData.fly.exit(); store.setSearchPanelShow(true); }, diff --git a/src/components/sideMenu/sliderAlpha/alpha.vue b/src/components/sideMenu/sliderAlpha/alpha.vue index ad38e3c..a390830 100644 --- a/src/components/sideMenu/sliderAlpha/alpha.vue +++ b/src/components/sideMenu/sliderAlpha/alpha.vue @@ -1,12 +1,11 @@ <template> <div class="sliders"> <el-slider - v-model="alpha" + v-model="value" + :max="100" + :min="0" vertical height="200px" - :max="1" - :min="0" - :step="0.01" @input="changeSlider" > </el-slider> @@ -14,42 +13,15 @@ </template> <script> -import store from "@/utils/store.js"; -import { layers } from "../../../../static/json/layer.js"; export default { data() { return { - alpha: store.tdglInfo.alpha, + value: 100, }; }, methods: { changeSlider(val) { - if (window.tdglLayer) { - sgworld.Creator.DeleteObject(window.tdglLayer); - } - window.tdglLayer = sgworld.Creator.createImageryProvider( - layers[8].name, - "tms", - { - id: layers[8].children[0].id, - url: layers[8].children[0].urls, - fileExtension: layers[8].children[0].img || "png", - enablePickFeatures: false, - level: layers[8].children[0].Level, - minimumLevel: layers[8].children[0].minimumLevel, - maximumLevel: layers[8].children[0].maximumLevel, - tilingScheme: - layers[8].children[0].tileType === "Geo" - ? new Cesium.GeographicTilingScheme() - : new Cesium.WebMercatorTilingScheme(), - // alpha: layers[8].children[0].alpha, - alpha:val, - }, - "0", - layers[8].children[0].zIndex, - true, - "" - ); + window.tdglLayer.item.alpha = val / 100; }, }, }; @@ -62,4 +34,7 @@ left: 0.15rem; z-index: 88; } +.el-tooltip__popper{ + z-index: 88 !important; +} </style> \ No newline at end of file diff --git a/src/components/viewer.vue b/src/components/viewer.vue index 643c8dc..ab57aa2 100644 --- a/src/components/viewer.vue +++ b/src/components/viewer.vue @@ -168,8 +168,8 @@ ); window.Viewer = sgworld._Viewer; Viewer.shadows = false; - viewer.scene.fxaa = false; - viewer.scene.postProcessStages.fxaa.enabled = false; + Viewer.scene.fxaa = false; + Viewer.scene.postProcessStages.fxaa.enabled = false; window.Viewer.scene.globe.maximumScreenSpaceError = 4/3; that.showBottom(); window.Viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100; //鐩告満鐨勯珮搴︾殑鏈�灏忓�� diff --git a/src/utils/map.js b/src/utils/map.js index 6d20478..fd9327b 100644 --- a/src/utils/map.js +++ b/src/utils/map.js @@ -4,7 +4,6 @@ import poiLayer from '@/components/poplayer/main'; import store from "@/utils/store"; import { Message } from 'element-ui'; - let tdglLine, qiyexinxi, qysl, ydbm, ydlx, cyfx, crzt, ydmj, crnx, crnf, rjl, jzxg, jzmd; let objdata; @@ -917,8 +916,8 @@ level: treeNode.Level, minimumLevel: treeNode.minimumLevel, maximumLevel: treeNode.maximumLevel, - minificationFilter:Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR, - magnificationFilter:Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR, + minificationFilter: Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR, + magnificationFilter: Cesium.TextureMinificationFilter.NEAREST_MIPMAP_LINEAR, tilingScheme: treeNode.tileType === "Geo" ? new Cesium.GeographicTilingScheme() @@ -2190,4 +2189,4 @@ clearLayerByTypeId(item); }) } -} \ No newline at end of file +} -- Gitblit v1.9.3