月球大数据地理空间分析展示平台-【前端】-月球2期前端
Surpriseplus
2023-09-08 be73e1692ebe367d45a0d6459402a5a3ac7edf81
src/views/Index.vue
@@ -1,15 +1,17 @@
<template>
  <div class="body_box">
    <div id="cesiumContainer">
    </div>
  <div
    class="body_box"
    v-loading="store.state.loading"
    element-loading-background="rgba(0, 0, 0, 0.8)"
  >
    <export-map
      v-if="layerExportshow"
      @SETexportMap="SETexportMap"
    ></export-map>
    <export-list v-if="store.state.setExportList"></export-list>
    <menus></menus>
    <bottom-btn></bottom-btn>
    <mouse-move></mouse-move>
    <bottom-btn v-if="store.state.isShowMap"></bottom-btn>
    <mouse-move v-if="store.state.isShowMap"></mouse-move>
    <spatial-box
      v-if="layerSpatialshow"
      @SETspatialClose="SETspatialClose"
@@ -19,9 +21,14 @@
      @SETcoordClose="setCoordLocation"
    >
    </coord-location>
    <details-query v-if="store.state.details.showDetails">
    </details-query>
    <details-query v-if="store.state.details.showDetails"> </details-query>
    <div v-if="store.state.isShowMap">
      <map-view></map-view>
    </div>
    <div v-if="!store.state.isShowMap">
      <ol-map></ol-map>
    </div>
    <plotting-inquire></plotting-inquire>
  </div>
</template>
@@ -40,7 +47,8 @@
//底部菜单
import bottomBtn from "@/components/bottomBtn.vue";
import exportMap from "./export/exportMap.vue";
import InitMap from "@/assets/js/Map/index.js";
import mapView from "@/views/Map/mapView.vue";
import olMap from "@/views/Map/olMap.vue";
//经纬度显示
import mouseMove from "@/components/mouseMove.vue";
//空间查询
@@ -51,21 +59,19 @@
import mapclock from "@/views/mapClock/index.vue";
//矢量数据信息弹窗
import detailsQuery from "@/views/query/detailsQuery.vue";
//出图列表
import exportList from "./export/exportList.vue";
//标绘查询
import plottingInquire from "./plotting/plottingInquire.vue";
import router from "@/router";
import { useStore } from "vuex"; // 引入useStore 方法
let map;
var viewer;
const store = useStore(); // 该方法用于返回store 实例
const layerExportshow = ref(false);
const layerSpatialshow = ref(false);
const layerLocationshow = ref(false);
const init = () => {
  viewer = InitMap.Viewer;
  map = InitMap.sgworld;
  window.setMouseMove(true);
};
//关闭状态
const SETexportMap = (res) => {
  layerExportshow.value = res;
@@ -115,10 +121,9 @@
    router.push("/Login");
  }
  InitMap.init3DMap();
  init();
  // setCloseNavigatBar();
  window.functionForJs = functionForJs;
  store.state.isShowMap = true;
});
</script>
<style lang="less" scoped>