| | |
| | | <template> |
| | | <div> |
| | | <div class="imgbox" |
| | | v-if="showFlyimg"> |
| | | <img src="../assets/image/feixingqi.png" |
| | | alt="" /> |
| | | </div> |
| | | |
| | | <div id="app1"></div> |
| | | </div> |
| | | </template> |
| | |
| | | light, |
| | | } from "@/utils/work"; |
| | | import bus from "@/utils/bus"; |
| | | import { getVectorList, getRadio } from "@/api/http"; |
| | | import { getVectorList,getRadio } from "@/api/http"; |
| | | export default { |
| | | name: "App", |
| | | data() { |
| | | return {}; |
| | | data () { |
| | | return { |
| | | showFlyimg: false, |
| | | }; |
| | | }, |
| | | methods: { |
| | | init() { |
| | | const that = this; |
| | | window.currentsubindex = 1; |
| | | let _core = new SmartEarth.Core(); |
| | | window.tedp = new this.$trame({ |
| | | init () { |
| | | const that=this; |
| | | window.currentsubindex=1; |
| | | let _core=new SmartEarth.Core(); |
| | | window.tedp=new this.$trame({ |
| | | elem: "app1", |
| | | width: 4992, |
| | | prop: [0, 0], |
| | | prop: [0,0], |
| | | height: 2560, |
| | | navtop: 300, |
| | | gisType: "hf", |
| | |
| | | }, |
| | | gisInit: (webgis) => { |
| | | //返回地图对象 |
| | | window.Sgworld = webgis; |
| | | window.sgworld = webgis; |
| | | window.Viewer = webgis.Viewer; |
| | | window.viewer = webgis.Viewer; |
| | | window.Cesium = Cesium; |
| | | window.Sgworld=webgis; |
| | | window.sgworld=webgis; |
| | | window.Viewer=webgis.Viewer; |
| | | window.viewer=webgis.Viewer; |
| | | window.Cesium=Cesium; |
| | | let that=this; |
| | | |
| | | window.layers = window.sgworld.Viewer.scene.imageryLayers; |
| | | window.layers=window.sgworld.Viewer.scene.imageryLayers; |
| | | // const blackMarble = layers.addImageryProvider( |
| | | // new Cesium.IonImageryProvider({ assetId: 3812 }) |
| | | // ); |
| | |
| | | // blackMarble.alpha = 0.0; |
| | | // blackMarble.brightness = 2.0; |
| | | // 地球颜色 |
| | | Viewer.scene.globe.baseColor = |
| | | Viewer.scene.globe.baseColor= |
| | | Cesium.Color.fromCssColorString("#272d39"); |
| | | // //飞向广州 |
| | | // //飞向广州 |
| | | // window.Viewer.camera.flyTo({ |
| | | // destination: Cesium.Cartesian3.fromDegrees( |
| | | // 113.29503528791071, |
| | |
| | | pitch: -0.7222154573481174, |
| | | roll: 0, |
| | | }, |
| | | complete: function callback () { |
| | | viewer.camera.changed.addEventListener(() => { |
| | | // 视高 km |
| | | let alt=( |
| | | viewer.camera.positionCartographic.height/1000 |
| | | ).toFixed(2); |
| | | // 方位角 |
| | | let heading=Cesium.Math.toDegrees( |
| | | viewer.camera.heading |
| | | ).toFixed(2); |
| | | // 俯仰角 |
| | | let pitch=Cesium.Math.toDegrees(viewer.camera.pitch).toFixed( |
| | | 2 |
| | | ); |
| | | // 翻滚角 |
| | | let roll=Cesium.Math.toDegrees(viewer.camera.roll).toFixed(2); |
| | | // 级别 |
| | | let level=0; |
| | | let tileRender=viewer.scene._globe._surface._tilesToRender; |
| | | if(tileRender&&tileRender.length>0) { |
| | | level=viewer.scene._globe._surface._tilesToRender[0]._level; |
| | | } |
| | | // let str = `级数:${level} 视高:${alt}km 方位角:${heading}° 俯仰角:${pitch}° 翻滚角:${roll}°`; |
| | | console.log(pitch); |
| | | that.showFlyimg=pitch>-25? true:false; |
| | | // console.log(that.showFlyimg); |
| | | }); |
| | | }, |
| | | }); |
| | | let urldian1 = |
| | | let urldian1= |
| | | "http://183.162.245.49:8099/geoserver/SHwuxiandian/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=SHwuxiandian:1GZ_POI&maxFeatures=50&outputFormat=application%2Fjson"; |
| | | let urldian = |
| | | let urldian= |
| | | "http://183.162.245.49:8099/geoserver/SHP/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=SHP:SH_POI1&maxFeatures=50&outputFormat=application%2Fjson"; |
| | | try { |
| | | loaddian(urldian1, "[TE_DESC]", "[height]"); |
| | | loaddian(urldian, "[name]", "[Height]"); |
| | | loaddian(urldian1,"[TE_DESC]","[height]"); |
| | | loaddian(urldian,"[name]","[Height]"); |
| | | loadBaimo(1); |
| | | loadLW(); |
| | | addRightMouseEvent(); |
| | | SPPM(); |
| | | loadYH(); |
| | | juhe(true, "监测站"); |
| | | juhe(true,"监测站"); |
| | | addMpt(true); |
| | | } catch (error) {} |
| | | } catch(error) { } |
| | | //开启日照 |
| | | viewer.scene.globe.enableLighting = false; |
| | | viewer.shadows = false; |
| | | viewer.scene.globe.enableLighting=false; |
| | | viewer.shadows=false; |
| | | addMouseEvent(); |
| | | light(); |
| | | getVectorList().then((res) => { |
| | | if (res.message === "Success") { |
| | | let region = res.rows; |
| | | if(res.message==="Success") { |
| | | let region=res.rows; |
| | | region.forEach((item) => { |
| | | let arr = []; |
| | | let arr=[]; |
| | | JSON.parse(item.vlatlngs).forEach((item2) => { |
| | | arr.push([item2[1], item2[0]]); |
| | | arr.push([item2[1],item2[0]]); |
| | | }); |
| | | item.vlatlngs = JSON.stringify(arr); |
| | | item.vlatlngs=JSON.stringify(arr); |
| | | }); |
| | | bus.$emit("areaData", region); |
| | | bus.$emit("areaData",region); |
| | | } |
| | | }); |
| | | //获取无线电数据 |
| | | getRadio().then((res) => { |
| | | if (res.message === "Success") { |
| | | let radio = res.rows; |
| | | bus.$emit("radioData", radio); |
| | | if(res.message==="Success") { |
| | | let radio=res.rows; |
| | | bus.$emit("radioData",radio); |
| | | console.log(radio); |
| | | } |
| | | }); |
| | |
| | | // window.Viewer.scene.primitives.add(baimo); |
| | | //县域边界,网格 |
| | | }, |
| | | subClick(index) { |
| | | subClick (index) { |
| | | let showindex; |
| | | switch (index) { |
| | | switch(index) { |
| | | case 0: |
| | | showindex = 1; |
| | | showindex=1; |
| | | break; |
| | | case 1: |
| | | showindex = 2; |
| | | showindex=2; |
| | | break; |
| | | case 2: |
| | | showindex = 3; |
| | | showindex=3; |
| | | break; |
| | | case 3: |
| | | showindex = 4; |
| | | showindex=4; |
| | | break; |
| | | case 4: |
| | | showindex = 5; |
| | | showindex=5; |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | bus.$emit("showindex", showindex); |
| | | bus.$emit("showindex",showindex); |
| | | }, |
| | | prop: [970, 970], |
| | | prop: [970,970], |
| | | nav: { |
| | | navTop: () => import("@/components/top/navTop"), |
| | | }, |
| | | showSub: true, |
| | | showSub: false, |
| | | compss: [ |
| | | { |
| | | sub: "频谱态势分析", //网格管理 |
| | |
| | | DynamicMap: () => import("@/components/props/bottom"), //态势图动态播放 |
| | | freeAnalyse: () => import("@/components/props/freeAnalyse"), //空闲资源展示 |
| | | moreTZ: () => import("@/components/props/moreTZ"), //空闲资源展示 |
| | | // SurprisePlus |
| | | showMilitaryPlot: () => import("@/components/props/militaryPlot"), //军事标绘 |
| | | situationComparison: () => |
| | | import("@/components/props/situationComparison"), //态势对比 |
| | | occupancyAnalysis: () => |
| | | import("@/components/props/occupancyAnalysis"), //频谱占用度分析 |
| | | |
| | | densityAnalysis: () => import("@/components/props/densityAnalysis"), //用频密度分析 |
| | | |
| | | SC1: () => import("@/components/props/situationComparison6-1"), |
| | | SC2: () => import("@/components/props/situationComparison6-2"), |
| | | SC3: () => import("@/components/props/situationComparison6-3"), |
| | | SC4: () => import("@/components/props/situationComparison6-4"), |
| | | SC5: () => import("@/components/props/situationComparison6-5"), |
| | | SC6: () => import("@/components/props/situationComparison6-6"), |
| | | SC7: () => import("@/components/props/situationComparison6-7"), |
| | | SC8: () => import("@/components/props/situationComparison7-1"), |
| | | SC9: () => import("@/components/props/situationComparison7-2-1"), |
| | | SC10: () => import("@/components/props/situationComparison7-3-1"), |
| | | SC11: () => import("@/components/props/situationComparison7-4"), |
| | | SC12: () => import("@/components/props/situationComparison7-5"), |
| | | SC13: () => import("@/components/props/situationComparison7-6"), |
| | | SC14: () => import("@/components/props/situationComparison7-7"), |
| | | SC15: () => import("@/components/props/situationComparison7-8"), |
| | | SC16: () => import("@/components/props/situationComparison7-9"), |
| | | SC17: () => import("@/components/props/situationComparison8-1"), |
| | | SC18: () => import("@/components/props/situationComparison8-2"), |
| | | SC19: () => import("@/components/props/situationComparison8-3"), |
| | | SC20: () => import("@/components/props/situationComparison8-4"), |
| | | SC21: () => import("@/components/props/situationComparison9-1"), |
| | | SC22: () => import("@/components/props/situationComparison9-2"), |
| | | SC23: () => import("@/components/props/situationComparison9-3"), |
| | | SC24: () => import("@/components/props/situationComparison10-1"), |
| | | SC25: () => import("@/components/props/situationComparison10-2"), |
| | | SC26: () => import("@/components/props/situationComparison10-3"), |
| | | SC27: () => import("@/components/props/situationComparison10-4"), |
| | | SC28: () => import("@/components/props/situationComparison7-10"), |
| | | SC29: () => import("@/components/props/situationComparison7-11"), |
| | | SC30: () => import("@/components/props/situationComparison7-12"), |
| | | |
| | | SC31: () => import("@/components/props/militaryVIdeo"), //军事标绘 |
| | | |
| | | }, |
| | | }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | mounted () { |
| | | this.init(); |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | .imgbox { |
| | | position: absolute; |
| | | /* background-color: #fff; */ |
| | | /* opacity: 0.2;. */ |
| | | /* top:50px; */ |
| | | width: 100%; |
| | | height: 500px; |
| | | } |
| | | img { |
| | | width: 100%; |
| | | height: 100%; |
| | | -webkit-user-drag: none; |
| | | } |
| | | #app1 { |
| | | font-family: "Avenir", Helvetica, Arial, sans-serif; |
| | | -webkit-font-smoothing: antialiased; |