18a74691 by jikai

111111

1 parent 97c8ec72
......@@ -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(this.viewer));
},
methods: {
closePop() {
this.$emit('closePop', 'allSee')
......@@ -55,7 +58,7 @@
},
startAnalysis() {
// this.isAnalysis = true;
this.$parent.viewpoint.chooseView();
this.viewpoint.chooseView();
},
stopAnalysis() {
// this.isAnalysis = false;
......
......@@ -20,44 +20,44 @@
</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">
......@@ -75,6 +75,7 @@
</template>
<script>
import visual from "../assets/js/map/visual";
export default {
name: 'allSee',
components: {},
......@@ -82,18 +83,42 @@
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,
}
},
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')
......
......@@ -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: {},
......@@ -73,7 +75,9 @@
// isAnalysis: true
}
},
mounted() {},
mounted() {
this.flood instanceof flood || (this.flood = new flood());
},
methods: {
closePop() {
this.$emit('closePop', 'ymAnslysis')
......@@ -84,18 +88,18 @@
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(viewer.scene, this.flood.positions2d, 0, 50);
this.flood.handlerPolygon.clear();
},
stopAnalysis() {
// this.isAnalysis = false;
this.$parent.viewer.entities.removeAll();
objectManage.viewer.entities.removeAll();
// this.$parent.flood.handlerPolygon.clear();
},
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();
}
}
}
......
......@@ -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,6 +81,7 @@
<script>
let maxW = 24 * 60 * 60 * 1000 - 1 * 60 * 1000
import shadow from "../assets/js/map/shadow";
export default {
name: 'yyAnslysis',
components: {},
......@@ -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 => {
......