18a74691 by jikai

111111

1 parent 97c8ec72
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
35 </template> 35 </template>
36 36
37 <script> 37 <script>
38 import viewpoint from "../assets/js/map/viewpoint";
38 export default { 39 export default {
39 name: 'allSee', 40 name: 'allSee',
40 components: {}, 41 components: {},
...@@ -45,7 +46,9 @@ ...@@ -45,7 +46,9 @@
45 // isAnalysis: true 46 // isAnalysis: true
46 } 47 }
47 }, 48 },
48 mounted() {}, 49 mounted() {
50 this.viewpoint instanceof viewpoint || (this.viewpoint = new viewpoint(this.viewer));
51 },
49 methods: { 52 methods: {
50 closePop() { 53 closePop() {
51 this.$emit('closePop', 'allSee') 54 this.$emit('closePop', 'allSee')
...@@ -55,7 +58,7 @@ ...@@ -55,7 +58,7 @@
55 }, 58 },
56 startAnalysis() { 59 startAnalysis() {
57 // this.isAnalysis = true; 60 // this.isAnalysis = true;
58 this.$parent.viewpoint.chooseView(); 61 this.viewpoint.chooseView();
59 }, 62 },
60 stopAnalysis() { 63 stopAnalysis() {
61 // this.isAnalysis = false; 64 // this.isAnalysis = false;
......
...@@ -20,44 +20,44 @@ ...@@ -20,44 +20,44 @@
20 </div> 20 </div>
21 <div class="func-input"> 21 <div class="func-input">
22 <span class="width-class">翻转</span> 22 <span class="width-class">翻转</span>
23 <el-slider style="width: 150px;" v-model="flip" :min='0' :max='360' :step='1'></el-slider> 23 <el-slider style="width: 150px;" v-model="pitch" :min='1' :max='90' :step='1'></el-slider>
24 <el-input-number v-model="flip" controls-position="right" 24 <el-input-number v-model="pitch" controls-position="right"
25 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360"> 25 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="90">
26 </el-input-number> 26 </el-input-number>
27 <span style="margin-left: 12px;"></span> 27 <span style="margin-left: 12px;"></span>
28 </div> 28 </div>
29 <div class="func-input"> 29 <div class="func-input">
30 <span class="width-class">距离</span> 30 <span class="width-class">距离</span>
31 <el-slider style="width: 150px;" v-model="distance" :min='0' :max='10000' :step='1'></el-slider> 31 <el-slider style="width: 150px;" v-model="distance" :min='1' :max='500' :step='1'></el-slider>
32 <el-input-number v-model="distance" controls-position="right" 32 <el-input-number v-model="distance" controls-position="right"
33 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="10000"> 33 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="500">
34 </el-input-number> 34 </el-input-number>
35 <span style="margin-left: 12px;"></span> 35 <span style="margin-left: 12px;"></span>
36 </div> 36 </div>
37 <div class="func-input"> 37 <div class="func-input">
38 <span class="width-class">水平视场角</span> 38 <span class="width-class">水平视场角</span>
39 <el-slider style="width: 150px;" v-model="level" :min='0' :max='360' :step='1'></el-slider> 39 <el-slider style="width: 150px;" v-model="horizontalFov" :min='1' :max='120' :step='1'></el-slider>
40 <el-input-number v-model="level" controls-position="right" 40 <el-input-number v-model="horizontalFov" controls-position="right"
41 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360"> 41 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="120">
42 </el-input-number> 42 </el-input-number>
43 <span style="margin-left: 12px;"></span> 43 <span style="margin-left: 12px;"></span>
44 </div> 44 </div>
45 <div class="func-input"> 45 <div class="func-input">
46 <span class="width-class">垂直视场角</span> 46 <span class="width-class">垂直视场角</span>
47 <el-slider style="width: 150px;" v-model="vertical" :min='0' :max='360' :step='1'></el-slider> 47 <el-slider style="width: 150px;" v-model="verticalFov" :min='1' :max='90' :step='1'></el-slider>
48 <el-input-number v-model="vertical" controls-position="right" 48 <el-input-number v-model="verticalFov" controls-position="right"
49 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="0" :max="360"> 49 style="width:100px; height:38px; margin-left: 12px;" :step='step' :min="1" :max="90">
50 </el-input-number> 50 </el-input-number>
51 <span style="margin-left: 12px;"></span> 51 <span style="margin-left: 12px;"></span>
52 </div> 52 </div>
53 <div class="select-color"> 53 <div class="select-color">
54 <div class="block"> 54 <div class="block">
55 <div class="demonstration">可见区域颜色</div> 55 <div class="demonstration">可见区域颜色</div>
56 <el-color-picker v-model="yesColor"></el-color-picker> 56 <el-color-picker v-model="visibleAreaColor"></el-color-picker>
57 </div> 57 </div>
58 <div class="block"> 58 <div class="block">
59 <div class="demonstration">不可见区域颜色</div> 59 <div class="demonstration">不可见区域颜色</div>
60 <el-color-picker v-model="noColor"></el-color-picker> 60 <el-color-picker v-model="hiddenAreaColor"></el-color-picker>
61 </div> 61 </div>
62 </div> 62 </div>
63 <div class="func-btn"> 63 <div class="func-btn">
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
75 </template> 75 </template>
76 76
77 <script> 77 <script>
78 import visual from "../assets/js/map/visual";
78 export default { 79 export default {
79 name: 'allSee', 80 name: 'allSee',
80 components: {}, 81 components: {},
...@@ -82,18 +83,42 @@ ...@@ -82,18 +83,42 @@
82 return { 83 return {
83 step: 1, 84 step: 1,
84 num: 1, 85 num: 1,
85 direction: 180, // 方向 86 direction: 1, // 方向
86 flip: 90, // 翻转 87 pitch: 1, // 翻转
87 distance: 0, // 距离 88 distance: 1, // 距离
88 level: 180, // 水平视场角 89 horizontalFov: 1, // 水平视场角
89 vertical: 180, // 垂直视场角 90 verticalFov: 1, // 垂直视场角
90 yesColor: 'red', // 可见区域颜色 91 visibleAreaColor: 'red', // 可见区域颜色
91 noColor: 'rgba(255, 69, 0, 0.68)', // 不可见区域颜色 92 hiddenAreaColor: 'rgba(255, 69, 0, 0.68)', // 不可见区域颜色
92
93 isXmbj: true, 93 isXmbj: true,
94 } 94 }
95 }, 95 },
96 mounted() {}, 96 watch: {
97 direction: function(a) {
98 this.visual.viewshed3D.direction = a;
99 },
100 pitch: function(a) {
101 this.visual.viewshed3D.pitch = a;
102 },
103 distance: function(a) {
104 this.visual.viewshed3D.distance = a;
105 },
106 horizontalFov: function(a) {
107 this.visual.viewshed3D.horizontalFov = a;
108 },
109 verticalFov: function(a) {
110 this.visual.viewshed3D.verticalFov = a;
111 },
112 visibleAreaColor: function(a) {
113 this.visual.viewshed3D.visibleAreaColor = Cesium.Color.fromCssColorString(a);
114 },
115 hiddenAreaColor: function(a) {
116 this.visual.viewshed3D.hiddenAreaColor = Cesium.Color.fromCssColorString(a);
117 }
118 },
119 mounted() {
120 this.visual instanceof visual || (this.visual = new visual());
121 },
97 methods: { 122 methods: {
98 closePop() { 123 closePop() {
99 this.$emit('closePop', 'visualField') 124 this.$emit('closePop', 'visualField')
......
...@@ -59,6 +59,8 @@ ...@@ -59,6 +59,8 @@
59 </template> 59 </template>
60 60
61 <script> 61 <script>
62 import flood from "../assets/js/map/flood";
63 import objectManage from '../assets/js/map/maputils';
62 export default { 64 export default {
63 name: 'allSee', 65 name: 'allSee',
64 components: {}, 66 components: {},
...@@ -73,7 +75,9 @@ ...@@ -73,7 +75,9 @@
73 // isAnalysis: true 75 // isAnalysis: true
74 } 76 }
75 }, 77 },
76 mounted() {}, 78 mounted() {
79 this.flood instanceof flood || (this.flood = new flood());
80 },
77 methods: { 81 methods: {
78 closePop() { 82 closePop() {
79 this.$emit('closePop', 'ymAnslysis') 83 this.$emit('closePop', 'ymAnslysis')
...@@ -84,18 +88,18 @@ ...@@ -84,18 +88,18 @@
84 startAnalysis() { 88 startAnalysis() {
85 // this.isAnalysis = true; 89 // this.isAnalysis = true;
86 let viewer = this.$parent.viewer; 90 let viewer = this.$parent.viewer;
87 this.$parent.flood.floodParse(viewer.scene, this.$parent.flood.positions2d, 0, 50); 91 this.flood.floodParse(viewer.scene, this.flood.positions2d, 0, 50);
88 this.$parent.flood.handlerPolygon.clear(); 92 this.flood.handlerPolygon.clear();
89 }, 93 },
90 stopAnalysis() { 94 stopAnalysis() {
91 // this.isAnalysis = false; 95 // this.isAnalysis = false;
92 this.$parent.viewer.entities.removeAll(); 96 objectManage.viewer.entities.removeAll();
93 // this.$parent.flood.handlerPolygon.clear(); 97 // this.$parent.flood.handlerPolygon.clear();
94 }, 98 },
95 handleIsXmbj(flag) { 99 handleIsXmbj(flag) {
96 this.isXmbj = flag; 100 this.isXmbj = flag;
97 this.$parent.flood.handlerPolygon.deactivate(); 101 this.flood.handlerPolygon.deactivate();
98 !flag && this.$parent.flood.handlerPolygon.activate(); 102 !flag && this.flood.handlerPolygon.activate();
99 } 103 }
100 } 104 }
101 } 105 }
......
...@@ -63,12 +63,16 @@ ...@@ -63,12 +63,16 @@
63 63
64 <div class="func-btn"> 64 <div class="func-btn">
65 <div class="btn-wrapper add-bg" @click="startAnalysis"> 65 <div class="btn-wrapper add-bg" @click="startAnalysis">
66 <img style="width: 20px; height: 20px; margin: 0 5px 0 44px" src="../assets/icon_开始分析.png" alt=""> 66 <img style="width: 20px; height: 20px; margin: 0 5px 0 26px" src="../assets/icon_开始分析.png" alt="">
67 <span>开始分析</span> 67 <span>分析</span>
68 </div>
69 <div class="btn-wrapper add-bg" @click="sunshine" style="margin-left: 30px;">
70 <img style="width: 20px; height: 20px; margin: 0 5px 0 26px" src="../assets/icon_开始分析.png" alt="">
71 <span>日照</span>
68 </div> 72 </div>
69 <div class="btn-wrapper" @click="stopAnalysis" style="margin-left: 30px;"> 73 <div class="btn-wrapper" @click="stopAnalysis" style="margin-left: 30px;">
70 <img style="width: 20px; height: 20px;margin: 0 5px 0 26px" src="../assets/icon_清除分析结果.png" alt=""> 74 <img style="width: 20px; height: 20px;margin: 0 5px 0 26px" src="../assets/icon_清除分析结果.png" alt="">
71 <span>清除分析结果</span> 75 <span>清除</span>
72 </div> 76 </div>
73 </div> 77 </div>
74 </div> 78 </div>
...@@ -77,6 +81,7 @@ ...@@ -77,6 +81,7 @@
77 81
78 <script> 82 <script>
79 let maxW = 24 * 60 * 60 * 1000 - 1 * 60 * 1000 83 let maxW = 24 * 60 * 60 * 1000 - 1 * 60 * 1000
84 import shadow from "../assets/js/map/shadow";
80 export default { 85 export default {
81 name: 'yyAnslysis', 86 name: 'yyAnslysis',
82 components: {}, 87 components: {},
...@@ -121,19 +126,15 @@ ...@@ -121,19 +126,15 @@
121 this.$emit('closePop', 'yyAnslysis') 126 this.$emit('closePop', 'yyAnslysis')
122 }, 127 },
123 startAnalysis() { 128 startAnalysis() {
124 console.log(this.shadow); 129 this.shadow.handlerPolygon.deactivate();
130 this.shadow.handlerPolygon.activate();
131 },
132 sunshine() {
133 this.shadow.sunlight();
125 }, 134 },
126 stopAnalysis() { 135 stopAnalysis() {
127 136
128 }, 137 },
129 /**
130 * val 值分别对应
131 * isCF, // 春分
132 isXZ, // 夏至
133 isQF, // 秋分
134 isLD, // 立冬
135 isDZ, // 冬至
136 */
137 handleIsXmbj(val) { 138 handleIsXmbj(val) {
138 let self = this; 139 let self = this;
139 this.keepTqArr.forEach(ele => { 140 this.keepTqArr.forEach(ele => {
......