From ebd0ec4f51288042b6fc5bf714b1febbb63cfacc Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 09 Jan 2026 18:03:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 applications/drone-command/src/views/dataCockpit/components/templateComponents/HistoryTemplate.vue |  149 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 149 insertions(+), 0 deletions(-)

diff --git a/applications/drone-command/src/views/dataCockpit/components/templateComponents/HistoryTemplate.vue b/applications/drone-command/src/views/dataCockpit/components/templateComponents/HistoryTemplate.vue
new file mode 100644
index 0000000..494cd94
--- /dev/null
+++ b/applications/drone-command/src/views/dataCockpit/components/templateComponents/HistoryTemplate.vue
@@ -0,0 +1,149 @@
+<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">
+					<span class="date">{{ getAlarmDate(data.alarmTime) }}</span>
+					<span class="time">{{ getAlarmTime(data.alarmTime) }}</span>
+				</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 class="row">
+				<span class="label">飞行状态</span>
+				<span class="value">{{ getFlightStatusText(data.flightStatus) }}</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>

--
Gitblit v1.9.3