guonan
2025-06-04 a025bd0aff7b67491cfdcb445745886c0ffaa8d2
src/views/GisView.vue
@@ -1,10 +1,18 @@
<template>
  <div id="gis-view" ref="mapRef"></div>
  <!-- 切换底图影像 -->
  <div @click="handleShow" class="diqiu">
  <div
    @click="handleShow"
    class="diqiu"
    :class="{ 'shift-right': simStore.isShowEarth }"
  >
    <img src="@/assets/img/screen/dq.png" alt="" />
  </div>
  <div v-show="picShow" class="earthBox">
  <div
    v-show="picShow"
    class="earthBox"
    :class="{ 'shift-right': simStore.isShowEarth }"
  >
    <div
      v-for="(item, index) in views"
      :key="index"
@@ -34,6 +42,8 @@
import { getDistrictCount, getDistrictCountByCity } from "@/api/index";
import { useRoute } from "vue-router";
import { EventBus } from "@/eventBus"; // 引入事件总线
import { useSimStore } from "@/store/simulation";
const simStore = useSimStore();
const views = [
  { label: "地图", value: "map", icon: "地图.png" },
@@ -53,7 +63,7 @@
const currentIndex = ref(-1);
let currentLayer = null;
let currentLayer = null;
const switchView = async (index) => {
  currentIndex.value = index;
@@ -617,4 +627,11 @@
.item-container.active .label {
  background-color: rgba(33, 137, 103, 0.8);
}
.diqiu.shift-right {
  right: 10%;
}
.earthBox.shift-right {
  right: 13%;
}
</style>