| | |
| | | # 页颿 é¢ |
| | | VUE_APP_TITLE = 山西é
ç½ |
| | | VUE_APP_TITLE = ä¸ä½åææ¥ææ¥è± |
| | | |
| | | # å¼åç¯å¢é
ç½® |
| | | ENV = 'development' |
| | |
| | | # 页颿 é¢ |
| | | VUE_APP_TITLE = 山西é
ç½ |
| | | VUE_APP_TITLE = ä¸ä½åææ¥ææ¥è± |
| | | |
| | | # ç产ç¯å¢é
ç½® |
| | | ENV = 'production' |
| | |
| | | # 页颿 é¢ |
| | | VUE_APP_TITLE = 山西é
ç½ |
| | | VUE_APP_TITLE = ä¸ä½åæºæ
§ææ¥è± |
| | | |
| | | NODE_ENV = production |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "compile-hero.disable-compile-files-on-did-save-code": false |
| | | } |
| | |
| | | const pwythHost = "http://localhost/pwyth"; |
| | | //é
ç½® |
| | | const config = { |
| | | |
| | | images: host + "/imgs/", |
| | | // serveræå¡ |
| | | apiServices: "http://" + apiHost + "/server/", |
| | |
| | | url: pwythHost + "/modles/TY/tileset.json", |
| | | cnName:"baseModel", |
| | | id:"baseModel", |
| | | flag:false, |
| | | }, |
| | | }; |
| | |
| | | <script src="./CimSDK/CimSDK.min.js"></script> |
| | | <link rel="stylesheet" href="./CimSDK/Workers/layui/css/layui.css"> |
| | | <link rel="stylesheet" href="./CimSDK/CimSDK.min.css"> |
| | | |
| | | |
| | | <title> |
| | | <%= webpackConfig.name %> |
| | | </title> |
| | |
| | | menuData: [ |
| | | { |
| | | id: 's1', |
| | | name: 'é
ç½å·¡æ£', |
| | | name: 'å·¡æ£', |
| | | children: [ |
| | | { |
| | | id: 'a1', |
| | |
| | | }, |
| | | { |
| | | id: 's2', |
| | | name: 'é
ç½è¿æ£', |
| | | name: 'è¿æ£', |
| | | children: [ |
| | | { |
| | | id: 'a1', |
| | |
| | | dataOption: [ |
| | | { value: 'æå¡', label: 'æå¡' }, |
| | | { |
| | | value: 'é
ç½ç®±', |
| | | label: 'é
ç½ç®±', |
| | | value: 'ç®±', |
| | | label: 'ç®±', |
| | | }, |
| | | { |
| | | value: 'ç¯ç½æ', |
| | |
| | | } |
| | | return std; |
| | | }, |
| | | getCartesianCoord(longitude, latitude, height) { |
| | | return Cesium.Cartesian3.fromDegrees(longitude, latitude, height); |
| | | }, |
| | | // æµé |
| | | setMenuS8(res) { |
| | | const colorAll = this.colorAll; |
| | |
| | | <el-table-column label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click="handleClick(scope.row)" type="text" size="small">æ¥ç</el-button> |
| | | <el-button @click="handleClick2(scope.row)" type="text" size="small">åå</el-button></el-button> |
| | | <el-button @click="handleClick2(scope.row)" type="text" size="small">åå</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | title: '山西é
ç½', |
| | | logo: logoImg |
| | | title: 'ä¸ä½åææ¥è±', |
| | | logo:"" |
| | | } |
| | | } |
| | | } |
| | |
| | | mapInfo: [], |
| | | msgList: [], |
| | | disasterSnow: { |
| | | title:"éª", |
| | | val:[] |
| | | title: 'éª', |
| | | val: [], |
| | | }, |
| | | disasterRain: { |
| | | title:"é¨", |
| | | val:[] |
| | | title: 'é¨', |
| | | val: [], |
| | | }, |
| | | disasterFire: { |
| | | title:"ç«", |
| | | val:[] |
| | | title: 'ç«', |
| | | val: [], |
| | | }, |
| | | weatherFlag: 2, |
| | | weatherMsg: { |
| | | name:'', |
| | | data:[] |
| | | }, |
| | | msgInfoData:null, |
| | | }; |
| | | |
| | | const mutations = { |
| | |
| | | <div class="logoImg"></div> |
| | | <!-- <img :src="logo" alt="logo" style="width: 100px; height: 100px; float: left" /> --> |
| | | <div style="float: left; margin-top: 13px; width: 300px; text-align: left"> |
| | | <div>山西é
ç½</div> |
| | | <div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">山西é
ç½</div> |
| | | <div>ä¸ä½åæºæ
§ææ¥è±</div> |
| | | <div style="letter-spacing: 1.5px; font-size: 20px; font-weight: 600; margin-top: -8px; margin-left: 3px">ä¸ä½åæºæ
§ææ¥è±</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="titleItem"> |
| | | <div class="logImg"></div> |
| | | </div> |
| | | |
| | | <!-- <div class="titleItem"> |
| | | <div class="logText">æ°ååªçæºè½é
ç½å·¡æ£ç³»ç»</div> |
| | | </div> --> |
| | | </div> |
| | | <div class="logContent"> |
| | | <div class="contFrom"> |
| | |
| | | .titleItem { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | align-items: end; |
| | | height: 266px; |
| | | } |
| | | |
| | |
| | | // }] |
| | | // }, |
| | | { |
| | | name: 'é
ç½è¿æ£', |
| | | name: 'è¿æ£', |
| | | |
| | | } |
| | | ], |
| | |
| | | <atlas v-if="isShow == 'ç¥è¯å¾è°±'"></atlas> |
| | | <analysis v-if="isShow == 'æ°æ®åæ'"></analysis> |
| | | <statistics v-if="isShow == 'æ°æ®ç»è®¡'"></statistics> |
| | | <line-loss v-if="isShow == 'é
ç½è¿æ£'"></line-loss> |
| | | <line-loss v-if="isShow == 'è¿æ£'"></line-loss> |
| | | <semanticFunction v-if="isShow == 'è¯ä¹åè½'"></semanticFunction> |
| | | </div> |
| | | |
| | |
| | | </div> |
| | | <div class="msgList" v-show="!showMsgFlag"> |
| | | <msg-list @childData="receiveDataFromChild"></msg-list> |
| | | </div> |
| | | <div class="msgListinfo" v-if="showMsgInfoFlag"> |
| | | <msg-list-info @childData="receiveDataInfoChild"></msg-list-info > |
| | | </div> |
| | | <div class="wearthList" v-if="$store.state.mapLayers.weatherFlag == 1"> |
| | | <div class="weatherHeader"> |
| | | {{ $store.state.mapLayers.weatherMsg.name }} |
| | | </div> |
| | | <div class="weatherBox"> |
| | | <ul> |
| | | <li v-for="(item, key) in $store.state.mapLayers.weatherMsg.data" :key="key"> |
| | | {{ item.name }}:{{ item.val }} |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import statistics from '@/views/visual/statistics/index.vue' |
| | | import semanticFunction from '@/views/dataManager/semanticFunction/index.vue' |
| | | import msgList from './msgList.vue'; |
| | | import msgListInfo from './msgListInfo.vue'; |
| | | import { point } from '@turf/turf'; |
| | | export default { |
| | | components: { |
| | |
| | | statistics, |
| | | lineLoss, |
| | | semanticFunction, |
| | | msgList |
| | | msgList, |
| | | msgListInfo |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | wsSocket: null, |
| | | rightChartData: {}, |
| | | leftChartData: {}, |
| | | showMsgFlag: true |
| | | showMsgFlag: true, |
| | | showMsgInfoFlag: false, |
| | | } |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | }, |
| | | methods: { |
| | | receiveDataFromChild(data) { |
| | | console.log(data); |
| | | |
| | | this.showMsgFlag = true |
| | | if(data =="close"){ |
| | | this.showMsgFlag = true; |
| | | this.showMsgInfoFlag = false |
| | | return |
| | | } |
| | | this.showMsgInfoFlag = true; |
| | | |
| | | }, |
| | | receiveDataInfoChild() { |
| | | this.showMsgInfoFlag = false |
| | | }, |
| | | ShowMenuList() { |
| | | if (this.$store.state.mapLayers.msgList.length == 0) return; |
| | |
| | | if (event.data != "è¿æ¥æå") { |
| | | const obj = JSON.parse(event.data) |
| | | if (obj.type == "rain") { |
| | | this.$store.state.mapLayers.disasterRain.val = [obj] |
| | | } else if (obj.type == "snow") { |
| | | this.$store.state.mapLayers.disasterSnow.val = [obj] |
| | | if ([obj] != this.$store.state.mapLayers.disasterRain.val) { |
| | | this.$store.state.mapLayers.disasterRain.val = [obj] |
| | | } |
| | | |
| | | } else if (obj.type == "thunder") { |
| | | if ([obj] != this.$store.state.mapLayers.disasterSnow.val) { |
| | | this.$store.state.mapLayers.disasterSnow.val = [obj] |
| | | } |
| | | } else if (obj.type == "fire") { |
| | | this.$store.state.mapLayers.disasterFire.val = [obj] |
| | | if ([obj] != this.$store.state.mapLayers.disasterFire.val) { |
| | | this.$store.state.mapLayers.disasterFire.val = [obj] |
| | | } |
| | | } else if (obj.type == "error") { |
| | | this.$store.state.mapLayers.msgList |
| | | |
| | | if (this.$store.state.mapLayers.msgList.length == 0) { |
| | | this.$store.state.mapLayers.msgList.push(obj) |
| | | } else { |
| | |
| | | } |
| | | |
| | | .leftMenu { |
| | | width: 12%; |
| | | width: 14%; |
| | | top: 90px; |
| | | left: 10px; |
| | | height: calc(100% - 180px); |
| | |
| | | } |
| | | |
| | | .rightMenu { |
| | | width: 12%; |
| | | width: 14%; |
| | | top: 90px; |
| | | right: 10px; |
| | | height: calc(100% - 180px); |
| | |
| | | } |
| | | } |
| | | |
| | | .wearthList { |
| | | width: 15%; |
| | | top: 90px; |
| | | left: 15%; |
| | | z-index: 40; |
| | | position: absolute; |
| | | background: url(~@/assets/images/Screen/chartbg.png) no-repeat; |
| | | background-size: 100% 100%; |
| | | height: 20%; |
| | | padding: 10px; |
| | | color: white; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .weatherHeader { |
| | | line-height: 10px; |
| | | font-size: 16px; |
| | | padding-left: 20px; |
| | | } |
| | | |
| | | .weatherBox { |
| | | flex: 1; |
| | | padding: 10px; |
| | | overflow: auto; |
| | | |
| | | li { |
| | | line-height: 30px; |
| | | font-size: 16px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .msgList { |
| | | width: 15%; |
| | | top: 90px; |
| | | right: 16%; |
| | | z-index: 40; |
| | | position: absolute; |
| | | height: 30%; |
| | | } |
| | | |
| | | .msgListinfo { |
| | | width: 15%; |
| | | top: calc(30% + 100px); |
| | | right: 16%; |
| | | z-index: 40; |
| | | position: absolute; |
| | | height: 30%; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | /* èªå®ä¹æ»å¨æ¡è½¨é */ |
| | | ::-webkit-scrollbar-track { |
| | | background-color: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | /* èªå®ä¹æ»å¨æ¡çæ»å */ |
| | | ::-webkit-scrollbar-thumb { |
| | | background-color: rgba(0, 0, 0, 0); |
| | | } |
| | | |
| | | /* 设置æ»å¨æ¡ç宽度 */ |
| | | ::-webkit-scrollbar { |
| | | width: 1px; |
| | | } |
| | | </style> |
| | | <style> |
| | | ::v-deep.map-info-bar { |
| | |
| | | <td>{{ roadItem.line }}</td> |
| | | <td style="color:#f56c6c">{{ roadItem.level }}</td> |
| | | <td style="color:#409eff"> |
| | | <el-button v-show="flagData != roadItem.address" class="elButton" type="primary" plain |
| | | <el-button v-show="flagData != roadItem.type" class="elButton" type="primary" plain |
| | | size="mini" @click="setChangeItem()">详æ
</el-button> |
| | | <el-button v-show="flagData == roadItem.address" class="elButton" type="danger" plain |
| | | <el-button v-show="flagData == roadItem.type" class="elButton" type="danger" plain |
| | | size="mini" @click="setCannelItem()">éç½®</el-button> |
| | | </td> |
| | | </tr> |
| | |
| | | }, |
| | | methods: { |
| | | setCannelItem() { |
| | | this.$store.state.mapLayers.weatherFlag = false; |
| | | this.$store.state.mapLayers.weatherFlag = 2 |
| | | this.flagData = null; |
| | | mapWeather.closeRegionWeather() |
| | | }, |
| | |
| | | }, |
| | | setChangeItem() { |
| | | var res = this.roadItem; |
| | | window.regionWeather = res.address; |
| | | window.regionWeather = res.type; |
| | | var event = new Event('POIDetailDataChange'); |
| | | this.$store.state.mapLayers.weatherMsg = mapWeather.getWearData(res); |
| | | this.$store.state.mapLayers.weatherFlag = 1; |
| | | window.dispatchEvent(event); |
| | | mapWeather.setRegionWeatherType(res); |
| | | }, |
| | |
| | | <template> |
| | | <div class="chartListBox" :childData="childData"> |
| | | <div class="aside-title"> éª</div> |
| | | <div class="aside-title">é·çµ</div> |
| | | <div class="echartBox" v-show="roadItem.address"> |
| | | <table class="chartTable"> |
| | | <tr> |
| | |
| | | <td>{{ roadItem.line }}</td> |
| | | <td style="color:#f56c6c">{{ roadItem.level }}</td> |
| | | <td style="color:#409eff"> |
| | | <el-button v-show="flagData != roadItem.address" class="elButton" type="primary" plain |
| | | <el-button v-show="flagData != roadItem.type" class="elButton" type="primary" plain |
| | | size="mini" @click="setChangeItem()">详æ
</el-button> |
| | | <el-button v-show="flagData == roadItem.address" class="elButton" type="danger" plain |
| | | <el-button v-show="flagData == roadItem.type" class="elButton" type="danger" plain |
| | | size="mini" @click="setCannelItem()">éç½®</el-button> |
| | | </td> |
| | | </tr> |
| | |
| | | }, |
| | | methods: { |
| | | setCannelItem() { |
| | | this.$store.state.mapLayers.weatherFlag = false; |
| | | this.$store.state.mapLayers.weatherFlag = 2 |
| | | this.flagData = null; |
| | | mapWeather.closeRegionWeather() |
| | | }, |
| | |
| | | }, |
| | | setChangeItem() { |
| | | var res = this.roadItem; |
| | | window.regionWeather = res.address; |
| | | window.regionWeather = res.type; |
| | | var event = new Event('POIDetailDataChange'); |
| | | this.$store.state.mapLayers.weatherMsg = mapWeather.getWearData(res); |
| | | this.$store.state.mapLayers.weatherFlag = 1; |
| | | window.dispatchEvent(event); |
| | | mapWeather.setRegionWeatherType(res); |
| | | }, |
| | |
| | | <td>{{ roadItem.line }}</td> |
| | | <td style="color:#f56c6c">{{ roadItem.level }}</td> |
| | | <td style="color:#409eff"> |
| | | <el-button v-show="flagData != roadItem.address" class="elButton" type="primary" plain |
| | | <el-button v-show="flagData != roadItem.type" class="elButton" type="primary" plain |
| | | size="mini" @click="setChangeItem()">详æ
</el-button> |
| | | <el-button v-show="flagData == roadItem.address" class="elButton" type="danger" plain |
| | | <el-button v-show="flagData == roadItem.type" class="elButton" type="danger" plain |
| | | size="mini" @click="setCannelItem()">éç½®</el-button> |
| | | </td> |
| | | </tr> |
| | |
| | | }, |
| | | methods: { |
| | | setCannelItem() { |
| | | this.$store.state.mapLayers.weatherFlag = false; |
| | | this.$store.state.mapLayers.weatherFlag = 2 |
| | | this.flagData = null; |
| | | mapWeather.closeRegionWeather() |
| | | }, |
| | |
| | | }, |
| | | setChangeItem() { |
| | | var res = this.roadItem; |
| | | window.regionWeather = res.address; |
| | | window.regionWeather = res.type; |
| | | var event = new Event('POIDetailDataChange'); |
| | | this.$store.state.mapLayers.weatherMsg = mapWeather.getWearData(res); |
| | | this.$store.state.mapLayers.weatherFlag = 1; |
| | | window.dispatchEvent(event); |
| | | mapWeather.setRegionWeatherType(res); |
| | | }, |
| | |
| | | import mapServer from '../../../assets/js/mapSdk/mapServe'; |
| | | import mapServer from '@/assets/js/mapSdk/mapServe.js'; |
| | | import * as turf from '@turf/turf'; |
| | | const mapWeather = { |
| | | regionWeather: null, |
| | | particle: null, |
| | | showRain: 'ShowRain', |
| | | wallLayer: null, |
| | | pathLayer: null, |
| | | listBiildBord: [], |
| | | listParticle: [], |
| | | getWearData(res) { |
| | | return { |
| | | name: res.address, |
| | | data: [ |
| | | { |
| | | name: 'åç§°', |
| | | val: res.address, |
| | | }, |
| | | { |
| | | name: 'æ°è±¡çº§å«', |
| | | val: res.level, |
| | | }, |
| | | { |
| | | name: 'æå±çº¿è·¯', |
| | | val: res.line, |
| | | }, |
| | | { |
| | | name: 'æ°æ®æ¥æº', |
| | | val: res.source, |
| | | }, |
| | | { |
| | | name: 'å叿¶é´', |
| | | val: res.time, |
| | | }, |
| | | ], |
| | | }; |
| | | }, |
| | | closeRegionWeather() { |
| | | if (this.regionWeather) { |
| | | this.regionWeather.enableWeatherType = SmartEarth.Cesium.RegionWeather.TYPE_NONE; |
| | |
| | | Viewer.scene.primitives.remove(Viewer.scene.primitives._primitives[i]); |
| | | } |
| | | } |
| | | if (this.wallLayer) { |
| | | Viewer.entities.remove(this.wallLayer); |
| | | this.wallLayer = null; |
| | | // this.wallLayer.removeFromMap(); |
| | | // this.wallLayer = null; |
| | | } |
| | | if (this.pathLayer) { |
| | | this.pathLayer.deleteObject(); |
| | | this.pathLayer = null; |
| | | } |
| | | for (var i in this.listBiildBord) { |
| | | this.listBiildBord[i].removeFromMap(); |
| | | } |
| | | this.listBiildBord = []; |
| | | for (var i in this.listParticle) { |
| | | this.listParticle[i].deleteObject(); |
| | | } |
| | | this.listParticle = []; |
| | | }, |
| | | setRegionWeatherType(response) { |
| | | this.closeRegionWeather(); |
| | |
| | | case 'rain': |
| | | // earthCtrl.camera.flyTo(coord[0], coord[1], 8000, 0, -90, 0, 0); |
| | | this.showRain(response); |
| | | |
| | | break; |
| | | case 'fire': |
| | | this.showFire(response); |
| | | earthCtrl.camera.flyTo(coord[0], coord[1], 1000, 0, -90, 0, 0); |
| | | // earthCtrl.camera.flyTo(coord[0], coord[1], 1000, 0, -90, 0, 0); |
| | | break; |
| | | case 'snow': |
| | | this.showSnow(); |
| | | earthCtrl.camera.flyTo(coord[0], coord[1], 1000, 0, -90, 0, 0); |
| | | break; |
| | | case 'thunder': |
| | | this.showThunder(response); |
| | | break; |
| | | } |
| | | }, |
| | | showFire(res) { |
| | | const coord = this.getCoord(res); |
| | | showThunder(response) { |
| | | if (response.geom) { |
| | | this.addWatherGeom(response.geom, 'thunder2.png'); |
| | | } |
| | | // const points = this.chunkArray(response.point.split(','), 2); |
| | | |
| | | // for (var i in points) { |
| | | // const billboardEntity = earthCtrl.factory.createBillboard({ |
| | | // name: 'æ ç¾ç¹', |
| | | // id: earthCtrl.factory.createUUID(), |
| | | // image: config.images + 'thunder.png', // è´´å¾, |
| | | // width: 40, |
| | | // height: 40, |
| | | // lon: parseFloat(points[i][0]), |
| | | // lat: parseFloat(points[i][1]), |
| | | // alt: 1, |
| | | // scale: 6, |
| | | // }); |
| | | // this.listBiildBord.push(billboardEntity); |
| | | // } |
| | | }, |
| | | addWatherGeom(response, image) { |
| | | if (response.ploygon) { |
| | | this.addWatherPloygon(this.chunkArray(response.ploygon, 2), image); |
| | | } |
| | | if (response.line) { |
| | | this.addWatherLine(this.chunkArray(response.line, 2)); |
| | | } |
| | | }, |
| | | addWatherLine(response) { |
| | | const obj = { |
| | | x: coord[0], |
| | | y: coord[1], |
| | | z: 0, |
| | | type: 'FeatureCollection', |
| | | features: [ |
| | | { |
| | | type: 'Feature', |
| | | geometry: { |
| | | type: 'LineString', |
| | | coordinates: response, |
| | | }, |
| | | }, |
| | | ], |
| | | }; |
| | | this.particle = earthCtrl.factory.createParticleEffect( |
| | | 'flame', |
| | | obj, |
| | | { |
| | | translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //平移 |
| | | particleSize: 10, |
| | | this.pathLayer = earthCtrl.factory.createPathLayer({ |
| | | url: obj, |
| | | color: '#ff0000', //线çé¢è² |
| | | width: 5.0, //线ç宽度 |
| | | pointColor: '#FFFFFF', //ç§»å¨ç¹çé¢è² |
| | | speed: 1, |
| | | far: 50000, |
| | | }); |
| | | }, |
| | | addWatherPloygon(response, image) { |
| | | response.push(response[0]); |
| | | const coord = this.getCentroid(response); |
| | | earthCtrl.camera.flyTo(coord[0], coord[1], 80000, 0, -90, 0, 0); |
| | | var geom = []; |
| | | for (var i = 0; i < response.length; i++) { |
| | | geom.push(response[i][0], response[i][1]); |
| | | } |
| | | |
| | | this.wallLayer = Viewer.entities.add({ |
| | | polygon: { |
| | | hierarchy: Cesium.Cartesian3.fromDegreesArray(geom), |
| | | material: new Cesium.ImageMaterialProperty({ |
| | | image: config.images + image, |
| | | alpha: 0.2, // 设置éæåº¦ä¸º0.5 |
| | | repeat: Cesium.Cartesian2(1.0, 1.0), // ä¸éå¤ |
| | | transparent: true, // å¯ç¨pngéæ |
| | | color: new Cesium.Color(1.0, 1.0, 1.0, 0.3), // 设置é¢è²åéæåº¦ |
| | | }), |
| | | stRotation: Cesium.Math.toRadians(0), |
| | | }, |
| | | function (data) {} |
| | | ); |
| | | }); |
| | | // this.wallLayer = earthCtrl.factory.createPolygon({ |
| | | // name: 'é¢', |
| | | // id: earthCtrl.factory.createUUID(), |
| | | // material: Cesium.Color.fromCssColorString('rgba(128,128,128, .2)'), |
| | | // outlineColor: Cesium.Color.fromCssColorString('rgba(128,128,128, .5)'), |
| | | // lineWidth: 3, |
| | | // height: 10, |
| | | // outline: true, |
| | | // outlineWidth: 2, |
| | | // positions: SmartEarth.Cesium.Cartesian3.fromDegreesArrayHeights(geom), |
| | | // }); |
| | | |
| | | // const obj = { type: 'GeometryCollection', geometries: [{ type: 'LineString', coordinates: response }] }; |
| | | // // æµå¨å¢å¾å± |
| | | // this.wallLayer = earthCtrl.factory.createTrailWallLayer({ |
| | | // url: obj, |
| | | // color: '#0000ff05', //é¢è² |
| | | // height: 20, //é«åº¦ |
| | | // speed: 2, |
| | | // }); |
| | | }, |
| | | showFire(response) { |
| | | if (response.geom) { |
| | | this.addWatherGeom(response.geom, 'filre.png'); |
| | | } |
| | | // const points = this.chunkArray(response.point.split(','), 2); |
| | | // for (var i in points) { |
| | | // const particle = earthCtrl.factory.createParticleEffect( |
| | | // 'flame', |
| | | // { |
| | | // x: parseFloat(points[i][0]), |
| | | // y: parseFloat(points[i][1]), |
| | | // z: 0, |
| | | // }, |
| | | // { |
| | | // translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //平移 |
| | | // particleSize: 10, |
| | | // }, |
| | | // function (data) {} |
| | | // ); |
| | | |
| | | // this.listParticle.push(particle); |
| | | // } |
| | | // 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(res) { |
| | | var area = []; |
| | | var std =[]; |
| | | for (var i = 0; i < res.area.length; i += 3) { |
| | | var std = []; |
| | | for (var i = 0; i < res.area.length; i += 2) { |
| | | area.push(res.area[i]); |
| | | area.push(res.area[i + 1]); |
| | | std.push([res.area[i],res.area[i + 1]]) |
| | | std.push([res.area[i], res.area[i + 1]]); |
| | | } |
| | | std.push(std[0]) |
| | | |
| | | |
| | | std.push(std[0]); |
| | | |
| | | const polygon = turf.polygon([std]); |
| | | |
| | | const centerPoint = turf.center(polygon); |
| | | const coord= centerPoint.geometry.coordinates; |
| | | const coord = centerPoint.geometry.coordinates; |
| | | earthCtrl.camera.flyTo(coord[0], coord[1], 8000, 0, -90, 0, 0); |
| | | |
| | | const geometry = new Cesium.PolygonGeometry({ |
| | |
| | | }); |
| | | primitive.name = this.showRain; |
| | | Viewer.scene.primitives.add(primitive); |
| | | |
| | | // Viewer.camera.lookAt(primitive.boundingSphere.center, new Cesium.HeadingPitchRange(0.0, Cesium.Math.toRadians(-90), 5000)); |
| | | // if (this.regionWeather) { |
| | | // this.regionWeather.enableWeatherType = SmartEarth.Cesium.RegionWeather.TYPE_RAIN; |
| | | // this.regionWeather.regionAlpha = 0.6; |
| | | // this.regionWeather.regionGradientDistance = 300; |
| | | // } |
| | | }, |
| | | |
| | | showSnow() { |
| | |
| | | const coord = res.point.split(','); |
| | | return coord; |
| | | }, |
| | | getCentroid(response) { |
| | | var centroid = turf.centroid(turf.polygon([response])); |
| | | return centroid.geometry.coordinates; |
| | | }, |
| | | chunkArray(array, size) { |
| | | return array.reduce((chunks, current, index) => { |
| | | const chunkIndex = Math.floor(index / size); |
| | | |
| | | if (!chunks[chunkIndex]) { |
| | | chunks[chunkIndex] = []; |
| | | } |
| | | |
| | | chunks[chunkIndex].push(current); |
| | | |
| | | return chunks; |
| | | }, []); |
| | | }, |
| | | getRegionWather(res) { |
| | | if (res.type == 'fire') return; |
| | | const coord = this.getCoord(res); |
| | |
| | | } |
| | | // é»è®¤è®¾ç½®åºå¾ |
| | | this.addImageLayer(); |
| | | |
| | | |
| | | |
| | | }, |
| | | addImageLayer() { |
| | | const baseLayer = mapData.baseLayer; |
| | |
| | | }, |
| | | setdefaultPerspective() { |
| | | mapConfig.sertCameraTo(mapData.defaultPerspective); |
| | | if (config.baseModel.url) { |
| | | if (config.baseModel.flag) { |
| | | mapServer.addLayer(config.baseModel); |
| | | } |
| | | this.getSelectLayers(); |
| | |
| | | if (item.cnName != "é
ç½çº¿") { |
| | | mapServer.addLayer(item) |
| | | } |
| | | } |
| | | } |
| | | |
| | | }) |
| | | this.$nextTick(() => { |
| | |
| | | earthCtrl.factory.createPathLayer({ |
| | | url: road, |
| | | // color: "#00FA9A", //线çé¢è² |
| | | color: "#ff0000", //线çé¢è² |
| | | color: "#ff0000", //线çé¢è² |
| | | width: 5.0, //线ç宽度 |
| | | pointColor: "#FFFFFF", //ç§»å¨ç¹çé¢è² |
| | | speed: 1, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | import * as turf from "@turf/turf"; |
| | | const msgList = { |
| | | label: null, |
| | | circle: undefined, |
| | | line: [], |
| | | startLine: [], |
| | | backLine: [], |
| | | point: null, |
| | | removeLabel() { |
| | | if (this.label) { |
| | | this.label.removeFromMap(); |
| | | this.label = null; |
| | | } |
| | | if (this.circle) { |
| | | this.circle.removeFromMap(); |
| | | this.circle = undefined; |
| | | } |
| | | if (this.pathLine) { |
| | | Viewer.entities.remove(this.pathLine); |
| | | this.pathLine = null; |
| | | } |
| | | this.startLine = []; |
| | | this.line = []; |
| | | this.backLine = []; |
| | | }, |
| | | setInit(item) { |
| | | const point = item.point.split(','); |
| | | this.point = point; |
| | | this.label = earthCtrl.factory.createLabel({ |
| | | lon: point[0], |
| | | lat: point[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), |
| | | }); |
| | | this.showCircle(point, '#ff0000'); |
| | | if (!item.geom.line) return; |
| | | this.line = this.chunkArray(item.geom.line, 2); |
| | | var center_Coord = []; |
| | | |
| | | for (var i = 0; i < this.line.length; i++) { |
| | | center_Coord.push(turf.point([this.line[i][0], this.line[i][1]])); |
| | | var coord_start =this.getCartesianCoord(this.line[i][0], this.line[i][1], 1); |
| | | this.startLine.push(coord_start); |
| | | } |
| | | var features = turf.featureCollection(center_Coord); |
| | | |
| | | var center = turf.center(features).geometry.coordinates; |
| | | |
| | | earthCtrl.camera.flyTo(center[0], center[1], 8000, 0, -90, 0, 0); |
| | | var backGeom = this.line.reverse(); |
| | | for (var i = 0; i < backGeom.length; i++) { |
| | | var coord_back =this.getCartesianCoord(backGeom[i][0], backGeom[i][1], 1); |
| | | this.backLine.push(coord_back); |
| | | } |
| | | // this.$nextTick(() => { |
| | | |
| | | this.showPathLine(this.startLine, true); |
| | | // }); |
| | | }, |
| | | getCartesianCoord(longitude, latitude, height) { |
| | | return Cesium.Cartesian3.fromDegrees(longitude, latitude, height); |
| | | }, |
| | | showCircle(res, color) { |
| | | if (this.circle) { |
| | | this.circle.removeFromMap(); |
| | | this.circle = undefined; |
| | | } |
| | | this.circle = earthCtrl.factory.createCircleScan({ |
| | | lon: res[0], |
| | | lat: res[1], |
| | | color: SmartEarth.Cesium.Color.fromCssColorString(color), |
| | | height: 1, |
| | | maxRadius: 100, |
| | | duration: 5000, |
| | | }); |
| | | }, |
| | | chunkArray(array, size) { |
| | | return array.reduce((chunks, current, index) => { |
| | | const chunkIndex = Math.floor(index / size); |
| | | |
| | | if (!chunks[chunkIndex]) { |
| | | chunks[chunkIndex] = []; |
| | | } |
| | | |
| | | chunks[chunkIndex].push(current); |
| | | |
| | | return chunks; |
| | | }, []); |
| | | }, |
| | | showPathLine(degreesArr, boolen) { |
| | | this.pathLine = Viewer.entities.add({ |
| | | polyline: { |
| | | clampToGround: true, |
| | | //轨迹线çåå¸ä½ç½® |
| | | positions: degreesArr, |
| | | material: new Cesium.ImageMaterialProperty({ |
| | | //å¾ççé¢è² |
| | | //轨迹è¿è¡çéç |
| | | speed: 10, |
| | | //éæä¸å¼ å¾ç |
| | | image: config.images + 'åå³.png', |
| | | //å°è½¨è¿¹åæä¸è¡50个å¾ç |
| | | repeat: { x: 40, y: 1 }, |
| | | }), |
| | | width: 20, |
| | | }, |
| | | }); |
| | | }, |
| | | }; |
| | | export default msgList; |
| | |
| | | <template> |
| | | <div class="msgBox"> |
| | | |
| | | <div class="aside-title"> |
| | | <div>æ
éä¿¡æ¯</div> |
| | | <div @click="sendDataToParent()" class="closeMsg"> |
| | | X |
| | | </div> |
| | | <div @click="sendDataToParent()" class="closeMsg">X</div> |
| | | </div> |
| | | <div class="menuTable"> |
| | | <table> |
| | | <tr> |
| | | <th style="width: 100px;">设å¤åç§°</th> |
| | | <th style="width: 80px">设å¤åç§°</th> |
| | | <th>设å¤ä½ç½®</th> |
| | | <th style="width: 100px;">æä½</th> |
| | | <th style="width: 40px">æä½</th> |
| | | </tr> |
| | | <tr v-for="(item, indx) in $store.state.mapLayers.msgList" :key="indx"> |
| | | <td>{{ item.msg }}</td> |
| | |
| | | </tr> |
| | | </table> |
| | | </div> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import mapConfig from '../../assets/js/mapSdk/mapConfig'; |
| | | import menuManager from '../../assets/js/mapSdk/menuManager'; |
| | | |
| | | |
| | | import msgList from './msgList.js'; |
| | | export default { |
| | | components: { |
| | | |
| | | }, |
| | | props: { |
| | | |
| | | }, |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | label: null, |
| | | } |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | watch: {}, |
| | | mounted() { }, |
| | | methods: { |
| | | sendDataToParent() { |
| | | this.removeLabel(); |
| | | console.log(23); |
| | | |
| | | this.$emit('childData', 'åç»ä»¶æ°æ®'); |
| | | |
| | | msgList.removeLabel(); |
| | | this.$emit('childData', 'close'); |
| | | }, |
| | | removeLabel() { |
| | | if (this.label) { |
| | | this.label.removeFromMap() |
| | | this.label = null; |
| | | } |
| | | }, |
| | | |
| | | handleClick(item) { |
| | | this.removeLabel(); |
| | | // const point = mapConfig.getWKTParse(item.point) |
| | | const point = item.point.split(",") |
| | | this.label = earthCtrl.factory.createLabel({ |
| | | lon: point[0], |
| | | lat: point[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) |
| | | this.$store.state.mapLayers.msgInfoData = {...item}; |
| | | this.$emit('childData', 'showMsgInfoFlag'); |
| | | msgList.removeLabel(); |
| | | msgList.setInit(item) |
| | | }, |
| | | handleClick2(item) { |
| | | |
| | | }, |
| | | setMsgClose() { |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | color: #fff; |
| | | width: 100%; |
| | | height: 45px; |
| | | line-height: 45px; |
| | | line-height: 35px; |
| | | background-size: 100% 100%; |
| | | background-repeat: no-repeat; |
| | | display: flex; |
| | |
| | | } |
| | | |
| | | .closeMsg :hover { |
| | | color: #409EFF; |
| | | color: #409eff; |
| | | } |
| | | |
| | | } |
| | | |
| | | .menuTable { |
| | |
| | | |
| | | th { |
| | | text-align: center; |
| | | |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | td { |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | line-height: 30px; |
| | | border-bottom: 1px solid #409EFF; |
| | | ; |
| | | border-bottom: 1px solid #409eff; |
| | | } |
| | | } |
| | | } |
| | |
| | | ::-webkit-scrollbar-thumb { |
| | | border-radius: 5px; |
| | | -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); |
| | | background: #409EFF; |
| | | 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); |
| | | background: rgba(237, 237, 237, 0.1); |
| | | } |
| | | </style> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="msgBox"> |
| | | <div class="aside-title"> |
| | | <div>{{ this.$store.state.mapLayers.msgInfoData.line }}</div> |
| | | <div @click="sendDataToParent()" class="closeMsg">X</div> |
| | | </div> |
| | | <div class="menuTable"> |
| | | <table> |
| | | <tr> |
| | | <td>å¼å¸¸ä¿¡æ¯ï¼</td> |
| | | <td>{{ this.$store.state.mapLayers.msgInfoData.msg }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>å¼å¸¸å°ç¹ï¼</td> |
| | | <td>{{ this.$store.state.mapLayers.msgInfoData.point }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>å¼å¸¸æ¶é´ï¼</td> |
| | | <td>{{ this.$store.state.mapLayers.msgInfoData.time }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>æ°æ®æ¥æºï¼</td> |
| | | <td>{{ this.$store.state.mapLayers.msgInfoData.source }}</td> |
| | | </tr> |
| | | |
| | | |
| | | </table> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import msgList from './msgList.js'; |
| | | |
| | | |
| | | |
| | | export default { |
| | | components: {}, |
| | | props: {}, |
| | | data() { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch: {}, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | sendDataToParent() { |
| | | msgList.removeLabel(); |
| | | this.$emit('childData', 'åç»ä»¶æ°æ®'); |
| | | }, |
| | | |
| | | }, |
| | | }; |
| | | </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: 35px; |
| | | 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; |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | td { |
| | | word-wrap: break-word; |
| | | word-break: break-all; |
| | | 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, 0.1); |
| | | } |
| | | </style> |
| | |
| | | const CompressionPlugin = require('compression-webpack-plugin'); |
| | | const { log } = require('console'); |
| | | |
| | | const name = process.env.VUE_APP_TITLE || '山西é
ç½'; // ç½é¡µæ é¢ |
| | | const name = process.env.VUE_APP_TITLE || 'ä¸ä½åæºæ
§ææ¥è±'; // ç½é¡µæ é¢ |
| | | |
| | | const port = process.env.port || process.env.npm_config_port || 80; // ç«¯å£ |
| | | console.log( "123",process.env.VUE_APP_SERVER_API_URL); |