吉安感知网项目-前端
张含笑
2026-01-21 9eb8bb59b802ceef1f52d334c8e577f2bf02c90e
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
<!--
 * @Author       : yuan
 * @Date         : 2026-01-17 14:51:39
 * @LastEditors  : yuan
 * @LastEditTime : 2026-01-17 15:13:50
 * @FilePath     : \applications\drone-command\src\views\dataCockpit\components\LegendBar.vue
 * @Description  : 
 * Copyright 2026 OBKoro1, All Rights Reserved. 
 * 2026-01-17 14:51:39
-->
<template>
    <div class="legend-bar">
        <div class="legend-title" data-text="图例">图例</div>
        <div class="legend-item">
            <span class="legend-color defense"></span>
            <span class="legend-text" data-text="防区">防区</span>
        </div>
        <div class="legend-item">
            <span class="legend-color partition"></span>
            <span class="legend-text" data-text="区域">区域</span>
        </div>
        <div class="legend-item">
            <img class="legend-icon drone" :src="droneIcon" alt="无人机" />
            <span class="legend-text" data-text="无人机">无人机</span>
        </div>
        <div class="legend-item">
            <img class="legend-icon" :src="commandPostIcon" alt="指挥点" />
            <span class="legend-text" data-text="指挥点">指挥点</span>
        </div>
        <div class="legend-item">
            <img class="legend-icon" :src="equipmentIcon" alt="设备" />
            <span class="legend-text" data-text="设备">设备</span>
        </div>
    </div>
</template>
 
<script setup>
import droneIcon from '@/assets/images/dataCockpit/legend/drone.png'
import commandPostIcon from '@/assets/images/dataCockpit/legend/command-post.png'
import equipmentIcon from '@/assets/images/dataCockpit/legend/equipment.png'
</script>
 
<style scoped lang="scss">
.legend-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 16px;
 
    font-family: Source Han Sans CN, Source Han Sans CN;
    font-size: 14px;
    color: #FFFFFF;
    text-align: center;
    font-style: normal;
    text-transform: none;
}
 
.legend-title {
    font-weight: 800;
}
 
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
 
.legend-title,
.legend-text {
    position: relative;
    white-space: nowrap;
 
    text-shadow:
    -1px -1px 0 black,
     1px -1px 0 black,
    -1px  1px 0 black,
     1px  1px 0 black;
}
 
.legend-color {
    width: 30px;
    height: 30px;
    border-radius: 0;
}
 
.legend-color.defense {
    background: radial-gradient(50% 50% at 50% 50%, #2aedbf 0%, #012b11 100%);
    border: 1px solid #19d266;
}
 
.legend-color.partition {
    background: radial-gradient(50% 50% at 50% 50%, #ffc609 0%, #583300 100%);
    border: 1px solid #ffcd2a;
}
 
.legend-icon {
    width: 30px;
    height: 42px;
    display: block;
}
 
.legend-icon.drone {
    width: 30px;
    height: 30px;
    display: block;
}
</style>