From a847f035b36c1005119d7f88d40f41849017ff47 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期一, 03 七月 2023 09:27:59 +0800 Subject: [PATCH] 地图导出菜单添加 --- src/views/Index.vue | 21 +++++++++++++++++++-- 1 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/views/Index.vue b/src/views/Index.vue index 218394c..79abcff 100644 --- a/src/views/Index.vue +++ b/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> -- Gitblit v1.9.3