d3efcda7 by 刘远

jikai commit

1 parent cc8568a9
......@@ -53,8 +53,12 @@
<div class="bottomNav">
<bottomNav></bottomNav>
</div>
<div class="leftAssert">
<!-- <div class="leftAssert">
<leftAssert @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></leftAssert>
</div> -->
<div class="leftAssert">
<!-- <taskList @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></taskList> -->
<component :is="leftPanel" @EFadb='EFadb' @EKgfz='EKgfz' @EGzfx='EGzfx' @EAddProject='EAddProject'></component>
</div>
<!-- <div class="mapPop">
<mapPop></mapPop>
......@@ -101,7 +105,9 @@
<script>
import objectManage from '../assets/js/map/maputils';
import createDraw from '../assets/js/map/createDraw';
import mapManage from '../assets/js/map/towMapObjects';
import GraphicAttributeManager from '../assets/js/map/GraphicAttributeManager';
import DrawTool from '../assets/js/map/DrawTool';
import roller from "../assets/js/map/roller";
import { loadModules } from "esri-loader";
......@@ -111,6 +117,8 @@
import rightFunc from '../components/rightFunc';
import bottomNav from '../components/bottomNav';
import leftAssert from '../components/leftAssert';
import taskList from '../components/taskList';
// import mapPop from '../components/mapPop';
import arcgisMap from '../components/arcgisMap'; //二维地图
......@@ -136,6 +144,7 @@
rightFunc,
bottomNav,
leftAssert,
taskList,
// mapPop,
arcgisMap,
threeMap,
......@@ -152,6 +161,7 @@
data() {
return {
map: 'threeMap',
leftPanel: 'leftAssert',
viewer: undefined,
gisView: undefined,
flyCircle: false,
......@@ -184,7 +194,13 @@
}
},
mounted() {
objectManage.viewer = this.viewer;
// objectManage.viewer = this.viewer;
// console.log(this.$http.get)
// console.log(this.$http.post)
// this.$http.get('http://192.168.3.194/XAYZT/analizeTask/getTaskListByUserId?userid=t0101_4028d839708bbb6d0170946760781016')
// .then(response => {
// console.log(response);
// });
},
methods: {
searchRoat(val) {
......@@ -199,11 +215,13 @@
"esri/views/MapView",
"esri/layers/TileLayer",
"esri/layers/WebTileLayer",
"esri/layers/MapImageLayer",
"esri/geometry/SpatialReference",
"esri/geometry/Extent",
"dojo/domReady!"
]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, Extent]) => {
]).then(([Map, Basemap, MapView, TileLayer, WebTileLayer, MapImageLayer, SpatialReference, Extent]) => {
if(!this.mapView) {
this.mapView = new MapView({
mapManage.mapView = new MapView({
map: new Map({
basemap: new Basemap({
baseLayers: [
......@@ -222,20 +240,35 @@
center: [117.73289858455101, 36.255126757404966],
zoom: 9,
});
this.mapView.when(() => {
mapManage.mapView.when(() => {
this.isFullscreenLoading = false;
// this.leftPanel = flag ? 'taskList' : 'leftAssert';
this.leftPanel = 'taskList';
// objectManage.mapView.map.add(new MapImageLayer({
// url: "https://192.168.3.194:6443/arcgis/rest/services/xzsj/ygyx/MapServer"
// }));
this.mapInit();
}, function(error){
console.log("The view's resources failed to load: ", error);
});
return;
}
this.isFullscreenLoading = false;
this.mapView.destroy();
this.mapView = undefined;
objectManage.mapView && (this.leftPanel = flag ? 'taskList' : 'leftAssert');
objectManage.mapView.destroy();
objectManage.mapView = undefined;
});
},
mapInit() {
GraphicAttributeManager.getInstance();
DrawTool.getInstance();
mapManage.drawTool.activate('point1', function() {
});
},
isCamera(flag) {
// this.commons.log(flag)
},
isLayer(flag) {
this.commons.log(flag)
......@@ -249,10 +282,10 @@
}
,EisReturn(val) {}
,Eenlarge() {
this.viewer.camera.zoomIn(300);
objectManage.viewer.camera.zoomIn(300);
}
,Enarrow() {
this.viewer.camera.zoomOut(300);
objectManage.viewer.camera.zoomOut(300);
}
,Ecoordinate() {
......@@ -272,11 +305,11 @@
,ErollerShutter() {
let slider = document.getElementById('vertical-slider');
slider.style.display = (this.isRoller = !this.isRoller) ? 'block' : 'none';
this.roller instanceof roller || (this.roller = new roller(this.viewer));
this.roller instanceof roller || (this.roller = new roller(objectManage.viewer));
}
,EsplitScreen() {
// VERTICAL HORIZONTAL
this.viewer.scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL;
objectManage.viewer.scene.multiViewportMode = Cesium.MultiViewportMode.HORIZONTAL;
}
// 指北
,EtoNorth() {
......@@ -295,15 +328,15 @@
}
// 顶视
,EtopSee() {
this.viewer.camera.flyTo({
objectManage.viewer.camera.flyTo({
destination : Cesium.Cartesian3.fromDegrees(116.45821857300415, 39.915281526734555, 5000.0)
});
}
// 环视
,EroundSee() {
(this.flyCircle = !this.flyCircle) ?
this.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}) :
this.viewer.camera.stopFlyCircle();
objectManage.viewer.camera.flyCircle({x: -2179734.991212225, y: 4379799.834213645, z: 4092420.9926270735}) :
objectManage.viewer.camera.stopFlyCircle();
}
// 视域
,Ehorizon(val) {
......@@ -432,7 +465,7 @@
position: absolute;
z-index: 1000;
left: 32px;
top: 149px;
top: 120px;
}
.mapPop {
......@@ -542,4 +575,5 @@
.tjx-anslysis {
top: 265px;
}
</style>
\ No newline at end of file
......