已添加31个文件
已修改17个文件
已删除7个文件
| | |
| | | <script src="./static/Signalling/js/DataRender.js"></script> |
| | | <script src="./static/Signalling/js/DataGrid.js"></script> |
| | | |
| | | <script src="./static/polyline.js"></script> |
| | | |
| | | <script src="./static/othersMap/othersMap.js"></script> |
| | | <script type="text/javascript"> |
| | |
| | | import service from '@/utils/request'; |
| | | import request from '@/utils/request'; //116:8089 |
| | | import service from '@/utils/service'; //121:8070 |
| | | import searchQY from '@/utils/searchQY'; //116:8086 ä¼ä¸åç§° |
| | | import axios from "axios"; |
| | | |
| | | |
| | | /*åå° 8089 */ |
| | | //ç»å½ |
| | | export function login(params) { |
| | | return service.post('/login', params); |
| | | return request.post('/login', params); |
| | | } |
| | | // ç¬¬ä¸æ¹ç»å½ |
| | | export function loginFromThirdApp(params) { |
| | | return service.post('/loginFromThirdApp', params); |
| | | return request.post('/loginFromThirdApp', params); |
| | | } |
| | | // è·åå¾å±æ |
| | | export function getmenu() { |
| | | return service.get('/system/layer/listTreeDetail'); |
| | | return request.get('/system/layer/listTreeDetail'); |
| | | } |
| | | // è·åç¨æ·ä¿¡æ¯ |
| | | export function getUserInfo() { |
| | | return service.get('/system/user/profile'); |
| | | return request.get('/system/user/profile'); |
| | | } |
| | | |
| | | //ä¿®æ¹ç¨æ·å¯ç |
| | | export function updateUserPwd(params) { |
| | | return service.put('system/user/profile/updatePwd', params); |
| | | return request.put('system/user/profile/updatePwd', params); |
| | | } |
| | | //京åç»å½ |
| | | // export function loginById(params) { |
| | |
| | | // } |
| | | |
| | | |
| | | //ä¼ä¸å°ååºæ¥è¯¢ï¼æ§ï¼ |
| | | // export function ent_selectByName(params) { |
| | | // return axios.get("https://skyzt.bda.gov.cn/dataApi/PoiExcel/ent/selectByName?name=" + params); |
| | | // } |
| | | // //ä¼ä¸å°ååºæ¥è¯¢(æ°) 8086 |
| | | export function ent_selectByName(params) { |
| | | return searchQY.get("enterprise/selectByPage?pageSize=100&pageIndex=1&returnGeom=true&name=" + params); |
| | | } |
| | | //ååºå°ååºæ¥è¯¢ |
| | | export function liushisijiayuanqudizhibianmafuwu(params) { |
| | | return service.get( |
| | | 'wfsserver/liushisijiayuanqu1012?version=1.3.0&request=GetFeature&typename=64å®¶ååºåºæ¬æ
åµèå´coordinates10092&propertyname=*&filter=<Filter><PropertyIsLike+wildCard%3D"*"><PropertyName>YQmingchen<%2FPropertyName><Literal>*' + params + '*<%2FLiteral><%2FPropertyIsLike><%2FFilter>&format=json' |
| | | ); |
| | | } |
| | | //ååºç±»åæ¥è¯¢ |
| | | export function shengwuSearch(params) { |
| | | return service.get( |
| | | 'wfsserver/liushisijiayuanqu1012?version=1.3.0&request=GetFeature&typename=64å®¶ååºåºæ¬æ
åµèå´coordinates10092&propertyname=*&filter=<Filter><PropertyIsLike+wildCard%3D"*"><PropertyName>chanyeDW<%2FPropertyName><Literal>*' + params + '*<%2FLiteral><%2FPropertyIsLike><%2FFilter>&format=json' |
| | | ); |
| | | } |
| | | |
| | | // å°åæ¥è¯¢ |
| | | export function findAddressCandidates(params) { |
| | | return service.get( |
| | | "/rest/services/Locators/dikuaixinxi1005/GeocodeServer/findAddressCandidates?singleLine=" + |
| | | params |
| | | ); |
| | | } |
| | | |
| | | //è·åå°åèå´ |
| | | export function getDiKuanFanWei(lng, lat) { |
| | | // return axios.get( |
| | | // `https://skyzt.bda.gov.cn/BEApi/cs/geowinmap_xncs/ds?lng=${lng}&lat=${lat}` |
| | | // ); |
| | | return axios.get( |
| | | `http://10.10.4.116:8086/cs/geowinmap_xncs/ds?lng=${lng}&lat=${lat}` |
| | | ); |
| | | |
| | | } |
| | | // export function getDiKuanFanWei(lon, lat) { |
| | | // return service.get( |
| | | // "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=" + |
| | | // lon + |
| | | // "&lat=" + |
| | | // lat + |
| | | // "&geom=true&requesttype=json" |
| | | // ); |
| | | // } |
| | | // |
| | | export function queryBySquare(url, layer, area) { |
| | | return service.get(url, { |
| | | params: { |
| | | version: '1.3.0', |
| | | request: 'GetFeature', |
| | | typename: layer, |
| | | propertyname: '*', |
| | | format: "json", |
| | | filter: `<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:Intersects><ogc:PropertyName /><gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:exterior><gml:LinearRing><gml:posList>${area}</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogc:Intersects></ogc:Filter>`, |
| | | } |
| | | }); |
| | | } |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import mapData from "../../../static/mapData"; |
| | | import rpc from "./rpc"; |
| | | import vueEvents from '@/utils/vueEvent.js' |
| | | window.mapMsg = { |
| | | setTimeInterval: null, |
| | | testMsg(res) { |
| | | // console.log(res); |
| | | this.setMsgMatching({ |
| | | message: res, |
| | | baidu_keys: { |
| | | results: [{ |
| | | word: res |
| | | }] |
| | | } |
| | | }); |
| | | }, |
| | | init() { |
| | | var that = this; |
| | | window.addEventListener("message", res => { |
| | | // if (res.data.status === "ok") { |
| | | // that.setMsgMatching(res.data.params); |
| | | // } |
| | | if (res.data.type === "command") { |
| | | let info = res.data.params |
| | | if (info.includes("å®ä½å°")) { |
| | | info.search("ã") != -1 ? mapMsg.testMsg(info.slice(3, -1)) : mapMsg.testMsg(info.slice(3)) |
| | | } else if (info.includes("å®ä½")) { |
| | | info.search("ã") != -1 ? mapMsg.testMsg(info.slice(2, -1)) : mapMsg.testMsg(info.slice(2)) |
| | | } else { |
| | | info.search("ã") != -1 ? mapMsg.testMsg(info.slice(0, -1)) : mapMsg.testMsg(info.slice(0)) |
| | | // mapMsg.testMsg(info.slice(0, -1))//æå¥å· |
| | | // mapMsg.testMsg(info.slice(0))//没å¥å· |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // clearTime() { |
| | | // if (this.setTimeInterval) { |
| | | // clearInterval(this.setTimeInterval); |
| | | // this.setTimeInterval = null; |
| | | // } |
| | | // // this.setTime(); |
| | | // }, |
| | | // setTime() { |
| | | // if (this.setTimeInterval) { |
| | | // clearInterval(this.setTimeInterval); |
| | | // this.setTimeInterval = null; |
| | | // } |
| | | // this.setTimeInterval = setTimeout((res) => { |
| | | // vueEvents.$emit("queryData", false); |
| | | // rpc.setClearAllMsg(); |
| | | // rpc.setLineRoaming() |
| | | // clearInterval(this.setTimeInterval); |
| | | // this.setTimeInterval = null; |
| | | // }, 90000) |
| | | // }, |
| | | //æ¶æ¯å¹é
|
| | | setMsgMatching(result) { |
| | | // æ¶å°çæ¶æ¯ |
| | | var param = result.message; |
| | | // é»è®¤çå¹é
è¯ |
| | | var rest = mapData.msgMach.rest; //'å¤ä½', 'è¿å', 'åå§å', 'åå§ä½ç½®' |
| | | var rom = mapData.msgMach.lineRoam;//'漫游', '导èª' |
| | | var closeRomData = mapData.msgMach.closeRoam;//'åæ¢æ¼«æ¸¸', '忢坼èª' |
| | | // var acceptData = mapData.msgMach.acceptMsg; |
| | | |
| | | // å°å¾å¤ä½ |
| | | var valRest = rest.filter((rs) => { |
| | | if (param.indexOf(rs) > -1) { |
| | | return rs; |
| | | } |
| | | }) |
| | | if (valRest.length > 0) { |
| | | // this.clearTime(); |
| | | vueEvents.$emit("queryData", false); |
| | | rpc.setClearAllMsg(); |
| | | rpc.setMapRest(); |
| | | return |
| | | } |
| | | // åæ¢æ¼«æ¸¸ |
| | | var closeRom = closeRomData.filter((rs) => { |
| | | if (param.indexOf(rs) > -1) { |
| | | return rs |
| | | } |
| | | }); |
| | | if (closeRom.length > 0) { |
| | | // this.clearTime(); |
| | | rpc.setCloseLineRomaing(); |
| | | return |
| | | } |
| | | //漫游 |
| | | var valRom = rom.filter((rs) => { |
| | | if (param.indexOf(rs) > -1) { |
| | | return rs; |
| | | } |
| | | }) |
| | | if (valRom.length > 0) { |
| | | vueEvents.$emit("queryData", false); |
| | | // this.clearTime(); |
| | | rpc.setClearAllMsg(); |
| | | rpc.setLineRoaming() |
| | | return |
| | | } |
| | | |
| | | // this.clearTime(); |
| | | rpc.getFuzzyQuery(result) |
| | | |
| | | // var accept = acceptData.filter(res => { |
| | | // if (param.indexOf(res) > -1) { |
| | | // return res; |
| | | // } |
| | | // }) |
| | | // if (accept.length > 0) { |
| | | // this.clearTime(); |
| | | // rpc.getFuzzyQuery(result) |
| | | // } |
| | | |
| | | |
| | | // else{ |
| | | // vueEvents.$emit("queryData", false); |
| | | // rpc.setClearAllMsg(); |
| | | // rpc.setMapRest(); |
| | | // } |
| | | |
| | | |
| | | |
| | | }, |
| | | }; |
| | | export default mapMsg |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from "vue"; |
| | | import coord from "@/components/poplayer/coord"; |
| | | import store from "@/utils/store"; |
| | | import mapData from "../../../static/mapData"; |
| | | import { |
| | | liushisijiayuanqudizhibianmafuwu, |
| | | findAddressCandidates, |
| | | getDiKuanFanWei, |
| | | ent_selectByName, |
| | | shengwuSearch |
| | | } from "../../api/api"; |
| | | import vueEvents from "@/utils/vueEvent.js"; |
| | | let PoiLayerConstructor = Vue.extend(coord); |
| | | const rpc = { |
| | | timeout: 500, |
| | | method: "get_statue", |
| | | divPoint: null, |
| | | instance: null, |
| | | pathLayer: null, |
| | | position: null, |
| | | marksIndex: null, |
| | | pitchValue: null, |
| | | unsubscribeTicks: null, |
| | | LineRoaming: null, //线路漫游 |
| | | dataQuery: [], //å
³é®åæ¥è¯¢ç»æ |
| | | pointerFly: null, //å®ç¹æ¼«æ¸¸ |
| | | isShow: false, |
| | | objArr: [], |
| | | pointrange: null, |
| | | |
| | | //å
³é®åæ¥è¯¢ |
| | | getFuzzyQuery(res) { |
| | | // if (res.message.indexOf('å¥é©°') > -1) { |
| | | // store.queryLayer.val = 'å¥é©°å
¬å¸' |
| | | // } |
| | | // // else if (res.message.indexOf('京ä¸') > -1) { |
| | | // // store.queryLayer.val = '京ä¸' |
| | | // // } |
| | | // // else if (res.message.indexOf('å°ç±³') > -1) { |
| | | // // store.queryLayer.val = 'å°ç±³' |
| | | // // } |
| | | // else if (res.message.indexOf('å大') > -1) { |
| | | // store.queryLayer.val = 'å大大å¦' |
| | | // } else if (res.message.indexOf('ä¿¡æ¯ææ¯') > -1) { |
| | | // store.queryLayer.val = 'ä¿¡æ¯ææ¯' |
| | | // } else if (res.message.indexOf('çç©å»è¯') > -1) { |
| | | // store.queryLayer.val = 'çç©å»è¯' |
| | | // } else if (res.message.indexOf('æºå¨äºº') > -1) { |
| | | // store.queryLayer.val = 'æºå¨äºº' |
| | | // } else if (res.message.indexOf('汽车') > -1) { |
| | | // store.queryLayer.val = '汽车' |
| | | // } else { |
| | | // store.queryLayer.val = res.message; |
| | | // } |
| | | |
| | | this.setClearAllMsg(); |
| | | if (!res.baidu_keys) return; |
| | | var flag = true; |
| | | if (this.dataQuery.length > 0) { |
| | | if (res.message.indexOf("第") > -1 && res.message.indexOf("æ¡") > -1) { |
| | | var data = mapData.msgMach.localPage; |
| | | flag = false; |
| | | var val_Data = null; |
| | | for (var i in data) { |
| | | if (res.message.indexOf(data[i]) > -1) { |
| | | if (i >= 6) i -= 6; |
| | | val_Data = this.dataQuery[i]; |
| | | setTimeout(() => { |
| | | this.setLocation(val_Data); |
| | | }, 1000); |
| | | break; |
| | | } |
| | | } |
| | | } else { |
| | | for (var i in this.dataQuery) { |
| | | var name = this.dataQuery[i].name; |
| | | for (var j = 0; j < length; j++) { |
| | | var world = keyWorld[j].word; |
| | | if (name.indexOf(world) > -1) { |
| | | flag = false; |
| | | debugger |
| | | this.setLocation(this.dataQuery[i]); |
| | | break; |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if (!flag) { |
| | | return; |
| | | } |
| | | var keyWorld = res.baidu_keys.results; |
| | | if (keyWorld) { |
| | | var length = keyWorld.length; |
| | | |
| | | this.dataQuery = []; |
| | | this.objArr = []; |
| | | this.pointrange = 6000; |
| | | |
| | | for (var i = 0; i < length; i++) { |
| | | var world = keyWorld[i].word; |
| | | // if (world == 'å¥é©°') return |
| | | if (world.indexOf('å¥é©°å
¬å¸') > -1) { |
| | | world = 'å¥é©°'; |
| | | this.pointrange = 12000 |
| | | } |
| | | // else if (world.indexOf('京ä¸') > -1) { |
| | | // world = '京ä¸' |
| | | // } |
| | | // else if (world.indexOf('å°ç±³') > -1) { |
| | | // world = 'å°ç±³' |
| | | // } |
| | | else if (world.indexOf('å大大å¦') > -1) { |
| | | world = 'å大大å¦' |
| | | } |
| | | else if (world.indexOf('ä¿¡æ¯ææ¯') > -1) { |
| | | world = 'ä¿¡æ¯ææ¯' |
| | | } else if (world.indexOf('çç©å»è¯') > -1) { |
| | | world = 'çç©å»è¯' |
| | | } else if (world.indexOf('æºå¨äºº') > -1 && world.indexOf('å') > -1) { |
| | | world = 'æºå¨äºº' |
| | | } else if (world.indexOf('汽车') > -1 && world.indexOf('å') > -1) { |
| | | world = '汽车' |
| | | } |
| | | else if (world.indexOf('å') > -1) { |
| | | |
| | | } |
| | | else if (world.indexOf('å大') > -1 && world.indexOf('å大大å¦') == -1) { |
| | | world = 'å大' |
| | | } else { |
| | | // continue |
| | | } |
| | | |
| | | this.setFuzzyQueryData(world, i, length - 1); |
| | | } |
| | | } |
| | | }, |
| | | async setFuzzyQueryData(res, index, length) { |
| | | if (res == "ä¿¡æ¯ææ¯" || res == "çç©å»è¯" || res == "æºå¨äºº" || res == "汽车") { |
| | | shengwuSearch(res).then(result => { |
| | | var that = this; |
| | | store.queryLayer.data = []; |
| | | result.features.forEach(val => { |
| | | let itemObj = { |
| | | type: "ååº", |
| | | name: val.properties.YQmingchen, |
| | | address: val.properties.YQdizhi, |
| | | lon: val.properties.longtitude, |
| | | lat: val.properties.latitude, |
| | | geom: val.geometry.coordinates[0].flat() |
| | | |
| | | }; |
| | | that.objArr.push(itemObj); |
| | | }); |
| | | if (index == length) { |
| | | if (that.objArr.length <= 0) { |
| | | vueEvents.$emit("queryData", true); |
| | | return; |
| | | } |
| | | var num = that.objArr.length; |
| | | for (var i = 0; i < num; i++) { |
| | | if (i < 6) { |
| | | that.dataQuery.push(that.objArr[i]); |
| | | } |
| | | } |
| | | store.queryLayer.data = that.dataQuery; |
| | | that.setClearAllMsg(); |
| | | setTimeout(() => { |
| | | vueEvents.$emit("queryData", true); |
| | | that.setLocation(that.dataQuery[0]); |
| | | }, 1000); |
| | | } |
| | | }) |
| | | } else { |
| | | Promise.all([ |
| | | ent_selectByName(res), //ä¼ä¸ |
| | | liushisijiayuanqudizhibianmafuwu(res), //ååº |
| | | findAddressCandidates(res),//å°å, |
| | | ]).then(result => { |
| | | var that = this; |
| | | store.queryLayer.data = []; |
| | | // ä¼ä¸(æ°) |
| | | var EntArr = result[0].data.filter(item => { |
| | | return item.entName.includes(res) && item.geom; |
| | | }); |
| | | EntArr.forEach(val => { |
| | | const coordinates = this.extractCoordinates(val.geom); |
| | | let itemObj = { |
| | | type: "ä¼ä¸", |
| | | name: val.entName, |
| | | address: val.address, |
| | | lon: coordinates.x, |
| | | lat: coordinates.y |
| | | }; |
| | | that.objArr.push(itemObj); |
| | | }); |
| | | // ä¼ä¸(æ§) |
| | | // var EntArr = result[0].data.result.filter(item => { |
| | | // return item.entName.includes(res) && item.x != 0; |
| | | // }); |
| | | // EntArr.forEach(val => { |
| | | // let itemObj = { |
| | | // type: "ä¼ä¸", |
| | | // name: val.entName, |
| | | // address: val.address, |
| | | // lon: val.x, |
| | | // lat: val.y |
| | | // }; |
| | | // that.objArr.push(itemObj); |
| | | // }); |
| | | //ååº |
| | | var YQArr = result[1].features.filter(item => { |
| | | return item.properties.YQmingchen.includes(res); |
| | | }); |
| | | |
| | | YQArr.forEach(val => { |
| | | let itemObj = { |
| | | type: "ååº", |
| | | name: val.properties.YQmingchen, |
| | | address: val.properties.YQdizhi, |
| | | lon: val.properties.longtitude, |
| | | lat: val.properties.latitude, |
| | | geom: val.geometry.coordinates[0].flat() |
| | | // lon: val.geometry.coordinates[0], |
| | | // lat: val.geometry.coordinates[1], |
| | | // geom: val.properties.Coor1 + val.properties.Coor2 |
| | | |
| | | }; |
| | | that.objArr.push(itemObj); |
| | | }); |
| | | //å°å |
| | | var LandArr = result[2].candidates.filter((item) => { |
| | | return item.attributes.QYMC.includes(res); |
| | | }) |
| | | // ç»ææ ¹æ®QYMCä»çå°é¿æåº |
| | | LandArr.sort((a, b) => (b.attributes.QYMC.length === a.attributes.QYMC.length ? 0 : a.attributes.QYMC.length > b.attributes.QYMC.length ? 1 : -1)) |
| | | LandArr.forEach((val) => { |
| | | let itemObj = { |
| | | type: "å°å", |
| | | name: val.attributes.QYMC, |
| | | area: val.attributes.area, |
| | | code: val.attributes["å°åç¼"], |
| | | lon: val.location.x, |
| | | lat: val.location.y, |
| | | }; |
| | | that.objArr.push(itemObj); |
| | | }); |
| | | // console.log(that.objArr); |
| | | if (index == length) { |
| | | if (that.objArr.length <= 0) { |
| | | vueEvents.$emit("queryData", true); |
| | | return; |
| | | } |
| | | var num = that.objArr.length; |
| | | for (var i = 0; i < num; i++) { |
| | | if (i < 6) { |
| | | that.dataQuery.push(that.objArr[i]); |
| | | } |
| | | } |
| | | store.queryLayer.data = that.dataQuery; |
| | | that.setClearAllMsg(); |
| | | setTimeout(() => { |
| | | vueEvents.$emit("queryData", true); |
| | | that.setLocation(that.dataQuery[0]); |
| | | }, 1000); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | getFuzzyQueryData(res, index, length, flag) { |
| | | if (!res || res.length <= 0) return; |
| | | for (var i in res) { |
| | | if (this.dataQuery.length < 6) { |
| | | this.dataQuery.push(res[i]); |
| | | } |
| | | } |
| | | if (index == length) { |
| | | if (this.dataQuery.length <= 0) { |
| | | vueEvents.$emit("queryData", false); |
| | | return; |
| | | } |
| | | |
| | | // store.queryLayer.data = this.dataQuery; |
| | | |
| | | this.setClearAllMsg(); |
| | | |
| | | setTimeout(() => { |
| | | vueEvents.$emit("queryData", true); |
| | | this.setLocation(this.dataQuery[0]); |
| | | }, 1000); |
| | | } |
| | | }, |
| | | // æåä¸¤ä¸ªåæ |
| | | extractCoordinates(pointStr) { |
| | | const regex = /POINT\((-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)\)/; |
| | | const match = pointStr.match(regex); |
| | | if (match) { |
| | | return { |
| | | x: parseFloat(match[1]), |
| | | y: parseFloat(match[2]) |
| | | }; |
| | | } else { |
| | | // throw new Error('Invalid POINT format'); |
| | | } |
| | | }, |
| | | // æ¾ç¤ºå°åèå´ |
| | | getLandmass(res) { |
| | | let that = this; |
| | | if (res.type == "ååº") { |
| | | this.setDrawPolyExtent(res.geom) |
| | | |
| | | // var geom = res.geom.split(','); |
| | | |
| | | // var coord = []; |
| | | // for (var i in geom) { |
| | | // coord.push(parseFloat(geom[i])) |
| | | // } |
| | | // this.setDrawPolyExtent(coord) |
| | | } else if (res.type == "å°å" || res.type == "ä¼ä¸") { |
| | | getDiKuanFanWei(res.lon, res.lat).then(response => { |
| | | let center = { lon: 0, lat: 0 }; |
| | | let polygon = that.read(response.data.geometry); |
| | | |
| | | if (polygon.length > 0) { |
| | | var geometry = []; |
| | | let points = polygon[0].split(","); |
| | | for (let i = 0; i < points.length; i++) { |
| | | let point = points[i].replace(/^\s+|\s+$/g, "").split(" "); |
| | | // center.lon += parseFloat(point[0]) / points.length; |
| | | // center.lat += parseFloat(point[1]) / points.length; |
| | | geometry.push(parseFloat(point[0]), parseFloat(point[1])) |
| | | } |
| | | that.setDrawPolyExtent(geometry) |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | // ç«ä½å¢ææ |
| | | setDrawPolyExtent(res) { |
| | | this.setLacationLineClear() |
| | | var position = Cesium.Cartesian3.fromDegreesArray(res) |
| | | |
| | | this.lacationLine = Viewer.entities.add({ |
| | | name: "ç«ä½å¢ææ", |
| | | wall: { |
| | | positions: position, |
| | | |
| | | |
| | | material: new Cesium.DynamicWallMaterialProperty({ |
| | | // color: new Cesium.Color.fromCssColorString('#73DB0E'), |
| | | color: new Cesium.Color.fromCssColorString('#1f1fa8'), |
| | | duration: 4000, |
| | | |
| | | }), |
| | | // 设置é«åº¦ |
| | | maximumHeights: Array(position.length).fill(80), |
| | | minimumHeights: Array(position.length).fill(10), |
| | | } |
| | | }) |
| | | }, |
| | | read(wkt) { |
| | | var regExes = { |
| | | typeStr: /^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/, |
| | | emptyTypeStr: /^\s*(\w+)\s*EMPTY\s*$/, |
| | | spaces: /\s+/, |
| | | parenComma: /\)\s*,\s*\(/, |
| | | doubleParenComma: /\)\s*\)\s*,\s*\(\s*\(/, // can't use {2} here |
| | | trimParens: /^\s*\(?(.*?)\)?\s*$/ |
| | | }; |
| | | /** |
| | | * Object with properties corresponding to the geometry types. Property values |
| | | * are functions that do the actual parsing. |
| | | * @private |
| | | */ |
| | | var parse$1 = { |
| | | /** |
| | | * Return point geometry given a point WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the point. |
| | | * @return {Point} A point geometry. |
| | | * @private |
| | | */ |
| | | point: function point(str) { |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var coords = str.trim().split(regExes.spaces); |
| | | return [Number.parseFloat(coords[0]), Number.parseFloat(coords[1])]; |
| | | }, |
| | | |
| | | /** |
| | | * Return a multipoint geometry given a multipoint WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the multipoint. |
| | | * @return {Point} A multipoint feature. |
| | | * @private |
| | | */ |
| | | multipoint: function multipoint(str) { |
| | | var this$1 = this; |
| | | |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var point; |
| | | var points = str.trim().split(","); |
| | | var components = []; |
| | | for (var i = 0, len = points.length; i < len; ++i) { |
| | | point = points[i].replace(regExes.trimParens, "$1"); |
| | | components.push(parse$1.point(point)); |
| | | } |
| | | return components; |
| | | }, |
| | | |
| | | /** |
| | | * Return a linestring geometry given a linestring WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the linestring. |
| | | * @return {LineString} A linestring geometry. |
| | | * @private |
| | | */ |
| | | linestring: function linestring(str) { |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var points = str.trim().split(","); |
| | | var components = []; |
| | | var coords; |
| | | for (var i = 0, len = points.length; i < len; ++i) { |
| | | coords = points[i].trim().split(regExes.spaces); |
| | | components.push([ |
| | | Number.parseFloat(coords[0]), |
| | | Number.parseFloat(coords[1]) |
| | | ]); |
| | | } |
| | | return components; |
| | | }, |
| | | |
| | | /** |
| | | * Return a linearring geometry given a linearring WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the linearring. |
| | | * @return {LinearRing} A linearring geometry. |
| | | * @private |
| | | */ |
| | | linearring: function linearring(str) { |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var points = str.trim().split(","); |
| | | var components = []; |
| | | var coords; |
| | | for (var i = 0, len = points.length; i < len; ++i) { |
| | | coords = points[i].trim().split(regExes.spaces); |
| | | components.push([ |
| | | Number.parseFloat(coords[0]), |
| | | Number.parseFloat(coords[1]) |
| | | ]); |
| | | } |
| | | return components; |
| | | }, |
| | | |
| | | /** |
| | | * Return a multilinestring geometry given a multilinestring WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the multilinestring. |
| | | * @return {MultiLineString} A multilinestring geometry. |
| | | * @private |
| | | */ |
| | | multilinestring: function multilinestring(str) { |
| | | var this$1 = this; |
| | | |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var line; |
| | | var lines = str.trim().split(regExes.parenComma); |
| | | var components = []; |
| | | for (var i = 0, len = lines.length; i < len; ++i) { |
| | | line = lines[i].replace(regExes.trimParens, "$1"); |
| | | components.push(parse$1.linestring(line)); |
| | | } |
| | | return components; |
| | | }, |
| | | |
| | | /** |
| | | * Return a polygon geometry given a polygon WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the polygon. |
| | | * @return {Polygon} A polygon geometry. |
| | | * @private |
| | | */ |
| | | polygon: function polygon(str) { |
| | | var this$1 = this; |
| | | |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var ring, linestring, linearring; |
| | | var rings = str.trim().split(regExes.parenComma); |
| | | var shell; |
| | | var holes = []; |
| | | //for (var i = 0, len = rings.length; i < len; ++i) { |
| | | ring = rings[0].replace(regExes.trimParens, "$1"); |
| | | linestring = ring; |
| | | //} |
| | | return linestring; |
| | | }, |
| | | |
| | | /** |
| | | * Return a multipolygon geometry given a multipolygon WKT fragment. |
| | | * |
| | | * @param {String} str A WKT fragment representing the multipolygon. |
| | | * @return {MultiPolygon} A multipolygon geometry. |
| | | * @private |
| | | */ |
| | | multipolygon: function multipolygon(str) { |
| | | var this$1 = this; |
| | | |
| | | if (str === undefined) { |
| | | return []; |
| | | } |
| | | |
| | | var polygon; |
| | | var polygons = str.trim().split(regExes.doubleParenComma); |
| | | var components = []; |
| | | for (var i = 0, len = polygons.length; i < len; ++i) { |
| | | polygon = polygons[i].replace(regExes.trimParens, "$1"); |
| | | components.push(parse$1.polygon(polygon)); |
| | | } |
| | | return components; |
| | | } |
| | | }; |
| | | |
| | | var geometry, type, str; |
| | | wkt = wkt.replace(/[\n\r]/g, " "); |
| | | var matches = regExes.typeStr.exec(wkt); |
| | | if (wkt.search("EMPTY") !== -1) { |
| | | matches = regExes.emptyTypeStr.exec(wkt); |
| | | matches[2] = undefined; |
| | | } |
| | | if (matches) { |
| | | type = matches[1].toLowerCase(); |
| | | str = matches[2]; |
| | | if (parse$1[type]) { |
| | | geometry = parse$1[type].apply(this, [str]); |
| | | } |
| | | } |
| | | |
| | | if (geometry === undefined) { |
| | | throw new Error("Could not parse WKT " + wkt); |
| | | } |
| | | |
| | | return geometry; |
| | | }, |
| | | //å°å¾å¤ä½ |
| | | setMapRest() { |
| | | const data = mapData.mapRest; |
| | | sgworld.Navigate.flyToPointsInterest({ |
| | | destination: SmartEarth.Cesium.Cartesian3.fromDegrees(data.lng, data.lat, data.alt), |
| | | orientation: { |
| | | heading: SmartEarth.Cesium.Math.toRadians(data.heading), |
| | | pitch: SmartEarth.Cesium.Math.toRadians(data.pitch), |
| | | roll: SmartEarth.Cesium.Math.toRadians(data.roll) |
| | | }, |
| | | // { |
| | | // x: data.lng, |
| | | // y: data.lat, |
| | | // z: data.alt |
| | | // }, |
| | | // orientation: { |
| | | // heading: data.heading, |
| | | // pitch: data.pitch, |
| | | // roll: data.roll |
| | | // }, |
| | | duration: 8 //é£è¡æ¶é´8s |
| | | }); |
| | | }, |
| | | //å¨ç»å¯¼èª |
| | | setLineRoaming() { |
| | | var valdata = mapData.animaNavigation; |
| | | this.marksIndex = 1; |
| | | this.pitchValue = -20; |
| | | this.setShowPathLine(valdata); |
| | | var geom = []; |
| | | for (var i in valdata) { |
| | | geom.push(valdata[i].lng, valdata[i].lat, valdata[i].height); |
| | | } |
| | | |
| | | var that = this; |
| | | sgworld.Creator.getFlyData(geom, data => { |
| | | data.showPoint = false; |
| | | data.showLine = false; |
| | | data.mode = 1; |
| | | data.pitch = -10; |
| | | data.height = 100; |
| | | data.speed = 25; |
| | | |
| | | that.LineRoaming = sgworld.Creator.createDynamicObject( |
| | | data, |
| | | null, |
| | | res => { |
| | | if (res.time >= res.Totaltime) { |
| | | that.setCloseLineRomaing(); |
| | | that.setMapRest(); |
| | | } |
| | | } |
| | | ); |
| | | }); |
| | | }, |
| | | //ç¹å»è·ååæ |
| | | clickToCoordinates() { |
| | | const handlerClick = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | handlerClick.setInputAction(event => { |
| | | let cartesian = Viewer.camera.pickEllipsoid( |
| | | event.position, |
| | | Viewer.scene.globe.ellipsoid |
| | | ); |
| | | if (cartesian == undefined) { |
| | | console.log("没æè·åå°åæ "); |
| | | } else { |
| | | // 空é´åæ 转ä¸çåæ (弧度) |
| | | let cartographic = Cesium.Cartographic.fromCartesian(cartesian); |
| | | // 弧度转为è§åº¦ï¼ç»çº¬åº¦ï¼ |
| | | let lon = Cesium.Math.toDegrees(cartographic.longitude); // ç»åº¦å¼ |
| | | let lat = Cesium.Math.toDegrees(cartographic.latitude); // çº¬åº¦å¼ |
| | | console.log("ç»çº¬åº¦æ¯ï¼", { x: lon, y: lat }); |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | }, |
| | | //å®ä½å¼¹çª |
| | | setLocation(res) { |
| | | var objdata = { |
| | | name: res.name, |
| | | address: res.address, |
| | | area: res.area, |
| | | code: res.code, |
| | | lat: res.lat, |
| | | lon: res.lon |
| | | }; |
| | | |
| | | //æ·»å å®ä½å¼¹çª |
| | | this.setAddPointLocation(objdata); |
| | | //èå´è°ç¨ |
| | | this.getLandmass(res); |
| | | }, |
| | | setAddPointLocation(res) { |
| | | // æ¸
餿¹æ³ |
| | | store.setlocalLayerShowAction(false); |
| | | store.setlocalLayerListAction({}); |
| | | store.setlocalLayerShowAction(true); |
| | | store.setlocalLayerListAction(res); |
| | | this.instance = new PoiLayerConstructor({ |
| | | data: { |
| | | list: res |
| | | } |
| | | }); |
| | | this.instance.$mount(); |
| | | this.divPoint = sgworld.Creator.createDivPoint( |
| | | "", |
| | | { |
| | | lon: res.lon, |
| | | lat: res.lat, |
| | | height: 50 |
| | | }, |
| | | { |
| | | type: "custom", |
| | | offset: ["c", 100], |
| | | description: this.instance.$el, |
| | | near: 0, |
| | | far: 100000 |
| | | } |
| | | ); |
| | | this.position = window.Viewer.entities.add({ |
| | | name: "FLYToMap", |
| | | position: Cesium.Cartesian3.fromDegrees(res.lon, res.lat, 0), |
| | | point: { |
| | | pixelSize: 1, |
| | | color: Cesium.Color.WHITE.withAlpha(0), |
| | | outlineColor: Cesium.Color.WHITE.withAlpha(0.9), |
| | | outlineWidth: 1 |
| | | } |
| | | }); |
| | | window.Viewer.flyTo(this.position, { |
| | | offset: { |
| | | heading: Cesium.Math.toRadians(-200), |
| | | pitch: Cesium.Math.toRadians(-45), |
| | | range: this.pointrange |
| | | }, |
| | | duration: 3 |
| | | }); |
| | | setTimeout(() => { |
| | | window.Viewer.entities.remove(this.position); |
| | | }, 1000); |
| | | // setTimeout(() => { |
| | | // this.setPointFly(res); |
| | | // }, 4000); |
| | | }, |
| | | setflyExtent(res) { |
| | | if (this.unsubscribeTicks) { |
| | | window.Viewer.clock.onTick.removeEventListener(this.unsubscribeTicks); |
| | | this.unsubscribeTicks = null; |
| | | } |
| | | // ç¸æºçç¹çè§åº¦ï¼å¦æå¤§äº0é£ä¹åæ¯ä»å°åºå¾ä¸çï¼æä»¥è¦ä¸ºè´å¼ |
| | | var pitch = Cesium.Math.toRadians(this.pitchValue); |
| | | // æ¶é´é´é2ç§é |
| | | this.setExtentTime(res[this.marksIndex].flytime); |
| | | var Exection = () => { |
| | | var preIndex = this.marksIndex - 1; |
| | | if (this.marksIndex == 0) { |
| | | preIndex = res.length - 1; |
| | | } |
| | | var heading = this.bearing( |
| | | res[preIndex].lat, |
| | | res[preIndex].lng, |
| | | res[this.marksIndex].lat, |
| | | res[this.marksIndex].lng |
| | | ); |
| | | heading = Cesium.Math.toRadians(heading); |
| | | // å½åå·²ç»è¿å»çæ¶é´ï¼åä½s |
| | | var delTime = Cesium.JulianDate.secondsDifference( |
| | | window.Viewer.clock.currentTime, |
| | | window.Viewer.clock.startTime |
| | | ); |
| | | var originLat = |
| | | this.marksIndex == 0 |
| | | ? res[res.length - 1].lat |
| | | : res[this.marksIndex - 1].lat; |
| | | var originLng = |
| | | this.marksIndex == 0 |
| | | ? res[res.length - 1].lng |
| | | : res[this.marksIndex - 1].lng; |
| | | var endPosition = Cesium.Cartesian3.fromDegrees( |
| | | originLng + |
| | | ((res[this.marksIndex].lng - originLng) / |
| | | res[this.marksIndex].flytime) * |
| | | delTime, |
| | | originLat + |
| | | ((res[this.marksIndex].lat - originLat) / |
| | | res[this.marksIndex].flytime) * |
| | | delTime, |
| | | res[this.marksIndex].height |
| | | ); |
| | | |
| | | // console.log(1, pitch); |
| | | window.Viewer.scene.camera.setView({ |
| | | destination: endPosition, |
| | | orientation: { |
| | | heading: heading, |
| | | pitch: Cesium.Math.toRadians(-5) |
| | | } |
| | | }); |
| | | if ( |
| | | Cesium.JulianDate.compare( |
| | | window.Viewer.clock.currentTime, |
| | | window.Viewer.clock.stopTime |
| | | ) >= 0 |
| | | ) { |
| | | this.unsubscribeTicks = window.Viewer.clock.onTick.removeEventListener( |
| | | Exection |
| | | ); |
| | | this.changeCameraHeading(res); |
| | | } |
| | | }; |
| | | window.Viewer.clock.onTick.addEventListener(Exection); |
| | | }, |
| | | setPointFly(res) { |
| | | var that = this; |
| | | that.pointerFly = window.sgworld.Analysis.setPointFly({ |
| | | position: Cesium.Cartesian3.fromDegrees(res.lon, res.lat, 200), |
| | | hideImage: true, |
| | | time: 120, |
| | | limitTime: true, |
| | | limitAngel: 120, |
| | | end: () => { |
| | | that.pointerFly = null; |
| | | } |
| | | }); |
| | | setTimeout(() => { |
| | | this.setClearPointFly(); |
| | | }, 8000); |
| | | }, |
| | | changeCameraHeading(res) { |
| | | var nextIndex = this.marksIndex + 1; |
| | | if (this.marksIndex == res.length - 1) { |
| | | if (this.unsubscribeTicks) { |
| | | window.Viewer.clock.onTick.removeEventListener(this.unsubscribeTicks); |
| | | this.unsubscribeTicks = null; |
| | | } |
| | | return; |
| | | } |
| | | // 计ç®ä¸¤ç¹ä¹é´çæ¹å |
| | | var heading = this.bearing( |
| | | res[this.marksIndex].lat, |
| | | res[this.marksIndex].lng, |
| | | res[nextIndex].lat, |
| | | res[nextIndex].lng |
| | | ); |
| | | // ç¸æºçç¹çè§åº¦ï¼å¦æå¤§äº0é£ä¹åæ¯ä»å°åºå¾ä¸çï¼æä»¥è¦ä¸ºè´å¼ |
| | | var pitch = Cesium.Math.toRadians(this.pitchValue); |
| | | // ç»å®é£è¡ä¸å¨æéæ¶é´ï¼æ¯å¦10s, é£ä¹æ¯ç§è½¬å¨åº¦æ° |
| | | var angle = |
| | | (heading - Cesium.Math.toDegrees(window.Viewer.camera.heading)) / 2; |
| | | // æ¶é´é´é2ç§é |
| | | this.setExtentTime(2); |
| | | // ç¸æºçå½åheading |
| | | var initialHeading = window.Viewer.camera.heading; |
| | | var Exection = () => { |
| | | // å½åå·²ç»è¿å»çæ¶é´ï¼åä½s |
| | | var delTime = Cesium.JulianDate.secondsDifference( |
| | | window.Viewer.clock.currentTime, |
| | | window.Viewer.clock.startTime |
| | | ); |
| | | var heading = Cesium.Math.toRadians(delTime * angle) + initialHeading; |
| | | window.Viewer.scene.camera.setView({ |
| | | orientation: { |
| | | heading: heading, |
| | | pitch: Cesium.Math.toRadians(-5) |
| | | } |
| | | }); |
| | | if ( |
| | | Cesium.JulianDate.compare( |
| | | window.Viewer.clock.currentTime, |
| | | window.Viewer.clock.stopTime |
| | | ) >= 0 |
| | | ) { |
| | | window.Viewer.clock.onTick.removeEventListener(Exection); |
| | | this.marksIndex = ++this.marksIndex >= res.length ? 0 : this.marksIndex; |
| | | this.setflyExtent(res); |
| | | } |
| | | }; |
| | | window.Viewer.clock.onTick.addEventListener(Exection); |
| | | }, |
| | | bearing(startLat, startLng, destLat, destLng) { |
| | | startLat = this.toRadians(startLat); |
| | | startLng = this.toRadians(startLng); |
| | | destLat = this.toRadians(destLat); |
| | | destLng = this.toRadians(destLng); |
| | | |
| | | let y = Math.sin(destLng - startLng) * Math.cos(destLat); |
| | | let x = |
| | | Math.cos(startLat) * Math.sin(destLat) - |
| | | Math.sin(startLat) * Math.cos(destLat) * Math.cos(destLng - startLng); |
| | | let brng = Math.atan2(y, x); |
| | | let brngDgr = this.toDegrees(brng); |
| | | return (brngDgr + 360) % 360; |
| | | }, |
| | | toRadians(degrees) { |
| | | return (degrees * Math.PI) / 180; |
| | | }, |
| | | toDegrees(radians) { |
| | | return (radians * 180) / Math.PI; |
| | | }, |
| | | setExtentTime(time) { |
| | | var startTime = Cesium.JulianDate.fromDate(new Date()); |
| | | var stopTime = Cesium.JulianDate.addSeconds( |
| | | startTime, |
| | | time, |
| | | new Cesium.JulianDate() |
| | | ); |
| | | window.Viewer.clock.startTime = startTime.clone(); // å¼å§æ¶é´ |
| | | window.Viewer.clock.stopTime = stopTime.clone(); // ç»éæ¶é´ |
| | | window.Viewer.clock.currentTime = startTime.clone(); // å½åæ¶é´ |
| | | window.Viewer.clock.clockRange = Cesium.ClockRange.CLAMPED; // è¡ä¸ºæ¹å¼ |
| | | window.Viewer.clock.clockStep = Cesium.ClockStep.SYSTEM_CLOCK; // æ¶é设置为å½åç³»ç»æ¶é´; å¿½ç¥ææå
¶ä»è®¾ç½®ã |
| | | }, |
| | | // 导èªçº¿ |
| | | setShowPathLine(res) { |
| | | console.log(res); |
| | | var geom = []; |
| | | for (var i in res) { |
| | | geom.push([res[i].lng, res[i].lat]); |
| | | } |
| | | |
| | | var url = { |
| | | type: "FeatureCollection", |
| | | features: [ |
| | | { |
| | | type: "Feature", |
| | | geometry: { |
| | | type: "LineString", |
| | | coordinates: geom |
| | | } |
| | | } |
| | | ] |
| | | }; |
| | | this.pathLayer = window.sgworld.Creator.createPathLayer({ |
| | | url: url, |
| | | color: "#0033FF", //线çé¢è² |
| | | width: 4.0, //线ç宽度 |
| | | pointColor: "#FFFFFF", //ç§»å¨ç¹çé¢è² |
| | | speed: 5, |
| | | far: 50000 |
| | | }); |
| | | }, |
| | | //ç»æäºä»¶ |
| | | setClearAllMsg() { |
| | | if (this.divPoint) { |
| | | this.divPoint && this.divPoint.deleteObject(); |
| | | this.divPoint = null; |
| | | } |
| | | if (this.instance) { |
| | | this.instance && this.instance.$destroy(); |
| | | this.instance = null; |
| | | } |
| | | //å°å |
| | | this.setLacationLineClear() |
| | | // 轨迹线 |
| | | this.setClosePathLine(); |
| | | // 漫游 |
| | | this.setCloseLineRomaing(); |
| | | //å®ç¹æ¼«æ¸¸ |
| | | this.setClearPointFly(); |
| | | // vueEvents.$emit("queryLayer", false); |
| | | }, |
| | | setLacationLineClear() { |
| | | if (this.lacationLine) { |
| | | Viewer.entities.remove(this.lacationLine) |
| | | this.lacationLine = null; |
| | | } |
| | | }, |
| | | setClearPointFly() { |
| | | if (this.pointerFly) { |
| | | this.pointerFly && this.pointerFly.end(); |
| | | this.pointerFly = null; |
| | | } |
| | | }, |
| | | setCloseLineRomaing() { |
| | | if (this.LineRoaming) { |
| | | this.LineRoaming && this.LineRoaming.exit(); |
| | | this.LineRoaming = null; |
| | | } |
| | | }, |
| | | setClosePathLine() { |
| | | if (this.pathLayer) { |
| | | this.pathLayer && this.pathLayer.deleteObject(); |
| | | } |
| | | } |
| | | }; |
| | | export default rpc; |
| | |
| | | <template> |
| | | <div class="mapViewer"> |
| | | <div class="cacheImage"> |
| | | <img style="display: none;" src="@assets/img/new/rightCircle-y.png" alt="" /> |
| | | <img style="display: none;" src="@assets/img/new/leftCircle-y.png" alt="" /> |
| | | <img style="display: none;" src="@assets/img/new/treeClose-y.png" alt="" /> |
| | | <img style="display: none;" src="@assets/img/new/h1.png" alt="" /> |
| | | </div> |
| | | |
| | | <img |
| | | style="display: none" |
| | | src="@assets/img/new/rightCircle-y.png" |
| | | alt="" |
| | | /> |
| | | <img |
| | | style="display: none" |
| | | src="@assets/img/new/leftCircle-y.png" |
| | | alt="" |
| | | /> |
| | | <img style="display: none" src="@assets/img/new/treeClose-y.png" alt="" /> |
| | | <img style="display: none" src="@assets/img/new/h1.png" alt="" /> |
| | | </div> |
| | | |
| | | <div class="tooltip" :class="{ tooltiphide: !tooltipShow }"> |
| | | <span> |
| | |
| | | <img class="searchBtn" src="@/assets/img/right/closeinput1.png" /> |
| | | </el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | <viewer1 class="mapViewer" :key="switchKey" v-if="viewer1Show" :style="viewer1Style" |
| | | @mousemove.native="viewer1MouseMove" /> |
| | | <viewer class="mapViewer" ref="mapViewer" :style="viewerStyle" @mousemove.native="viewerMouseMove" /> |
| | | <div class="controlPanel" :style="{ |
| | | width: `${size}`, |
| | | height: `${size}`, |
| | | transform: `scale(${scale}) translate(${offset},${offset})`, |
| | | '-webkit-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | '-moz-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | '-o-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | '-ms-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | }"> |
| | | <left-menu></left-menu> |
| | | |
| | | <viewer1 |
| | | class="mapViewer" |
| | | :key="switchKey" |
| | | v-if="viewer1Show" |
| | | :style="viewer1Style" |
| | | @mousemove.native="viewer1MouseMove" |
| | | /> |
| | | <viewer |
| | | class="mapViewer" |
| | | ref="mapViewer" |
| | | :style="viewerStyle" |
| | | @mousemove.native="viewerMouseMove" |
| | | /> |
| | | <div |
| | | class="controlPanel" |
| | | :style="{ |
| | | width: `${size}`, |
| | | height: `${size}`, |
| | | transform: `scale(${scale}) translate(${offset},${offset})`, |
| | | '-webkit-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | '-moz-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | '-o-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | '-ms-transform': `scale(${scale}) translate(${offset},${offset})`, |
| | | }" |
| | | > |
| | | <img @click="changePwd" id="headlog" src="@/assets/img/new/topBar.png" /> |
| | | <img id="bottomBar" src="@/assets/img/new/bottomBar.png" /> |
| | | <!-- <el-slider |
| | |
| | | import signalling from "@/components/menu/signalling"; |
| | | import bottommenu from "@/components/menu/bottom-menu"; |
| | | import { mapState, mapMutations } from "vuex"; |
| | | import vueEvents from "@/utils/vueEvent.js"; |
| | | import leftMenu from "@/components/menu/leftMenu.vue"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | setting, |
| | | qycharts, |
| | | History, |
| | | signalling |
| | | signalling, |
| | | leftMenu, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | offset: "0%", |
| | | tooltipInfo: "请ç¨åããã", |
| | | tooltipShow: false, |
| | | signallingShow:false, |
| | | signallingShow: false, |
| | | switchKey: 0, |
| | | |
| | | // viewer1Show: false, |
| | | }; |
| | | }, |
| | |
| | | this.scale = (100 / size).toFixed(2); |
| | | this.offset = "-" + ((size - 100) / 2).toFixed(2) + "%"; |
| | | this.size = size + "%"; |
| | | vueEvents.$on("queryLayer", (res) => { |
| | | this.queryShow = res; |
| | | }); |
| | | }, |
| | | computed: { |
| | | ...mapState(["viewer1Show", "isLand", "yqfk"]), |
| | |
| | | this.tooltipShow = show; |
| | | this.tooltipInfo = msg ? msg : ""; |
| | | }, |
| | | |
| | | changePwd() { |
| | | console.log(111); |
| | | }, |
| | | changeMode(mode){ |
| | | changeMode(mode) { |
| | | this.$refs.mapViewer.changeMode(mode); |
| | | }, |
| | | detectZoom() { |
| | |
| | | this.$store.commit("showHistory", false); |
| | | }, |
| | | }, |
| | | beforeDestroy(){ |
| | | beforeDestroy() { |
| | | this.$refs.bottommenu.switchMenu(0); |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .cacheImage{ |
| | | .cacheImage { |
| | | display: none !important; |
| | | } |
| | | .mapViewer { |
| | |
| | | }); |
| | | }, |
| | | // æ¸
餿¬å°æææ ç»ä¿¡æ¯ |
| | | deleteAllPlot() { |
| | | this.$confirm("该æä½å°æ¸
é¤æææ ç»ä¿¡æ¯ï¼æ¯å¦ç»§ç»?", "æ¸
é¤", { |
| | | deleteAllPlot() { |
| | | this.$confirm("该æä½å°å é¤æææ ç»åå²è®°å½ï¼æ¯å¦ç»§ç»?", "æ¸
é¤", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.$message({ |
| | | message: "æ ç»æ°æ®å·²æ¸
é¤", |
| | | type: "success", |
| | | axios({ |
| | | method: "GET", |
| | | url: "http://10.10.4.121:8070/PM20221203225_OpenAPI3_Service-0.0.1-SNAPSHOT/biaoHui/list", |
| | | }).then((response) => { |
| | | let hisIDArr = []; |
| | | response.data.result.forEach((item) => { |
| | | hisIDArr.push({ |
| | | id: item.id, |
| | | }); |
| | | }); |
| | | axios |
| | | .post( |
| | | "http://10.10.4.121:8070/PM20221203225_OpenAPI3_Service-0.0.1-SNAPSHOT/biaoHui/del", |
| | | hisIDArr, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | if (res.data.code == 200) { |
| | | this.$message({ |
| | | message: "å 餿å", |
| | | type: "success", |
| | | }); |
| | | this.initData({}); |
| | | } else { |
| | | this.$message.error("å é¤å¤±è´¥ï¼"); |
| | | } |
| | | }); |
| | | }); |
| | | this.initData({}); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | |
| | | :model="loginForm" |
| | | :rules="rules" |
| | | ref="loginForm" |
| | | @keyup.enter.native="submitForm('loginForm')" |
| | | > |
| | | <el-form-item prop="loginname"> |
| | | <div class="user-box"> |
| | |
| | | class="nobr" |
| | | autocomplete="off" |
| | | clearable |
| | | @keyup.enter.native="submitForm('loginForm')" |
| | | > |
| | | </el-input> |
| | | </div> |
| | |
| | | }, |
| | | created() {}, |
| | | mounted() { |
| | | window.addEventListener("keydown", this.keyDown); |
| | | // if ( |
| | | // window.location.href.match(/=(\S*)#/) && |
| | | // window.location.href.match(/=(\S*)#/)[1] != "" |
| | |
| | | this.passCAFree(); |
| | | } |
| | | }, |
| | | destroyed() { |
| | | // 鿝äºä»¶ |
| | | window.removeEventListener("keydown", this.keyDown, false); |
| | | }, |
| | | methods: { |
| | | // ç¹å»å车é®ç»å½ |
| | | keyDown(e) { |
| | | // åè½¦åæ§è¡ç»å½æ¹æ³ enteré®çASCIIæ¯13 |
| | | if (e.keyCode == 13 || e.keyCode == 100) { |
| | | this.submitForm("loginForm"); // å®ä¹çç»å½æ¹æ³ |
| | | } |
| | | }, |
| | | // è´¦å·å¯ç ç»å½ |
| | | submitForm(formName) { |
| | | // this.$router.push("/index"); |
| | |
| | | spinner: "el-icon-loading", |
| | | background: "rgba(0, 0, 0, 0.7)", |
| | | }); |
| | | |
| | | login({ |
| | | username: this.loginForm.loginname, |
| | | password: this.loginForm.password, |
| | |
| | | return Promise.resolve(error.response); |
| | | // reject(error); |
| | | }); |
| | | |
| | | // //妿ç»å½å¤±è´¥ï¼éè¦å·æ°éªè¯ç ç |
| | | // this.$refs.refresh.createdCode(); |
| | | // this.validCode = ""; //æ¸
空éªè¯ç è¾å
¥æ¡çå
容 |
| | |
| | | bottom: -160px; |
| | | animation: square 20s linear infinite; |
| | | border-radius: 45%; |
| | | box-shadow: 0px 0px 10px rgba(255,255,255,0.5); |
| | | box-shadow: 0px 0px 10px rgba(255, 255, 255, 0.5); |
| | | } |
| | | |
| | | .bg-squares li:nth-child(1) { |
| | |
| | | <template> |
| | | <div> |
| | | <div id="sdkContainer"></div> |
| | | <!-- <iframe |
| | | id="digital_page" |
| | | v-if="isShowDigitalPerson" |
| | | src="https://iframetester.com/" |
| | | height="450" |
| | | width="600" |
| | | frameborder="no" |
| | | border="0" |
| | | marginwidth="0" |
| | | marginheight="0" |
| | | scrolling="no" |
| | | allowtransparency="yes" |
| | | ></iframe> --> |
| | | <iframe |
| | | v-if="isShowDigitalPerson" |
| | | id="digital_page" |
| | | allow="microphone;" |
| | | :src="digitalHuman" |
| | | :height="digitalSize.height" |
| | | :width="digitalSize.width" |
| | | frameborder="no" |
| | | border="0" |
| | | marginwidth="0" |
| | | marginheight="0" |
| | | scrolling="no" |
| | | allowtransparency="yes" |
| | | ></iframe> |
| | | |
| | | <div class="listBox" v-show="viewer1Show && !isLand"> |
| | | <ul id="viewer_lsyx"> |
| | | <li |
| | |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | |
| | | <layerTreeTwoScreen v-if="layerTreeTwoScreen" /> |
| | | <!-- <div id="bottomInfo" v-html="bottomInfo"></div> --> |
| | | <div |
| | |
| | | import "animate.css"; |
| | | import Bus from "@tools/Bus"; |
| | | |
| | | import mapData from "../../../static/mapData"; |
| | | import mapMsg from "../../assets/js/mapMsg"; |
| | | import vueEvents from "@/utils/vueEvent.js"; |
| | | |
| | | let activeLi, nLayer, LWLayer; |
| | | export default { |
| | | name: "viewer", |
| | |
| | | scale: "1", |
| | | offset: "0%", |
| | | radio: 3, |
| | | digitalHuman: null, |
| | | digitalSize: {}, |
| | | arr: [ |
| | | 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, |
| | | 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, |
| | |
| | | }, |
| | | computed: { |
| | | ...mapState(["viewer1Show", "isLand", "layerTreeTwoScreen", "cesiumInit"]), |
| | | isShowDigitalPerson() { |
| | | return this.$store.state.isShowDigitalPerson; |
| | | }, |
| | | }, |
| | | watch: { |
| | | viewer1Show(newvalue, oldvalue) { |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.digitalHuman = window.digitalHumanURL; |
| | | this.digitalSize = window.digitalSize; |
| | | let pathName = window.location.pathname.split("/"); |
| | | let StaticFileBaseUrl; |
| | | if (pathName.length != 2) { |
| | | StaticFileBaseUrl = `../../../${pathName[1]}/static/CimSDK/`; |
| | | } else { |
| | | StaticFileBaseUrl = `../../../static/CimSDK/`; |
| | | } |
| | | this.$nextTick(function () { |
| | | let that = this; |
| | | //*********å京sdk************ |
| | | window.sgworld = new SmartEarth.EarthCtrl( |
| | | "sdkContainer", |
| | | { |
| | | StaticFileBaseUrl: "../../../static/CimSDK/", |
| | | // StaticFileBaseUrl: "../../../SW/static/CimSDK/", |
| | | // StaticFileBaseUrl: "../../../YZXNCS/static/CimSDK/", |
| | | StaticFileBaseUrl: StaticFileBaseUrl, |
| | | }, |
| | | {}, |
| | | {}, |
| | |
| | | }, |
| | | duration: 5, //é£è¡æ¶é´8s |
| | | }); |
| | | // console.log("å è½½å®æ"); |
| | | }, 14000); |
| | | that.setCesiumInit(true); |
| | | } |
| | |
| | | // Viewer.scene.screenSpaceCameraController.enableCollisionDetection = false; |
| | | Viewer.scene.globe.translucency.frontFaceAlpha = 0.5; |
| | | Viewer.scene.globe.undergroundColor = undefined; |
| | | |
| | | mapMsg.init(); |
| | | // rpc.clickToCoordinates(); |
| | | // mapMsg.setTime(); |
| | | //å¼å¯ç¼è¾å¹¶å¯ç¨å±æ§å¼¹çª |
| | | sgworld.Creator.SimpleGraphic.setEdit(true, { |
| | | editProp: true, |
| | |
| | | border-radius: 10px; |
| | | /* box-shadow: 0px 0px 5px 3px #fff; */ |
| | | } |
| | | |
| | | #digital_page { |
| | | position: absolute; |
| | | left: 0; |
| | | bottom: 120px; |
| | | z-index: 10; |
| | | } |
| | | /* #switchImagerLayer:before { |
| | | content: ""; |
| | | position: absolute; |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | let pathName = window.location.pathname.split("/"); |
| | | let StaticFileBaseUrl; |
| | | if (pathName.length != 2) { |
| | | StaticFileBaseUrl = `../../../${pathName[1]}/static/CimSDK/`; |
| | | } else { |
| | | StaticFileBaseUrl = `../../../static/CimSDK/`; |
| | | } |
| | | let size = this.detectZoom(); |
| | | this.scale = (100 / size).toFixed(2); |
| | | this.offset = "-" + ((size - 100) / 2).toFixed(2) + "%"; |
| | |
| | | window.sgworld1 = new SmartEarth.EarthCtrl( |
| | | "sdkContainer1", |
| | | { |
| | | StaticFileBaseUrl: "../../static/CimSDK/", |
| | | // StaticFileBaseUrl: "../../../SW/static/CimSDK/", |
| | | // StaticFileBaseUrl: "../../../YZXNCS/static/CimSDK/", |
| | | StaticFileBaseUrl: StaticFileBaseUrl, |
| | | }, |
| | | {}, |
| | | null, |
| | |
| | | } |
| | | 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=" + |
| | | "http://10.10.4.116:8089/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=" + |
| | | // "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=" + |
| | | p.lon + |
| | | "&lat=" + |
| | | p.lat + |
| | |
| | | if (center.lon != 0 && center.lat != 0) { |
| | | axios |
| | | .get( |
| | | "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + |
| | | "http://10.10.4.116:8089/cs/poisearch/guihuacon/getInfo?ydbm=" + |
| | | // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" + |
| | | response.data.NO |
| | | ) |
| | | .then( |
| | |
| | | <template> |
| | | <div class="specialTool"> |
| | | |
| | | <div class="bottomwrapper" :class="{ 'top-btn-active': viewer1Show && isLand }"> |
| | | <div |
| | | class="bottomwrapper" |
| | | :class="{ 'top-btn-active': viewer1Show && isLand }" |
| | | > |
| | | <div class="imgbox" @click="tdglHandle"> |
| | | <img src="@assets/img/new/tudiguanli.png" alt="" /> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="bottomwrapper" @click="historyHandle" :class="{ 'top-btn-active': viewer1Show && !isLand }"> |
| | | <div |
| | | class="bottomwrapper" |
| | | @click="historyHandle" |
| | | :class="{ 'top-btn-active': viewer1Show && !isLand }" |
| | | > |
| | | <div class="imgbox"> |
| | | <img src="@assets/img/new/chengshigengxin.png" alt="" /> |
| | | </div> |
| | |
| | | <span> åå²å½±å </span> |
| | | </div> |
| | | </div> |
| | | <div class="bottomwrapper csbj" @click="spjkHandle" :class="{ 'top-btn-active': !isShowSPJK }"> |
| | | <div |
| | | class="bottomwrapper csbj" |
| | | @click="spjkHandle" |
| | | :class="{ 'top-btn-active': !isShowSPJK }" |
| | | > |
| | | <div class="imgbox"> |
| | | <img src="@assets/img/new/spjk.png" alt="" /> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="bottomwrapper spjk" @click="shoujixinling" :class="{ 'top-btn-active': !isShowSjxl }"> |
| | | <div |
| | | class="bottomwrapper spjk" |
| | | @click="shoujixinling" |
| | | :class="{ 'top-btn-active': !isShowSjxl }" |
| | | > |
| | | <div class="imgbox"> |
| | | <img src="@assets/img/new/sjxl.png" alt="" /> |
| | | </div> |
| | |
| | | <span> ææºä¿¡ä»¤ </span> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="bottomwrapper jxmx"> |
| | | <el-dropdown trigger="click" @command="handleCommand"> |
| | |
| | | <div class="textbox"> |
| | | <span> 精模示è </span> |
| | | </div> |
| | | <el-dropdown-menu slot="dropdown" :append-to-body="false" class="popper-dropdown"> |
| | | <el-dropdown-menu |
| | | slot="dropdown" |
| | | :append-to-body="false" |
| | | class="popper-dropdown" |
| | | > |
| | | <el-dropdown-item command="fcfhHandle">åå±åæ·</el-dropdown-item> |
| | | <!-- <el-dropdown-item command="sprhHandle">åºæ¯è§é¢èå</el-dropdown-item> --> |
| | | <el-dropdown-item v-if="isShowSPRH" command="jiqirendahui">åºæ¯è§é¢èå</el-dropdown-item> |
| | | <el-dropdown-item v-else command="jiqirendahui">å
³éè§é¢èå</el-dropdown-item> |
| | | <el-dropdown-item v-if="isShowSPRH" command="jiqirendahui" |
| | | >åºæ¯è§é¢èå</el-dropdown-item |
| | | > |
| | | <el-dropdown-item v-else command="jiqirendahui" |
| | | >å
³éè§é¢èå</el-dropdown-item |
| | | > |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
| | |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> --> |
| | | <el-slider :min="0" :max="360" v-model="robotVideoList[3].heading" @input="updateVideo"> |
| | | <el-slider |
| | | :min="0" |
| | | :max="360" |
| | | v-model="robotVideoList[3].heading" |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> |
| | | </el-form-item> |
| | | <el-form-item label="俯仰è§åº¦:"> |
| | | <el-slider :min="-89" :max="89" v-model="robotVideoList[3].pitch" @input="updateVideo"> |
| | | <el-slider |
| | | :min="-89" |
| | | :max="89" |
| | | v-model="robotVideoList[3].pitch" |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> |
| | | </el-form-item> |
| | | <el-form-item label="æ°´å¹³è§è§:"> |
| | | <el-slider :min="30" :max="120" v-model="robotVideoList[3].horizonAngle" @input="updateVideo"> |
| | | <el-slider |
| | | :min="30" |
| | | :max="120" |
| | | v-model="robotVideoList[3].horizonAngle" |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> |
| | | </el-form-item> |
| | | <el-form-item label="åç´è§è§:"> |
| | | <el-slider :min="30" :max="120" v-model="robotVideoList[3].verticalAngle" @input="updateVideo"> |
| | | <el-slider |
| | | :min="30" |
| | | :max="120" |
| | | v-model="robotVideoList[3].verticalAngle" |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿æå°:"> |
| | | <el-slider :min="100" :max="300" v-model="robotVideoList[3].far" @input="updateVideo"> |
| | | <el-slider |
| | | :min="100" |
| | | :max="300" |
| | | v-model="robotVideoList[3].far" |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> |
| | | </el-form-item> |
| | | <el-form-item label="éæåº¦:"> |
| | | <el-slider :step="0.1" :min="0" :max="1" v-model="robotVideoList[3].alpha" @input="updateVideo"> |
| | | <el-slider |
| | | :step="0.1" |
| | | :min="0" |
| | | :max="1" |
| | | v-model="robotVideoList[3].alpha" |
| | | @input="updateVideo" |
| | | > |
| | | </el-slider> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | |
| | | |
| | | <div class="textAreaBox" v-if="isShowTextArea"> |
| | | <el-input |
| | | v-model="input" |
| | | placeholder="请è¾å
¥å
容" |
| | | clearable |
| | | @keyup.enter.native="sendCommand($event)" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | |
| | | |
| | | .textAreaBox { |
| | | background: rgba(5, 39, 126, 0.7); |
| | | padding: 10px; |
| | | /* width: 375px; */ |
| | | position: absolute; |
| | | bottom: 165px; |
| | | color: #fff; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | z-index: 99999; |
| | | } |
| | | .textAreaBox .el-form-item { |
| | | margin: 0; |
| | | } |
| | | .textAreaBox .el-input { |
| | | width: 300px; |
| | | } |
| | | .specialTool .bottomwrapper:nth-of-type(3) { |
| | | /* background: red; */ |
| | | position: relative; |
| | |
| | | let video4; |
| | | let heatMapItem; |
| | | import { mapState, mapMutations } from "vuex"; |
| | | import { queryBySquare } from "@/utils/request"; |
| | | import { queryBySquare } from "@/api/api"; |
| | | |
| | | import Bus from "../tools/Bus"; |
| | | import { roman } from "../../assets/json/index.js"; |
| | | import URLInCode from "@/assets/js/urlInCode"; |
| | | |
| | | import axios from "axios"; |
| | | export default { |
| | | components: { |
| | | |
| | | }, |
| | | components: {}, |
| | | name: "bottom-menu", |
| | | data() { |
| | | return { |
| | |
| | | isShowSPRH: true, |
| | | csbjShow: false, |
| | | jxmxShow: false, |
| | | |
| | | input: "", |
| | | romanOption: [ |
| | | { name: "æ ¸å¿åº" }, |
| | | { name: "æ¯è§ç»¿å°" }, |
| | |
| | | }, |
| | | computed: { |
| | | ...mapState(["viewer1Show", "isLand", "yqfk", "qyEchartsShow"]), |
| | | isShowTextArea() { |
| | | if (this.$store.state.isShowTextArea) { |
| | | this.input = ""; |
| | | } |
| | | return this.$store.state.isShowTextArea; |
| | | }, |
| | | }, |
| | | methods: { |
| | | ...mapMutations(["setViewer1Show", "setIsLand", "setqyEchartsShow"]), |
| | |
| | | break; |
| | | } |
| | | }, |
| | | handleCommand(command) { |
| | | sendCommand(event) { |
| | | mapMsg.testMsg(event.target.value); |
| | | |
| | | // 黿¢é»è®¤è¡ä¸ºï¼å¦æéè¦çè¯ï¼ |
| | | event.preventDefault(); |
| | | }, |
| | | handleCommand(command) { |
| | | switch (command) { |
| | | case "spjkHandle": |
| | | this.spjkHandle(); |
| | |
| | | ); |
| | | }, |
| | | switchMenu(id) { |
| | | |
| | | if (id != 1) { |
| | | this.setViewer1Show(false); |
| | | } |
| | |
| | | } |
| | | }, |
| | | closeSjxl() { |
| | | |
| | | this.isShowSjxl = true; |
| | | this.$parent.signallingShow = false; |
| | | |
| | | this.isShowSjxl = true; |
| | | this.$parent.signallingShow = false; |
| | | }, |
| | | // historyHandle() { |
| | | // this.$store.commit("showHistory", true); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="menuBox"> |
| | | <div v-if="list.length == 0 && val == null"></div> |
| | | <div class="boxCntent" v-else-if="list.length == 0"> |
| | | {{ val }} æ°æ®æ£å¨è¡¥å
ä¸ |
| | | <!-- <div class="close" @click.stop="closelist"></div> --> |
| | | </div> |
| | | <ul class="boxCntent" v-if="list.length != 0"> |
| | | <!-- <div class="close" @click.stop="closelist"></div> --> |
| | | <div> |
| | | <li v-for="(item, index) in list" :key="index"> |
| | | <div> |
| | | {{ item.name }} |
| | | </div> |
| | | <div v-if="item.address">å°åï¼ {{ item.address }}</div> |
| | | <div v-if="item.code">å°åç¼å·ï¼ {{ item.code }}</div> |
| | | </li> |
| | | </div> |
| | | </ul> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import store from "@/utils/store"; |
| | | import rpc from "@/assets/js/rpc"; |
| | | import vueEvents from "@/utils/vueEvent.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | list: [], |
| | | val: null, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | vueEvents.$on("queryData", (res) => { |
| | | this.list = []; |
| | | this.val = null; |
| | | if (res) { |
| | | if (store.queryLayer.data) { |
| | | this.list = store.queryLayer.data; |
| | | } |
| | | this.val = store.queryLayer.val; |
| | | } |
| | | }); |
| | | }, |
| | | methods: { |
| | | closelist() { |
| | | vueEvents.$emit("queryData", false); |
| | | rpc.setClearAllMsg(); |
| | | |
| | | store.queryLayer.data = []; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .menuBox { |
| | | border-radius: 3px; |
| | | background-image: url("~@/assets/img/new/listbg.png"); |
| | | background-size: 100% 100%; |
| | | position: absolute; |
| | | z-index: 30; |
| | | bottom: 130px; |
| | | right: 70px; |
| | | width: 300px; |
| | | color: white; |
| | | font-family: Source Han Sans SC; |
| | | font-size: 16px; |
| | | } |
| | | .close { |
| | | pointer-events: all; |
| | | width: 28px; |
| | | height: 28px; |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | background-image: url("../poplayer/img/close.png"); |
| | | cursor: pointer; |
| | | } |
| | | .menuBox .boxCntent { |
| | | margin: 1%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: flex-end; |
| | | } |
| | | .menuBox li { |
| | | padding: 10px; |
| | | border: 1px solid gray; |
| | | margin-top: 2px; |
| | | } |
| | | </style> |
| | |
| | | } |
| | | </style> |
| | | <script> |
| | | import Vue from "vue"; |
| | | import store from "@/utils/store"; |
| | | import poiLayer from "@/components/poplayer/main"; |
| | | import rpc from "@/assets/js/rpc"; |
| | | import mapData from "../../../../static/mapData"; |
| | | import mapMsg from "@/assets/js/mapMsg"; |
| | | import vueEvents from "@/utils/vueEvent.js"; |
| | | let PoiLayerConstructor = Vue.extend(poiLayer); |
| | | |
| | | import axios from "axios"; |
| | | import { mapState, mapMutations } from "vuex"; |
| | | import Bus from "../../tools/Bus"; |
| | |
| | | import URLInCode from "@/assets/js/urlInCode"; |
| | | import keyName from "@/utils/poiKeys"; |
| | | import LayerField from "@/utils/NameConf"; |
| | | let handler; |
| | | |
| | | let handler, buildingPolygon, objdata, video, promiseS3M; |
| | | window.divPoint3 = null; |
| | | window.instance = null; |
| | | let tooltipHTML; |
| | | window.divPoint1 = null; |
| | | window.pickFeature = null; |
| | | window.imgUrl = null; |
| | | window.scale = null; |
| | | let buildingPolygon; |
| | | let tooltip; |
| | | let lineArr = []; |
| | | let video; |
| | | let promiseS3M; |
| | | //交éå¾å± |
| | | let panoramaLayer; |
| | | window.panoramaLayer = null; |
| | | export default { |
| | | name: "special", |
| | | data() { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-if="state.show"> |
| | | |
| | | <location :list="list"></location> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import location from "./location.vue"; |
| | | import store from "@/utils/store"; |
| | | export default { |
| | | name: "Main", |
| | | components: { |
| | | location, |
| | | }, |
| | | data() { |
| | | return { |
| | | state: store.localLayer, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="z-index: 100000000"> |
| | | <div class="Poplayer"> |
| | | <div class="close" @click.stop="closehandle"></div> |
| | | <div class="content"> |
| | | <div class="ssdw">{{ state.list.name }}</div> |
| | | |
| | | <div class="lxr" v-if="state.list.address"> |
| | | å°åï¼{{ state.list.address }} |
| | | </div> |
| | | <div class="lxr" v-if="state.list.code"> |
| | | å°åç¼å·ï¼{{ state.list.code }} |
| | | </div> |
| | | <div class="lxr" v-if="state.list.area"> |
| | | å°åé¢ç§¯ï¼{{ state.list.area }} å¹³æ¹ç±³ |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import store from "@/utils/store"; |
| | | import keys from "@/utils/poiKeys"; |
| | | import rpc from "../../assets/js/rpc"; |
| | | import mapData from "../../../static/mapData"; |
| | | export default { |
| | | name: "Main", |
| | | components: {}, |
| | | props: { |
| | | keys: { |
| | | type: Object, |
| | | }, |
| | | list: { |
| | | type: Object, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | state: store.localLayer, |
| | | KEY: {}, |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | mounted() { |
| | | if (this.list) { |
| | | this.state.list = this.list; |
| | | } |
| | | // this.KEY = keys[this.state.list.POITYPE]; |
| | | }, |
| | | watch: { |
| | | "state.list": function (val) { |
| | | this.KEY = keys[val.POITYPE]; |
| | | }, |
| | | }, |
| | | methods: { |
| | | closehandle() { |
| | | if (window.pickFeature && window.pickFeature.primitive) { |
| | | window.pickFeature.primitive.image = window.imgUrl; |
| | | window.pickFeature.primitive.scale = window.scale; |
| | | window.pickFeature = null; |
| | | } |
| | | store.setlocalLayerListAction({}); |
| | | divPoint3 && divPoint3.deleteObject(); |
| | | store.setlocalLayerShowAction(false); |
| | | if (window.tdglLine) { |
| | | sgworld.Creator.DeleteObject(window.tdglLine); |
| | | window.tdglLine = null; |
| | | } |
| | | rpc.setLacationLineClear(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .Poplayer { |
| | | min-width: 380px; |
| | | max-width: 580px; |
| | | /* width: 380px; */ |
| | | /* min-height: 183px; */ |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | background-image: url("./img/bg.png"); |
| | | z-index: 999; |
| | | color: #fff; |
| | | font-family: SourceHanSansSC-R; |
| | | /* padding: 20px; */ |
| | | padding: 10px 5px 10px 5px; |
| | | box-sizing: border-box; |
| | | font-size: 16px; |
| | | pointer-events: all; |
| | | } |
| | | |
| | | .title { |
| | | text-align: center; |
| | | font-size: 20px; |
| | | font-weight: 700; |
| | | letter-spacing: 4px; |
| | | padding-left: 26px; |
| | | } |
| | | |
| | | /* .title { |
| | | display: none; |
| | | width: 100%; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | padding-left: 20px; |
| | | margin-top: 10px; |
| | | } */ |
| | | |
| | | .close { |
| | | pointer-events: all; |
| | | width: 28px; |
| | | height: 28px; |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | background-image: url("./img/close.png"); |
| | | float: right; |
| | | margin-top: 8px; |
| | | margin-right: 15px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .content { |
| | | width: 100%; |
| | | margin: auto; |
| | | } |
| | | |
| | | .con-item { |
| | | width: 90%; |
| | | overflow: hidden; |
| | | margin-bottom: 7px; |
| | | margin-left: 25px; |
| | | margin-right: 20px; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .name { |
| | | /* min-width: 100px; */ |
| | | float: left; |
| | | } |
| | | |
| | | .value { |
| | | max-width: 400px; |
| | | float: left; |
| | | color: aqua; |
| | | } |
| | | .ssdw { |
| | | width: 94%; |
| | | margin: 20px auto 0; |
| | | text-align: center; |
| | | color: #f2be10; |
| | | font: bold 18px sans-serif; |
| | | } |
| | | .lxr { |
| | | margin: 13px auto 0; |
| | | max-width: 80%; |
| | | text-align: center; |
| | | color: #fff; |
| | | font: bold 15px sans-serif; |
| | | } |
| | | .dz { |
| | | margin: 13px auto 20px; |
| | | max-width: 80%; |
| | | text-align: center; |
| | | color: #fff; |
| | | font: bold 15px sans-serif; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div v-if="state.show"> |
| | | <poplayer :list="list" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import poplayer from "./poplayer.vue"; |
| | | import store from "@/utils/store"; |
| | | export default { |
| | | name: "Main", |
| | | components: { |
| | | poplayer, |
| | | }, |
| | | data() { |
| | | return { |
| | | state: store.Poplayer, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="z-index: 100000000"> |
| | | <div class="Poplayer"> |
| | | <div class="close" @click.stop="closehandle"></div> |
| | | <!-- <div class="title">ç¹ä½è¯¦æ
</div> --> |
| | | <div class="content"> |
| | | <div class="ssdw">{{ state.list[KEY["æå±åä½"]] }}</div> |
| | | <div class="lxr">è系人ï¼{{ state.list[KEY["è系人"]] }}</div> |
| | | <div class="dz">å°åï¼{{ state.list[KEY["å°å"]] }}</div> |
| | | <!-- <div class="con-item" v-for="(item, index) in KEY" :key="index"> |
| | | <span class="name">{{ index }}ï¼</span> |
| | | <span class="value">{{ state.list[item] }}</span> |
| | | </div> --> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import store from "@/utils/store"; |
| | | import keys from "@/utils/poiKeys"; |
| | | export default { |
| | | name: "Main", |
| | | components: {}, |
| | | props: { |
| | | keys: { |
| | | type: Object, |
| | | }, |
| | | list: { |
| | | type: Object, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | state: store.Poplayer, |
| | | KEY: {}, |
| | | }; |
| | | }, |
| | | computed: {}, |
| | | mounted() { |
| | | if (this.list) { |
| | | this.state.list = this.list; |
| | | } |
| | | this.KEY = keys[this.state.list.POITYPE]; |
| | | }, |
| | | watch: { |
| | | "state.list": function (val) { |
| | | this.KEY = keys[val.POITYPE]; |
| | | }, |
| | | }, |
| | | methods: { |
| | | closehandle() { |
| | | if (window.pickFeature && window.pickFeature.primitive) { |
| | | window.pickFeature.primitive.image = window.imgUrl; |
| | | window.pickFeature.primitive.scale = window.scale; |
| | | window.pickFeature = null; |
| | | } |
| | | store.setPoplayerListAction({}); |
| | | divPoint3 && divPoint3.deleteObject(); |
| | | store.setPoplayerShowAction(false); |
| | | if (window.tdglLine) { |
| | | sgworld.Creator.DeleteObject(window.tdglLine); |
| | | window.tdglLine = null; |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .Poplayer { |
| | | min-width: 380px; |
| | | max-width: 580px; |
| | | /* width: 380px; */ |
| | | /* min-height: 183px; */ |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | background-image: url("./img/bg.png"); |
| | | z-index: 999; |
| | | color: #fff; |
| | | font-family: SourceHanSansSC-R; |
| | | /* padding: 20px; */ |
| | | padding: 10px 5px 10px 5px; |
| | | box-sizing: border-box; |
| | | font-size: 16px; |
| | | pointer-events: all; |
| | | } |
| | | |
| | | .title { |
| | | text-align: center; |
| | | font-size: 20px; |
| | | font-weight: 700; |
| | | letter-spacing: 4px; |
| | | padding-left: 26px; |
| | | } |
| | | |
| | | /* .title { |
| | | display: none; |
| | | width: 100%; |
| | | height: 30px; |
| | | line-height: 30px; |
| | | padding-left: 20px; |
| | | margin-top: 10px; |
| | | } */ |
| | | |
| | | .close { |
| | | pointer-events: all; |
| | | width: 28px; |
| | | height: 28px; |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | background-image: url("./img/close.png"); |
| | | float: right; |
| | | margin-top: 8px; |
| | | margin-right: 15px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .content { |
| | | width: 100%; |
| | | margin: auto; |
| | | } |
| | | |
| | | .con-item { |
| | | width: 90%; |
| | | overflow: hidden; |
| | | margin-bottom: 7px; |
| | | margin-left: 25px; |
| | | margin-right: 20px; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .name { |
| | | /* min-width: 100px; */ |
| | | float: left; |
| | | } |
| | | |
| | | .value { |
| | | max-width: 400px; |
| | | float: left; |
| | | color: aqua; |
| | | } |
| | | .ssdw { |
| | | width: 94%; |
| | | margin: 20px auto 0; |
| | | text-align: center; |
| | | color: #f2be10; |
| | | font: bold 18px sans-serif; |
| | | } |
| | | .lxr { |
| | | margin: 13px auto 0; |
| | | max-width: 80%; |
| | | text-align: center; |
| | | color: #fff; |
| | | font: bold 15px sans-serif; |
| | | } |
| | | .dz { |
| | | margin: 13px auto 20px; |
| | | max-width: 80%; |
| | | text-align: center; |
| | | color: #fff; |
| | | font: bold 15px sans-serif; |
| | | } |
| | | </style> |
| | |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | content="æ°å人" |
| | | placement="left" |
| | | popper-class="item_tooltip" |
| | | > |
| | | <div |
| | | class="legend-bg" |
| | | @click="showDigitalPerson" |
| | | :class="{ active: isShowDP }" |
| | | > |
| | | <img class="legendImg" src="@/assets/img/new/æ°å人.png" /> |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | <div class="mapTool"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | content="ææ¬æä½" |
| | | placement="left" |
| | | popper-class="item_tooltip" |
| | | > |
| | | <div |
| | | class="legend-bg" |
| | | @click="showTextArea" |
| | | :class="{ active: isShowTA }" |
| | | > |
| | | <img class="legendImg" src="@/assets/img/new/ææ¬è¾å
¥.png" /> |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | <div class="mapTool"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | content="äº¦åºæ°åºèå´" |
| | | placement="left" |
| | | popper-class="item_tooltip" |
| | |
| | | background-image: url("~@/assets/img/new/leftCircle.png"); |
| | | background-size: 100%; |
| | | background-color: transparent; |
| | | width: 35px; |
| | | height: 35px; |
| | | width: 35px; |
| | | height: 35px; |
| | | position: relative; |
| | | cursor: pointer; |
| | | } |
| | | .active { |
| | | background-image: url("~@/assets/img/new/leftCircle-y.png"); |
| | | } |
| | | .tcqp { |
| | | background-color: rgba(0, 138, 252, 0.6); |
| | |
| | | return { |
| | | isWideAngle: false, |
| | | wideAngle: 1.04, |
| | | isShowDP: false, |
| | | isShowTA: false, |
| | | clickIndex: 0, |
| | | camera: { |
| | | position: [116.540659, 39.744945, 50000], |
| | |
| | | let p = sgworld.Navigate.getCameraInfo(); |
| | | console.log(p); |
| | | }, |
| | | |
| | | showDigitalPerson() { |
| | | this.isShowDP = !this.isShowDP; |
| | | this.$store.commit("showDigitalPerson", this.isShowDP); |
| | | }, |
| | | showTextArea() { |
| | | this.isShowTA = !this.isShowTA; |
| | | this.$store.commit("showTextArea", this.isShowTA); |
| | | }, |
| | | maskingOut() { |
| | | if (!window.maskinglayer) { |
| | | window.maskinglayer = sgworld.Creator.createImageryProvider( |
| | |
| | | import common from "@/components/common"; |
| | | import { mapState, mapMutations } from "vuex"; |
| | | import Bus from "../tools/Bus"; |
| | | import { queryBySquare } from "@/utils/request"; |
| | | import { queryBySquare } from "@/api/api"; |
| | | import FCFH from "@/components/right/FCFH"; |
| | | |
| | | //交éå¾å± |
| | |
| | | ]; |
| | | const router = new Router({ |
| | | mode: "history", |
| | | base: '/SW',//æµè¯ç æå
æ¶è§£å¼ |
| | | // base: '/SW',//æµè¯ç æå
æ¶è§£å¼ |
| | | base: '/TEST',//æµè¯ç æå
æ¶è§£å¼ |
| | | // base: '/YZXNCS',//æ£å¼ç æå
æ¶è§£å¼ |
| | | routes, |
| | | }); |
| | | router.beforeEach((to, from, next) => { |
| | | // next(); |
| | | // next(); |
| | | // å»ç»å½é¡µï¼ç´æ¥è·³è½¬ |
| | | if (to.path === "/login") { |
| | | next(); |
| | |
| | | cesiumInit: false, //å°å¾æ¯å¦åå§å宿 |
| | | showSetting: false, |
| | | isShowHistory: false, |
| | | isShowTextArea: false, |
| | | isShowDigitalPerson: false, |
| | | description: {}, |
| | | selectedLayers: [], |
| | | userId: "", |
| | |
| | | showHistory(state, b) { |
| | | state.isShowHistory = b |
| | | }, |
| | | showTextArea(state, b) { |
| | | state.isShowTextArea = b |
| | | }, |
| | | showDigitalPerson(state, b) { |
| | | state.isShowDigitalPerson = b |
| | | }, |
| | | // saveData(state, b) { |
| | | // state.layerData = b |
| | | // }, |
| | |
| | | // import { Message } from "element-ui"; |
| | | // import router from "../router" |
| | | |
| | | // create an axios instance |
| | | const service = axios.create({ |
| | | |
| | | // åå°8089 |
| | | const request = axios.create({ |
| | | baseURL: 'http://10.10.4.116:8089/', // apiçbase_url |
| | | timeout: 35000, // 请æ±è¶
æ¶æ¶é´ |
| | | headers: { |
| | |
| | | }, |
| | | withCredentials: true, |
| | | }); |
| | | const GISSERVER = axios.create({ |
| | | baseURL: 'http://10.10.4.116:8070/gisserver/', // apiçbase_url |
| | | timeout: 35000, // 请æ±è¶
æ¶æ¶é´ |
| | | }); |
| | | // gisserver ååæ¥è¯¢ |
| | | // export function queryPOI(servername, layer, name) { |
| | | // return GISSERVER.get("wfsserver/" + servername + "?version=1.3.0&request=GetFeature&format=json&typename=" + layer + "&propertyname=*&filter=%3CFilter%3E%3CPropertyIsLike+wildCard%3D%22*%22%3E%3CPropertyName%3E%E4%BA%95%E7%BC%96%E5%8F%B7%3C%2FPropertyName%3E%3CLiteral%3E" + name + "%3C%2FLiteral%3E%3C%2FPropertyIsLike%3E%3C%2FFilter%3E"); |
| | | // } |
| | | // // gisserver èå´æ¥è¯¢ |
| | | export function queryBySquare(url, layer, area) { |
| | | return GISSERVER.get(url, { |
| | | params: { |
| | | version: '1.3.0', |
| | | request: 'GetFeature', |
| | | typename: layer, |
| | | propertyname: '*', |
| | | format: "json", |
| | | filter: `<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:Intersects><ogc:PropertyName /><gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326"><gml:exterior><gml:LinearRing><gml:posList>${area}</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogc:Intersects></ogc:Filter>`, |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // request interceptor |
| | | service.interceptors.request.use( |
| | | request.interceptors.request.use( |
| | | (config) => { |
| | | // è¯·æ±æºå¸¦token |
| | | const token = window.localStorage.getItem('TokenKey'); |
| | |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | service.interceptors.response.use( |
| | | request.interceptors.response.use( |
| | | (response) => { |
| | | //ç»å½ä¹åætoken |
| | | if (window.localStorage.getItem('TokenKey') != null) { |
| | |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | export default service; |
| | | export default request; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import axios from "axios"; |
| | | // import { Message } from "element-ui"; |
| | | import router from "../router" |
| | | |
| | | |
| | | // ä¼ä¸æ¥å£8086 |
| | | const request = axios.create({ |
| | | baseURL: 'http://10.10.4.116:8086/', // apiçbase_url |
| | | timeout: 35000, // 请æ±è¶
æ¶æ¶é´ |
| | | headers: { |
| | | "content-type": "application/json;charset=UTF-8", |
| | | }, |
| | | withCredentials: true, |
| | | }); |
| | | |
| | | // request interceptor |
| | | request.interceptors.request.use( |
| | | (config) => { |
| | | // è¯·æ±æºå¸¦token |
| | | const token = window.localStorage.getItem('TokenKey'); |
| | | if (token) { |
| | | config.headers["Authorization"] = token; |
| | | } |
| | | return config; |
| | | }, |
| | | (error) => { |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | request.interceptors.response.use( |
| | | (response) => { |
| | | //ç»å½ä¹åætoken |
| | | if (window.localStorage.getItem('TokenKey') != null) { |
| | | // console.log(response); |
| | | // if (response.data.code !== 200) { |
| | | // router.push('/login'); |
| | | // localStorage.removeItem("TokenKey"); |
| | | // localStorage.removeItem("TokenTime"); |
| | | // } |
| | | // //tokenè¿æè¿åç»å½é¡µ |
| | | // if (response.data.code == 500104) { |
| | | // router.push('/login') |
| | | // localStorage.removeItem("TokenKey"); |
| | | // localStorage.removeItem("TokenTime"); |
| | | // } |
| | | } |
| | | return response.data; |
| | | }, |
| | | (error) => { |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | export default request; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | import axios from "axios"; |
| | | // import mapData from "../../static/mapData"; |
| | | import router from "../router" |
| | | // 121:8070 |
| | | const service = axios.create({ |
| | | // baseURL: 'https://skyzt.bda.gov.cn/dataApi/gisserver/', // apiçbase_url |
| | | baseURL: 'http://10.10.4.121:8070/gisserver/', // apiçbase_url |
| | | timeout: -1, // 请æ±è¶
æ¶æ¶é´ |
| | | headers: { |
| | | "content-type": "application/json;charset=UTF-8", |
| | | }, |
| | | withCredentials: false, |
| | | }); |
| | | |
| | | // request interceptor |
| | | service.interceptors.request.use( |
| | | (config) => { |
| | | // è¯·æ±æºå¸¦token |
| | | const token = window.localStorage.getItem('TokenKey'); |
| | | if (token) { |
| | | config.headers["Authorization"] = token; |
| | | } |
| | | return config; |
| | | }, |
| | | (error) => { |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | service.interceptors.response.use( |
| | | (response) => { |
| | | //ç»å½ä¹åætoken |
| | | if (window.localStorage.getItem('TokenKey') != null) { |
| | | // if (response.data.code !== 200) { |
| | | // router.push('/login'); |
| | | // localStorage.removeItem("TokenKey"); |
| | | // localStorage.removeItem("TokenTime"); |
| | | // } |
| | | // //tokenè¿æè¿åç»å½é¡µ |
| | | // if (response.data.code == 500104) { |
| | | // router.push('/login') |
| | | // localStorage.removeItem("TokenKey"); |
| | | // localStorage.removeItem("TokenTime"); |
| | | // } |
| | | } |
| | | return response.data; |
| | | }, |
| | | (error) => { |
| | | return Promise.reject(error); |
| | | } |
| | | ); |
| | | export default service; |
| | |
| | | list: {}, |
| | | show: false |
| | | }, |
| | | localLayer: { |
| | | list: {}, |
| | | show: false |
| | | }, |
| | | queryLayer: { |
| | | data: null, |
| | | isShow: false, |
| | | val: null, |
| | | }, |
| | | setPoplayerListAction(newValue) { |
| | | if (this.debug) { } |
| | | this.Poplayer.list = newValue |
| | |
| | | if (this.debug) { } |
| | | this.Poplayer.show = newValue |
| | | }, |
| | | setlocalLayerListAction(newValue) { |
| | | if (this.debug) { } |
| | | this.localLayer.list = newValue |
| | | }, |
| | | setlocalLayerShowAction(newValue) { |
| | | if (this.debug) { } |
| | | this.localLayer.show = newValue |
| | | }, |
| | | }; |
| | | |
| | | export default store; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue' |
| | | var vueEvents = new Vue(); |
| | | export default vueEvents; |
| | |
| | | window.GIS_IP = 'http://10.10.4.116:8070' |
| | | |
| | | window.digitalHumanURL = "https://szr.bda.gov.cn/human/#/yizhuang/b1401669626c4b1faf7a9940be866b2a?model=yingshang" |
| | | window.digitalSize = { |
| | | width: "600", |
| | | height: "450" |
| | | } |
| | | window.KEYPOIS = [{ |
| | | lon: 116.496476, |
| | | lat: 39.801245, |
| | |
| | | lon: 116.572530, |
| | | lat: 39.762424, |
| | | name: 'å京å¸éå·åºç©æµåºå°ç®¡çå§åä¼' |
| | | }, ] |
| | | },] |
| | |
| | | "alpha": 1, |
| | | "zIndex": 3, |
| | | "Level": "9,20", |
| | | "checked": true, |
| | | "checked": false, |
| | | "rename": false, |
| | | "flyTo": [ |
| | | "116.51352", |
| | |
| | | "0.0", |
| | | "-89.8" |
| | | ], |
| | | "checked": true, |
| | | "checked": false, |
| | | "rename": false |
| | | }, |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const mapData = { |
| | | // apiUrl: 'https://skyzt.bda.gov.cn/', //æ¥å£è°ç¨å°å |
| | | // apiUrl1: 'https://skyzt.bda.gov.cn/dataApi/PoiExcel/', //æ¥å£è°ç¨å°å |
| | | |
| | | apiUrl: 'https://10.10.4.116/', //æ¥å£è°ç¨å°å |
| | | apiUrl1: 'https://10.10.4.116/PoiExcel', //æ¥å£è°ç¨å°å |
| | | mapRest: { |
| | | lng: 116.502368, //ç»åº¦0 |
| | | lat: 39.791361, //纬度 |
| | | alt: 225.59, //é«åº¦ |
| | | heading: 328.5, //åç§»è§åº¦ |
| | | pitch: -27.5, //俯仰è§åº¦ |
| | | roll: 0.0 //æè½¬è§åº¦ |
| | | // lng: -2189204.3052408984, //ç»åº¦0 |
| | | // lat: 4391299.928900704, //纬度 |
| | | // alt: 4061302.0742125358, //é«åº¦ |
| | | // heading: 2.706017718142978, //åç§»è§åº¦ |
| | | // pitch: -0.06450211339012002, //俯仰è§åº¦ |
| | | // roll: 0.0000010046555702913906 //æè½¬è§åº¦ |
| | | |
| | | }, |
| | | |
| | | //å¨ç»å¯¼èªç¹ |
| | | animaNavigation: [ |
| | | |
| | | { |
| | | lng: 116.499038465066, |
| | | lat: 39.79379384829494, |
| | | height: 50, |
| | | flytime: 15 |
| | | }, |
| | | |
| | | { |
| | | lng: 116.50131516549982, |
| | | lat: 39.794912006682736, |
| | | height: 50, |
| | | flytime: 15 |
| | | }, |
| | | { |
| | | lng: 116.50385532465293, |
| | | lat: 39.79171002696756, |
| | | height: 50, |
| | | flytime: 15 |
| | | }, |
| | | { |
| | | lng: 116.50153479330987, |
| | | lat: 39.790688924207245, |
| | | height: 50, |
| | | flytime: 15 |
| | | }, |
| | | { |
| | | lng: 116.499038465066, |
| | | lat: 39.79379384829494, |
| | | height: 50, |
| | | flytime: 15 |
| | | }, |
| | | // { |
| | | // lng: 116.49950473277674, |
| | | // lat: 39.80189614394973, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.50864967659528, |
| | | // lat: 39.79067016691884, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.51750657045278, |
| | | // lat: 39.779885531673784, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.51491897145428, |
| | | // lat: 39.777801533477216, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.50928535631186, |
| | | // lat: 39.7849775227156, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.50450607791721, |
| | | // lat: 39.790780793020865, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.50176984584178, |
| | | // lat: 39.794178695978616, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.49910758277029, |
| | | // lat: 39.79756565468724, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.49371390522775, |
| | | // lat: 39.80404038134903, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.49681980501585, |
| | | // lat: 39.805157599150505, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // }, |
| | | // { |
| | | // lng: 116.49938716960466, |
| | | // lat: 39.80200828692789, |
| | | // height: 50, |
| | | // flytime: 15 |
| | | // } |
| | | ], |
| | | //å®ä½å¼¹çª |
| | | pointPop: { |
| | | lng: 116.50450607791721, |
| | | lat: 39.790780793020865, |
| | | height: 50, |
| | | flytime: 15, |
| | | text: "è¿æ¯ä¸æ¡æµè¯æ°æ®" |
| | | }, |
| | | msgMach: { |
| | | rest: ['å¤ä½', 'è¿å', 'åå§å', 'åå§ä½ç½®'], |
| | | lineRoam: ['漫游', '导èª'], |
| | | closeRoam: ['åæ¢æ¼«æ¸¸', '忢坼èª'], |
| | | localPage: ['ä¸', 'äº', 'ä¸', 'å', 'äº', 'å
', '1', '2', '3', '4', '5', '6'], |
| | | acceptMsg: ['å®ä½', 'å¥é©°', '京ä¸', 'å°ç±³', 'å大大å¦', 'å大', '第', 'å', 'ä¿¡æ¯ææ¯', 'çç©å»è¯', 'æºå¨äºº', '汽车',] |
| | | } |
| | | }; |
| | | export default mapData; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | /** |
| | | * @description:卿ç«ä½å¢æè´¨ |
| | | * @date: 2022-02-11 |
| | | */ |
| | | |
| | | |
| | | //å¨æå¢æè´¨ |
| | | function DynamicWallMaterialProperty(options) { |
| | | // é»è®¤åæ°è®¾ç½® |
| | | this._definitionChanged = new Cesium.Event(); |
| | | this._color = undefined; |
| | | this._colorSubscription = undefined; |
| | | this.color = options.color; |
| | | this.duration = options.duration; |
| | | this.trailImage = options.trailImage; |
| | | this._time = (new Date()).getTime(); |
| | | } |
| | | Object.defineProperties(DynamicWallMaterialProperty.prototype, { |
| | | isConstant: { |
| | | get: function () { |
| | | return false; |
| | | } |
| | | }, |
| | | definitionChanged: { |
| | | get: function () { |
| | | return this._definitionChanged; |
| | | } |
| | | }, |
| | | color: Cesium.createPropertyDescriptor('color') |
| | | }); |
| | | DynamicWallMaterialProperty.prototype.getType = function (time) { |
| | | return 'DynamicWall'; |
| | | }; |
| | | DynamicWallMaterialProperty.prototype.getValue = function (time, result) { |
| | | if (!Cesium.defined(result)) { |
| | | result = {}; |
| | | } |
| | | result.color = Cesium.Property.getValueOrClonedDefault(this._color, time, Cesium.Color.WHITE, result.color); |
| | | if (this.trailImage) { |
| | | result.image = this.trailImage; |
| | | } else { |
| | | result.image = Cesium.Material.DynamicWallImage |
| | | } |
| | | |
| | | if (this.duration) { |
| | | result.time = (((new Date()).getTime() - this._time) % this.duration) / this.duration; |
| | | } |
| | | viewer.scene.requestRender(); |
| | | return result; |
| | | }; |
| | | DynamicWallMaterialProperty.prototype.equals = function (other) { |
| | | return this === other || |
| | | (other instanceof DynamicWallMaterialProperty && |
| | | Cesium.Property.equals(this._color, other._color)) |
| | | }; |
| | | Cesium.DynamicWallMaterialProperty = DynamicWallMaterialProperty; |
| | | Cesium.Material.DynamicWallType = 'DynamicWall'; |
| | | Cesium.Material.DynamicWallImage = "./colors.png"; |
| | | Cesium.Material.DynamicWallSource = "czm_material czm_getMaterial(czm_materialInput materialInput)\n\ |
| | | {\n\ |
| | | czm_material material = czm_getDefaultMaterial(materialInput);\n\ |
| | | vec2 st = materialInput.st;\n\ |
| | | vec4 colorImage = texture(image, vec2(fract(st.t - time), st.t));\n\ |
| | | vec4 fragColor;\n\ |
| | | fragColor.rgb = color.rgb / 1.0;\n\ |
| | | fragColor = czm_gammaCorrect(fragColor);\n\ |
| | | material.alpha = colorImage.a * color.a;\n\ |
| | | material.diffuse = color.rgb;\n\ |
| | | material.emission = fragColor.rgb;\n\ |
| | | return material;\n\ |
| | | }"; |
| | | Cesium.Material._materialCache.addMaterial(Cesium.Material.DynamicWallType, { |
| | | fabric: { |
| | | type: Cesium.Material.DynamicWallType, |
| | | uniforms: { |
| | | color: new Cesium.Color(1.0, 1.0, 1.0, 1), |
| | | image: Cesium.Material.DynamicWallImage, |
| | | time: 0 |
| | | }, |
| | | source: Cesium.Material.DynamicWallSource |
| | | }, |
| | | translucent: function (material) { |
| | | return true; |
| | | } |
| | | }); |