月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-07-03 a847f035b36c1005119d7f88d40f41849017ff47
src/views/Index.vue
@@ -4,7 +4,10 @@
      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>
  </div>
@@ -23,21 +26,35 @@
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 * 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;
};
//关闭状态
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>