| | |
| | | <template> |
| | | <div class="mapBox"> |
| | | <div id="mapdiv"> |
| | | <div class="menu_Top" v-if="$store.state.mapMenuBoolean"> |
| | | <div |
| | | class="menu_Top box_divm" |
| | | v-if="$store.state.mapMenuBoolean" |
| | | > |
| | | <map-menu-top v-if="$store.state.mapMenuBoxFlag == '1'" /> |
| | | <map-space-top v-if="$store.state.mapMenuBoxFlag == '2'" /> |
| | | </div> |
| | | |
| | | <div class="bufferBox" v-if="showBufferBoxDialog"> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <div |
| | | class="bufferBox" |
| | | v-if="showBufferBoxDialog" |
| | | > |
| | | <el-card class="box-card box_divm"> |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>缓冲区分析</span> |
| | | <div style="float: right; cursor: pointer"> |
| | | <i class="el-icon-close" @click="closeBufferBox(1)"></i> |
| | | <i |
| | | class="el-icon-close" |
| | | @click="closeBufferBox(1)" |
| | | ></i> |
| | | </div> |
| | | </div> |
| | | <div class="box-body"> |
| | | <el-form ref="form" :model="bufFrom" label-width="100px"> |
| | | <el-form |
| | | ref="form" |
| | | :model="bufFrom" |
| | | label-width="100px" |
| | | > |
| | | <el-form-item label="缓冲半径(米):"> |
| | | <el-input v-model="bufFrom.val"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="addBuffer(1)" type="info">点</el-button> |
| | | <el-button @click="addBuffer(2)" type="info">线</el-button> |
| | | <el-button @click="addBuffer(3)" type="info">面</el-button> |
| | | <el-button @click="clearBuffer" type="info">清除</el-button> |
| | | <el-button |
| | | @click="addBuffer(1)" |
| | | type="info" |
| | | >点</el-button> |
| | | <el-button |
| | | @click="addBuffer(2)" |
| | | type="info" |
| | | >线</el-button> |
| | | <el-button |
| | | @click="addBuffer(3)" |
| | | type="info" |
| | | >面</el-button> |
| | | <el-button |
| | | @click="clearBuffer" |
| | | type="info" |
| | | >清除</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div class="coordLocalBox" v-if="showCoordLocalBoxDialog"> |
| | | <div |
| | | class="coordLocalBox" |
| | | v-if="showCoordLocalBoxDialog" |
| | | > |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <div slot="header"> |
| | | <span>坐标定位</span> |
| | | <div style="float: right; cursor: pointer"> |
| | | <i class="el-icon-close" @click="closeBufferBox(2)"></i> |
| | | <i |
| | | class="el-icon-close" |
| | | @click="closeBufferBox(2)" |
| | | ></i> |
| | | </div> |
| | | </div> |
| | | <div class="box-body"> |
| | | <el-form ref="form" :model="coordFrom" label-width="50px"> |
| | | <el-form |
| | | ref="form" |
| | | :model="coordFrom" |
| | | label-width="50px" |
| | | > |
| | | <el-form-item label="经度:"> |
| | | <el-input v-model="coordFrom.lon"></el-input> |
| | | </el-form-item> |
| | |
| | | <el-input v-model="coordFrom.height"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="setCoordLocal" type="info">定位</el-button> |
| | | <el-button |
| | | @click="setCoordLocal" |
| | | type="info" |
| | | >定位</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div class="toponymicLocalBox" v-if="showToponymicLocalBoxDialog"> |
| | | <div |
| | | class="toponymicLocalBox" |
| | | v-if="showToponymicLocalBoxDialog" |
| | | > |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>地名定位</span> |
| | | <div style="float: right; cursor: pointer"> |
| | | <i class="el-icon-close" @click="closeBufferBox(3)"></i> |
| | | <i |
| | | class="el-icon-close" |
| | | @click="closeBufferBox(3)" |
| | | ></i> |
| | | </div> |
| | | </div> |
| | | <div class="box-body"> |
| | | <el-form :model="comprehensive" :inline="true" label-width="50px"> |
| | | <el-form |
| | | :model="comprehensive" |
| | | :inline="true" |
| | | label-width="50px" |
| | | > |
| | | <el-form-item label="地名:"> |
| | | <el-input |
| | | style="width: 200px" |
| | |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="setQueryTable" type="info">查询</el-button> |
| | | <el-button |
| | | @click="setQueryTable" |
| | | type="info" |
| | | >查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="tableData" height="200px" style="width: 100%"> |
| | | <el-table |
| | | :data="tableData" |
| | | height="200px" |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | align="center" |
| | | type="index" |
| | | label="序号" |
| | | width="70px" |
| | | /> |
| | | <el-table-column prop="name" align="center" label="定位"> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="定位" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="handleLocation(scope.$index, scope.row)" |
| | |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" align="center" label="地名"> |
| | | <el-table-column |
| | | prop="name" |
| | | align="center" |
| | | label="地名" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="margin-top: 10px" class="pagination_box"> |
| | | <div class="pagination_box"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="listData.pageIndex" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="listData.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="count" |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div class="pathAnalysisBox" v-if="showPathAnalysisBoxDialog"> |
| | | <div |
| | | class="pathAnalysisBox" |
| | | v-if="showPathAnalysisBoxDialog" |
| | | > |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <div |
| | | slot="header" |
| | | class="clearfix" |
| | | > |
| | | <span>路径分析</span> |
| | | <div style="float: right; cursor: pointer"> |
| | | <i class="el-icon-close" @click="closeBufferBox(4)"></i> |
| | | <i |
| | | class="el-icon-close" |
| | | @click="closeBufferBox(4)" |
| | | ></i> |
| | | </div> |
| | | </div> |
| | | <div class="box-body"> |
| | |
| | | :rules="rules" |
| | | label-width="55px" |
| | | > |
| | | <el-form-item label="起点:" prop="lon"> |
| | | <el-form-item |
| | | label="起点:" |
| | | prop="lon" |
| | | > |
| | | <el-input |
| | | style="width: 250px" |
| | | v-model="pathFrom.lon" |
| | |
| | | :underline="false" |
| | | @click="showMouseLeftClick(1)" |
| | | style="margin-left: 10px" |
| | | ><i style="color: white" class="el-icon-plus"></i |
| | | ></el-link> |
| | | ><i |
| | | style="color: white" |
| | | class="el-icon-plus" |
| | | ></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item label="终点:" prop="lat"> |
| | | <el-form-item |
| | | label="终点:" |
| | | prop="lat" |
| | | > |
| | | <el-input |
| | | style="width: 250px" |
| | | v-model="pathFrom.lat" |
| | |
| | | :underline="false" |
| | | @click="showMouseLeftClick(2)" |
| | | style="margin-left: 10px" |
| | | ><i style="color: white" class="el-icon-plus"></i |
| | | ></el-link> |
| | | ><i |
| | | style="color: white" |
| | | class="el-icon-plus" |
| | | ></i></el-link> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="showMouseLeftClick(3)" type="info" |
| | | >查询</el-button |
| | | > |
| | | <el-button |
| | | @click="showMouseLeftClick(3)" |
| | | type="info" |
| | | >查询</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | { |
| | | validator: validatePosition, |
| | | trigger: "blur", |
| | | message: "坐标点经纬度格式错误,坐标格式应为[116.xxx, 39.yyy]", |
| | | message: "坐标点经纬度错误,坐标应在[116.xxx, 39.yyy]范围", |
| | | }, |
| | | ], |
| | | lat: [ |
| | |
| | | { |
| | | validator: validatePosition, |
| | | trigger: "blur", |
| | | message: "坐标点经纬度格式错误,坐标格式应为[116.xxx, 39.yyy]", |
| | | message: "坐标点经纬度错误,坐标应在[116.xxx, 39.yyy]范围", |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | pathStart: null, |
| | | pathEnd: null, |
| | | pathData: null, |
| | | |
| | | layer1: null, |
| | | layer2: null, |
| | | layer3: null, |
| | | isActive: false, |
| | | isMenuLayer: true, |
| | | selFrom: {}, |
| | |
| | | |
| | | //地图初始化 |
| | | window.sgworld = new SmartEarth.SGWorld("mapdiv", { |
| | | url:SmartEarthRootUrl+"Workers/image/earth.jpg" |
| | | licenseServer: window.sceneConfig.licenseServer, |
| | | }) |
| | | |
| | | window.Viewer = window.sgworld._Viewer |
| | | Viewer.imageryLayers._layers[0].show = false |
| | | //定位 |
| | | sgworld.Navigate.jumpTo({ |
| | | //跳转视角 |
| | | destination: new Cesium.Cartesian3.fromDegrees( |
| | | 116.3911, |
| | | 39.9115, |
| | | 100000 |
| | | ), |
| | | }) |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | // sgworld.Navigate.jumpTo({ |
| | | // //跳转视角 |
| | | // destination: new Cesium.Cartesian3.fromDegrees( |
| | | // 116.3911, |
| | | // 39.9115, |
| | | // 100000 |
| | | // ), |
| | | // }) |
| | | Viewer.camera.flyTo({ |
| | | destination: Cesium.Cartesian3.fromDegrees(110, 33, 8000000), |
| | | |
| | | }); |
| | | this.layer1 = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: gaoDeBaseUrl[0].url, |
| | | }) |
| | | ) |
| | | |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | this.layer2 = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: gaoDeBaseUrl[1].url, |
| | | }) |
| | | ) |
| | | Viewer.imageryLayers.addImageryProvider( |
| | | this.layer3 = Viewer.imageryLayers.addImageryProvider( |
| | | new Cesium.UrlTemplateImageryProvider({ |
| | | url: gaoDeBaseUrl[2].url, |
| | | }) |
| | |
| | | //比例尺 |
| | | window.sgworld.navControl("scale", false) |
| | | //开启深度检测 |
| | | sgworld.Analysis.depthTestAgainstTerrain(true) |
| | | // sgworld.Analysis.depthTestAgainstTerrain(true) |
| | | Viewer.scene.globe.depthTestAgainstTerrain = true; |
| | | //影像对比设置 |
| | | // var base = { |
| | | // url: 'https://a.tile.openstreetmap.org/', |
| | |
| | | // ); |
| | | // openStreetMap.item.show = false; |
| | | |
| | | Viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ |
| | | url: demLayer, |
| | | }) |
| | | // var option = { |
| | | // url: window.sceneConfig.SGUrl, |
| | | // layerName: window.sceneConfig.mptName, |
| | | // requestVertexNormals: true |
| | | // } |
| | | // sgworld.Creator.sfsterrainprovider("", option, "", true, ""); |
| | | // Viewer.terrainProvider = new Cesium.CesiumTerrainProvider({ |
| | | // url: demLayer, |
| | | // }) |
| | | var option = { |
| | | url: window.sceneConfig.SGUrl, |
| | | layerName: window.sceneConfig.mptName, |
| | | requestVertexNormals: true |
| | | } |
| | | sgworld.Creator.sfsterrainprovider("", option, "", true, ""); |
| | | |
| | | window.elevationTool = new SmartEarth.ElevationTool(window.sgworld) |
| | | elevationTool.setContourColor("#F1D487") |
| | |
| | | }, |
| | | setLayerVisible() { |
| | | if (this.isActive == true) { |
| | | Viewer.imageryLayers._layers[1].show = true |
| | | Viewer.imageryLayers._layers[2].show = false |
| | | Viewer.imageryLayers._layers[3].show = false |
| | | // Viewer.imageryLayers._layers[1].show = true |
| | | // Viewer.imageryLayers._layers[2].show = false |
| | | // Viewer.imageryLayers._layers[3].show = false |
| | | |
| | | Viewer.imageryLayers.lower(this.layer2); |
| | | Viewer.imageryLayers.lower(this.layer3); |
| | | |
| | | } else { |
| | | Viewer.imageryLayers._layers[1].show = false |
| | | Viewer.imageryLayers._layers[2].show = true |
| | | Viewer.imageryLayers._layers[3].show = true |
| | | |
| | | Viewer.imageryLayers.raise(this.layer3); |
| | | Viewer.imageryLayers.raise(this.layer2); |
| | | |
| | | // Viewer.imageryLayers._layers[1].show = false |
| | | // Viewer.imageryLayers._layers[2].show = true |
| | | // Viewer.imageryLayers._layers[3].show = true |
| | | } |
| | | }, |
| | | //显示弹窗 |
| | |
| | | return false |
| | | } |
| | | }) |
| | | if (this.linePath != null) { |
| | | this.clearPathAll(3) |
| | | } |
| | | this.clearPathAll(3) |
| | | var start = this.pathFrom.lon.split(",") |
| | | var end = this.pathFrom.lat.split(",") |
| | | var startData = { |
| | |
| | | right: 1%; |
| | | bottom: 1%; |
| | | } |
| | | .box-body { |
| | | padding: 18px; |
| | | /deep/ .el-form-item__label { |
| | | color: white !important; |
| | | } |
| | | /deep/ .el-input__inner { |
| | | background: rgba(255, 255, 255, 0.2) !important; |
| | | color: white !important; |
| | | } |
| | | |
| | | /deep/.el-table, |
| | | .el-table__expanded-cell { |
| | | background-color: transparent; |
| | | color: white; |
| | | } |
| | | |
| | | /deep/ .el-table tr { |
| | | background-color: transparent !important; |
| | | } |
| | | /deep/ .el-table tbody tr:hover > td { |
| | | background-color: rgba(255, 255, 255, 0.2) !important; |
| | | } |
| | | /deep/.el-table–enable-row-transition .el-table__body td, |
| | | .el-table .cell { |
| | | background-color: transparent !important; |
| | | } |
| | | /deep/ .el-table th.el-table__cell { |
| | | background-color: transparent !important; |
| | | color: white; |
| | | } |
| | | /deep/.el-pager li { |
| | | background-color: transparent !important; |
| | | color: white; |
| | | } |
| | | /deep/ .btn-prev { |
| | | background-color: transparent !important; |
| | | } |
| | | /deep/ .btn-next { |
| | | background-color: transparent !important; |
| | | color: white !important; |
| | | } |
| | | /deep/ .el-pagination__total { |
| | | color: white; |
| | | } |
| | | /deep/ .el-pagination__jump { |
| | | color: white; |
| | | } |
| | | } |
| | | |
| | | .box-card { |
| | | background: #303030; |
| | | opacity: 0.85; |
| | | border: 1px solid rgba(32, 160, 255, 0.6); |
| | | color: white; |
| | | } |
| | | .menu_Top { |
| | | background: #303030; |
| | | opacity: 0.85; |
| | | width: 100%; |
| | | padding: 1%; |