吉安感知网项目-前端
chenyao
4 days ago 899f3474a9bc54d1a72710b4fd992176c1888e70
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
<!--
 * @Author       : yuan
 * @Date         : 2026-01-17 14:51:39
 * @LastEditors  : yuan
 * @LastEditTime : 2026-01-31 16:03:51
 * @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 detect-area"></span>
            <span class="legend-text" data-text="侦测区">侦测区</span>
        </div>
        <div class="legend-item">
            <span class="legend-color alarm-area"></span>
            <span class="legend-text" data-text="报警区">报警区</span>
        </div>
        <div class="legend-item">
            <span class="legend-color key-control-area"></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'
import offlineEquipmentIcon from '@/assets/images/dataCockpit/legend/offline-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.partition {
    background: radial-gradient(50% 50% at 50% 50%, rgba(255, 215, 114, 0.5) 0%, rgba(168, 107, 0, 0.6) 100%);
    border: 1px solid rgba(255, 215, 114, 0.9);
}
 
.legend-color.detect-area {
    background-color: rgba(25, 178, 230, 0.5);
    border: 1px solid rgb(0, 251, 255);
}
 
.legend-color.alarm-area {
    background-color: rgba(255, 235, 59, 0.5);
    border: 1px solid rgb(255, 235, 59);
}
 
.legend-color.key-control-area {
    background-color: rgba(247, 20, 20, 0.5);
    border: 1px solid rgb(255, 0, 0);
}
 
.legend-icon {
    width: 30px;
    height: 42px;
    display: block;
}
 
.legend-icon.drone {
    width: 30px;
    height: 30px;
    display: block;
}
</style>