无人机管理后台前端(已迁走)
张含笑
2025-09-01 2ca94de8ede18ac07ccfd8dec7b6f6a707adde9b
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
<!--
 * @Author       : yuan
 * @Date         : 2025-06-17 09:50:12
 * @LastEditors  : yuan
 * @LastEditTime : 2025-07-05 16:23:32
 * @FilePath     : \src\components\DeviceJobDetails\HistoryDronePopup.vue
 * @Description  : 
 * Copyright 2025 OBKoro1, All Rights Reserved. 
 * 2025-06-17 09:50:12
-->
<template>
    <div class="history-drone-map-popup">
        <div class="container">
            <div class="header">
                {{ props.data.name }}
 
                <el-icon class="header-close" @click="props.removeLabel(props.data)">
                    <Close />
                </el-icon>
            </div>
 
            <div class="content">
                <div class="content-item cg">
                    <span class="content-item-title">飞行成果数:</span>
 
                    <div class="content-item-category" v-html="flyResultNum"></div>
                </div>
 
                <div class="content-item sc">
                    <span class="content-item-title">飞行时长:</span>
 
                    <div class="content-item-category" v-html="flyTime"></div>
                </div>
 
                <div class="content-item jl">
                    <span class="content-item-title">飞行距离:</span>
 
                    <div class="content-item-category" v-html="flyDistance"></div>
                </div>
            </div>
        </div>
    </div>
</template>
 
<script setup>
import { Close } from '@element-plus/icons-vue'
 
const props = defineProps(['data', 'removeLabel'])
 
const flyResultNum = computed(() => {
    let flyResultNum = props.data?.fly_result_num || '--'
 
    if (flyResultNum !== '--') {
        return `
            <span class="content-item-category-num">${flyResultNum}</span>
            <span class="content-item-category-unit">个</span>
        `
    } else {
        return `
                <span class="content-item-category-num">${flyResultNum}</span>
            `
    }
})
 
const flyTime = computed(() => {
    let flyTime = props.data?.fly_time || '--'
    if (flyTime > 60) {
        const minute = Math.floor(flyTime / 60)
        const second = Math.round(flyTime % 60)
 
        return `
            <span class="content-item-category-num">${minute}</span>
            <span class="content-item-category-unit">m</span>
            <span class="content-item-category-num">${second}</span>
            <span class="content-item-category-unit">s</span>
        `
    } else {
        if (flyTime !== '--') {
            flyTime = Math.round(flyTime)
 
            return `
                <span class="content-item-category-num">${flyTime}</span>
                <span class="content-item-category-unit">s</span>
            `
        } else {
            return `
                <span class="content-item-category-num">${flyTime}</span>
            `
        }
    }
})
 
const flyDistance = computed(() => {
    let distance = props.data?.fly_distance || '--'
 
    if (distance > 1000) {
        distance = (distance / 1000).toFixed(2)
 
        return `
            <span class="content-item-category-num">${distance}</span>
            <span class="content-item-category-unit">km</span>
        `
    } else {
        if (distance !== '--') {
            distance = distance.toFixed(2)
 
            return `
                <span class="content-item-category-num">${distance}</span>
                <span class="content-item-category-unit">m</span>
            `
        } else {
            return `
                <span class="content-item-category-num">${distance}</span>
            `
        }
    }
})
 
const list = ref([
    { name: '空闲中', value: 0, color: 'rgb(6, 217, 87)' },
    { name: '作业', value: 0, color: '#FFA768' },
    { name: '离线中', value: 0, color: '#FF7373' },
])
const loading = ref(true)
 
const dataObj = ref({
    device_num: 0,
    jobNum: 0,
    region_name: '',
})
onMounted(async () => {
    loading.value = true
 
    loading.value = false
})
</script>
<style scoped lang="scss">
.history-drone-map-popup {
    position: relative;
    width: 200px;
    height: 156px;
    background: url('@/assets/images/historyMapPopup/popup-bg.png') no-repeat center / 100% 100%;
    backdrop-filter: blur(4px);
 
    .container {
        padding: 6px;
        display: flex;
        flex-direction: column;
        position: absolute;
        bottom: 0;
        width: 200px;
        height: 156px;
        // background: rgba(3, 13, 33, 0.4);
        border-radius: 10px;
 
        .header {
            margin: 0 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            height: 34px;
            font-family: Source Han Sans CN, Source Han Sans CN;
            font-weight: bold;
            font-size: 16px;
            color: #ffffff;
            text-align: left;
            font-style: normal;
            text-transform: none;
            border-bottom: 2px solid rgba(255, 255, 255, 0.2);
 
            .header-close {
                display: flex;
                align-items: center;
                width: 16px;
                cursor: pointer;
            }
        }
 
        .content {
            height: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
 
            &-item {
                padding: 0px 16px 9px 32px;
                position: relative;
                height: 0;
                flex: 1;
                display: flex;
                align-items: flex-end;
                justify-content: space-between;
 
                &::after {
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 14px;
                    width: 18px;
                    height: 18px;
                    transform: translate(0, -50%);
                }
 
                &.cg::after {
                    background: url('@/assets/images/historyMapPopup/1.png') no-repeat center / 100% 100%;
                }
 
                &.sc::after {
                    background: url('@/assets/images/historyMapPopup/2.png') no-repeat center / 100% 100%;
                }
 
                &.jl::after {
                    background: url('@/assets/images/historyMapPopup/3.png') no-repeat center / 100% 100%;
                }
 
                & * {
                    height: 100%;
                    display: flex;
                    align-items: flex-end;
                }
 
                &-title {
                    font-family: Source Han Sans CN-Regular;
                    font-size: 14px;
                    color: #dfe9fe;
                }
 
                ::v-deep(.content-item-category) {
                    .content-item-category-num {
                        font-family: Source Han Sans CN-Bold;
                        font-weight: Bold;
                        color: #ffffff;
                        font-size: 14px;
                    }
 
                    .content-item-category-unit {
                        font-family: Source Han Sans CN-Regular;
                        font-size: 14px;
                        color: #dfe9fe;
                    }
                }
            }
        }
    }
}
</style>