增加全局Loading
Showing
2 changed files
with
89 additions
and
16 deletions
... | @@ -22,4 +22,8 @@ | ... | @@ -22,4 +22,8 @@ |
22 | .cesium-viewer-toolbar, .cesium-viewer-animationContainer, .cesium-viewer-bottom, .cesium-viewer-fullscreenContainer { | 22 | .cesium-viewer-toolbar, .cesium-viewer-animationContainer, .cesium-viewer-bottom, .cesium-viewer-fullscreenContainer { |
23 | display: none !important; | 23 | display: none !important; |
24 | } | 24 | } |
25 | |||
26 | .el-loading-mask { | ||
27 | background-color: rgba(0, 0, 0, 0.4) !important; | ||
28 | } | ||
25 | </style> | 29 | </style> | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="home"> | 2 | <div class="home" v-loading.fullscreen.lock="isFullscreenLoading"> |
3 | <div class="top"> | 3 | <div class="top"> |
4 | <TopTitle></TopTitle> | 4 | <TopTitle></TopTitle> |
5 | </div> | 5 | </div> |
... | @@ -91,10 +91,35 @@ | ... | @@ -91,10 +91,35 @@ |
91 | <addProjectMsg @closeAddProjectMsg='EcloseAddProjectMsg'></addProjectMsg> | 91 | <addProjectMsg @closeAddProjectMsg='EcloseAddProjectMsg'></addProjectMsg> |
92 | </div> | 92 | </div> |
93 | 93 | ||
94 | <threeMap></threeMap> | 94 | |
95 | <!-- <div id="cesiumContainer"> | 95 | <div id="cesiumContainer"> |
96 | <div id="vertical-slider" style="display: none;"></div> | 96 | <div id="vertical-slider" style="display: none;"></div> |
97 | <div id="horizontal-slider" style="display: none;"></div> | 97 | <div id="horizontal-slider" style="display: none;"></div> |
98 | </div> | ||
99 | |||
100 | <!-- <div id="split_up" style="display: none;"></div> | ||
101 | <div id="split_bottom" style="display: none;"></div> | ||
102 | <div id="split_left" style="display: none;"></div> | ||
103 | <div id="split_right" style="display: none;"></div> --> | ||
104 | <!-- <div id="loadingbar" class="spinner"> | ||
105 | <div class="spinner-container container1"> | ||
106 | <div class="circle1"></div> | ||
107 | <div class="circle2"></div> | ||
108 | <div class="circle3"></div> | ||
109 | <div class="circle4"></div> | ||
110 | </div> | ||
111 | <div class="spinner-container container2"> | ||
112 | <div class="circle1"></div> | ||
113 | <div class="circle2"></div> | ||
114 | <div class="circle3"></div> | ||
115 | <div class="circle4"></div> | ||
116 | </div> | ||
117 | <div class="spinner-container container3"> | ||
118 | <div class="circle1"></div> | ||
119 | <div class="circle2"></div> | ||
120 | <div class="circle3"></div> | ||
121 | <div class="circle4"></div> | ||
122 | </div> | ||
98 | </div> --> | 123 | </div> --> |
99 | 124 | ||
100 | </div> | 125 | </div> |
... | @@ -104,7 +129,9 @@ | ... | @@ -104,7 +129,9 @@ |
104 | import objectManage from '../assets/js/map/maputils'; | 129 | import objectManage from '../assets/js/map/maputils'; |
105 | import createDraw from '../assets/js/map/createDraw'; | 130 | import createDraw from '../assets/js/map/createDraw'; |
106 | import roller from "../assets/js/map/roller"; | 131 | import roller from "../assets/js/map/roller"; |
107 | import { loadModules } from "esri-loader"; | 132 | // import flood from "../assets/js/map/flood"; |
133 | // import viewpoint from "../assets/js/map/viewpoint"; | ||
134 | // import visual from "../assets/js/map/visual"; | ||
108 | 135 | ||
109 | 136 | ||
110 | import TopTitle from '../components/topTitle'; | 137 | import TopTitle from '../components/topTitle'; |
... | @@ -114,7 +141,6 @@ | ... | @@ -114,7 +141,6 @@ |
114 | import leftAssert from '../components/leftAssert'; | 141 | import leftAssert from '../components/leftAssert'; |
115 | // import mapPop from '../components/mapPop'; | 142 | // import mapPop from '../components/mapPop'; |
116 | 143 | ||
117 | import threeMap from '../components/threeMap'; //三维地图 | ||
118 | import allSee from '../components/allSee'; //通视 | 144 | import allSee from '../components/allSee'; //通视 |
119 | import ymAnslysis from '../components/ymAnslysis'; //淹没分析 | 145 | import ymAnslysis from '../components/ymAnslysis'; //淹没分析 |
120 | import horizon from '../components/horizon'; // 视域分析 | 146 | import horizon from '../components/horizon'; // 视域分析 |
... | @@ -137,7 +163,7 @@ | ... | @@ -137,7 +163,7 @@ |
137 | bottomNav, | 163 | bottomNav, |
138 | leftAssert, | 164 | leftAssert, |
139 | // mapPop, | 165 | // mapPop, |
140 | threeMap, | 166 | |
141 | allSee, | 167 | allSee, |
142 | ymAnslysis, | 168 | ymAnslysis, |
143 | horizon, | 169 | horizon, |
... | @@ -178,20 +204,60 @@ | ... | @@ -178,20 +204,60 @@ |
178 | 'tjxAnslysis', 'yyAnslysis', 'visualField', 'kgAnalusis'], | 204 | 'tjxAnslysis', 'yyAnslysis', 'visualField', 'kgAnalusis'], |
179 | 205 | ||
180 | addProjectMsg: false, // 建设项目信息表 | 206 | addProjectMsg: false, // 建设项目信息表 |
207 | isFullscreenLoading: false, // 全屏loading | ||
181 | } | 208 | } |
182 | }, | 209 | }, |
183 | mounted() { | 210 | mounted() { |
184 | objectManage.viewer = this.viewer; | 211 | this.viewer = new Cesium.Viewer('cesiumContainer', {shadows : true}); |
185 | // loadModules([ | 212 | this.viewer.imageryLayers.addImageryProvider(new Cesium.TiandituImageryProvider({ |
186 | // "esri/Map", | 213 | credit : new Cesium.Credit('天地图全球影像服务'), |
187 | // "esri/Basemap", | 214 | token: URL_CONFIG.TOKEN_TIANDITU |
188 | // "esri/views/MapView", | 215 | })); |
189 | // "esri/layers/TileLayer", | 216 | let scene = this.viewer.scene |
190 | // "esri/layers/WebTileLayer", | 217 | scene.shadowMap.darkness = 1; //设置第二重烘焙纹理的效果(明暗程度) |
191 | // "dojo/domReady!" | 218 | scene.skyAtmosphere.brightnessShift=0.4; |
192 | // ]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer]) => { | 219 | scene.debugShowFramesPerSecond = true; |
193 | // console.log(Map); | 220 | scene.hdrEnabled = false; |
221 | scene.sun.show = true; | ||
222 | this.draw = new createDraw(this.viewer); | ||
223 | |||
224 | var promise = []; | ||
225 | // promise[0] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, { | ||
226 | // name: 'ground' | ||
194 | // }); | 227 | // }); |
228 | promise[0] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, { | ||
229 | name: 'build1' | ||
230 | }); | ||
231 | promise[1] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_BUILD, { | ||
232 | name: 'build2' | ||
233 | }); | ||
234 | promise[2] = scene.addS3MTilesLayerByScp(URL_CONFIG.SCP_CBD_GROUND1, { | ||
235 | name: 'ground' | ||
236 | }); | ||
237 | |||
238 | Cesium.when.all(promise, layers => { | ||
239 | // this.layers = layer; | ||
240 | objectManage.viewer = this.viewer; | ||
241 | // layers[0].selectEnabled = false; | ||
242 | // layers[1].selectEnabled = false; | ||
243 | console.log(layers); | ||
244 | layers[1].shadowType = 2; | ||
245 | layers[2].shadowType = 2; | ||
246 | scene.camera.setView({ | ||
247 | destination : Cesium.Cartesian3.fromDegrees(116.44621857300415, 39.899281526734555, 216.7793905027196), | ||
248 | orientation : { | ||
249 | heading : 0.41348036210986194, | ||
250 | pitch : -0.13636490404291735, | ||
251 | roll : 6.283185307179563 | ||
252 | } | ||
253 | }); | ||
254 | }, function(e){ | ||
255 | if (widget._showRenderLoopErrors) { | ||
256 | var title = '加载SCP失败,请检查网络连接状态或者url地址是否正确?'; | ||
257 | widget.showErrorPanel(title, undefined, e); | ||
258 | } | ||
259 | }); | ||
260 | |||
195 | }, | 261 | }, |
196 | methods: { | 262 | methods: { |
197 | searchRoat(val) { | 263 | searchRoat(val) { |
... | @@ -537,4 +603,7 @@ | ... | @@ -537,4 +603,7 @@ |
537 | .tjx-anslysis { | 603 | .tjx-anslysis { |
538 | top: 265px; | 604 | top: 265px; |
539 | } | 605 | } |
606 | |||
607 | |||
608 | |||
540 | </style> | 609 | </style> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment