| | |
| | | //ragç«¯å£ |
| | | const ragHost = isWeb ? isUrl + ":9036" : "192.168.11.24:8103"; |
| | | // æ¬å°æ°æ®å°å |
| | | const pwythHost = "http://192.168.11.95:8888/pwyth"; |
| | | const pwythHost = "http://localhost/pwyth"; |
| | | //é
ç½® |
| | | const config = { |
| | | // serveræå¡ |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | |
| | | |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | this.createSocket(); |
| | | setTimeout(() => { |
| | | this.$store.state.mapLayers.msgList.push({ |
| | | msg: "åå卿
é", |
| | | point: "POINT (112.56978672907 37.8558881392881)" |
| | | }) |
| | | |
| | | }, 10000); |
| | | }, |
| | | methods: { |
| | | |
| | | createSocket() { |
| | | this.wsSocket = new WebSocket(config.pySocket); |
| | | this.wsSocket.onopen = (event) => { |
| | | console.log('WebSocketè¿æ¥æå'); |
| | | }; |
| | | this.wsSocket.onmessage = (event) => { |
| | | // console.log('Received message:', event.data); |
| | | |
| | | if (event.data != "è¿æ¥æå") { |
| | | const obj = JSON.parse(event.data) |
| | | |
| | | |
| | | this.leftChartData = { |
| | | type: 'left1', |
| | | val: obj |
| | | } |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | <div class="msgBox" @click.stop="setShowMenuClick(true)"> |
| | | |
| | | <i style="font-size: 20px;" class="el-icon-chat-line-round"></i> |
| | | <el-badge v-show="msgCount > 0" :value="msgCount" class="item"> |
| | | <el-badge v-show="$store.state.mapLayers.msgList.length > 0" :value="$store.state.mapLayers.msgList.length" class="item"> |
| | | </el-badge> |
| | | <el-dialog title="å¼å¸¸ä¿¡æ¯" :visible.sync="dialogVisible" width="30%" :show-close="false"> |
| | | <el-table :data="msgData" style="width: 100%"> |
| | | <el-dialog title="æ
éä¿¡æ¯" :visible.sync="dialogVisible" width="30%" :show-close="false"> |
| | | <el-table :data="$store.state.mapLayers.msgList" style="width: 100%"> |
| | | <el-table-column prop="msg" label="设å¤åç§°"> |
| | | </el-table-column> |
| | | <el-table-column prop="point" label="设å¤ä½ç½®"> |
| | |
| | | dialogFlag: false, |
| | | wsSocket: null, |
| | | innerVisible: false, |
| | | msgData: [{ |
| | | msg: "åå卿
é", |
| | | point: "POINT (112.56978672907 37.8558881392881)" |
| | | }], |
| | | msgData: [], |
| | | parentData: null, |
| | | } |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | if (!this.wsSocket) { |
| | | this.createSocket(); |
| | | } |
| | | // if (!this.wsSocket) { |
| | | // this.createSocket(); |
| | | // } |
| | | |
| | | }, |
| | | } |
| | |
| | | const baseLayer = mapData.baseLayer; |
| | | const vecUrl = baseLayer.sUrl + baseLayer.vecLayer + baseLayer.lUrl |
| | | const geo= config.geoServer; |
| | | // var vectorLayer = new TileLayer({ |
| | | // source: new XYZ({ |
| | | // url: vecUrl + config.tdToken, |
| | | // }), |
| | | // }); |
| | | // const cvaUrl = baseLayer.sUrl + baseLayer.cvaLayer + baseLayer.lUrl |
| | | // var vectorLayer1 = new TileLayer({ |
| | | // source: new XYZ({ |
| | | // url: cvaUrl + config.tdToken, |
| | | // }), |
| | | // }); |
| | | var layer2 = new Image({ |
| | | name: "Wms_Layer", |
| | | source: new ImageWMS({ |
| | | crossOrigin: "anonymous", |
| | | url: geo.url + geo.wms, |
| | | params: { |
| | | FORMAT: "image/png", |
| | | VERSION: "1.1.1", |
| | | LAYERS: geo.layers[0], |
| | | }, |
| | | var vectorLayer = new TileLayer({ |
| | | source: new XYZ({ |
| | | url: vecUrl + config.tdToken, |
| | | }), |
| | | }); |
| | | this.mapol.addLayer(layer2); |
| | | const cvaUrl = baseLayer.sUrl + baseLayer.cvaLayer + baseLayer.lUrl |
| | | var vectorLayer1 = new TileLayer({ |
| | | source: new XYZ({ |
| | | url: cvaUrl + config.tdToken, |
| | | }), |
| | | }); |
| | | // var layer2 = new Image({ |
| | | // name: "Wms_Layer", |
| | | // source: new ImageWMS({ |
| | | // crossOrigin: "anonymous", |
| | | // url: geo.url + geo.wms, |
| | | // params: { |
| | | // FORMAT: "image/png", |
| | | // VERSION: "1.1.1", |
| | | // LAYERS: geo.layers[0], |
| | | // }, |
| | | // }), |
| | | // }); |
| | | // this.mapol.addLayer(layer2); |
| | | this.mapol = new Map({ |
| | | target: 'mapView', |
| | | layers: [vectorLayer, vectorLayer1], |
| | |
| | | }), |
| | | }); |
| | | |
| | | |
| | | console.log(geo.url + geo.wms) |
| | | var layer2 = new Image({ |
| | | name: "Wms_Layer", |
| | | source: new ImageWMS({ |
| | |
| | | import '@/assets/styles/ruoyi.scss' // ruoyi css |
| | | import App from './App' |
| | | import store from './store' |
| | | import mapStore from './store/mapStore.js' |
| | | import router from './router' |
| | | import directive from './directive' // directive |
| | | import plugins from './plugins' // plugins |
| | |
| | | el: '#app', |
| | | router, |
| | | store, |
| | | mapStore, |
| | | render: h => h(App) |
| | | }) |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import Vue from 'vue' |
| | | import Vuex from 'vuex' |
| | | |
| | | Vue.use(Vuex) |
| | | |
| | | const mapStore= new Vuex.Store({ |
| | | //æ°æ®ï¼ç¸å½äºdata |
| | | state: { |
| | | regionWeather:null, |
| | | }, |
| | | getters: { |
| | | |
| | | }, |
| | | //éé¢å®ä¹æ¹æ³ï¼æä½stateæ¹å |
| | | mutations: { |
| | | |
| | | }, |
| | | // æä½å¼æ¥æä½mutation |
| | | actions: { |
| | | |
| | | }, |
| | | modules: { |
| | | |
| | | }, |
| | | }) |
| | | export default mapStore; |
| | |
| | | layerTree: [], |
| | | defaultLayer: [], |
| | | mapInfo: [], |
| | | msgList:[ ] |
| | | |
| | | }; |
| | | |
| | | const mutations = { |
| | |
| | | <el-popover popper-class="popover" placement="top" v-show="i.children && i.children.length > 0" |
| | | width="100" trigger="click"> |
| | | <span slot="reference">{{ i.name }}</span> |
| | | <div @click="setChildData(c)" class="popover__item" v-show="i.children && i.children.length > 0" |
| | | v-for="(c, f) in i.children" c :title="c.name"> {{ |
| | | c.name.slice(0, 8) }} |
| | | <div v-show="i.children && i.children.length > 0"> |
| | | <div @click="setChildData(c)" class="popover__item" v-for="(c, f) in i.children" c |
| | | :title="c.name"> {{ |
| | | c.name.slice(0, 8) }} |
| | | </div> |
| | | </div> |
| | | |
| | | </el-popover> |
| | | <span @click="setChildData(i)" slot="reference" v-show="!i.children || i.children.length <= 0">{{ i.name }}</span> |
| | | <span @click="setChildData(i)" slot="reference" v-show="!i.children || i.children.length <= 0">{{ i.name |
| | | }}</span> |
| | | </div> |
| | | |
| | | </div> |
| | |
| | | id: 'a1', |
| | | name: 'ç¥è¯å¾è°±', |
| | | pid: 's1', |
| | | }, { |
| | | id: 'a1', |
| | | name: 'è¯ä¹åè½', |
| | | pid: 's4', |
| | | } |
| | | ] |
| | | }, { |
| | |
| | | }] |
| | | }, { |
| | | name: 'æ°å线æ', |
| | | |
| | | |
| | | } |
| | | ], |
| | | visible: false |
| | |
| | | title: 'éª', |
| | | val: [ |
| | | { |
| | | point: '112.54236790420437.8448783429948', |
| | | point: '112.542367904204,37.8448783429948', |
| | | line: 'æ²å线', |
| | | address: '太åå¸å¸æ¿å»ºè®¾å¼åå¤ç®±å', |
| | | type: 'snow', |
| | |
| | | { |
| | | val: [ |
| | | { |
| | | point: '112.542367904204 37.839565698022', |
| | | point: '112.542367904204,37.839565698022', |
| | | line: 'ä¸å头', |
| | | address: 'èåè¥å¼éæ', |
| | | type: 'fire', |
| | |
| | | <analysis v-if="isShow == 'æ°æ®åæ'"></analysis> |
| | | <statistics v-if="isShow == 'æ°æ®ç»è®¡'"></statistics> |
| | | <line-loss v-if="isShow == 'æ°å线æ'"></line-loss> |
| | | <semanticFunction v-if="isShow == 'è¯ä¹åè½'"></semanticFunction> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <div v-show="showMsgFlag" @click="ShowMenuList" class="elBadge" |
| | | :disabled="$store.state.mapLayers.msgList.length == 0"> |
| | | <el-badge :value="$store.state.mapLayers.msgList.length" class="item"> |
| | | <i class="el-icon-chat-dot-square"></i> |
| | | </el-badge> |
| | | </div> |
| | | <div class="msgList" v-show="!showMsgFlag" > |
| | | <msg-list @childData="receiveDataFromChild"></msg-list> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import analysis from '@/views/visual/analysis/index.vue' |
| | | import lineLoss from './lineLoss.vue'; |
| | | import statistics from '@/views/visual/statistics/index.vue' |
| | | import semanticFunction from '@/views/dataManager/semanticFunction/index.vue' |
| | | import msgList from './msgList.vue'; |
| | | export default { |
| | | components: { |
| | | mapView, leftMenu, |
| | | rightMenu, bottomMenu, atlas, analysis, statistics, lineLoss |
| | | rightMenu, |
| | | bottomMenu, |
| | | atlas, |
| | | analysis, |
| | | statistics, |
| | | lineLoss, |
| | | semanticFunction, |
| | | msgList |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | showInfo: false, |
| | | wsSocket: null, |
| | | rightChartData: {}, |
| | | leftChartData:{}, |
| | | leftChartData: {}, |
| | | showMsgFlag: true |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | }, |
| | | mounted() { |
| | | if (!this.wsSocket) { |
| | | this.createSocket(); |
| | | // this.createSocket(); |
| | | } |
| | | }, |
| | | methods: { |
| | | receiveDataFromChild(data) { |
| | | console.log(data); |
| | | |
| | | this.showMsgFlag = true |
| | | }, |
| | | ShowMenuList() { |
| | | if (this.$store.state.mapLayers.msgList.length == 0) return; |
| | | this.showMsgFlag = !this.showMsgFlag |
| | | |
| | | }, |
| | | createSocket() { |
| | | this.wsSocket = new WebSocket(config.pySocket); |
| | | this.wsSocket.onopen = (event) => { |
| | |
| | | |
| | | if (event.data != "è¿æ¥æå") { |
| | | const obj = JSON.parse(event.data) |
| | | |
| | | |
| | | |
| | | |
| | | this.leftChartData = { |
| | | type: 'left1', |
| | | val: obj |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // å¤çæ¥æ¶å°çæ¶æ¯ |
| | | }; |
| | | }, |
| | | childData(res) { |
| | |
| | | bottom: 0px; |
| | | } |
| | | |
| | | .elBadge { |
| | | // width: 15%; |
| | | top: 90px; |
| | | right: 16%; |
| | | z-index: 40; |
| | | padding: 10px; |
| | | position: absolute; |
| | | background: url(~@/assets/images/treeClose.png)no-repeat; |
| | | background-size: 100% 100%; |
| | | |
| | | .el-icon-chat-dot-square { |
| | | color: white; |
| | | font-size: 22px; |
| | | margin-right: 5px; |
| | | } |
| | | } |
| | | |
| | | .msgList { |
| | | width: 15%; |
| | | top: 90px; |
| | | right: 16%; |
| | | z-index: 40; |
| | | position: absolute; |
| | | |
| | | height: 30%; |
| | | } |
| | | |
| | | .visualInfo { |
| | | width: 60%; |
| | | height: 60%; |
| | |
| | | watch: { |
| | | |
| | | }, |
| | | |
| | | mounted() { |
| | | window.regionWeather = null; |
| | | this.initEchart(); |
| | | }, |
| | | methods: { |
| | |
| | | this.initEchart3(); |
| | | }, |
| | | initEchart1() { |
| | | var chart1= data[3]; |
| | | var chart1 = data[3]; |
| | | chart1.id = "myChart01"; |
| | | this.childData =chart1 |
| | | this.childData = chart1 |
| | | }, |
| | | initEchart2() { |
| | | var chart2= data[4]; |
| | | var chart2 = data[4]; |
| | | chart2.id = "myChart02"; |
| | | this.childData1 = chart2 |
| | | }, initEchart3() { |
| | | var chart3= data[5]; |
| | | var chart3 = data[5]; |
| | | chart3.id = "myChart03"; |
| | | this.childData2 = chart3 |
| | | } |
| | |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item, i) in childData.val"> |
| | | <td>{{ item.address }}</td> |
| | | <td>{{ item.line }}</td> |
| | | <td style="color:#f56c6c">{{ item.level }}</td> |
| | | <tr> |
| | | <td>{{ roadItem.address }}</td> |
| | | <td>{{ roadItem.line }}</td> |
| | | <td style="color:#f56c6c">{{ roadItem.level }}</td> |
| | | <td style="color:#409eff"> |
| | | <el-button v-show="flagData != item.address" class="elButton" type="primary" plain size="mini" |
| | | @click="setChangeItem(item)">详æ
</el-button> |
| | | <el-button v-show="flagData == item.address" class="elButton" type="danger" plain size="mini" |
| | | @click="setCannelItem(item)">éç½®</el-button> |
| | | <el-button v-show="flagData != roadItem.address" class="elButton" type="primary" plain |
| | | size="mini" @click="setChangeItem()">详æ
</el-button> |
| | | <el-button v-show="flagData == roadItem.address" class="elButton" type="danger" plain |
| | | size="mini" @click="setCannelItem()">éç½®</el-button> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <div class="chartEchart"> |
| | | <div :id="chartId" class="myChart"> </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | import mapWeather from './mapWeather'; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | this.chartId = newValue.id; |
| | | this.title = newValue.title; |
| | | setTimeout(() => { |
| | | this.setEchartChange(newValue) |
| | | }, 1000); |
| | | this.setEchartChange(newValue.val[0]) |
| | | |
| | | }, 200); |
| | | } |
| | | } |
| | | }, |
| | |
| | | chartId: "", |
| | | title: "", |
| | | flagData: null, |
| | | roadItem: {}, |
| | | } |
| | | }, |
| | | created() { |
| | | window.addEventListener('POIDetailDataChange', this.handlePOIDetailDataChange) |
| | | }, |
| | | |
| | | methods: { |
| | | setCannelItem() { |
| | | this.flagData = null; |
| | | mapWeather.closeRegionWeather() |
| | | }, |
| | | setChangeItem(res) { |
| | | this.flagData = res.address; |
| | | handlePOIDetailDataChange() { |
| | | if (this.flagData == window.regionWeather) return |
| | | this.flagData = window.regionWeather; |
| | | }, |
| | | setChangeItem() { |
| | | var res = this.roadItem; |
| | | window.regionWeather = res.address; |
| | | var event = new Event('POIDetailDataChange'); |
| | | window.dispatchEvent(event); |
| | | mapWeather.setRegionWeatherType(res); |
| | | }, |
| | | |
| | | setEchartChange(res) { |
| | | if (!res.data) return; |
| | | const data = res.data; |
| | | this.roadItem = res |
| | | if (!this.roadItem.data) return; |
| | | const data = this.roadItem.data; |
| | | const id = document.getElementById(this.chartId) |
| | | var std = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | |
| | | const myChart = echarts.init(id); |
| | | var option = { |
| | | title: { |
| | | text: res.address, |
| | | text: "", |
| | | textStyle: { |
| | | color: "white" |
| | | } |
| | |
| | | color: white; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | // justify-content: space-around; |
| | | .chartEchart { |
| | | flex: 1; |
| | | |
| | | } |
| | | |
| | | .myChart { |
| | | width: 100%; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import mapServer from '../../../assets/js/mapSdk/mapServe'; |
| | | |
| | | const mapWeather = { |
| | | regionWeather: null, |
| | | particle: null, |
| | | closeRegionWeather() { |
| | | if (this.regionWeather) { |
| | | this.regionWeather.enableWeatherType = SmartEarth.Cesium.RegionWeather.TYPE_NONE; |
| | | this.regionWeather = null; |
| | | } |
| | | if (this.particle) { |
| | | this.particle.deleteObject(); |
| | | this.particle = null; |
| | | } |
| | | }, |
| | | setRegionWeatherType(response) { |
| | | this.closeRegionWeather(); |
| | | if (!this.regionWeather) { |
| | | this.getRegionWather(response); |
| | | } |
| | | const coord = this.getCoord(response); |
| | | earthCtrl.camera.flyTo(coord[0], coord[1], 1000, 0, -90, 0, 0); |
| | | switch (response.type) { |
| | | case 'rain': |
| | | this.showRain(); |
| | | break; |
| | | case 'fire': |
| | | this.showFire(response); |
| | | break; |
| | | case 'snow': |
| | | this.showSnow(); |
| | | break; |
| | | } |
| | | }, |
| | | showFire(res) { |
| | | const coord = this.getCoord(res); |
| | | const obj = { |
| | | x: coord[0], |
| | | y: coord[1], |
| | | z: 0, |
| | | }; |
| | | this.particle = earthCtrl.factory.createParticleEffect( |
| | | 'flame', |
| | | obj, |
| | | { |
| | | translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //平移 |
| | | particleSize:10 |
| | | }, |
| | | function (data) {} |
| | | ); |
| | | }, |
| | | |
| | | showRain() { |
| | | if (this.regionWeather) { |
| | | this.regionWeather.enableWeatherType = SmartEarth.Cesium.RegionWeather.TYPE_RAIN; |
| | | this.regionWeather.regionAlpha = 0.6; |
| | | this.regionWeather.regionGradientDistance = 300; |
| | | } |
| | | }, |
| | | showSnow() { |
| | | if (this.regionWeather) { |
| | | this.regionWeather.enableWeatherType = SmartEarth.Cesium.RegionWeather.TYPE_SNOW; |
| | | this.regionWeather.regionAlpha = 0.9; |
| | | this.regionWeather.regionGradientDistance = 300; |
| | | } |
| | | }, |
| | | getCoord(res) { |
| | | const coord = res.point.split(','); |
| | | console.log('æµè¯', coord); |
| | | |
| | | return coord; |
| | | }, |
| | | getRegionWather(res) { |
| | | if (res.type == 'fire') return; |
| | | const coord = this.getCoord(res); |
| | | const model = mapServer.layerList.filter((item) => { |
| | | if (item.name == config.baseModel.cnName + '_' + config.baseModel.id) { |
| | | return item; |
| | | } |
| | | }); |
| | | if (model.length <= 0) return; |
| | | this.regionWeather = earthCtrl.factory.createRegionWeather({ |
| | | primitive: model[0].layer.item, |
| | | position: new SmartEarth.Cesium.Cartesian3.fromDegrees(coord[0], coord[1], 1), |
| | | radius: 1000, |
| | | }) |
| | | }, |
| | | }; |
| | | |
| | | export default mapWeather; |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import mapServer from '@/assets/js/mapSdk/mapServe'; |
| | | import mapConfig from '@/assets/js/mapSdk/mapConfig'; |
| | | import mapData from '@/assets/js/mapSdk/mapData'; |
| | | import mapServer from '@/assets/js/mapSdk/mapServe.js'; |
| | | import mapConfig from '@/assets/js/mapSdk/mapConfig.js'; |
| | | import mapData from '@/assets/js/mapSdk/mapData.js'; |
| | | import { layer_selectAll } from "@/api/mapView/map.js"; |
| | | import axios from 'axios'; |
| | | import road from './road'; |
| | | export default { |
| | | name: 'mapView', |
| | | mounted() { |
| | |
| | | mapServer.addLayer(config.baseModel); |
| | | } |
| | | this.getSelectLayers(); |
| | | |
| | | |
| | | }, |
| | | getSelectLayers() { |
| | | layer_selectAll().then(response => { |
| | | if (response.data.code != 200) return |
| | | |
| | | const val = response.data.result.filter(item => { |
| | | |
| | | |
| | | response.data.result.filter(item => { |
| | | if (item.type == 2 && item.isShow == 1) { |
| | | |
| | | mapServer.addLayer(item) |
| | | |
| | | if (item.cnName != "é
ç½çº¿") { |
| | | mapServer.addLayer(item) |
| | | } |
| | | } |
| | | return item; |
| | | |
| | | }) |
| | | |
| | | this.$nextTick(() => { |
| | | this.addRoadLayer(); |
| | | }) |
| | | |
| | | }) |
| | | }, |
| | | addRoadLayer() { |
| | | earthCtrl.factory.createPathLayer({ |
| | | url: road, |
| | | color: "#00FA9A", //线çé¢è² |
| | | width: 4.0, //线ç宽度 |
| | | pointColor: "#FFFFFF", //ç§»å¨ç¹çé¢è² |
| | | speed: 1, |
| | | far: 50000 |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="msgBox"> |
| | | |
| | | <div class="aside-title"> |
| | | <div>æ
éä¿¡æ¯</div> |
| | | <div @click="sendDataToParent()" class="closeMsg"> |
| | | X |
| | | </div> |
| | | </div> |
| | | <div class="menuTable"> |
| | | <table> |
| | | <tr> |
| | | <th style="width: 100px;">设å¤åç§°</th> |
| | | <th>设å¤ä½ç½®</th> |
| | | <th style="width: 100px;">æä½</th> |
| | | </tr> |
| | | <tr v-for="(item, indx) in $store.state.mapLayers.msgList" :key="indx"> |
| | | <td>{{ item.msg }}</td> |
| | | <td>{{ item.point }}</td> |
| | | <td> |
| | | <el-button @click="handleClick(item)" type="text" size="small">æ¥ç</el-button> |
| | | <!-- <el-button @click="handleClick2(item)" type="text" size="small">åå</el-button> --> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import mapConfig from '../../assets/js/mapSdk/mapConfig'; |
| | | |
| | | |
| | | export default { |
| | | components: { |
| | | |
| | | }, |
| | | props: { |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | label: null, |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | sendDataToParent() { |
| | | this.removeLabel(); |
| | | console.log(23); |
| | | |
| | | this.$emit('childData', 'åç»ä»¶æ°æ®'); |
| | | |
| | | }, |
| | | removeLabel() { |
| | | if (this.label) { |
| | | this.label.removeFromMap() |
| | | this.label = null; |
| | | } |
| | | }, |
| | | handleClick(item) { |
| | | this.removeLabel(); |
| | | const point = mapConfig.getWKTParse(item.point) |
| | | this.label = earthCtrl.factory.createLabel({ |
| | | lon: point.coordinates[0], |
| | | lat: point.coordinates[1], |
| | | alt: 40, |
| | | text: item.msg, |
| | | image: config.sdkImg + 'Workers/image/mark.png', |
| | | // ææ¬åç§»é |
| | | pixelOffset: new SmartEarth.Cesium.Cartesian2(0, -50), |
| | | // å¾çåç§»é |
| | | iPixelOffset: new SmartEarth.Cesium.Cartesian2(0, -20) |
| | | }); |
| | | earthCtrl.userScene.flyTo(this.label) |
| | | }, |
| | | handleClick2(item) { |
| | | |
| | | }, |
| | | setMsgClose() { |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .msgBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | background: url(~@/assets/images/Screen/chartbg.png) no-repeat; |
| | | background-size: 100% 100%; |
| | | position: relative; |
| | | border-radius: 5px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .aside-title { |
| | | box-sizing: border-box; |
| | | padding-left: 30px; |
| | | font-size: 15px; |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei-Regular; |
| | | color: #fff; |
| | | width: 100%; |
| | | height: 45px; |
| | | line-height: 45px; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | display: flex; |
| | | |
| | | .closeMsg { |
| | | margin-left: 64%; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .closeMsg :hover { |
| | | color: #409EFF; |
| | | } |
| | | |
| | | } |
| | | |
| | | .menuTable { |
| | | margin: 5px; |
| | | margin-top: 10px; |
| | | text-align: center; |
| | | flex: 1; |
| | | overflow: auto; |
| | | |
| | | table { |
| | | width: 100%; |
| | | color: white; |
| | | |
| | | th { |
| | | text-align: center; |
| | | |
| | | } |
| | | |
| | | td { |
| | | line-height: 30px; |
| | | border-bottom: 1px solid #409EFF; |
| | | ; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | /*æ»å¨æ¡æ´ä½æ ·å¼*/ |
| | | ::-webkit-scrollbar { |
| | | /*é«å®½åå«å¯¹åºæ¨ªç«æ»å¨æ¡ç尺寸*/ |
| | | width: 5px; |
| | | height: 1px; |
| | | } |
| | | |
| | | /*æ»å¨æ¡éé¢å°æ¹å*/ |
| | | ::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | background: #409EFF; |
| | | } |
| | | |
| | | /*æ»å¨æ¡éé¢è½¨é*/ |
| | | ::-webkit-scrollbar-track { |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | border-radius: 10px; |
| | | background: rgba(237, 237, 237, .1); |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | const road = { |
| | | type: 'FeatureCollection', |
| | | totalFeatures: 'unknown', |
| | | features: [ |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.1', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.554578, 37.853285], |
| | | [112.560167, 37.853238], |
| | | [112.560143, 37.846945], |
| | | [112.556504, 37.848753], |
| | | [112.55378, 37.848847], |
| | | [112.552042, 37.847602], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11634, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.2', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.543213, 37.847039], |
| | | [112.544622, 37.847814], |
| | | [112.552019, 37.847555], |
| | | [112.55486, 37.845324], |
| | | [112.554249, 37.845395], |
| | | [112.542297, 37.845231], |
| | | [112.541405, 37.84509], |
| | | [112.534337, 37.844972], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11633, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.3', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.542361, 37.845216], |
| | | [112.542525, 37.839475], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11635, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.4', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.53948, 37.845113], |
| | | [112.53948, 37.846992], |
| | | [112.540771, 37.846992], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11632, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.5', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.533562, 37.848142], |
| | | [112.533609, 37.84779], |
| | | [112.534713, 37.847814], |
| | | [112.53483, 37.846358], |
| | | [112.535347, 37.846358], |
| | | [112.53537, 37.844456], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11631, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.6', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.54056, 37.845013], |
| | | [112.536521, 37.841773], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11638, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.7', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.540842, 37.845037], |
| | | [112.537366, 37.84229], |
| | | [112.537085, 37.841702], |
| | | [112.535394, 37.841045], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11637, |
| | | name: 'æ²å线', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'sbx_polyline.8', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.542341, 37.844899], |
| | | [112.540698, 37.845157], |
| | | [112.540567, 37.845019], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11636, |
| | | name: '', |
| | | type: 'æ²å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.1', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.539461, 37.847329], |
| | | [112.539202, 37.85388], |
| | | [112.538874, 37.858131], |
| | | [112.560242, 37.859375], |
| | | [112.56853, 37.859563], |
| | | [112.568437, 37.858084], |
| | | [112.568789, 37.858107], |
| | | [112.568836, 37.856557], |
| | | [112.570104, 37.856487], |
| | | [112.570104, 37.855618], |
| | | [112.569658, 37.855923], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11621, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡ç¯å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.2', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.539014, 37.856487], |
| | | [112.534459, 37.856416], |
| | | [112.534436, 37.855853], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11622, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡ç¯å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.3', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.533508, 37.855771], |
| | | [112.535046, 37.855853], |
| | | [112.533532, 37.855113], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11623, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡åç¯çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.4', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.539285, 37.851215], |
| | | [112.534565, 37.851086], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11623, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡ç¯å线', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.5', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.539026, 37.855853], |
| | | [112.538862, 37.84855], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11625, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡åç¯çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.6', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.539167, 37.854291], |
| | | [112.541961, 37.854291], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11628, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡åç¯çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.7', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.53912, 37.855195], |
| | | [112.540376, 37.855219], |
| | | [112.54087, 37.854925], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11627, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡åç¯çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.8', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.539226, 37.852929], |
| | | [112.540353, 37.852965], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11629, |
| | | name: 'æ¡ç¯å线', |
| | | tpye: 'æ¡åç¯çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'thnx_polyline.9', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.538991, 37.855853], |
| | | [112.539367, 37.855853], |
| | | [112.540071, 37.848832], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 11626, |
| | | name: 'æ¡åç¯çº¿', |
| | | tpye: 'æ¡åç¯çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'zzt_polyline.1', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.568448, 37.92898], |
| | | [112.568213, 37.928322], |
| | | [112.569575, 37.928322], |
| | | [112.569575, 37.928839], |
| | | [112.570045, 37.928815], |
| | | [112.571125, 37.928486], |
| | | [112.57183, 37.928486], |
| | | [112.57183, 37.928886], |
| | | [112.573732, 37.928886], |
| | | [112.574107, 37.924518], |
| | | [112.574906, 37.924448], |
| | | [112.574953, 37.923931], |
| | | [112.577723, 37.923814], |
| | | [112.577958, 37.923532], |
| | | [112.577982, 37.922499], |
| | | [112.577817, 37.922334], |
| | | [112.577747, 37.921043], |
| | | [112.578569, 37.920738], |
| | | [112.580782, 37.920661], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 116101, |
| | | name: 'ä¸å头2å·çº¿', |
| | | type: 'ä¸å头2å·çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'zzt_polyline.2', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.577958, 37.920949], |
| | | [112.578592, 37.920315], |
| | | [112.578592, 37.918883], |
| | | [112.577935, 37.918883], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 116102, |
| | | name: 'ä¸å头2å·çº¿', |
| | | type: 'ä¸å头2å·çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'zzt_polyline.3', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.578263, 37.91893], |
| | | [112.578258, 37.916259], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 116103, |
| | | name: 'ä¸å头2å·çº¿', |
| | | type: 'ä¸å头2å·çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'zzt_polyline.4', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.577864, 37.920761], |
| | | [112.580846, 37.918601], |
| | | [112.583799, 37.917104], |
| | | [112.584433, 37.918254], |
| | | [112.585091, 37.917879], |
| | | [112.585995, 37.919417], |
| | | [112.585689, 37.919605], |
| | | [112.585719, 37.92008], |
| | | [112.585907, 37.92008], |
| | | [112.585907, 37.919857], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 116104, |
| | | name: 'ä¸å头2å·çº¿', |
| | | type: 'ä¸å头2å·çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'zzt_polyline.5', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.583834, 37.917092], |
| | | [112.585666, 37.916247], |
| | | [112.585619, 37.915883], |
| | | [112.585314, 37.915883], |
| | | [112.585314, 37.915448], |
| | | [112.585079, 37.915448], |
| | | [112.585102, 37.915953], |
| | | [112.584832, 37.916129], |
| | | [112.584809, 37.915754], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 116105, |
| | | name: 'ä¸å头2å·çº¿', |
| | | type: 'ä¸å头2å·çº¿', |
| | | }, |
| | | }, |
| | | { |
| | | type: 'Feature', |
| | | id: 'zzt_polyline.6', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: [ |
| | | [112.577988, 37.922493], |
| | | [112.577494, 37.922516], |
| | | ], |
| | | }, |
| | | geometry_name: 'the_geom', |
| | | properties: { |
| | | id: 115106, |
| | | name: 'ä¸å头2å·çº¿', |
| | | type: 'ä¸å头2å·çº¿', |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | export default road; |