d3b8532c by 焦小希
2 parents 4d5d3f41 386e0a84
This file is too large to display.
......@@ -11,6 +11,7 @@
"core-js": "^3.6.5",
"echarts": "^4.8.0",
"element-ui": "^2.13.2",
"esri-loader": "^2.15.0",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
......
......@@ -18,7 +18,6 @@
<!-- <script src="./js/bootstrap.min.js"></script> -->
<script src="./js/spectrum.js"></script>
<script type="text/javascript" src="./js/supermap/SuperMap.Include.js"></script>
<script type="text/javascript" src="./js/require.min.js" data-main="js/main"></script>
</head>
<body>
<noscript>
......@@ -34,8 +33,8 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="https://cesium.com/downloads/cesiumjs/releases/1.71/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.71/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<!-- <script src="https://cesium.com/downloads/cesiumjs/releases/1.71/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.71/Build/Cesium/Widgets/widgets.css" rel="stylesheet"> -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
</head>
......
......@@ -19,10 +19,7 @@
padding: 0px;
list-style: none;
}
.cesium-viewer-toolbar, .cesium-viewer-animationContainer, .cesium-viewer-bottom, .cesium-viewer-fullscreenContainer {
display: none !important;
}
</style>
......
......@@ -10,7 +10,7 @@ export default class createDraw {
}
distance() {
this.handlerDis.measureEvt.addEventListener(result => {
var dis = Number(result.distance), distance = dis > 1000 ? (dis / 1000).toFixed(2) + 'km' : dis.toFixed(2) + 'm';
var dis = Number(result.distance), distance = dis > 1000 ? (dis / 1000).toFixed(2) + 'km' : dis.toFixed(2) + 'm';
this.handlerDis.disLabel.text = '距离:' + distance;
});
this.handlerDis.activeEvt.addEventListener(this.handle());
......
import objectManage from './maputils';
export default class flood {
constructor(viewer) {
constructor() {
this.positions2d = [];
this.handlerPolygon = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Polygon);
this.handlerPolygon = new Cesium.DrawHandler(objectManage.viewer, Cesium.DrawMode.Polygon);
this.handlerPolygon.drawEvt.addEventListener(polygon => {
var array = [].concat(polygon.object.positions), positions = [];
var array = [].concat(polygon.object.positions);
for(var i = 0, len = array.length; i < len; i++){
var cartographic = Cesium.Cartographic.fromCartesian(array[i]);
var longitude = Cesium.Math.toDegrees(cartographic.longitude);
var latitude = Cesium.Math.toDegrees(cartographic.latitude);
var h=cartographic.height;
if(positions.indexOf(longitude)===-1&&positions.indexOf(latitude)===-1){
positions.push(longitude);
positions.push(latitude);
positions.push(h);
this.positions2d.push(longitude);
this.positions2d.push(latitude);
this.positions2d.push(1000.0);
}
}
return positions;
this.positions2d.push(longitude);
this.positions2d.push(latitude);
this.positions2d.push(cartographic.height);
}
});
}
initHyp() {
......@@ -70,11 +64,19 @@ export default class flood {
}
});
}
floodParse(scene, positions2d, waterHeight, targetHeight) {
var River1 = new Cesium.Primitive({
floodParse(waterHeight, targetHeight) {
!this.positions2d.length && (this.positions2d = [
116.44391163897568, 39.922128887755996, 10,
116.47222524452756, 39.921663337343915, 10,
116.47147655687662, 39.903608069115315, 10,
116.44520545789665, 39.902556426686864, 10,
116.44515353439972, 39.90683243165845, 10,
116.4437677267605, 39.9069642145195, 10
]);
this.river = new Cesium.Primitive({
geometryInstances : new Cesium.GeometryInstance({
geometry :new Cesium.PolygonGeometry({
polygonHierarchy : new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(positions2d)),
polygonHierarchy : new Cesium.PolygonHierarchy(Cesium.Cartesian3.fromDegreesArrayHeights(this.positions2d)),
extrudedHeight: targetHeight,
height: waterHeight,
vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT
......@@ -96,6 +98,10 @@ export default class flood {
}),
show : true
});
scene.primitives.add(River1);
objectManage.viewer.scene.primitives.add(this.river);
}
remove() {
this.positions2d = [];
objectManage.viewer.scene.primitives.remove(this.river);
}
}
\ No newline at end of file
......
import objectManage from './maputils';
export default class heightControl {
constructor(opt) {
this.handlerPolygon = new Cesium.DrawHandler(objectManage.viewer, Cesium.DrawMode.Polygon);
this.building = objectManage.viewer.scene.layers.find("build1");
this.building1 = objectManage.viewer.scene.layers.find("build2");
this.arr = [];
var i = 0;
while(i < 2000) this.arr.push(i++);
this.handlerPolygon.drawEvt.addEventListener(result => {
var array = [].concat(result.object.positions), positions = [];
var polygon = result.object;
if(!polygon) return;
polygon.show = false;
this.handlerPolygon.polyline.show = false;
for(var i = 0, len = array.length; i < len; i++){
var cartographic = Cesium.Cartographic.fromCartesian(array[i]);
var longitude = Cesium.Math.toDegrees(cartographic.longitude);
var latitude = Cesium.Math.toDegrees(cartographic.latitude);
if(positions.indexOf(longitude)===-1&&positions.indexOf(latitude)===-1){
positions.push(longitude);
positions.push(latitude);
}
}
this.addPolygon(Object.assign(opt, {p: positions}));
this.splice(opt.h);
});
}
addPolygon(opt) {
this.polygon = objectManage.viewer.entities.add({
id: 'polygonA',
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(opt.p),
height: opt.h,
material: new Cesium.Color(1, 1, 0.20, 0.5),
outline: true,
outlineColor: Cesium.Color.RED
}
}).polygon;
}
splice(h) {
this.building.clipLineColor = Cesium.Color.WHITE.withAlpha(0.0);
this.building1.setObjsColor(this.arr, Cesium.Color.DARKORANGE.withAlpha(0.5));
this.building.setCustomClipBox({
dimensions: new Cesium.Cartesian3(5000, 5000, h * 2),
position: Cesium.Cartesian3.fromDegrees(116.44391163897568, 39.922128887755996, h / h - 1),
clipMode: "clip_behind_any_plane"
});
this.building1.setCustomClipBox({
dimensions: new Cesium.Cartesian3(5000, 5000, h * 2),
position: Cesium.Cartesian3.fromDegrees(116.44391163897568, 39.922128887755996, h / h - 1),
clipMode: "clip_behind_all_plane"
});
}
remove() {
objectManage.viewer.entities.removeAll();
}
}
\ No newline at end of file
import objectManage from './maputils';
export default class shadow {
constructor() {
this.points = [];
this.shadowQuery = new Cesium.ShadowQueryPoints(objectManage.viewer.scene);
this.shadowQuery.build();
this.setCurrentTime();
this.init();
}
setCurrentTime() {
objectManage.viewer.clock.currentTime = Cesium.JulianDate.fromDate(new Date());
let d = new Date();
d.setHours(20)
objectManage.viewer.clock.currentTime = Cesium.JulianDate.fromDate(d);
objectManage.viewer.clock.multiplier = 1;
objectManage.viewer.clock.shouldAnimate = true;
}
init() {
this.handlerPolygon = new Cesium.DrawHandler(objectManage.viewer, Cesium.DrawMode.Polygon, 0);
this.tooltip = this.createTooltip(document.body);
this.points = [];
this.handlerPolygon = new Cesium.DrawHandler(objectManage.viewer, Cesium.DrawMode.Polygon, 0);
this.handlerPolygon.activeEvt.addEventListener(a => {
let body = $('body').removeClass('measureCur');
a && body.addClass('measureCur');
......
import objectManage from './maputils';
export default class viewpoint {
constructor(viewer) {
this.viewer = viewer;
this.sightline = new Cesium.Sightline(viewer.scene);
constructor() {
this.sightline = new Cesium.Sightline(objectManage.viewer.scene);
this.sightline.couldRemove = false;
this.sightline.build();
this.handlerPoint = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Point);
this.handlerPoint = new Cesium.DrawHandler(objectManage.viewer, Cesium.DrawMode.Point);
this.handlerPoint.drawEvt.addEventListener(result => {
var point = result.object;
point.show = false;
......@@ -14,9 +14,9 @@ export default class viewpoint {
var longitude = Cesium.Math.toDegrees(cartographic.longitude);
var latitude = Cesium.Math.toDegrees(cartographic.latitude);
var height = cartographic.height;
if(viewer.scene.viewFlag) {
if(objectManage.viewer.scene.viewFlag) {
this.sightline.viewPosition = [longitude, latitude, height];
viewer.scene.viewFlag = false;
objectManage.viewer.scene.viewFlag = false;
this.addPoint();
}else {
this.sightline.addTargetPoint({
......@@ -29,13 +29,19 @@ export default class viewpoint {
}
chooseView() {
if(this.handlerPoint.active) return;
this.viewer.scene.viewFlag = true;
this.viewer.entities.removeAll();
objectManage.viewer.scene.viewFlag = true;
objectManage.viewer.entities.removeAll();
this.sightline.removeAllTargetPoint();
this.handlerPoint.activate();
}
addPoint() {
this.viewer.scene.viewFlag = false;
objectManage.viewer.scene.viewFlag = false;
this.handlerPoint.activate();
}
remove() {
this.sightline.destroy();
this.sightline = new Cesium.Sightline(objectManage.viewer.scene);
this.sightline.couldRemove = false;
this.sightline.build();
}
}
\ No newline at end of file
......
import objectManage from './maputils';
export default class visual {
constructor(viewer) {
this.viewer = viewer;
viewer.scene.viewFlag = true;
this.pointHandler = new Cesium.DrawHandler(viewer, Cesium.DrawMode.Point);
this.viewshed3D = new Cesium.ViewShed3D(viewer.scene);
constructor() {
objectManage.viewer.scene.viewFlag = true;
this.pointHandler = new Cesium.DrawHandler(objectManage.viewer, Cesium.DrawMode.Point);
this.viewshed3D = new Cesium.ViewShed3D(objectManage.viewer.scene);
this.viewPosition;
this.viewModel = {
direction: 1.0,
......@@ -15,7 +15,7 @@ export default class visual {
invisibleAreaColor: '#ffffffff'
};
Cesium.knockout.track(this.viewModel);
this.init(viewer.scene);
this.init(objectManage.viewer.scene);
}
init(scene) {
this.handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
......@@ -49,29 +49,33 @@ export default class visual {
this.pointHandler.drawEvt.addEventListener(result => {
var point = result.object;
var position = point.position;
viewPosition = position;
this.viewPosition = position;
// 将获取的点的位置转化成经纬度
var cartographic = Cesium.Cartographic.fromCartesian(position);
var longitude = Cesium.Math.toDegrees(cartographic.longitude);
var latitude = Cesium.Math.toDegrees(cartographic.latitude);
var height = cartographic.height + 1.8;
point.position = Cesium.Cartesian3.fromDegrees(longitude, latitude, height);
if (this.viewer.scene.viewFlag) {
if (objectManage.viewer.scene.viewFlag) {
// 设置视口位置
this.viewshed3D.viewPosition = [longitude, latitude, height];
this.viewshed3D.build();
// 将标记置为false以激活鼠标移动回调里面的设置可视域操作
this.viewer.scene.viewFlag = false;
objectManage.viewer.scene.viewFlag = false;
}
});
}
chooseView() {
if (this.pointHandler.active) return;
//先清除之前的可视域分析
this.viewer.entities.removeAll();
objectManage.viewer.entities.removeAll();
this.viewshed3D.distance = 0.1;
this.viewer.scene.viewFlag = true;
objectManage.viewer.scene.viewFlag = true;
//激活绘制点类
this.pointHandler.activate();
}
remove() {
this.viewshed3D.destroy();
this.viewshed3D = new Cesium.ViewShed3D(objectManage.viewer.scene);
}
}
\ No newline at end of file
......
// 建设项目信息表 弹窗
<template>
<div class="container">
<div class="wrapper">
<div class="box">
</div>
</div>
<div class="mian">
<div class="title-bt">
<span>建设项目信息表</span>
<span @click="closePop" class="close">×</span>
</div>
<div class="main-box">
<div class="basic-msg">
<div class="title-basic">
<div class="vertical-line"></div>
<span>基本信息</span>
</div>
</div>
<div class="project-detail">
<div class="project">
<span class="title-name title-line-1">*项目编号</span>
<el-input v-model="col1" placeholder="请输入项目编号" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-2">*规划类型</span>
<el-input v-model="col2" placeholder="请输入规划类型" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-3">*规划级别</span>
<el-input v-model="col3" placeholder="请输入规划级别" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-4">*行政辖区</span>
<el-input v-model="col4" placeholder="请输入行政辖区" class="input-one"></el-input>
</div>
</div>
<div class="project-detail">
<div class="project">
<span class="title-name title-line-1">*规划名称</span>
<el-input v-model="col5" placeholder="请输入规划名称" class="input-two"></el-input>
</div>
<div class="project">
<span class="title-name title-line-3">*规划范围</span>
<el-input v-model="col6" placeholder="请输入规划类型" class="input-two"></el-input>
</div>
</div>
<div class="project-detail">
<div class="project">
<span class="title-name title-line-1">*规划基准年</span>
<el-input v-model="col7" placeholder="请输入规划基准年" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-2">*规划期限(年)</span>
<el-input v-model="col8" placeholder="请输入规划期限(年)" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-3">*近期(年)</span>
<el-input v-model="col9" placeholder="请输入近期(年)" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-4">*远期(年)</span>
<el-input v-model="col10" placeholder="请输入远期(年)" class="input-one"></el-input>
</div>
</div>
<div class="project-detail">
<div class="project">
<span class="title-name title-line-1">*总面积(平方公里)</span>
<el-input v-model="col8" placeholder="请输入总面积(平方公里)" class="input-one"></el-input>
</div>
<div class="project">
<span class="title-name title-line-2">*规划基准年</span>
<el-input v-model="col9" placeholder="请输入规划基准年" class="input-one"></el-input>
</div>
<div class="project" style="visibility:hidden;">
<span class="title-name title-line-3">*远期(年)</span>
<el-input v-model="col10" placeholder="请输入远期(年)" class="input-one"></el-input>
</div>
<div class="project" style="visibility:hidden;">
<span class="title-name title-line-4">*远期(年)</span>
<el-input v-model="col10" placeholder="请输入远期(年)" class="input-one"></el-input>
</div>
</div>
<div class="basic-msg">
<div class="title-basic">
<div class="vertical-line"></div>
<span>设计方案查询</span>
<el-upload class="upload-demo" action="" :accept='accept' :show-file-list='false'
:before-upload="importantPrograme">
<div class="import-programme">
<img src="../assets/一张图/导入.png" alt=""
style="width: 18px; height: 19px; margin-right: 12px;">
<span>导入方案</span>
</div>
</el-upload>
</div>
</div>
<div style="display: flex;">
<div v-if='isimportan1' style="width: 49%; padding-bottom: 36px;">
<div class="box-programe">
<span class="de-programe">*设计方案一</span>
<div style="margin-left: 12px; cursor: pointer;">
<el-tooltip class="item" effect="dark" content="科技路.doc" placement="top">
<img src="../assets/一张图/doc@2x.png" alt=""
style="width: 19px; height: 26px; margin-right: 12px;"> </el-tooltip>
<el-tooltip class="item" effect="dark" content="科技路.xls" placement="top">
<img src="../assets/一张图/xls@2x.png" alt=""
style="width: 19px; height: 26px; margin-right: 12px;">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="科技路.max" placement="top">
<img src="../assets/一张图/max@2x.png" alt=""
style="width: 19px; height: 26px; margin-right: 12px;">
</el-tooltip>
</div>
</div>
<div class="table-programe">
<div class="table-box">
<span class="fixed-width">项目编号</span>
<span class="fixed-width-2">/</span>
</div>
<div class="table-box">
<span class="fixed-width">项目名称</span>
<span class="fixed-width-2">/</span>
</div>
<div class="table-box">
<span class="fixed-width">项目地址</span>
<span class="fixed-width-2">科技四路以北、科技三路以北、经八路以东、绿带以东</span>
</div>
<div class="table-box">
<span class="fixed-width">用地性质</span>
<span class="fixed-width-2">二类居住用地</span>
</div>
<div class="table-box">
<span class="fixed-width">净用地面积</span>
<span class="fixed-width-2">2.36</span>
</div>
<div class="table-box">
<span class="fixed-width">容积率</span>
<span class="fixed-width-2">≤3.8</span>
</div>
<div class="table-box">
<span class="fixed-width">绿地率</span>
<span class="fixed-width-2">≥23</span>
</div>
<div class="table-box">
<span class="fixed-width">建筑密度</span>
<span class="fixed-width-2">≤21</span>
</div>
<div class="table-box">
<span class="fixed-width">建筑高度</span>
<span class="fixed-width-2">≤110</span>
</div>
</div>
</div>
<div v-if='isimportan2' style="width: 49%; padding-bottom: 36px;">
<div class="box-programe">
<span class="de-programe">*设计方案二</span>
<div style="margin-left: 12px; cursor: pointer;">
<el-tooltip class="item" effect="dark" content="科技路.doc" placement="top">
<img src="../assets/一张图/doc@2x.png" alt=""
style="width: 19px; height: 26px; margin-right: 12px;"> </el-tooltip>
<el-tooltip class="item" effect="dark" content="科技路.xls" placement="top">
<img src="../assets/一张图/xls@2x.png" alt=""
style="width: 19px; height: 26px; margin-right: 12px;">
</el-tooltip>
<el-tooltip class="item" effect="dark" content="科技路.max" placement="top">
<img src="../assets/一张图/max@2x.png" alt=""
style="width: 19px; height: 26px; margin-right: 12px;">
</el-tooltip>
</div>
</div>
<div class="table-programe">
<div class="table-box">
<span class="fixed-width">项目编号</span>
<span class="fixed-width-2">/</span>
</div>
<div class="table-box">
<span class="fixed-width">项目名称</span>
<span class="fixed-width-2">/</span>
</div>
<div class="table-box">
<span class="fixed-width">项目地址</span>
<span class="fixed-width-2">科技四路以南、科技五路以北、经十二路以东、皂河绿带以西</span>
</div>
<div class="table-box">
<span class="fixed-width">用地性质</span>
<span class="fixed-width-2">二类居住用地</span>
</div>
<div class="table-box">
<span class="fixed-width">净用地面积</span>
<span class="fixed-width-2">5.56</span>
</div>
<div class="table-box">
<span class="fixed-width">容积率</span>
<span class="fixed-width-2">≤2.8</span>
</div>
<div class="table-box">
<span class="fixed-width">绿地率</span>
<span class="fixed-width-2">≥35</span>
</div>
<div class="table-box">
<span class="fixed-width">建筑密度</span>
<span class="fixed-width-2">≤25</span>
</div>
<div class="table-box">
<span class="fixed-width">建筑高度</span>
<span class="fixed-width-2">≤120</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'kgAnalusis',
components: {},
data() {
return {
col1: '',
col2: '',
col3: '',
col4: '',
col5: '',
col6: '',
col7: '',
col8: '',
col9: '',
col10: '',
col11: '',
col12: '',
isimportan1: false,
isimportan2: false,
accept: '.zip',
}
},
mounted() {},
methods: {
closePop() {
this.$emit('closeAddProjectMsg')
},
EheightChange() {
},
importantPrograme(e) {
debugger
if (!this.isimportan1) {
this.isimportan1 = true;
} else {
this.isimportan2 = true;
}
}
}
}
</script>
<style scoped>
.container {
position: relative;
color: #fff;
font-size: 16px;
width: 1350px;
/* height: 750px; */
}
.wrapper {
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
border: 1px solid rgba(151, 151, 151, 0.73);
}
.box {
background: rgba(4, 10, 10, 0.73);
box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.5);
/* filter: blur(10px); */
height: 100px;
position: absolute;
width: 100%;
height: 100%;
z-index: 1;
}
.mian {
position: relative;
width: 100%;
height: 100%;
z-index: 1000;
/* overflow-x: hidden; */
}
.main-box {
max-height: 730px;
overflow-y: auto;
}
.title-bt {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
padding: 18px 24px;
font-size: 20px;
}
.func-input {
display: flex;
align-items: center;
/* justify-content: space-between; */
padding: 18px 24px 0px 24px;
font-size: 18px;
cursor: pointer;
}
.func {
padding: 18px 24px;
}
.func-btn {
display: flex;
padding: 18px 24px 30px 24px;
align-items: center;
font-size: 18px;
cursor: pointer;
}
.title-basic {
display: flex;
align-items: center;
padding: 20px 31px;
font-size: 18px;
}
.vertical-line {
width: 4px;
height: 15px;
background: rgba(255, 255, 255, 1);
margin-right: 6px;
}
.input-one {
width: 180px;
height: 38px;
margin-left: 12px;
}
.input-two {
width: 508px;
height: 38px;
margin-left: 12px;
}
.project-detail {
display: flex;
justify-content: space-around;
}
.project {
margin-bottom: 24px;
}
.title-line-1 {
display: inline-block;
width: 140px;
text-align: right;
}
.title-line-2 {
display: inline-block;
width: 100px;
text-align: right;
}
.title-line-3 {
display: inline-block;
width: 100px;
text-align: right;
}
.title-line-4 {
display: inline-block;
width: 100px;
text-align: right;
}
.import-programme {
display: flex;
align-items: center;
cursor: pointer;
padding: 10px 38px;
border: 1px solid rgba(151, 151, 151, 0.58);
margin-left: 20px;
background: rgba(4, 10, 10, 0.58);
box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.5);
font-size: 18px;
}
.de-programe {
display: inline-block;
width: 156px;
font-size: 18px;
text-align: right;
}
.box-programe {
display: flex;
align-items: center;
}
.table-box {
padding: 10px 10px;
display: flex;
border: 1px solid #6D7278;
}
.fixed-width {
display: inline-block;
width: 100px;
text-align: right;
}
.fixed-width-2 {
display: inline-block;
width: 322px;
text-align: left;
margin-left: 52px;
}
.table-programe {
margin-left: 165px;
margin-top: 17px;
border: 1px solid rgba(151, 151, 151, 0.58);
font-size: 18px;
}
.close {
cursor: pointer;
}
>>>input::-webkit-input-placeholder {
font-size: 16px;
color: rgba(255, 255, 255, 0.78) !important;
}
>>>.el-input__inner {
background: rgba(4, 10, 10, 0.58) !important;
border: 1px solid rgba(242, 242, 242, 0.4);
color: #fff;
}
>>>.el-input__suffix {
color: #fff;
font-size: 17px;
}
>>>.el-input-number__increase,
>>>.el-input-number__decrease {
background: rgba(4, 10, 10, 0.58);
}
>>>.el-input-number.is-controls-right .el-input-number__decrease,
>>>.el-input-number__increase {
border-left: 1px solid rgba(4, 10, 10, 0.58);
}
>>>.el-icon-arrow-up:before,
>>>.el-icon-arrow-down:before {
color: #fff;
}
>>>.el-input-number.is-controls-right .el-input-number__increase {
border-bottom: 1px solid rgba(4, 10, 10, 0.58);
}
>>>.el-table th.is-leaf,
>>>.el-table {
background-color: transparent !important;
color: #fff;
}
>>>.el-table tr {
background-color: transparent !important;
}
>>>.el-slider__button {
background-color: #2FA5FF;
border: 2px solid #FFFFFF;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.20);
}
>>>.el-table__row td {
background: transparent !important;
}
</style>
\ No newline at end of file
......@@ -35,6 +35,7 @@
</template>
<script>
import viewpoint from "../assets/js/map/viewpoint";
export default {
name: 'allSee',
components: {},
......@@ -45,7 +46,9 @@
// isAnalysis: true
}
},
mounted() {},
mounted() {
this.viewpoint instanceof viewpoint || (this.viewpoint = new viewpoint());
},
methods: {
closePop() {
this.$emit('closePop', 'allSee')
......@@ -54,11 +57,10 @@
},
startAnalysis() {
// this.isAnalysis = true;
this.$parent.viewpoint.chooseView();
this.viewpoint.chooseView();
},
stopAnalysis() {
// this.isAnalysis = false;
this.viewpoint.remove();
}
}
......
......@@ -12,29 +12,35 @@
<div style="margin-top: 10px; font-size: 14px;">方案对比</div>
</div>
</div>
<div @click="EKgfz()">
<div @click="EAddProject()">
<div>
<img src="../assets/一张图/新增项目.png" alt="">
<div style="margin-top: 10px; font-size: 14px;">新增项目</div>
</div>
</div>
<!-- <div @click="EKgfz()">
<div>
<img src="../assets/一张图/icon_方案审查_辅助审查_控高分析.png" alt="">
<div style="margin-top: 10px; font-size: 14px;">控高分析</div>
</div>
</div>
</div> -->
</div>
<div class="box">
<div @click="EGzfx()">
<!-- <div class="box"> -->
<!-- <div @click="EGzfx()">
<div>
<img src="../assets/一张图/icon_方案审查_辅助审查_光照分析.png" alt="">
<div style="margin-top: 10px; font-size: 14px;">光照分析</div>
</div>
</div>
</div> -->
<!-- css 占位 -->
<div style="visibility:hidden">
<!-- <div>
<div>
<img src="../assets/一张图/icon_方案审查_辅助审查_控高分析.png" alt="">
<div style="margin-top: 10px; font-size: 14px;">控高分析</div>
<img src="../assets/一张图/新增项目.png" alt="">
<div style="margin-top: 10px; font-size: 14px;">新增项目</div>
</div>
</div>
</div> -->
</div>
<!-- </div> -->
</div>
</div>
</template>
......@@ -76,6 +82,10 @@
EGzfx() {
this.$emit('EGzfx');
},
// 新增项目
EAddProject() {
this.$emit('EAddProject');
}
}
}
</script>
......
......@@ -6,12 +6,12 @@
</div>
</div>
<div class="mian">
<div class="title">
<div class="title-bt">
<span>控高分析</span>
<span @click="closePop" class="close">×</span>
</div>
<div class="" style="padding: 18px 24px 0px 24px;">
<el-slider v-model="height" :min='0' :max='1000' :format-tooltip="formatTooltip"
<el-slider v-model="height" :min='1' :max='1000' :format-tooltip="formatTooltip"
@change='EheightChange'></el-slider>
</div>
<div class="func-btn">
......@@ -24,62 +24,40 @@
<span>清除分析结果</span>
</div>
</div>
<div class="table-box" style="padding: 18px 24px 30px 24px;">
<el-table :data="tableData" :highlight-current-row='false' height="242" border style="width: 100%">
<el-table-column prop="name" label="名称" align='center'>
</el-table-column>
<el-table-column prop="height" label="高度(m)" align='center'>
</el-table-column>
<el-table-column prop="superelevation" label="超高度(m)" align='center'>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<script>
import heightControl from "../assets/js/map/heightControl";
export default {
name: 'kgAnalusis',
components: {},
data() {
return {
height: 320,
tableData: [{
name: '1号楼',
height: '34',
superelevation: '4'
}, {
name: '1号楼',
height: '34',
superelevation: '4'
}, {
name: '1号楼',
height: '34',
superelevation: '4'
}, {
name: '1号楼',
height: '34',
superelevation: '4'
},]
height: 100
}
},
mounted() {},
mounted() {
this.heightControl instanceof heightControl || (this.heightControl = new heightControl({h: this.height}));
},
methods: {
closePop() {
this.$emit('closePop', 'kgAnalusis')
},
startAnalysis() {
this.heightControl.handlerPolygon.deactivate();
this.heightControl.handlerPolygon.activate();
},
stopAnalysis() {
this.heightControl.remove();
},
formatTooltip(val) {
return val + '米';
},
EheightChange() {
this.heightControl.polygon.height = this.height;
this.heightControl.splice(this.height);
}
}
}
......@@ -132,7 +110,7 @@
}
.title {
.title-bt {
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(255, 255, 255, 0.15);
......
......@@ -34,7 +34,7 @@
</div>
<div style="margin-top: 16px;">
<auxiliaryReview @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx'></auxiliaryReview>
<auxiliaryReview @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></auxiliaryReview>
</div>
</div>
</template>
......@@ -84,6 +84,10 @@
EGzfx() {
this.$emit('EGzfx');
},
// 新增项目
EAddProject() {
this.$emit('EAddProject');
},
}
}
</script>
......@@ -118,5 +122,6 @@
.assert-list .name {
transform: translateX(56px);
line-height: 36px;
font-size: 16px;
}
</style>
\ No newline at end of file
......
......@@ -76,7 +76,7 @@
<!--淹没分析 -->
<div class="func-ico" :class="[ymAnslysis?'selected':'']" @click="handleymAnslysis('ymAnslysis')">
<el-tooltip class="item" effect="dark" content="淹没" placement="left">
<img src="../assets/一张图/icon_通视.png" alt="">
<img src="../assets/一张图/淹没分析.png" alt="">
</el-tooltip>
</div>
......@@ -84,28 +84,28 @@
<!--阴影分析 -->
<div class="func-ico" :class="[yyAnslysis?'selected':'']" @click="handleyyAnslysis('yyAnslysis')">
<el-tooltip class="item" effect="dark" content="阴影" placement="left">
<img src="../assets/一张图/icon_通视.png" alt="">
<img src="../assets/一张图/阴影分析.png" alt="">
</el-tooltip>
</div>
<!--控高分析 -->
<!-- <div class="func-ico" :class="[kgAnalusis?'selected':'']" @click="handlekgAnalusis('kgAnalusis')">
<div class="func-ico" :class="[kgAnalusis?'selected':'']" @click="handlekgAnalusis('kgAnalusis')">
<el-tooltip class="item" effect="dark" content="控高" placement="left">
<img src="../assets/一张图/icon_通视.png" alt="">
<img src="../assets/一张图/控高分析.png" alt="">
</el-tooltip>
</div> -->
</div>
<!--天际线分析 -->
<div class="func-ico" :class="[tjxAnslysis?'selected':'']" @click="handletjxAnslysis('tjxAnslysis')">
<!-- <div class="func-ico" :class="[tjxAnslysis?'selected':'']" @click="handletjxAnslysis('tjxAnslysis')">
<el-tooltip class="item" effect="dark" content="天际线" placement="left">
<img src="../assets/一张图/icon_通视.png" alt="">
</el-tooltip>
</div>
</div> -->
<!--可视域分析 -->
<div class="func-ico" :class="[visualField?'selected':'']" @click="handlevisualField('visualField')">
<el-tooltip class="item" effect="dark" content="可视域分析" placement="left">
<img src="../assets/一张图/icon_通视.png" alt="">
<img src="../assets/一张图/视域分析.png" alt="">
</el-tooltip>
</div>
......
......@@ -49,7 +49,8 @@
src: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3820738330,1510784229&fm=26&gp=0.jpg'
}
},
mounted() {},
mounted() {
},
methods: {
closePop() {
this.$emit('closePop', 'tjxAnslysis')
......@@ -58,7 +59,7 @@
},
stopAnalysis() {
},
}
}
......
......@@ -20,44 +20,54 @@
</div>
<div class="func-input">
<span class="width-class">翻转</span>
<el-slider style="width: 150px;" v-model="flip" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="flip" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
<el-slider style="width: 150px;" v-model="pitch" :min='1' :max='90' :step='1'></el-slider>
<el-input-number v-model="pitch" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="90">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">距离</span>
<el-slider style="width: 150px;" v-model="distance" :min='0' :max='10000' :step='1'></el-slider>
<el-slider style="width: 150px;" v-model="distance" :min='1' :max='500' :step='1'></el-slider>
<el-input-number v-model="distance" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="10000">
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="500">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">水平视场角</span>
<el-slider style="width: 150px;" v-model="level" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="level" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
<el-slider style="width: 150px;" v-model="horizontalFov" :min='1' :max='120' :step='1'></el-slider>
<el-input-number v-model="horizontalFov" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="120">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="func-input">
<span class="width-class">垂直视场角</span>
<el-slider style="width: 150px;" v-model="vertical" :min='0' :max='360' :step='1'></el-slider>
<el-input-number v-model="vertical" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360">
<el-slider style="width: 150px;" v-model="verticalFov" :min='1' :max='90' :step='1'></el-slider>
<el-input-number v-model="verticalFov" controls-position="right"
style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="90">
</el-input-number>
<span style="margin-left: 12px;"></span>
</div>
<div class="select-color">
<div class="block">
<div class="demonstration">可见区域颜色</div>
<el-color-picker v-model="yesColor"></el-color-picker>
<el-color-picker v-model="visibleAreaColor"></el-color-picker>
</div>
<div class="block">
<div class="demonstration">不可见区域颜色</div>
<el-color-picker v-model="noColor"></el-color-picker>
<el-color-picker v-model="hiddenAreaColor"></el-color-picker>
</div>
</div>
<div class="func-btn">
<div class="btn-wrapper add-bg" @click="startAnalysis">
<img style="width: 20px; height: 20px; margin: 0 5px 0 44px" src="../assets/icon_开始分析.png" alt="">
<span>开始绘制</span>
</div>
<div class="btn-wrapper" @click="stopAnalysis" style="margin-left: 30px;">
<img style="width: 20px; height: 20px;margin: 0 5px 0 26px" src="../assets/icon_清除分析结果.png" alt="">
<span>清除绘制结果</span>
</div>
</div>
</div>
......@@ -65,6 +75,7 @@
</template>
<script>
import visual from "../assets/js/map/visual";
export default {
name: 'allSee',
components: {},
......@@ -72,31 +83,51 @@
return {
step: 1,
num: 1,
direction: 180, // 方向
flip: 90, // 翻转
distance: 0, // 距离
level: 180, // 水平视场角
vertical: 180, // 垂直视场角
yesColor: 'red', // 可见区域颜色
noColor: 'rgba(255, 69, 0, 0.68)', // 不可见区域颜色
direction: 1, // 方向
pitch: 1, // 翻转
distance: 1, // 距离
horizontalFov: 1, // 水平视场角
verticalFov: 1, // 垂直视场角
visibleAreaColor: 'red', // 可见区域颜色
hiddenAreaColor: 'rgba(255, 69, 0, 0.68)', // 不可见区域颜色
isXmbj: true,
// isAnalysis: true
}
},
mounted() {},
watch: {
direction: function(a) {
this.visual.viewshed3D.direction = a;
},
pitch: function(a) {
this.visual.viewshed3D.pitch = a;
},
distance: function(a) {
this.visual.viewshed3D.distance = a;
},
horizontalFov: function(a) {
this.visual.viewshed3D.horizontalFov = a;
},
verticalFov: function(a) {
this.visual.viewshed3D.verticalFov = a;
},
visibleAreaColor: function(a) {
this.visual.viewshed3D.visibleAreaColor = Cesium.Color.fromCssColorString(a);
},
hiddenAreaColor: function(a) {
this.visual.viewshed3D.hiddenAreaColor = Cesium.Color.fromCssColorString(a);
}
},
mounted() {
this.visual instanceof visual || (this.visual = new visual());
},
methods: {
closePop() {
this.$emit('closePop', 'visualField')
},
handleChange() {
},
startAnalysis() {
// this.isAnalysis = true;
this.visual.chooseView();
},
stopAnalysis() {
// this.isAnalysis = false;
this.visual.remove();
},
handleIsXmbj(flag) {
this.isXmbj = flag;
......@@ -237,7 +268,7 @@
display: flex;
justify-content: space-around;
text-align: center;
padding: 30px 0px;
padding: 15px 0 0 0;
}
.demonstration {
......
......@@ -59,6 +59,8 @@
</template>
<script>
import flood from "../assets/js/map/flood";
import objectManage from '../assets/js/map/maputils';
export default {
name: 'allSee',
components: {},
......@@ -67,13 +69,15 @@
step: 0.01,
num: 1,
sdgc: '', // 水底高程
swsd: '', // 水位深度
swsd: 50, // 水位深度
ymsd: '', // 淹没速度
isXmbj: true,
// isAnalysis: true
}
},
mounted() {},
mounted() {
this.flood instanceof flood || (this.flood = new flood());
},
methods: {
closePop() {
this.$emit('closePop', 'ymAnslysis')
......@@ -82,20 +86,16 @@
},
startAnalysis() {
// this.isAnalysis = true;
let viewer = this.$parent.viewer;
this.$parent.flood.floodParse(viewer.scene, this.$parent.flood.positions2d, 0, 50);
this.$parent.flood.handlerPolygon.clear();
this.flood.floodParse(0, this.swsd);
this.flood.handlerPolygon.clear();
},
stopAnalysis() {
// this.isAnalysis = false;
this.$parent.viewer.entities.removeAll();
// this.$parent.flood.handlerPolygon.clear();
this.flood.remove();
},
handleIsXmbj(flag) {
this.isXmbj = flag;
this.$parent.flood.handlerPolygon.deactivate();
!flag && this.$parent.flood.handlerPolygon.activate();
this.flood.handlerPolygon.deactivate();
!flag && this.flood.handlerPolygon.activate();
}
}
}
......
......@@ -20,14 +20,14 @@
<div class="func-input">
<span>开始时间</span>
<el-time-picker style="margin:0 12px; width: 245px;" v-model="staTime"
:picker-options="pickerOptions" placeholder="选择开始时间">
<el-time-picker style="margin:0 12px; width: 245px;" v-model="staTime" :picker-options="pickerOptions"
placeholder="选择开始时间">
</el-time-picker>
</div>
<div class="func-input">
<span>结束时间</span>
<el-time-picker style="margin:0 12px; width: 245px;" v-model="endTime"
:picker-options="pickerOptions" placeholder="选择结束时间">
<el-time-picker style="margin:0 12px; width: 245px;" v-model="endTime" :picker-options="pickerOptions"
placeholder="选择结束时间">
</el-time-picker>
</div>
......@@ -63,12 +63,16 @@
<div class="func-btn">
<div class="btn-wrapper add-bg" @click="startAnalysis">
<img style="width: 20px; height: 20px; margin: 0 5px 0 44px" src="../assets/icon_开始分析.png" alt="">
<span>开始分析</span>
<img style="width: 20px; height: 20px; margin: 0 5px 0 26px" src="../assets/icon_开始分析.png" alt="">
<span>分析</span>
</div>
<div class="btn-wrapper add-bg" @click="sunshine" style="margin-left: 30px;">
<img style="width: 20px; height: 20px; margin: 0 5px 0 26px" src="../assets/icon_开始分析.png" alt="">
<span>日照</span>
</div>
<div class="btn-wrapper" @click="stopAnalysis" style="margin-left: 30px;">
<img style="width: 20px; height: 20px;margin: 0 5px 0 26px" src="../assets/icon_清除分析结果.png" alt="">
<span>清除分析结果</span>
<span>清除</span>
</div>
</div>
</div>
......@@ -77,17 +81,18 @@
<script>
let maxW = 24 * 60 * 60 * 1000 - 1 * 60 * 1000
import shadow from "../assets/js/map/shadow";
export default {
name: 'yyAnslysis',
components: {},
data() {
return {
isCF: true, // 春分
isXZ: false, // 夏至
isQF: false, // 秋分
isLD: false, // 立冬
isDZ: false, // 冬至
keepTqArr: ['isCF', 'isXZ', 'isQF', 'isLD', 'isDZ'],
// isCF: true, // 春分
// isXZ: false, // 夏至
// isQF: false, // 秋分
// isLD: false, // 立冬
// isDZ: false, // 冬至
// keepTqArr: ['isCF', 'isXZ', 'isQF', 'isLD', 'isDZ'],
anslysisTime: '',
timeS: 30, // 时间间隔
......@@ -103,7 +108,7 @@
// label: this.$createElement('strong', '50%')
// }
},
pickerOptions: { // 时间选择器 时间范围限制
pickerOptions: { // 时间选择器 时间范围限制
selectableRange: '00:00:00 - 23:59:59'
},
staTime: '', // 开始时间
......@@ -121,19 +126,15 @@
this.$emit('closePop', 'yyAnslysis')
},
startAnalysis() {
console.log(this.shadow);
this.shadow.handlerPolygon.deactivate();
this.shadow.handlerPolygon.activate();
},
sunshine() {
this.shadow.sunlight();
},
stopAnalysis() {
},
/**
* val 值分别对应
* isCF, // 春分
isXZ, // 夏至
isQF, // 秋分
isLD, // 立冬
isDZ, // 冬至
*/
handleIsXmbj(val) {
let self = this;
this.keepTqArr.forEach(ele => {
......@@ -177,7 +178,6 @@
.box {
background: rgba(4, 10, 10, 0.58);
box-shadow: 0px 4px 9px 0px rgba(0, 0, 0, 0.5);
/* filter: blur(10px); */
height: 100px;
position: absolute;
width: 100%;
......@@ -217,7 +217,6 @@
.func-input {
display: flex;
align-items: center;
/* justify-content: space-between; */
padding: 18px 24px 0px 24px;
font-size: 18px;
cursor: pointer;
......
......@@ -12,7 +12,6 @@ import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.prototype.$echarts = echarts;
Vue.prototype.config = config;
Vue.prototype.commons = commons;
......
......@@ -25,12 +25,12 @@
@roundSee='EroundSee'
@horizon='Ehorizon'
@allSee='EallSee'
@ymAnslysis='EymAnslysis'
@tjxAnslysis='EtjxAnslysis'
@visualField='EvisualField'
@yyAnslysis='EyyAnslysis'
@kgAnalusis='EkgAnalusis'
:enlarge='enlarge'
:narrow='narrow'
:coordinate='coordinate'
......@@ -53,9 +53,9 @@
<div class="bottomNav">
<bottomNav></bottomNav>
</div>
<!-- <div class="leftAssert">
<leftAssert @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx'></leftAssert>
</div> -->
<div class="leftAssert">
<leftAssert @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></leftAssert>
</div>
<!-- <div class="mapPop">
<mapPop></mapPop>
</div> -->
......@@ -71,13 +71,12 @@
<horizon @closePop='closePop'></horizon>
</div>
<div class="allSee tjx-anslysis" v-if='tjxAnslysis'>
<tjxAnslysis @closePop='closePop'></tjxAnslysis>
<div class="allSee" v-if='visualField'>
<visualField @closePop='closePop'></visualField>
</div>
<div class="allSee tjx-anslysis" v-if='visualField'>
<visualField @closePop='closePop'></visualField>
<div class="allSee" v-if='tjxAnslysis'>
<tjxAnslysis @closePop='closePop'></tjxAnslysis>
</div>
<div class="allSee" v-if='yyAnslysis'>
......@@ -88,13 +87,16 @@
<kgAnalusis @closePop='closePop'></kgAnalusis>
</div>
<div class="add-project-msg" v-if='addProjectMsg'>
<addProjectMsg @closeAddProjectMsg='EcloseAddProjectMsg'></addProjectMsg>
</div>
<div id="cesiumContainer">
<div id="vertical-slider" style="display: none;"></div>
<div id="horizontal-slider" style="display: none;"></div>
</div>
<!-- <div id="split_up" style="display: none;"></div>
<div id="split_bottom" style="display: none;"></div>
<div id="split_left" style="display: none;"></div>
......@@ -127,16 +129,16 @@
import objectManage from '../assets/js/map/maputils';
import createDraw from '../assets/js/map/createDraw';
import roller from "../assets/js/map/roller";
import flood from "../assets/js/map/flood";
import viewpoint from "../assets/js/map/viewpoint";
import visual from "../assets/js/map/visual";
// import flood from "../assets/js/map/flood";
// import viewpoint from "../assets/js/map/viewpoint";
// import visual from "../assets/js/map/visual";
import TopTitle from '../components/topTitle';
import rightTopFunc from '../components/rightTopFunc';
import rightFunc from '../components/rightFunc';
import bottomNav from '../components/bottomNav';
// import leftAssert from '../components/leftAssert';
import leftAssert from '../components/leftAssert';
// import mapPop from '../components/mapPop';
import allSee from '../components/allSee'; //通视
......@@ -145,9 +147,13 @@
import tjxAnslysis from '../components/tjxAnslysis'; // 天际线分析
import yyAnslysis from '../components/yyAnslysis'; // 阴影分析
import kgAnalusis from '../components/kgAnalusis'; // 控高分析
import visualField from '../components/visualField'; //可视域分析
import addProjectMsg from '../components/addProjectMsg'; // 建设项目信息表
import URL_CONFIG from "./../config/urlConfig.vue";
const Cesium = window.Cesium;
import visualField from '../components/visualField' //可视域分析
export default {
components: {
......@@ -155,16 +161,18 @@
rightTopFunc,
rightFunc,
bottomNav,
// leftAssert,
leftAssert,
// mapPop,
allSee,
ymAnslysis,
horizon,
tjxAnslysis,
visualField,
tjxAnslysis,
yyAnslysis,
kgAnalusis,
addProjectMsg,
},
data() {
return {
......@@ -192,32 +200,46 @@
keepArr: ['isReturn', 'enlarge', 'narrow', 'coordinate', 'distance',
'area', 'marker', 'rollerShutter', 'splitScreen', 'toNorth',
'topSee', 'roundSee', 'horizon', 'allSee', 'ymAnslysis',
'tjxAnslysis', 'yyAnslysis', 'kgAnalusis', 'visualField']
'tjxAnslysis', 'yyAnslysis', 'visualField', 'kgAnalusis'],
addProjectMsg: false, // 建设项目信息表
}
},
mounted() {
this.viewer = new Cesium.Viewer('cesiumContainer');
this.viewer = new Cesium.Viewer('cesiumContainer', {shadows : true});
this.viewer.imageryLayers.addImageryProvider(new Cesium.TiandituImageryProvider({
credit : new Cesium.Credit('天地图全球影像服务'),
token: URL_CONFIG.TOKEN_TIANDITU
}));
let scene = this.viewer.scene
scene.shadowMap.darkness = 1.275; //设置第二重烘焙纹理的效果(明暗程度)
scene.shadowMap.darkness = 1; //设置第二重烘焙纹理的效果(明暗程度)
scene.skyAtmosphere.brightnessShift=0.4;
scene.debugShowFramesPerSecond = true;
scene.hdrEnabled = false;
scene.sun.show = false;
scene.sun.show = true;
this.draw = new createDraw(this.viewer);
Cesium.when.all([
scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, {
name: 'ground'
}),
scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, {
name: 'build'
})
], layer => {
var promise = [];
// promise[0] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, {
// name: 'ground'
// });
promise[0] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, {
name: 'build1'
});
promise[1] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, {
name: 'build2'
});
promise[2] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, {
name: 'ground'
});
Cesium.when.all(promise, layers => {
// this.layers = layer;
objectManage.viewer = this.viewer;
// layers[0].selectEnabled = false;
// layers[1].selectEnabled = false;
// layers[0].shadowType = 2;
// layers[1].shadowType = 2;
scene.camera.setView({
destination : Cesium.Cartesian3.fromDegrees(116.44621857300415, 39.899281526734555, 216.7793905027196),
orientation : {
......@@ -231,7 +253,8 @@
var title = '加载SCP失败,请检查网络连接状态或者url地址是否正确?';
widget.showErrorPanel(title, undefined, e);
}
});
});
},
methods: {
searchRoat(val) {
......@@ -308,93 +331,7 @@
,EtopSee() {}
// 环视
,EroundSee() {
// var parentEntity = this.viewer.entities.add(new Cesium.Entity()), positions = [], cartesian, polyline;
// this.handler = new Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas)
// this.handler.setInputAction(evt => {
// cartesian = this.viewer.scene.pickPosition(evt.position);
// // cartesian = this.draw.getCatesian3FromPX(evt.position, this.viewer, []);
// positions.push(cartesian.clone());
// // addCompany.createPoint.call(this, {position: cartesian})
// if(positions.length === 1) {
// this.handler.setInputAction(moveEvent => {
// positions[1] = this.viewer.scene.pickPosition(moveEvent.endPosition);
// // positions[1] = this.draw.getCatesian3FromPX(moveEvent.endPosition, this.viewer, []);
// !polyline && (polyline = addCompany.createPolyline.call(this, positions));
// }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
// return;
// }
// this.handler.destroy();
// // console.log(Cesium.Cartesian3.distance(positions[0], positions[1]));
// // var cartesian = this.draw.getCatesian3FromPX(evt.position, this.viewer, []);
// var viewPointEntity = this.viewer.entities.add({
// parent: parentEntity,
// position: positions[0],
// ellipsoid: {
// radii: new Cesium.Cartesian3(5, 5, 5),
// material: Cesium.Color.GREEN
// }
// });
// // // 世界坐标转换为投影坐标
// var webMercatorProjection = new Cesium.WebMercatorProjection(this.viewer.scene.globe.ellipsoid);
// var viewPointWebMercator = webMercatorProjection.project(Cesium.Cartographic.fromCartesian(positions[0]));
// // // 排除碰撞监测的对象
// var objectsToExclude = [viewPointEntity];
// // 目标点集合
// var destPoints = [];
// // 视域点和目标点的距离
// var radius = Cesium.Cartesian3.distance(positions[0], positions[1]); // 视距1000米
// // 计算一圈
// for (var i = 0; i <= 30; i++) {
// // 度数转弧度
// var radians = Cesium.Math.toRadians(i);
// // 计算目标点
// var toPoint = new Cesium.Cartesian3(viewPointWebMercator.x + radius * Math.cos(radians), viewPointWebMercator.y + radius * Math.sin(radians), 10);
// // 投影坐标转世界坐标
// toPoint = webMercatorProjection.unproject(toPoint);
// destPoints.push(Cesium.Cartographic.toCartesian(toPoint.clone()));
// }
// let viewer = this.viewer;
// // 绘制线
// function drawLine(leftPoint, secPoint, color) {
// viewer.entities.add({
// polyline: {
// positions: [leftPoint, secPoint],
// arcType: Cesium.ArcType.NONE,
// width: 5,
// material: color,
// depthFailMaterial: color
// }
// })
// }
// pickFromRay.call(this);
// function pickFromRay() {
// for (var i = 0; i < destPoints.length; i++) {
// // 计算射线的方向,目标点left 视域点right
// var direction = Cesium.Cartesian3.normalize(Cesium.Cartesian3.subtract(destPoints[i], positions[0], new Cesium.Cartesian3()), new Cesium.Cartesian3());
// console.log(direction);
// // 建立射线
// var ray = new Cesium.Ray(positions[0], direction);
// var result = viewer.scene.pickFromRay(ray, objectsToExclude); // 计算交互点,返回第一个
// showIntersection(result, destPoints[i], positions[0]);
// }
// }
// // 处理交互点
// function showIntersection(result, destPoint, cartesian) {
// // 如果是场景模型的交互点,排除交互点是地球表面
// if (Cesium.defined(result) && Cesium.defined(result.object)) {
// drawLine(result.position, cartesian, Cesium.Color.GREEN); // 可视区域
// drawLine(result.position, destPoint, Cesium.Color.RED); // 不可视区域
// } else {
// drawLine(cartesian, destPoint, Cesium.Color.GREEN);
// }
// }
// this.handler.destroy();
// }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
}
// 视域
,Ehorizon(val) {
......@@ -405,13 +342,11 @@
,EallSee(val) {
this[val] = !this[val];
this.onlySelect(val);
this.viewpoint instanceof viewpoint || (this.viewpoint = new viewpoint(this.viewer));
},
// 淹没分析
EymAnslysis(val) {
this[val] = !this[val];
this.onlySelect(val);
this.flood instanceof flood || (this.flood = new flood(this.viewer));
},
// 天际线分析
EtjxAnslysis(val) {
......@@ -437,6 +372,9 @@
closePop(val) {
this[val] = false;
},
EcloseAddProjectMsg() {
this.addProjectMsg = false;
},
onlySelect(val) {
this.keepArr.forEach(ele => {
if(val == ele) {
......@@ -457,6 +395,10 @@
// 光照分析
EGzfx() {
},
// 打开新增项目列表
EAddProject() {
this.addProjectMsg = true;
}
}
}
</script>
......@@ -617,6 +559,14 @@
top: 416px;
}
.add-project-msg {
position: absolute;
z-index: 1000;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.tjx-anslysis {
top: 265px;
}
......