智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
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
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-29 14:20:49
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-27 15:34:16
 * @FilePath: \bigScreen\src\pages\layout\components\scomponents\toolList.vue
 * @Description:
 *
 * Copyright (c) 2024 by shuishen, All Rights Reserved.
-->
<template>
  <ul v-show="moreToolShow" class="tool-list-box">
    <li @click="showComponent(item.component)" v-for="(item, index) in components" :key="index">
      <i :class="item.icon"></i> {{ item.title }}
    </li>
  </ul>
 
  <component :is="currentComponent" v-if="currentComponent" @closeChild="closeComponent" />
</template>
 
<script setup>
const { moreToolShow } = defineProps({
  moreToolShow: {
    type: Boolean, //参数类型
    default: false, //默认值
    required: true, //是否必须传递
  }
})
import location from './tool/location.vue'
import curtain from './tool/curtain.vue'
import measure from './tool/measure.vue'
import exportScene from './tool/exportScene.vue'
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'
const emit = defineEmits(['close'])
 
let currentComponent = shallowRef(null)
const components = [
  {
    icon: 'fa fa-calculator',
    title: '图上量算',
    component: measure,
  },
  // {
  //   icon: 'fa fa-bar-chart',
  //   title: '空间分析',
  // },
  {
    name: 'location',
    icon: 'fa fa-map-pin',
    title: '坐标定位',
    component: location
  },
  // {
  //   icon: 'fa fa-paper-plane',
  //   title: '地区导航',
  // },
  // {
  //   icon: 'fa fa-edit',
  //   title: '我的标记',
  // },
  // {
  //   icon: 'fa fa-tags',
  //   title: '视角书签',
  // },
  {
    name: 'exportScene',
    icon: 'fa fa-download',
    title: '场景导出',
    component: exportScene
  },
  // {
  //   icon: 'fa fa-object-group',
  //   title: '图上标绘',
  // },
  // {
  //   icon: 'fa fa-helicopter',
  //   title: '飞行漫游',
  // },
  // {
  //   icon: 'fa fa-level-up',
  //   title: '路线导航',
  // },
  // {
  //   icon: 'fa fa-columns',
  //   title: '卷帘对比',
  //   component: curtain
  // },
  // {
  //   icon: 'fa fa-window-restore',
  //   title: '分屏对比',
  // },
]
 
const showComponent = (component) => {
  currentComponent.value = component
  emit('close', 'tool')
}
 
const closeComponent = () => {
  currentComponent.value = null
}
</script>
 
<style lang="scss" scoped>
.tool-list-box {
  position: absolute;
  right: 540px;
  z-index: 101;
  top: 152px;
  background: rgba(63, 72, 84, .7);
  pointer-events: auto;
 
  li {
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    cursor: pointer;
 
    i {
      margin-right: 5px;
    }
  }
 
  li:hover {
    background: #4db3ff;
  }
 
  li:first-child {
    margin-top: 0;
  }
}
</style>