From 4b8943bd66fc721f8381b74eff259a2f7ffef513 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 27 二月 2023 17:34:19 +0800 Subject: [PATCH] 地形压平添加参数;坡度分析 添加图例,数据上传,元数据管理,资料馆添加元数据查询,综合展示图片更换 --- src/components/mapsdk.vue | 293 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 225 insertions(+), 68 deletions(-) diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue index ccab4d6..791b4ae 100644 --- a/src/components/mapsdk.vue +++ b/src/components/mapsdk.vue @@ -97,6 +97,44 @@ </el-card> </div> <div + class="terrainLevelBox" + v-if="showTerrainLevelDialog" + > + <el-card class="box-card"> + <div slot="header"> + <span>鍦板舰骞虫暣</span> + <div style="float: right; cursor: pointer"> + <i + class="el-icon-close" + @click="closeBufferBox(5)" + ></i> + </div> + </div> + <div class="box-body"> + <el-form + ref="form" + :model="terrainFrom" + label-width="100px" + > + <el-form-item label="骞虫暣楂樺害:"> + <el-input v-model="terrainFrom.height"></el-input> + </el-form-item> + + <el-form-item> + <el-button + @click="drawTerrainLevel" + type="parmary" + >缁樺埗</el-button> + <el-button + @click="clearTerrainLevel" + type="info" + >娓呴櫎</el-button> + </el-form-item> + </el-form> + </div> + </el-card> + </div> + <div class="toponymicLocalBox" v-if="showToponymicLocalBoxDialog" > @@ -141,33 +179,40 @@ type="index" label="搴忓彿" /> - <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)" - size="small" - >{{scope.row.name}}<i class="el-icon-place" style="padding-left: 5px"></i></el-button> + @click="handleLocation(scope.$index, scope.row)" + size="small" + >{{scope.row.name}}<i + class="el-icon-place" + style="padding-left: 5px" + ></i></el-button> </template> </el-table-column> -<!-- <el-table-column--> -<!-- prop="name"--> -<!-- align="center"--> -<!-- label="瀹氫綅"--> -<!-- >--> -<!-- <template slot-scope="scope">--> -<!-- <el-button--> -<!-- @click="handleLocation(scope.$index, scope.row)"--> -<!-- size="small"--> -<!-- icon="el-icon-place"--> -<!-- ></el-button>--> -<!-- </template>--> -<!-- </el-table-column>--> -<!-- <el-table-column--> -<!-- prop="name"--> -<!-- align="center"--> -<!-- label="鍦板悕"--> -<!-- >--> -<!-- </el-table-column>--> + <!-- <el-table-column--> + <!-- prop="name"--> + <!-- align="center"--> + <!-- label="瀹氫綅"--> + <!-- >--> + <!-- <template slot-scope="scope">--> + <!-- <el-button--> + <!-- @click="handleLocation(scope.$index, scope.row)"--> + <!-- size="small"--> + <!-- icon="el-icon-place"--> + <!-- ></el-button>--> + <!-- </template>--> + <!-- </el-table-column>--> + <!-- <el-table-column--> + <!-- prop="name"--> + <!-- align="center"--> + <!-- label="鍦板悕"--> + <!-- >--> + <!-- </el-table-column>--> </el-table> <div class="pagination_box"> <el-pagination @@ -175,7 +220,7 @@ @current-change="handleCurrentChange" :current-page="listData.pageIndex" :page-sizes="[10, 20, 50, 100]" - :pager-count = "3" + :pager-count="3" :page-size="listData.pageSize" layout="total, prev, pager, next" :total="count" @@ -251,29 +296,59 @@ </div> <div style="display: flex"> <div - @click="changeMenulayer" - class="center CenDiv" - :class="{ center1: centerFlag }" + @click="changeMenulayer" + class="center CenDiv" + :class="{ center1: centerFlag }" > <div - id="cenBg" - v-bind:class="{ active: isActive, menuLayer: isMenuLayer }" + id="cenBg" + v-bind:class="{ active: isActive, menuLayer: isMenuLayer }" ></div> </div> - <div @click="changeMapType" class="changeMapType"> - <div id="cenBg" :class="show2DMap ? 'mapTypeTwo' : 'mapTypeThree'"></div> + <div + @click="changeMapType" + class="changeMapType" + > + <div + id="cenBg" + :class="show2DMap ? 'mapTypeTwo' : 'mapTypeThree'" + ></div> </div> </div> -<!-- <div--> -<!-- @click="changeMenulayer"--> -<!-- class="center CenDiv"--> -<!-- :class="{ center1: centerFlag }"--> -<!-- >--> -<!-- <div--> -<!-- id="cenBg"--> -<!-- v-bind:class="{ active: isActive, menuLayer: isMenuLayer }"--> -<!-- ></div>--> -<!-- </div>--> + <div + class="lengend" + v-show="showLengendDialog" + > + <el-card class="box-card"> + <!-- <div + class="lengend_color" + style="height:205px" + > + + </div> --> + <div class="lengendBox"> + <div class="lengendSpan"> + <div style="left:10px">0掳</div> + <div style="align-self: flex-end;left:10px; position: absolute; + bottom: 8%; ">70掳</div> + </div> + <div + class="lengend_color" + style="height:205px; width:30px " + ></div> + </div> + </el-card> + </div> + <!-- <div--> + <!-- @click="changeMenulayer"--> + <!-- class="center CenDiv"--> + <!-- :class="{ center1: centerFlag }"--> + <!-- >--> + <!-- <div--> + <!-- id="cenBg"--> + <!-- v-bind:class="{ active: isActive, menuLayer: isMenuLayer }"--> + <!-- ></div>--> + <!-- </div>--> </div> </div> </template> @@ -375,13 +450,16 @@ isMenuLayer: true, selFrom: {}, selectTree: null, - + showTerrainLevelDialog: false, menuList: [], defaultProps: { children: "children", label: "label", }, //鏍戠粦瀹氬璞� - show2DMap:false, + show2DMap: false, + terrainFrom: { + height: '10' + }, showLengendDialog: false, }; }, mounted() { @@ -394,6 +472,28 @@ }); }, methods: { + drawTerrainLevel() { + this.clearTerrainLevel() + var deep = parseFloat(this.terrainFrom.height) + sgworld.Creator.createSimpleGraphic( + 'polygon', + { + clampToGround: true, + }, + function (entity) { + + var positions = entity.polygon.hierarchy.getValue().positions; + sgworld.Creator.SimpleGraphic.remove(entity.id); + + window.TerrainFlattening = sgworld.Creator.createTerrainModifier("鍦板舰鍘嬪钩", positions, deep, {}); + } + ); + }, + clearTerrainLevel() { + if (window.TerrainFlattening) { + window.TerrainFlattening && window.TerrainFlattening.remove(); + } + }, init3DMap() { var webKey = "94a34772eb88317fcbf8428e10448561"; @@ -544,6 +644,23 @@ this.closeBufferBox(4); } } + } else if (res.name == "Trrain") { + switch (res.id) { + case "d10": + this.showTerrainLevelDialog = !this.showTerrainLevelDialog; + this.clearTerrainLevel(); + break; + } + + } else if (res.name == "Lengend") { + switch (res.id) { + case "d2": + + this.showLengendDialog = res.vshow; + + break; + } + } }, handleSizeChange(val) { @@ -628,7 +745,10 @@ case 4: this.showPathAnalysisBoxDialog = false; this.clearPathAll(3); - + break; + case 5: + this.showTerrainLevelDialog = false; + this.clearTerrainLevel() break; } }, @@ -643,23 +763,23 @@ Altitude: 2000, }; this.imagePoint = sgworld.Creator.CreateLabel( - position, - "", - SmartEarthRootUrl + "Workers/image/mark.png", - { - disableDepthTestDistance: Infinity, - scale: 0.8, - }, - 0, - "宸℃鐐�" + position, + "", + SmartEarthRootUrl + "Workers/image/mark.png", + { + disableDepthTestDistance: Infinity, + scale: 0.8, + }, + 0, + "宸℃鐐�" ); sgworld.Navigate.jumpTo({ //璺宠浆瑙嗚 destination: new Cesium.Cartesian3.fromDegrees( - lon, - lat, - height + lon, + lat, + height ), }); // sgworld.Navigate.jumpTo({ @@ -910,11 +1030,11 @@ } }, //浜岀淮/涓夌淮鍦板浘鍒囨崲 - changeMapType(){ + changeMapType() { // debugger this.show2DMap = !this.show2DMap; //浜岀淮 - if (this.show2DMap){ + if (this.show2DMap) { this.$bus.$emit("changemap", 2); } //涓夌淮 @@ -944,7 +1064,7 @@ height: 450x; z-index: 40; position: absolute; - right: 6%; + right: 8%; bottom: 1%; } .bufferBox { @@ -960,15 +1080,23 @@ height: 370px; z-index: 40; position: absolute; - right: 6%; + right: 8%; bottom: 1%; + } + .terrainLevelBox { + width: 350px; + height: 370px; + z-index: 40; + position: absolute; + right: 8%; + bottom: -11%; } .pathAnalysisBox { width: 412px; z-index: 40; position: absolute; - right: 6%; + right: 8%; bottom: 1%; } @@ -995,6 +1123,35 @@ bottom: 5%; position: absolute; z-index: 40; + } + .lengend { + width: 80px; + + z-index: 40; + position: absolute; + right: 8%; + bottom: 1%; + .lengendBox { + width: 100%; + height: 100%; + display: flex; + .lengendSpan { + flex-direction: column; + align-items: center; + justify-content: space-between; + } + .lengend_color { + background-image: linear-gradient( + #0055ff, + #2448da, + #483cb6, + #6d3091, + #91246d, + #b61848, + #da0c24 + ); + } + } } } } @@ -1094,7 +1251,7 @@ border-radius: 5px; } -.changeMapType{ +.changeMapType { position: absolute; bottom: 1%; left: calc(1% + 75px); @@ -1104,25 +1261,25 @@ display: flex; justify-content: center; align-items: center; - box-shadow: 3px 3px 6px #666; + // box-shadow: 3px 3px 6px #666; //border: 1px solid rgba(204, 204, 204, 0.76); border-radius: 5px; - background: #fff; + cursor: pointer; } -.mapTypeTwo{ +.mapTypeTwo { width: 100%; height: 100%; margin-left: 10px; - background-image: url("../assets/img/3dmap.png"); + background-image: url("../assets/img/synthesis/3D.png"); background-repeat: no-repeat; background-size: contain; } -.mapTypeThree{ +.mapTypeThree { width: 100%; height: 100%; margin-left: 10px; - background-image: url("../assets/img/2dmap.png"); + background-image: url("../assets/img/synthesis/2D 鎷疯礉 2.png"); background-repeat: no-repeat; background-size: contain; } -- Gitblit v1.9.3