Merge branch 'master' of http://103.85.165.99:8989/r/LFWEB_NEW
| | |
| | | @click="restSpacePopLayer" |
| | | >重置</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item v-if="spaceLayer == 'sexplorationpoint'"> |
| | | <el-button |
| | | size="small" |
| | | @click="spaceHistogram( )" |
| | | plain |
| | | >柱状图</el-button> |
| | | <!-- <el-button |
| | | plain |
| | | size="small" |
| | | >剖切图</el-button> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="centTable"> |
| | | <el-table |
| | |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | <!-- <el-table-column |
| | | label="柱状图" |
| | | width="100" |
| | | align="center" |
| | |
| | | @click="spaceHistogram(scope.$index, scope.row)" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | v-for="(item, index) in attributeData" |
| | | :key="index" |
| | |
| | | inquiry_selectFields, |
| | | inquiry_selectDomains, |
| | | decr, |
| | | encr, |
| | | } from "../../api/api.js" |
| | | import * as turf from "@turf/turf" |
| | | export default { |
| | | computed: { |
| | | storeTime() { |
| | |
| | | this.tableData = data.result |
| | | this.$refs.filterTable.doLayout() |
| | | }, |
| | | async spaceHistogram(index, row) { |
| | | if (this.$store.state.histogramLayer.length != 0) { |
| | | for (var i in this.$store.state.histogramLayer) { |
| | | Viewer.entities.remove(this.$store.state.histogramLayer[i]) |
| | | |
| | | async setCartesianToEightFour(entities) { |
| | | var east = Cesium.Math.toDegrees( |
| | | entities.rectangle.coordinates.getValue().east |
| | | ); |
| | | var north = Cesium.Math.toDegrees( |
| | | entities.rectangle.coordinates.getValue().north |
| | | ); |
| | | var west = Cesium.Math.toDegrees( |
| | | entities.rectangle.coordinates.getValue().west |
| | | ); |
| | | var south = Cesium.Math.toDegrees( |
| | | entities.rectangle.coordinates.getValue().south |
| | | ); |
| | | var line = turf.polygon([ |
| | | [ |
| | | [east, north], |
| | | [west, north], |
| | | [west, south], |
| | | [east, south], |
| | | [east, north], |
| | | ], |
| | | ]); |
| | | var wkt = this.$wkt.convert(line.geometry); |
| | | this.listdata.pageIndex = 1; |
| | | this.listdata.pageSize = 10; |
| | | this.listdata.wkt = encr(wkt) |
| | | |
| | | const data = await dataQuerySelectByPage(this.listdata) |
| | | if (data.code != 200) { |
| | | this.$message.error("列表调用失败") |
| | | } |
| | | this.listdata.count = data.count; |
| | | this.tableData = data.result; |
| | | this.$refs.filterTable.doLayout(); |
| | | this.showHistogramLayer(data.count) |
| | | var that = this; |
| | | |
| | | window.histogramHandler = new Cesium.ScreenSpaceEventHandler( |
| | | sgworld.Viewer.scene.canvas |
| | | ) |
| | | window.histogramHandler.setInputAction((event) => { |
| | | var pick = sgworld.Viewer.scene.pick(event.endPosition); |
| | | |
| | | var propertiesFlag = that.$store.state.propertiesFlag |
| | | |
| | | if (Cesium.defined(pick)) { |
| | | if (pick && pick.id && pick.id.tag && pick.id.tag == "Histogram") { |
| | | that.$store.state.propertiesInfo = { |
| | | title: pick.id.properties._exppointid._value, |
| | | name: pick.id.properties._geoname._value, |
| | | type: pick.id.properties.geotype._value, |
| | | botdepth: pick.id.properties._botdepth._value, |
| | | describe: pick.id.properties._describe._value, |
| | | } |
| | | that.$store.state.propertiesFlag = "2" |
| | | } else { |
| | | that.$store.state.propertiesFlag = propertiesFlag |
| | | } |
| | | } else { |
| | | that.$store.state.propertiesFlag = propertiesFlag |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) |
| | | }, |
| | | async showHistogramLayer(res) { |
| | | var obj = { |
| | | pageIndex: 1, |
| | | pageSize: res, |
| | | wkt: this.listdata.wkt, |
| | | name: this.listdata.name |
| | | } |
| | | if (window.histogramHandler != null && Cesium.defined(window.histogramHandler)) { |
| | | window.histogramHandler.removeInputAction( |
| | | Cesium.ScreenSpaceEventType.MOUSE_MOVE |
| | | ) |
| | | window.histogramHandler = null |
| | | const data = await dataQuerySelectByPage(obj) |
| | | if (data.code != 200) { |
| | | return |
| | | } |
| | | var val = data.result; |
| | | for (var i in val) { |
| | | this.setShowHistogramLayer(val[i]) |
| | | } |
| | | }, |
| | | async setShowHistogramLayer(res) { |
| | | var param = { |
| | | gid: row.gid, |
| | | gid: res.gid, |
| | | name: this.spaceLayer, |
| | | } |
| | | const data1 = await dataQuerySelectWktById(param) |
| | | if (data1.code != 200) { |
| | | this.$message.error("列表调用失败") |
| | | } |
| | | |
| | | var val1 = decr(data1.result) |
| | | var wkt = this.$wkt.parse(val1) |
| | | var coord = wkt.coordinates |
| | |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | name: 'sexplorationpointstratum', |
| | | filter: "exppointid = '" + row.exppointid + "'" |
| | | filter: "exppointid = '" + res.exppointid + "'" |
| | | } |
| | | var data = await dataQuerySelectByPage(obj) |
| | | if (data.code != 200) { |
| | | |
| | | } |
| | | |
| | | if (data.code != 200) { return } |
| | | if (data.result.length != 0) { |
| | | var val = data.result; |
| | | //冒泡排序 |
| | | for (var i = 0; i < val.length; i++) { |
| | | for (var u = i + 1; u < val.length; u++) { |
| | | |
| | | if (val[i].botdepth > val[u].botdepth) { |
| | | var num = val[i]; |
| | | val[i] = val[u]; |
| | |
| | | 'rgba(197,222,130,1)', |
| | | 'rgba(208,228,177,1)', |
| | | ] |
| | | var num = row.elev; |
| | | var num = res.elev; |
| | | var height = 0; |
| | | for (var i = 0; i < val.length; i++) { |
| | | var fill, line; |
| | | if (i > outlineList.length) { |
| | | if (i >= outlineList.length) { |
| | | var len = outlineList.length - 1; |
| | | fill = outlineList[len]; |
| | | line = outlineList[len]; |
| | |
| | | }); |
| | | num -= val[i].botdepth; |
| | | this.$store.state.histogramLayer.push(layer) |
| | | sgworld.Navigate.flyToObj(layer) |
| | | } |
| | | window.histogramHandler = new Cesium.ScreenSpaceEventHandler( |
| | | sgworld.Viewer.scene.canvas |
| | | ) |
| | | var that = this; |
| | | window.histogramHandler.setInputAction((event) => { |
| | | // var ellipsoid = sgworld.Viewer.scene.globe.ellipsoid; |
| | | // var cartesian = sgworld.Viewer.scene.camera.pickEllipsoid(event.endPosition, ellipsoid); |
| | | var pick = sgworld.Viewer.scene.pick(event.endPosition); |
| | | var selectedEntity = null; |
| | | |
| | | if (Cesium.defined(pick)) { |
| | | if (pick && pick.id && pick.id.tag && pick.id.tag == "Histogram") { |
| | | |
| | | that.$store.state.propertiesInfo = { |
| | | title: pick.id.properties._exppointid._value, |
| | | name: pick.id.properties._geoname._value, |
| | | type: pick.id.properties.geotype._value, |
| | | botdepth: pick.id.properties._botdepth._value, |
| | | describe: pick.id.properties._describe._value, |
| | | } |
| | | that.$store.state.propertiesFlag = "2" |
| | | } else { |
| | | that.$store.state.propertiesFlag = null |
| | | } |
| | | } else { |
| | | that.$store.state.propertiesFlag = null |
| | | } |
| | | |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) |
| | | |
| | | |
| | | } else { |
| | | var msg = row.exppointid + " 没勘探点地层表数据,无法生成柱状图" |
| | | this.$message.error(msg); |
| | | |
| | | |
| | | } |
| | | |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | spaceHistogram() { |
| | | this.restSpacePopLayer(); |
| | | if (this.$store.state.histogramLayer.length != 0) { |
| | | for (var i in this.$store.state.histogramLayer) { |
| | | Viewer.entities.remove(this.$store.state.histogramLayer[i]) |
| | | } |
| | | } |
| | | if (window.histogramHandler != null && Cesium.defined(window.histogramHandler)) { |
| | | window.histogramHandler.removeInputAction( |
| | | Cesium.ScreenSpaceEventType.MOUSE_MOVE |
| | | ) |
| | | window.histogramHandler = null |
| | | } |
| | | var that = this; |
| | | sgworld.Creator.createSimpleGraphic('rectangle', { showSize: false }, function (entity) { |
| | | sgworld.Creator.SimpleGraphic.remove(entity.id); |
| | | that.setCartesianToEightFour(entity) |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | // var param = { |
| | | // gid: row.gid, |
| | | // name: this.spaceLayer, |
| | | // } |
| | | // const data1 = await dataQuerySelectWktById(param) |
| | | // if (data1.code != 200) { |
| | | // this.$message.error("列表调用失败") |
| | | // } |
| | | |
| | | // var val1 = decr(data1.result) |
| | | // var wkt = this.$wkt.parse(val1) |
| | | // var coord = wkt.coordinates |
| | | // var obj = { |
| | | // pageIndex: 1, |
| | | // pageSize: 10, |
| | | // name: 'sexplorationpointstratum', |
| | | // filter: "exppointid = '" + row.exppointid + "'" |
| | | // } |
| | | // var data = await dataQuerySelectByPage(obj) |
| | | // if (data.code != 200) { |
| | | |
| | | // } |
| | | |
| | | // if (data.result.length != 0) { |
| | | // var val = data.result; |
| | | // //冒泡排序 |
| | | // for (var i = 0; i < val.length; i++) { |
| | | // for (var u = i + 1; u < val.length; u++) { |
| | | |
| | | // if (val[i].botdepth > val[u].botdepth) { |
| | | // var num = val[i]; |
| | | // val[i] = val[u]; |
| | | // val[u] = num; |
| | | // } |
| | | // } |
| | | // } |
| | | // var outlineList = [ |
| | | // 'rgba(141,135,114,1)', |
| | | // 'rgba(248,235,179,1)', |
| | | // 'rgba(185,183,151,1)', |
| | | // 'rgba(224,222,94,1)', |
| | | // 'rgba(250,190,153,1)', |
| | | // 'rgba(197,222,130,1)', |
| | | // 'rgba(208,228,177,1)', |
| | | // ] |
| | | // var num = row.elev; |
| | | // var height = 0; |
| | | // for (var i = 0; i < val.length; i++) { |
| | | // var fill, line; |
| | | // if (i > outlineList.length) { |
| | | // var len = outlineList.length - 1; |
| | | // fill = outlineList[len]; |
| | | // line = outlineList[len]; |
| | | // } else { |
| | | // fill = outlineList[i]; |
| | | // line = outlineList[i]; |
| | | // } |
| | | // var height = num - val[i].botdepth |
| | | // var layer = Viewer.entities.add({ |
| | | // position: Cesium.Cartesian3.fromDegrees(coord[0], coord[1]), |
| | | // tag: 'Histogram', |
| | | // properties: val[i], |
| | | // ellipse: { |
| | | // semiMinorAxis: 1.0, //短轴 |
| | | // semiMajorAxis: 1.0, //长轴 |
| | | // height: height, //拉伸高度 elev gwaterdep |
| | | // extrudedHeight: num, //离地高度 |
| | | // rotation: Cesium.Math.toRadians(0), //旋转 |
| | | // fill: true, //是否显示圆的填充 |
| | | // material: Cesium.Color.fromCssColorString(line), //圆的颜色, |
| | | // outline: false, //是否显示圆轮廓 |
| | | |
| | | // }, |
| | | // }); |
| | | // num -= val[i].botdepth; |
| | | // this.$store.state.histogramLayer.push(layer) |
| | | // sgworld.Navigate.flyToObj(layer) |
| | | // } |
| | | // window.histogramHandler = new Cesium.ScreenSpaceEventHandler( |
| | | // sgworld.Viewer.scene.canvas |
| | | // ) |
| | | // var that = this; |
| | | // window.histogramHandler.setInputAction((event) => { |
| | | // // var ellipsoid = sgworld.Viewer.scene.globe.ellipsoid; |
| | | // // var cartesian = sgworld.Viewer.scene.camera.pickEllipsoid(event.endPosition, ellipsoid); |
| | | // var pick = sgworld.Viewer.scene.pick(event.endPosition); |
| | | // var selectedEntity = null; |
| | | |
| | | // if (Cesium.defined(pick)) { |
| | | // if (pick && pick.id && pick.id.tag && pick.id.tag == "Histogram") { |
| | | |
| | | // that.$store.state.propertiesInfo = { |
| | | // title: pick.id.properties._exppointid._value, |
| | | // name: pick.id.properties._geoname._value, |
| | | // type: pick.id.properties.geotype._value, |
| | | // botdepth: pick.id.properties._botdepth._value, |
| | | // describe: pick.id.properties._describe._value, |
| | | // } |
| | | // that.$store.state.propertiesFlag = "2" |
| | | // } else { |
| | | // that.$store.state.propertiesFlag = null |
| | | // } |
| | | // } else { |
| | | // that.$store.state.propertiesFlag = null |
| | | // } |
| | | |
| | | // }, Cesium.ScreenSpaceEventType.MOUSE_MOVE) |
| | | |
| | | |
| | | // } else { |
| | | // var msg = row.exppointid + " 没勘探点地层表数据,无法生成柱状图" |
| | | // this.$message.error(msg); |
| | | // } |
| | | }, |
| | | async spaceLocation(index, row) { |
| | | var param = { |
| | |
| | | .then((response) => { |
| | | if (response.code != 200) { |
| | | this.loading = false; |
| | | Message({ |
| | | this.$message({ |
| | | message: response.msg, |
| | | type: "error", |
| | | duration: 5 * 1000, |
| | | }); |
| | | // Message({ |
| | | // message: response.msg, |
| | | // type: "error", |
| | | // duration: 5 * 1000, |
| | | // }); |
| | | return; |
| | | } |
| | | |
| | |
| | | sessionStorage.setItem("routerName", "/Thematic"); |
| | | sessionStorage.setItem("changeSelectStyle", 1); |
| | | this.$router.push("/"); |
| | | }else { |
| | | this.$message({ |
| | | message: "请您联系管理员分配角色菜单", |
| | | type: "error", |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | } else { |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!--坐标点位--> |
| | | <div |
| | | class="coordLocalBox" |
| | | v-if="showCoordLocalBoxDialog" |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!--地形平整--> |
| | | <div |
| | | class="terrainLevelBox" |
| | | v-if="showTerrainLevelDialog" |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!-- 路径分析弹窗--> |
| | | <div |
| | | class="pathAnalysisBox" |
| | | v-if="showPathAnalysisBoxDialog" |
| | |
| | | ></div> |
| | | </div> |
| | | </div> |
| | | <!-- 坡度分析弹窗--> |
| | | <div |
| | | class="lengend" |
| | | v-show="showLengendDialog" |
| | |
| | | this.$bus.$on('changemapType', (e) => { |
| | | this.show2DMap = e; |
| | | }); |
| | | this.$bus.$on('closeMenuPop', (e) => { |
| | | //非路径分析 |
| | | if (e != 'd3'){ |
| | | this.showPathAnalysisBoxDialog = false; |
| | | } |
| | | //非坡度分析 |
| | | if (e != 'd2'){ |
| | | this.showLengendDialog = false; |
| | | } |
| | | //非地形平整 |
| | | if (e != 'd10'){ |
| | | this.showTerrainLevelDialog = false; |
| | | } |
| | | }); |
| | | //模型捕捉 |
| | | this.catchmodel() |
| | | }, |
| | |
| | | } else { |
| | | this.showBufferBoxDialog = true; |
| | | } |
| | | } else if (res.name == "Coord") { |
| | | } |
| | | else if (res.name == "Coord") { |
| | | if (res.id == "1") { |
| | | this.showCoordLocalBoxDialog = true; |
| | | this.showToponymicLocalBoxDialog = false; |
| | |
| | | this.showCoordLocalBoxDialog = false; |
| | | this.getToponymicData(); |
| | | } |
| | | } else if (res.name == "Analysis") { |
| | | } |
| | | else if (res.name == "Analysis") { |
| | | if (res.id == "3") { |
| | | if (res.show == true) { |
| | | this.showPathAnalysisBoxDialog = true; |
| | |
| | | this.closeBufferBox(4); |
| | | } |
| | | } |
| | | } else if (res.name == "Trrain") { |
| | | } |
| | | else if (res.name == "Trrain") { |
| | | switch (res.id) { |
| | | case "d10": |
| | | this.showTerrainLevelDialog = !this.showTerrainLevelDialog; |
| | | this.clearTerrainLevel(); |
| | | break; |
| | | } |
| | | |
| | | } else if (res.name == "Lengend") { |
| | | } |
| | | else if (res.name == "Lengend") { |
| | | switch (res.id) { |
| | | case "d2": |
| | | |
| | | this.showLengendDialog = res.vshow; |
| | | |
| | | break; |
| | | } |
| | | |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | |
| | | break; |
| | | case 2: |
| | | this.showCoordLocalBoxDialog = false; |
| | | sgworld.Creator.DeleteObject(this.imagePoint); |
| | | break; |
| | | case 3: |
| | | this.showToponymicLocalBoxDialog = false; |
| | |
| | | Y: lat, |
| | | Altitude: 2000, |
| | | }; |
| | | if (this.imagePoint != null) { |
| | | sgworld.Creator.DeleteObject(this.imagePoint); |
| | | this.imagePoint = null; |
| | | } |
| | | this.imagePoint = sgworld.Creator.CreateLabel( |
| | | position, |
| | | "", |
| | |
| | | }, |
| | | async showMouseLeftClick(res) { |
| | | if (res == 3) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return false; |
| | | this.$refs.form.validate(async (valid) => { |
| | | if (valid) { |
| | | this.clearPathAll(5); |
| | | var start = this.pathFrom.lon.split(","); |
| | | var end = this.pathFrom.lat.split(","); |
| | | var startData = { |
| | | x1: parseFloat(start[0]), |
| | | y1: parseFloat(start[1]), |
| | | x2: parseFloat(end[0]), |
| | | y2: parseFloat(end[1]), |
| | | }; |
| | | const data = await comprehensive_selectRoute(startData); |
| | | if (data.code != 200) { |
| | | return this.$message.error("数据请求失败"); |
| | | } |
| | | if (!data.result) { |
| | | return this.$message.error("暂无数据"); |
| | | } |
| | | var wkt = this.$wkt.parse(data.result); |
| | | var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { |
| | | stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), |
| | | strokeWidth: 5, |
| | | clampToGround: true, |
| | | }); |
| | | bufferSource.then((bufferSource) => { |
| | | sgworld.Navigate.flyToObj(bufferSource); |
| | | Viewer.dataSources.add(bufferSource); |
| | | }); |
| | | } |
| | | }); |
| | | this.clearPathAll(3); |
| | | var start = this.pathFrom.lon.split(","); |
| | | var end = this.pathFrom.lat.split(","); |
| | | var startData = { |
| | | x1: parseFloat(start[0]), |
| | | y1: parseFloat(start[1]), |
| | | x2: parseFloat(end[0]), |
| | | y2: parseFloat(end[1]), |
| | | }; |
| | | |
| | | const data = await comprehensive_selectRoute(startData); |
| | | if (data.code != 200) { |
| | | return this.$message.error("数据请求失败"); |
| | | } |
| | | var wkt = this.$wkt.parse(data.result); |
| | | var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { |
| | | stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), |
| | | |
| | | strokeWidth: 5, |
| | | clampToGround: true, |
| | | }); |
| | | bufferSource.then((bufferSource) => { |
| | | sgworld.Navigate.flyToObj(bufferSource); |
| | | Viewer.dataSources.add(bufferSource); |
| | | }); |
| | | // this.clearPathAll(3); |
| | | // var start = this.pathFrom.lon.split(","); |
| | | // var end = this.pathFrom.lat.split(","); |
| | | // var startData = { |
| | | // x1: parseFloat(start[0]), |
| | | // y1: parseFloat(start[1]), |
| | | // x2: parseFloat(end[0]), |
| | | // y2: parseFloat(end[1]), |
| | | // }; |
| | | // |
| | | // const data = await comprehensive_selectRoute(startData); |
| | | // if (data.code != 200) { |
| | | // return this.$message.error("数据请求失败"); |
| | | // } |
| | | // if (!data.result) { |
| | | // return this.$message.error("暂无数据"); |
| | | // } |
| | | // var wkt = this.$wkt.parse(data.result); |
| | | // var bufferSource = Cesium.GeoJsonDataSource.load(wkt, { |
| | | // stroke: new Cesium.Color(82 / 255, 152 / 255, 255 / 255, 1), |
| | | // |
| | | // strokeWidth: 5, |
| | | // clampToGround: true, |
| | | // }); |
| | | // bufferSource.then((bufferSource) => { |
| | | // sgworld.Navigate.flyToObj(bufferSource); |
| | | // Viewer.dataSources.add(bufferSource); |
| | | // }); |
| | | // var jsonurl = |
| | | // wnsUrl + |
| | | // '?start=' + |
| | |
| | | sgworld.Creator.DeleteObject(this.linePath); |
| | | this.linePath = null; |
| | | } |
| | | case 5: |
| | | if (this.linePath != null) { |
| | | sgworld.Creator.DeleteObject(this.linePath); |
| | | this.linePath = null; |
| | | } |
| | | |
| | | Viewer.dataSources.removeAll(); |
| | | break; |
| | | } |
| | | }, |
| | |
| | | .mapBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | position: relative; |
| | | #mapdiv { |
| | | width: 100%; |
| | |
| | | padding: 10px 20px; |
| | | } |
| | | } |
| | | .pathAnalysisBox{ |
| | | width: 412px; |
| | | height: 370px; |
| | | z-index: 40; |
| | | position: absolute; |
| | | right: 8%; |
| | | bottom: 1%; |
| | | } |
| | | .attributionPop{ |
| | | width: 350px; |
| | | height: 370px; |
| | |
| | | padding: 10px 20px; |
| | | } |
| | | } |
| | | |
| | | .terrainLevelBox { |
| | | width: 350px; |
| | | height: 370px; |
| | |
| | | }, |
| | | activeName: "first", |
| | | isShowModel: false, |
| | | options: [{ |
| | | options: [ |
| | | { |
| | | value: '倾斜模型', |
| | | label: '倾斜模型' |
| | | }, { |
| | |
| | | }, { |
| | | value: '其他模型', |
| | | label: '其他模型' |
| | | }] |
| | | }], |
| | | modelClip:false, |
| | | clippingPlanes:null, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | setChangeTwoMenu(res) { |
| | | var val = res.id[0]; |
| | | if (window.model != null) { |
| | | window.model.deleteObject(); |
| | | window.model = null; |
| | | // window.model.deleteObject(); |
| | | // window.model = null; |
| | | } |
| | | sgworld.Analysis.clearCurtainContrast(); |
| | | if (this.isMenuFlag == "d") { |
| | |
| | | |
| | | setAnalsy(res) { |
| | | //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo"); |
| | | |
| | | this.$bus.$emit("closeMenuPop", res); |
| | | var that = this; |
| | | switch (res) { |
| | | case "d1": //等高线分析 |
| | | this.closePipelinePop(); |
| | | that.isolineFlag = !that.isolineFlag; |
| | | elevationTool.tf = that.isolineFlag; |
| | | elevationTool.render(); |
| | | break; |
| | | case "d2": //坡度分析 |
| | | this.closePipelinePop(); |
| | | that.isslopeFlag = !that.isslopeFlag; |
| | | var val = { |
| | | name: "Lengend", |
| | |
| | | |
| | | break; |
| | | case "d3": //路径分析 |
| | | this.closePipelinePop(); |
| | | this.isRouter = !this.isRouter; |
| | | let value; |
| | | if (this.isRouter) { |
| | |
| | | this.$bus.$emit("mapChangeBox", value); |
| | | break; |
| | | case "d4": //剖面分析 |
| | | this.closePipelinePop(); |
| | | if (window.AnalysisDXPM) { |
| | | window.AnalysisDXPM.end && window.AnalysisDXPM.end("cancel"); |
| | | this.clear(res); |
| | |
| | | } |
| | | break; |
| | | case "d5": //洪水淹没分析 |
| | | this.closePipelinePop(); |
| | | if (window.AnalysisFlood) { |
| | | this.clear(res); |
| | | } else { |
| | |
| | | } |
| | | break; |
| | | case "d6": //土方量分析 |
| | | this.closePipelinePop(); |
| | | if (window.TFvolumetricMeasurementTool) { |
| | | TFvolumetricMeasurementTool.cleanUp(); |
| | | if (TFvolumetricMeasurementTool._mouseHandler) { |
| | |
| | | } |
| | | break; |
| | | case "d7": //三维截面分析 |
| | | this.closePipelinePop(); |
| | | // if(window.MXModel) { |
| | | // Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK); |
| | | // window.MXModel=null; |
| | | // } else { |
| | | var that = this; |
| | | window.model = sgworld.Creator.create3DTilesets( |
| | | "", |
| | | modelUrl + "/tileset/m/SN/tileset.json", |
| | | {}, |
| | | {}, |
| | | "0", |
| | | true, |
| | | (data) => { |
| | | sgworld.Navigate.flyToObj(data); |
| | | that.setclippingModel(); |
| | | that.modelClip = !that.modelClip; |
| | | if (that.modelClip){ |
| | | if (window.model){ |
| | | that.modelClipping(); |
| | | } |
| | | ); |
| | | else { |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |
| | | url: modelUrl+ "/tileset/m/SN/tileset.json", |
| | | maximumScreenSpaceError: 64, // 最大屏幕空间错误:16 |
| | | maximumMemoryUsage: 768, // 最大内存:512 |
| | | dynamicScreenSpaceError: true, // 减少离相机较远的屏幕空间错误:false |
| | | skipLevelOfDetail: true, // 在遍历时候跳过详情:false |
| | | }) |
| | | ); |
| | | tileset.readyPromise.then((tileset) => { |
| | | tileset.id = res.cnName; |
| | | tileset.layerId = res.id; |
| | | Viewer.flyTo(tileset); |
| | | that.modelClipping(); |
| | | }); |
| | | window.model = tileset |
| | | } |
| | | } |
| | | else { |
| | | Viewer.entities.removeAll(); |
| | | } |
| | | // window.model = sgworld.Creator.create3DTilesets( |
| | | // "", |
| | | // modelUrl + "/tileset/m/SN/tileset.json", |
| | | // {}, |
| | | // {}, |
| | | // "0", |
| | | // true, |
| | | // (data) => { |
| | | // sgworld.Navigate.flyToObj(data); |
| | | // that.setclippingModel(); |
| | | // } |
| | | // ); |
| | | |
| | | break; |
| | | case "d9": //管道分析 |
| | |
| | | |
| | | break; |
| | | case "d8": //影像对比 |
| | | this.closePipelinePop(); |
| | | if (this.isContrastFlag == false) { |
| | | this.isContrastFlag = true; |
| | | sgworld.Analysis.createCurtainContrast(2, 1); |
| | |
| | | } |
| | | break; |
| | | case "d10": //地面整平 |
| | | this.closePipelinePop(); |
| | | var val = { |
| | | name: "Trrain", |
| | | id: res, |
| | |
| | | break; |
| | | |
| | | case "d11": //地形开挖 |
| | | this.closePipelinePop(); |
| | | // this.$refs && |
| | | // this.$refs.terrainDig && |
| | | // this.$refs.terrainDig.open("管道空间分析", null, { |
| | |
| | | break; |
| | | |
| | | case "d12": //通视分析 |
| | | this.closePipelinePop(); |
| | | if (window.TSExcavation != null) { |
| | | window.TSExcavation._SimpleGraphic.drawHandler && |
| | | window.TSExcavation._SimpleGraphic.drawHandler.destroy(); |
| | |
| | | } |
| | | break; |
| | | case "d13": //视域分析 |
| | | this.closePipelinePop(); |
| | | if (window.SYExcavatio) { |
| | | window.SYExcavatio.end && window.SYExcavatio.end(); |
| | | window.SYExcavatio.close(); |
| | |
| | | } |
| | | break; |
| | | case "d14": //圆形时域分析 |
| | | this.closePipelinePop(); |
| | | if (window.YXSYExcavation) { |
| | | window.YXSYExcavation.end && window.YXSYExcavation.end(); |
| | | window.YXSYExcavation.close(); |
| | |
| | | break; |
| | | } |
| | | }, |
| | | |
| | | //模型裁切 |
| | | modelClipping() { |
| | | const scene = Viewer.scene; |
| | | let targetY = 0.0; |
| | | let planeEntities = []; |
| | | let selectedPlane; |
| | | let clippingPlanes = new Cesium.ClippingPlaneCollection({ |
| | | planes: [ // ClippingPlane对象数组集合 |
| | | new Cesium.ClippingPlane( // 裁切面 |
| | | new Cesium.Cartesian3(0.0, 0.0, -1.0), // 法线方向 |
| | | 0// 原点到平面的最短距离,设置0就好 |
| | | ), |
| | | ], |
| | | enabled:true, |
| | | edgeWidth: 1.0, // 模型被裁切部分的截面线宽 |
| | | }); |
| | | let boundingSphere = window.model.boundingSphere; |
| | | // 创建添加裁剪平面 |
| | | for (let i = 0; i < clippingPlanes.length; ++i) { |
| | | const plane = clippingPlanes.get(i); |
| | | const planeEntity = Viewer.entities.add({ |
| | | position: boundingSphere.center, |
| | | plane: { |
| | | dimensions: new Cesium.Cartesian2( |
| | | boundingSphere.radius * 1.5, |
| | | boundingSphere.radius * 1.5 |
| | | ), |
| | | material: Cesium.Color.WHITE.withAlpha(0.1), |
| | | plane: new Cesium.CallbackProperty( |
| | | // 添加绑定事件,不断调用 |
| | | createPlaneUpdateFunction(plane), |
| | | false |
| | | ), |
| | | outline: true, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | }, |
| | | }); |
| | | planeEntities.push(planeEntity); |
| | | } |
| | | this.clippingPlanes = clippingPlanes; |
| | | window.model.clippingPlanes = clippingPlanes; |
| | | |
| | | // Select plane when mouse down |
| | | // 绑定上移动事件 |
| | | const downHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | downHandler.setInputAction(function (movement) { |
| | | const pickedObject = scene.pick(movement.position); |
| | | if ( |
| | | Cesium.defined(pickedObject) && |
| | | Cesium.defined(pickedObject.id.plane) |
| | | ) { |
| | | selectedPlane = pickedObject.id.plane; |
| | | selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.05); |
| | | selectedPlane.outlineColor = Cesium.Color.WHITE; |
| | | scene.screenSpaceCameraController.enableInputs = false; |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.LEFT_DOWN); |
| | | |
| | | // Release plane on mouse up |
| | | // 绑定下移动事件 |
| | | const upHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | upHandler.setInputAction(function () { |
| | | if (Cesium.defined(selectedPlane)) { |
| | | selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.1); |
| | | selectedPlane.outlineColor = Cesium.Color.WHITE; |
| | | selectedPlane = undefined; |
| | | } |
| | | scene.screenSpaceCameraController.enableInputs = true; |
| | | }, Cesium.ScreenSpaceEventType.LEFT_UP); |
| | | // Update plane on mouse move |
| | | const moveHandler = new Cesium.ScreenSpaceEventHandler( |
| | | Viewer.scene.canvas |
| | | ); |
| | | moveHandler.setInputAction(function (movement) { |
| | | if (Cesium.defined(selectedPlane)) { |
| | | const deltaY = movement.startPosition.y - movement.endPosition.y; |
| | | targetY += deltaY; |
| | | } |
| | | }, Cesium.ScreenSpaceEventType.MOUSE_MOVE); |
| | | function createPlaneUpdateFunction(plane) { |
| | | return function () { |
| | | plane.distance = targetY; |
| | | return plane; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | //关闭管道信息弹窗 |
| | | closePipelinePop(){ |
| | | this.$refs && |
| | | this.$refs.queryinfo && |
| | | this.$refs.queryinfo.close("queryinfo"); |
| | | }, |
| | | setclippingModel() { |
| | | if (window.model) { |
| | | setTimeout(() => { |
| | |
| | | <div |
| | | class="edit" |
| | | @click="showLayerAttribute()" |
| | | v-if="!showlocal" |
| | | v-if="!showlocal && !shwoHistogram" |
| | | v-show="!firstLevel" |
| | | > |
| | | <i class="el-icon-tickets"></i> 属性 |
| | |
| | | <div |
| | | class="edit" |
| | | @click="positioning()" |
| | | v-show="showlocal" |
| | | v-if="showlocal" |
| | | > |
| | | <i class="el-icon-tickets"></i> 定位 |
| | | </div> |
| | |
| | | > |
| | | <i class="el-icon-tickets"></i> 钻孔柱状图 |
| | | </div> |
| | | <div |
| | | <!-- <div |
| | | class="edit" |
| | | v-show="showModelAttach" |
| | | @click="modelAttach()" |
| | | > |
| | | <i class="el-icon-tickets"></i> 模型属性 |
| | | </div> |
| | | </div> --> |
| | | <!-- <div |
| | | class="edit" |
| | | @click="menuMoveF( 'up')" |
| | |
| | | console.log("tree drop: ", dropNode.label, dropType); |
| | | }, |
| | | handleCheckChange(data, checked, indeterminate) { |
| | | |
| | | if (data.type != 2) return; |
| | | var std = []; |
| | | if (data.serveType == "WMS") { |
| | | var layers_ol = window.map.getAllLayers(); |
| | | for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) { |
| | | var val_id = |
| | | window.Viewer.imageryLayers._layers[i].imageryProvider.name; |
| | |
| | | |
| | | const img_layer = window.Viewer.imageryLayers._layers[i]; |
| | | img_layer.show = checked; |
| | | } |
| | | } |
| | | |
| | | for (var i in layers_ol) { |
| | | var layerOl = layers_ol[i]; |
| | | if (layerOl.values_.name == data.cnName) { |
| | | layerOl.setVisible(checked); //显示图层 |
| | | } |
| | | } |
| | | } else if (data.serveType == "WFS") { |
| | |
| | | for (var i in Viewer.scene.primitives._primitives) { |
| | | Viewer.scene.primitives._primitives[i].show = checked; |
| | | if (Viewer.scene.primitives._primitives[i].id == data.cnName) { |
| | | std.push(res.id); |
| | | // std.push(res.id); |
| | | Viewer.flyTo(Viewer.scene.primitives._primitives[i]); |
| | | } |
| | | } |
| | |
| | | } |
| | | if (std.length == 0 && checked == true) { |
| | | this.setAddLayers(data); |
| | | } else { |
| | | window.map.getLayers().getArray().forEach(item => { |
| | | if (item.get("name") == data.cnName) { |
| | | item.setVisible(checked); |
| | | debugger |
| | | } |
| | | }); |
| | | } |
| | | var layers_ol = window.map.getAllLayers(); |
| | | for (var i in layers_ol) { |
| | | var layerOl = layers_ol[i]; |
| | | if (layerOl.values_.name == data.label) { |
| | | layerOl.setVisible(checked); //显示图层 |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | // var layers_ol = window.map.getAllLayers(); |
| | | // for (var i in layers_ol) { |
| | | // var layerOl = layers_ol[i]; |
| | | // if (layerOl.values_.name == data.label) { |
| | | // layerOl.setVisible(checked); //显示图层 |
| | | // } |
| | | // } |
| | | }, |
| | | setAddLayers(res) { |
| | | if (res.serveType == "WMS") { |
| | |
| | | }); |
| | | window.map.addLayer(vectorLayer); |
| | | } else if (res.serveType == "Tileset") { |
| | | |
| | | var tileset = Viewer.scene.primitives.add( |
| | | new Cesium.Cesium3DTileset({ |
| | | name: res.cnName, |
| | |
| | | skipLevelOfDetail: true, // 在遍历时候跳过详情:false |
| | | }) |
| | | ); |
| | | |
| | | tileset.readyPromise.then((tileset) => { |
| | | tileset.id = res.cnName; |
| | | tileset.layerId = res.id; |
| | | this.tileSet(tileset, parseFloat(res.elev)) |
| | | Viewer.flyTo(tileset); |
| | | }); |
| | | window.model = tileset |
| | | } |
| | | }, |
| | | |
| | |
| | | " |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | |
| | | :title="$t('common.changepassWord')" |
| | | :visible.sync="resetPwd" |
| | | :before-close="handleClose" |
| | | |
| | | :close-on-click-modal="false" |
| | | > |
| | | |
| | | <el-form |
| | |
| | | |
| | | this.getUserInfo(); |
| | | } |
| | | else { |
| | | this.$message({ |
| | | message: res.msg, |
| | | type: "error", |
| | | }); |
| | | } |
| | | }, 500); |
| | | }) |
| | | .catch((res) => { |