吉安感知网项目-前端
shuishen
2026-01-19 6eff67ca4d898a1dfeeb51175e372ae9beaca8a9
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
142
143
<template>
    <div class="drone-info-card" @click="emit('click', data)">
        <div class="title">
            <span class="name">
                {{ data.droneName }}
            </span>
        </div>
 
        <div class="rows">
            <div class="row">
                <span class="label">序列号</span>
                <span class="value">{{ data.droneSerialNo }}</span>
            </div>
 
            <div class="row">
                <span class="label">数据源</span>
                <span class="value">{{ getDataSource(data) }}</span>
            </div>
 
            <div class="row">
                <span class="label">信号频段</span>
                <span class="value">{{ formatFrequency(data.signalFreqMhz) }}</span>
            </div>
 
            <div class="row">
                <span class="label">发现时间</span>
                <span class="value">
                    {{ data.alarmTime }}
                </span>
            </div>
 
            <div class="row">
                <span class="label">停留时间</span>
                <span class="value">{{ data.stayDuration }}</span>
            </div>
 
            <div class="row">
                <span class="label">反制方式</span>
                <span class="value">{{ getCounterWayText(data.counterWay) }}</span>
            </div>
        </div>
    </div>
</template>
 
<script setup>
defineProps({
    data: {
        type: Object,
        required: true,
        default: () => ({})
    }
})
 
const emit = defineEmits(['click'])
 
const getDataSource = (item) => {
    return item?.deviceName || item?.areaName || '-'
}
 
const formatFrequency = (value) => {
    if (value == null || value === '') return '-'
    return `${value}MHZ`
}
 
const getAlarmDate = (value) => {
    if (!value) return '-'
    const parts = value.replace('T', ' ').split(' ')
    return parts[0] || value
}
 
const getAlarmTime = (value) => {
    if (!value) return '-'
    const parts = value.replace('T', ' ').split(' ')
    return parts[1] || value
}
 
const getFlightStatusText = (value) => {
    if (value === 1 || value === '1') return '侦测中'
    if (value === 2 || value === '2') return '反制中'
    return value || '-'
}
 
const getCounterWayText = (value) => {
    if (value === 1 || value === '1') return '信号干扰'
    if (value === 2 || value === '2') return '诱导驱离'
    if (value === 3 || value === '3') return '无'
    return value || '-'
}
</script>
 
<style scoped lang="scss">
.drone-info-card {
    margin-top: 10px;
    padding: 10px;
    color: #fff;
    background: #191933;
    border-radius: 6px 6px 6px 6px;
 
    &:hover {
        filter: brightness(1.05);
    }
 
    .title {
        display: flex;
        align-items: center;
        gap: 6px;
 
        .name {
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: bold;
            font-size: 14px;
            color: #FFFFFF;
            text-align: left;
            font-style: normal;
            text-transform: none;
        }
    }
 
    .rows {
        margin-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
 
        font-family: Source Han Sans CN, Source Han Sans CN;
        font-weight: 400;
        font-size: 12px;
        color: #9E9EBA;
        text-align: left;
        font-style: normal;
        text-transform: none;
 
        .row {
            line-height: 22px;
 
            .label {
                margin-right: 10px;
                color: #D4D5D7;
            }
        }
    }
}
</style>