wangrong
2026-08-30 761e5c5fa871959f60e15c971c8d83f2b53d0af5
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<template>
  <el-container class="map-setting-container">
    <el-aside class="map-setting-left">
      <div class="left-container">
        <div
          v-for="(item, index) in leftOptions"
          :key="item.id"
          class="left-menu-item"
          :class="{ active: activeIndex === item.id }"
          @click="selectHandler(index)"
        >
          <span :title="t(item.name)">{{ t(item.name) }}</span>
        </div>
      </div>
    </el-aside>
    <el-main class="map-setting-right">
      <div class="right-container">
        <OnlineMap v-if="activeIndex" />
        <geometry v-else />
      </div>
    </el-main>
  </el-container>
</template>
 
<script lang="ts" setup>
import { ref } from 'vue'
import { useI18n } from '@/hooks/web/useI18n'
import Geometry from './Geometry.vue'
import OnlineMap from './OnlineMap.vue'
 
const { t } = useI18n()
 
const activeIndex = ref(0)
const leftOptions = [
  { id: 0, name: 'online_map.geometry' },
  { id: 1, name: 'online_map.onlinemap' }
]
 
const selectHandler = (index: number) => {
  activeIndex.value = index
}
</script>
 
<style lang="less" scoped>
.map-setting-container {
  width: 100%;
  height: 100%;
  .map-setting-left {
    width: 200px !important;
    height: 100%;
    border-right: 1px solid #1f232926;
    .left-container {
      padding: 16px 16px 16px 16px;
      width: 100%;
      height: 100%;
      .left-menu-item {
        width: 168px;
        height: 40px;
        padding: 9px 8px;
        line-height: 22px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 400;
        cursor: pointer;
        &:hover {
          background: #1f232926;
        }
        span {
          display: block;
          width: 150px;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }
      .active {
        background: var(--ed-color-primary-1a, #3370ff1a);
        color: var(--ed-color-primary);
        font-weight: 500;
      }
    }
  }
  .map-setting-right {
    padding: 0 !important;
    .right-container {
      height: 100%;
    }
  }
}
</style>