|
@@ -1,15 +1,6 @@
|
|
|
<template>
|
|
|
<div class="container">
|
|
|
- <el-row style="height: 40px">
|
|
|
- <div class="myHeader">
|
|
|
- <el-button :type="this.dimension == 2 ? 'success' : 'danger'" @click="dimensionswitch(2)" round>二维</el-button>
|
|
|
- <el-button :type="this.dimension == 3 ? 'success' : 'danger'" @click="dimensionswitch(3)" round>三维</el-button>
|
|
|
- <el-button :type="this.dimension == 5 ? 'success' : 'danger'" @click="dimensionswitch(5)" round>
|
|
|
- 一体化
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </el-row>
|
|
|
- <el-row id="earth" style="height: 790px; width: 100%; display: flex; position: relative">
|
|
|
+ <el-row id="earth" style="height: 100%; width: 100%; display: flex; position: relative">
|
|
|
<el-col style="height: 100%; position: relative" :span="this.leftwidth">
|
|
|
<div class="main-layout" v-on:mouseover="changeActive('2D')">
|
|
|
<div id="2DcesiumContainer" class="map" @click="onMapClick"></div>
|
|
@@ -70,25 +61,20 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import screenfull from "screenfull";
|
|
|
-import fireController from "@/api/fireController";
|
|
|
+import fireController from "@/api/fireController.js";
|
|
|
import { getToken } from "@/utils";
|
|
|
import axios from "axios";
|
|
|
import Model from "@/views/situation/Model.vue";
|
|
|
import satelliteModel from '@/assets/model/satelite.glb';
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
|
Model
|
|
|
},
|
|
|
computed: {
|
|
|
- leftwidth() {
|
|
|
- if (this.dimension === 2) {
|
|
|
- return 24;
|
|
|
- } else if (this.dimension === 3) {
|
|
|
- return 0;
|
|
|
- } else if (this.dimension === 5) {
|
|
|
- return 12;
|
|
|
- }
|
|
|
- }
|
|
|
+ ...mapGetters([
|
|
|
+ "dimension"
|
|
|
+ ])
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -96,13 +82,13 @@ export default {
|
|
|
situation: [],
|
|
|
nameIdList:[],
|
|
|
websocket: null,
|
|
|
+ leftwidth: 12,
|
|
|
unit: [],
|
|
|
satellite: [],
|
|
|
center: [],
|
|
|
move_data: {},
|
|
|
viewer2D: null,
|
|
|
viewer3D: null,
|
|
|
- dimension: 5,
|
|
|
mousevalue: null,
|
|
|
// 选中的点
|
|
|
selectedMarker: null,
|
|
@@ -122,6 +108,20 @@ export default {
|
|
|
id: 1
|
|
|
};
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ dimension: {
|
|
|
+ handler: function (val, oldVal) {
|
|
|
+ console.log(val)
|
|
|
+ if (val == 2) {
|
|
|
+ this.leftwidth = 24;
|
|
|
+ } else if (val == 3) {
|
|
|
+ this.leftwidth = 0;
|
|
|
+ } else if (val == 5) {
|
|
|
+ this.leftwidth = 12;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getData();
|
|
|
},
|
|
@@ -1042,6 +1042,9 @@ this.viewer3D.entities.values.forEach(entity => {
|
|
|
display: none !important;
|
|
|
}
|
|
|
|
|
|
+.container{
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
.modeltooltip {
|
|
|
position: absolute;
|
|
|
padding: 5px;
|