<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 { removeToken, getToken } from "@/utils/auth";
|
//左侧菜单
|
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 router from "@/router";
|
// 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(() => {
|
var token = getToken();
|
if (!token) {
|
router.push("/Login");
|
}
|
|
InitMap.init3DMap();
|
init();
|
const infobar = document.getElementsByClassName("map-info-bar")[0];
|
infobar.style.display = "none";
|
|
const navigation = document.getElementsByClassName("navigation-controls")[0];
|
navigation.style.top = "calc(100% - 182px)";
|
navigation.style.right = "70px";
|
|
window.functionForJs = functionForJs;
|
});
|
</script>
|
<style lang="less" scoped>
|
.body_box {
|
width: 100%;
|
height: 100%;
|
position: absolute;
|
}
|
</style>
|