月球大数据地理空间分析展示平台-【前端】-月球2期前端
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<template>
  <div class="body_box">
    <div
      id="cesiumContainer"
      style="width: 100%; height: 100%; position: absolute"
    ></div>
    <export-map
      v-if="layerExportshow"
      @SETexportMap="SETexportMap"
    ></export-map>
    <menus></menus>
    <bottom-btn></bottom-btn>
    <mouse-move></mouse-move>
  </div>
</template>
 
<script lang="ts" setup>
import {
  ref,
  onMounted,
  onBeforeUnmount,
  reactive,
  defineProps,
  defineEmits,
} from "vue";
//左侧菜单
import menus from "@/views/menus.vue";
//底部菜单
import bottomBtn from "@/components/bottomBtn.vue";
import exportMap from "./export/exportMap.vue";
import InitMap from "@/assets/js/Map/index.js";
//经纬度显示
import mouseMove from "@/components/mouseMove.vue";
// import * as SmartEarth from "../../public/CIMSDK/index.js";
// import * as SmartEarth from "../assets/js/CIMSDK/index.js";
 
let map;
var viewer;
const layerExportshow = ref(false);
 
const init = () => {
  viewer = InitMap.Viewer;
  map = InitMap.sgworld;
  window.setMouseMove(true);
};
//关闭状态
const SETexportMap = (res) => {
  layerExportshow.value = res;
};
const functionForJs = (res) => {
  switch (res.type) {
    case "exportMap":
      layerExportshow.value = res.value;
      break;
  }
};
onMounted(() => {
  // console.log(SmartEarth);
  InitMap.init3DMap();
  init();
  window.functionForJs = functionForJs;
});
</script>
<style lang="less" scoped>
.body_box {
  width: 100%;
  height: 100%;
  position: absolute;
}
</style>