jikai commit
Showing
1 changed file
with
50 additions
and
16 deletions
| ... | @@ -53,8 +53,12 @@ | ... | @@ -53,8 +53,12 @@ |
| 53 | <div class="bottomNav"> | 53 | <div class="bottomNav"> |
| 54 | <bottomNav></bottomNav> | 54 | <bottomNav></bottomNav> |
| 55 | </div> | 55 | </div> |
| 56 | <div class="leftAssert"> | 56 | <!-- <div class="leftAssert"> |
| 57 | <leftAssert @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></leftAssert> | 57 | <leftAssert @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></leftAssert> |
| 58 | </div> --> | ||
| 59 | <div class="leftAssert"> | ||
| 60 | <!-- <taskList @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></taskList> --> | ||
| 61 | <component :is="leftPanel" @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></component> | ||
| 58 | </div> | 62 | </div> |
| 59 | <!-- <div class="mapPop"> | 63 | <!-- <div class="mapPop"> |
| 60 | <mapPop></mapPop> | 64 | <mapPop></mapPop> |
| ... | @@ -101,7 +105,9 @@ | ... | @@ -101,7 +105,9 @@ |
| 101 | <script> | 105 | <script> |
| 102 | 106 | ||
| 103 | import objectManage from '../assets/js/map/maputils'; | 107 | import objectManage from '../assets/js/map/maputils'; |
| 104 | import createDraw from '../assets/js/map/createDraw'; | 108 | import mapManage from '../assets/js/map/towMapObjects'; |
| 109 | import GraphicAttributeManager from '../assets/js/map/GraphicAttributeManager'; | ||
| 110 | import DrawTool from '../assets/js/map/DrawTool'; | ||
| 105 | import roller from "../assets/js/map/roller"; | 111 | import roller from "../assets/js/map/roller"; |
| 106 | import { loadModules } from "esri-loader"; | 112 | import { loadModules } from "esri-loader"; |
| 107 | 113 | ||
| ... | @@ -111,6 +117,8 @@ | ... | @@ -111,6 +117,8 @@ |
| 111 | import rightFunc from '../components/rightFunc'; | 117 | import rightFunc from '../components/rightFunc'; |
| 112 | import bottomNav from '../components/bottomNav'; | 118 | import bottomNav from '../components/bottomNav'; |
| 113 | import leftAssert from '../components/leftAssert'; | 119 | import leftAssert from '../components/leftAssert'; |
| 120 | import taskList from '../components/taskList'; | ||
| 121 | |||
| 114 | // import mapPop from '../components/mapPop'; | 122 | // import mapPop from '../components/mapPop'; |
| 115 | 123 | ||
| 116 | import arcgisMap from '../components/arcgisMap'; //二维地图 | 124 | import arcgisMap from '../components/arcgisMap'; //二维地图 |
| ... | @@ -136,6 +144,7 @@ | ... | @@ -136,6 +144,7 @@ |
| 136 | rightFunc, | 144 | rightFunc, |
| 137 | bottomNav, | 145 | bottomNav, |
| 138 | leftAssert, | 146 | leftAssert, |
| 147 | taskList, | ||
| 139 | // mapPop, | 148 | // mapPop, |
| 140 | arcgisMap, | 149 | arcgisMap, |
| 141 | threeMap, | 150 | threeMap, |
| ... | @@ -152,6 +161,7 @@ | ... | @@ -152,6 +161,7 @@ |
| 152 | data() { | 161 | data() { |
| 153 | return { | 162 | return { |
| 154 | map: 'threeMap', | 163 | map: 'threeMap', |
| 164 | leftPanel: 'leftAssert', | ||
| 155 | viewer: undefined, | 165 | viewer: undefined, |
| 156 | gisView: undefined, | 166 | gisView: undefined, |
| 157 | flyCircle: false, | 167 | flyCircle: false, |
| ... | @@ -184,7 +194,13 @@ | ... | @@ -184,7 +194,13 @@ |
| 184 | } | 194 | } |
| 185 | }, | 195 | }, |
| 186 | mounted() { | 196 | mounted() { |
| 187 | objectManage.viewer = this.viewer; | 197 | // objectManage.viewer = this.viewer; |
| 198 | // console.log(this.$http.get) | ||
| 199 | // console.log(this.$http.post) | ||
| 200 | // this.$http.get('http://192.168.3.194/XAYZT/analizeTask/getTaskListByUserId?userid=t0101_4028d839708bbb6d0170946760781016') | ||
| 201 | // .then(response => { | ||
| 202 | // console.log(response); | ||
| 203 | // }); | ||
| 188 | }, | 204 | }, |
| 189 | methods: { | 205 | methods: { |
| 190 | searchRoat(val) { | 206 | searchRoat(val) { |
| ... | @@ -199,11 +215,13 @@ | ... | @@ -199,11 +215,13 @@ |
| 199 | "esri/views/MapView", | 215 | "esri/views/MapView", |
| 200 | "esri/layers/TileLayer", | 216 | "esri/layers/TileLayer", |
| 201 | "esri/layers/WebTileLayer", | 217 | "esri/layers/WebTileLayer", |
| 218 | "esri/layers/MapImageLayer", | ||
| 219 | "esri/geometry/SpatialReference", | ||
| 202 | "esri/geometry/Extent", | 220 | "esri/geometry/Extent", |
| 203 | "dojo/domReady!" | 221 | "dojo/domReady!" |
| 204 | ]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, Extent]) => { | 222 | ]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, MapImageLayer, SpatialReference, Extent]) => { |
| 205 | if(!this.mapView) { | 223 | if(!this.mapView) { |
| 206 | this.mapView = new MapView({ | 224 | mapManage.mapView = new MapView({ |
| 207 | map: new Map({ | 225 | map: new Map({ |
| 208 | basemap: new Basemap({ | 226 | basemap: new Basemap({ |
| 209 | baseLayers: [ | 227 | baseLayers: [ |
| ... | @@ -222,20 +240,35 @@ | ... | @@ -222,20 +240,35 @@ |
| 222 | center: [117.73289858455101, 36.255126757404966], | 240 | center: [117.73289858455101, 36.255126757404966], |
| 223 | zoom: 9, | 241 | zoom: 9, |
| 224 | }); | 242 | }); |
| 225 | this.mapView.when(() => { | 243 | mapManage.mapView.when(() => { |
| 226 | this.isFullscreenLoading = false; | 244 | this.isFullscreenLoading = false; |
| 245 | // this.leftPanel = flag ? 'taskList' : 'leftAssert'; | ||
| 246 | this.leftPanel = 'taskList'; | ||
| 247 | // objectManage.mapView.map.add(new MapImageLayer({ | ||
| 248 | // url: "https://192.168.3.194:6443/arcgis/rest/services/xzsj/ygyx/MapServer" | ||
| 249 | // })); | ||
| 250 | this.mapInit(); | ||
| 227 | }, function(error){ | 251 | }, function(error){ |
| 228 | console.log("The view's resources failed to load: ", error); | 252 | console.log("The view's resources failed to load: ", error); |
| 229 | }); | 253 | }); |
| 230 | return; | 254 | return; |
| 231 | } | 255 | } |
| 232 | this.isFullscreenLoading = false; | 256 | this.isFullscreenLoading = false; |
| 233 | this.mapView.destroy(); | 257 | objectManage.mapView && (this.leftPanel = flag ? 'taskList' : 'leftAssert'); |
| 234 | this.mapView = undefined; | 258 | objectManage.mapView.destroy(); |
| 259 | objectManage.mapView = undefined; | ||
| 235 | }); | 260 | }); |
| 236 | }, | 261 | }, |
| 262 | mapInit() { | ||
| 263 | GraphicAttributeManager.getInstance(); | ||
| 264 | DrawTool.getInstance(); | ||
| 265 | mapManage.drawTool.activate('point1', function() { | ||
| 266 | |||
| 267 | }); | ||
| 268 | }, | ||
| 237 | isCamera(flag) { | 269 | isCamera(flag) { |
| 238 | // this.commons.log(flag) | 270 | // this.commons.log(flag) |
| 271 | |||
| 239 | }, | 272 | }, |
| 240 | isLayer(flag) { | 273 | isLayer(flag) { |
| 241 | this.commons.log(flag) | 274 | this.commons.log(flag) |
| ... | @@ -249,10 +282,10 @@ | ... | @@ -249,10 +282,10 @@ |
| 249 | } | 282 | } |
| 250 | ,EisReturn(val) {} | 283 | ,EisReturn(val) {} |
| 251 | ,Eenlarge() { | 284 | ,Eenlarge() { |
| 252 | this.viewer.camera.zoomIn(300); | 285 | objectManage.viewer.camera.zoomIn(300); |
| 253 | } | 286 | } |
| 254 | ,Enarrow() { | 287 | ,Enarrow() { |
| 255 | this.viewer.camera.zoomOut(300); | 288 | objectManage.viewer.camera.zoomOut(300); |
| 256 | } | 289 | } |
| 257 | ,Ecoordinate() { | 290 | ,Ecoordinate() { |
| 258 | 291 | ||
| ... | @@ -272,11 +305,11 @@ | ... | @@ -272,11 +305,11 @@ |
| 272 | ,ErollerShutter() { | 305 | ,ErollerShutter() { |
| 273 | let slider = document.getElementById('vertical-slider'); | 306 | let slider = document.getElementById('vertical-slider'); |
| 274 | slider.style.display = (this.isRoller = !this.isRoller) ? 'block' : 'none'; | 307 | slider.style.display = (this.isRoller = !this.isRoller) ? 'block' : 'none'; |
| 275 | this.roller instanceof roller || (this.roller = new roller(this.viewer)); | 308 | this.roller instanceof roller || (this.roller = new roller(objectManage.viewer)); |
| 276 | } | 309 | } |
| 277 | ,EsplitScreen() { | 310 | ,EsplitScreen() { |
| 278 | // VERTICAL HORIZONTAL | 311 | // VERTICAL HORIZONTAL |
| 279 | this.viewer.scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL; | 312 | objectManage.viewer.scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL; |
| 280 | } | 313 | } |
| 281 | // 指北 | 314 | // 指北 |
| 282 | ,EtoNorth() { | 315 | ,EtoNorth() { |
| ... | @@ -295,15 +328,15 @@ | ... | @@ -295,15 +328,15 @@ |
| 295 | } | 328 | } |
| 296 | // 顶视 | 329 | // 顶视 |
| 297 | ,EtopSee() { | 330 | ,EtopSee() { |
| 298 | this.viewer.camera.flyTo({ | 331 | objectManage.viewer.camera.flyTo({ |
| 299 | destination : Cesium.Cartesian3.fromDegrees(116.45821857300415, 39.915281526734555, 5000.0) | 332 | destination : Cesium.Cartesian3.fromDegrees(116.45821857300415, 39.915281526734555, 5000.0) |
| 300 | }); | 333 | }); |
| 301 | } | 334 | } |
| 302 | // 环视 | 335 | // 环视 |
| 303 | ,EroundSee() { | 336 | ,EroundSee() { |
| 304 | (this.flyCircle = !this.flyCircle) ? | 337 | (this.flyCircle = !this.flyCircle) ? |
| 305 | this.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}) : | 338 | objectManage.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}) : |
| 306 | this.viewer.camera.stopFlyCircle(); | 339 | objectManage.viewer.camera.stopFlyCircle(); |
| 307 | } | 340 | } |
| 308 | // 视域 | 341 | // 视域 |
| 309 | ,Ehorizon(val) { | 342 | ,Ehorizon(val) { |
| ... | @@ -432,7 +465,7 @@ | ... | @@ -432,7 +465,7 @@ |
| 432 | position: absolute; | 465 | position: absolute; |
| 433 | z-index: 1000; | 466 | z-index: 1000; |
| 434 | left: 32px; | 467 | left: 32px; |
| 435 | top: 149px; | 468 | top: 120px; |
| 436 | } | 469 | } |
| 437 | 470 | ||
| 438 | .mapPop { | 471 | .mapPop { |
| ... | @@ -542,4 +575,5 @@ | ... | @@ -542,4 +575,5 @@ |
| 542 | .tjx-anslysis { | 575 | .tjx-anslysis { |
| 543 | top: 265px; | 576 | top: 265px; |
| 544 | } | 577 | } |
| 578 | |||
| 545 | </style> | 579 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment