From cf2ab1935f8b6cd113db09142ed8b8dd6f3070ab Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 19 Jan 2026 11:37:59 +0800
Subject: [PATCH] feat:数据驾驶舱显示相关调整处理

---
 applications/drone-command/src/views/dataCockpit/components/RealWarning.vue |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/applications/drone-command/src/views/dataCockpit/components/RealWarning.vue b/applications/drone-command/src/views/dataCockpit/components/RealWarning.vue
index 81df396..e40f246 100644
--- a/applications/drone-command/src/views/dataCockpit/components/RealWarning.vue
+++ b/applications/drone-command/src/views/dataCockpit/components/RealWarning.vue
@@ -2,7 +2,7 @@
  * @Author       : yuan
  * @Date         : 2026-01-08 09:29:07
  * @LastEditors  : yuan
- * @LastEditTime : 2026-01-08 14:49:09
+ * @LastEditTime : 2026-01-19 11:31:09
  * @FilePath     : \applications\drone-command\src\views\dataCockpit\components\RealWarning.vue
  * @Description  : 
  * Copyright 2026 OBKoro1, All Rights Reserved. 
@@ -15,16 +15,18 @@
 		element-loading-background="rgba(5, 5, 15, 0.6)"
 		element-loading-text="加载中..."
 	>
-		<EmptyState v-if="!realWarningData.length" />
-		<RealTemplate
-			v-else
-			v-for="(item, ind) in realWarningData"
-			:key="ind"
-			:data="item"
-			@signal="() => handleAction('signal', item)"
-			@counter="() => handleAction('counter', item)"
-			@favorite="() => console.log('收藏', item.id)"
-		/>
+		<div class="list-content">
+			<EmptyState v-if="!realWarningData.length" />
+			<RealTemplate
+				v-else
+				v-for="(item, ind) in realWarningData"
+				:key="ind"
+				:data="item"
+				@signal="() => handleAction('signal', item)"
+				@counter="() => handleAction('counter', item)"
+				@favorite="() => console.log('收藏', item.id)"
+			/>
+		</div>
 	</div>
 </template>
 
@@ -46,8 +48,7 @@
 
 const buildPayload = (type, item) => ({
 	counterWay: type === 'signal' ? 1 : type === 'counter' ? 2 : '',
-	deviceId: item.deviceId,
-	droneDeviceCode: item.droneDeviceCode ?? item.droneSerialNo
+	alarmRecordId: item?.alarmRecordId ?? item?.id
 })
 
 const handleAction = async (type, item) => {
@@ -56,6 +57,7 @@
 		const res = await interferenceAndExpulsionApi(buildPayload(type, item))
 		if (res?.data?.success) {
 			ElMessage({ type: 'success', message: `${actionText}成功` })
+			await fetchRealWarning()
 		} else {
 			ElMessage({ type: 'error', message: res?.data?.msg || `${actionText}失败` })
 		}
@@ -88,8 +90,16 @@
 
 <style lang="scss" scoped>
 .real-warning {
+	display: flex;
+	flex-direction: column;
 	width: 100%;
 	height: 100%;
+	overflow: hidden;
 }
 
+.list-content {
+	height: 0;
+	flex: 1;
+	overflow-y: auto;
+}
 </style>

--
Gitblit v1.9.3