月球大数据地理空间分析展示平台-【前端】-月球2期前端
WX
2023-06-09 eff42e5897b5f0935aa5b93c1bd9acb8bb39b8f0
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<template>
  <div class="menus" v-show="fullScreen">
    <div class="logo_box">
      <img src="../assets/img/logo.png" alt="" class="logo" />
      <div class="logo_name">
        <h3>月球大数据地理空间分析展示平台</h3>
        <img src="../assets/img/logob.png" alt="" class="logo_name_b" />
      </div>
    </div>
    <div class="menus_box">
      <div
        class="imgBox"
        v-for="(item, i) in menuOptions"
        :key="i"
        @click="setMenuClick(item)"
      >
        <img
          v-if="checkMenuFlag != item.id"
          class="imgIcon"
          :src="require('../assets/img/leftBtn/' + item.imgUrl)"
        />
        <img
          v-if="checkMenuFlag == item.id"
          class="imgIcon"
          :src="require('../assets/img/leftBtn/' + item.checkImgUrl)"
        />
      </div>
    </div>
  </div>
  <div class="content_box" v-show="fullScreen">
    <layer-manage v-show="checkMenuFlag == 'l1'"> </layer-manage>
    <plotting v-show="checkMenuFlag == 'l2'"> </plotting>
    <baseMapSwitching v-show="checkMenuFlag == 'l5'"> </baseMapSwitching>
    <search> </search>
  </div>
  <top-btn v-show="fullScreen"></top-btn>
  <div class="fullScreen_btn"></div>
</template>
 
<script lang="ts" setup>
import {
  ref,
  onMounted,
  onBeforeUnmount,
  reactive,
  defineProps,
  defineEmits,
} from "vue";
import menuData from "@/assets/js/Map/menuData";
import menuTool from "@/assets/js/Map/menuTool";
//顶部菜单
import topBtn from "@/components/topBtn.vue";
//图层管理页面
import layerManage from "@/views/layer/layerManage.vue";
//地理编码搜索
import search from "@/views/search/search.vue";
//标绘查询
import plotting from "@/views/plotting/plotting.vue";
//底图切换
import baseMapSwitching from "@/views/baseMapSwitching/baseMapSwitching.vue";
const menuOptions = ref([]);
const checkMenuFlag = ref("");
let fullScreen = ref(true);
const setMenuClick = (res) => {
  if (res.id == "l6") {
    fullScreen.value = !fullScreen.value;
  }
  if (checkMenuFlag.value && checkMenuFlag.value == res.id) {
    checkMenuFlag.value = null;
  } else {
    checkMenuFlag.value = res.id;
    menuTool.leftTools(res);
  }
};
onMounted(() => {
  menuOptions.value = menuData.leftMenu;
});
</script>
<style lang="less" scoped>
.menus {
  position: absolute;
  top: 27px;
  left: 14px;
  .logo_box {
    display: flex;
    align-items: center;
    .logo {
      width: 68px;
      height: 68px;
    }
    .logo_name {
      margin-left: 14px;
 
      h3 {
        font-size: 36px;
        font-family: Source Han Sans CN;
        font-weight: 400;
        color: #ffffff;
        line-height: 9px;
      }
      .logo_name_b {
        text-align: center;
        width: 100%;
        height: 9px;
      }
    }
  }
  .menus_box {
    background: url("../assets/img/矩形 1.png");
    left: 7px;
    position: absolute;
    top: 105px;
    width: 71px;
    height: 628px;
    padding: 36px 0px;
    .imgBox {
      width: 100%;
      display: flex;
      justify-content: center;
      margin-bottom: 52px;
      cursor: pointer;
      img {
        width: 30px;
        height: 30px;
      }
    }
  }
}
.content_box {
  position: absolute;
  top: 135px;
  left: 100px;
  display: flex;
}
.fullScreen_btn {
  // background: url("../assets/img/形状 3.png") no-repeat center;
  // background-size: 100% 100%;
  width: 30px;
  height: 30px;
}
</style>