餐饮油烟智能监测与监管一体化平台
riku
2026-03-17 b1a0d701cf898c8b7812e66a808a1c91f2bae6cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
  <div id="container"></div>
</template>
 
<script setup>
import { onMounted, onUnmounted } from 'vue'
import { onMapMounted, createMap, satellite, map, destroyMap } from '@/utils/map/index'
const props = defineProps({
  showSatellite: {
    type: Boolean,
    default: false,
  },
})
onMounted(() => {
  // 高德地图初始化
  setTimeout(() => {
    createMap('container')
    onMapMounted(() => {
      if (props.showSatellite) {
        satellite.show()
      } else {
        satellite.hide()
      }
    })
  }, 1000)
})
onUnmounted(() => {
  destroyMap()
})
</script>
<style>
#container {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: var(--screen-min-height);
  min-width: var(--screen-min-width);
  z-index: 0px;
}
 
/* 去除高德地图的固定版号图标 */
.amap-logo {
  display: none;
  opacity: 0 !important;
}
.amap-copyright {
  display: none;
  opacity: 0 !important;
}
 
/* .amap-marker-label {
  font-size: 14px;
  text-align: center;
  color: white;
  background-color: transparent;
  text-shadow: black 2px 2px 2px;
  border-radius: 2px;
  border: 0px;
  padding: 4px;
} */
</style>