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/templateComponents/RealTemplate.vue | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/applications/drone-command/src/views/dataCockpit/components/templateComponents/RealTemplate.vue b/applications/drone-command/src/views/dataCockpit/components/templateComponents/RealTemplate.vue
index d29d7b4..06b6695 100644
--- a/applications/drone-command/src/views/dataCockpit/components/templateComponents/RealTemplate.vue
+++ b/applications/drone-command/src/views/dataCockpit/components/templateComponents/RealTemplate.vue
@@ -57,8 +57,8 @@
</div>
<div class="footer">
- <el-button class="general" color="#2B2B4C" @click="emit('signal')">信号干扰</el-button>
- <el-button color="#284FE3" type="primary" @click="emit('counter')">诱导驱离</el-button>
+ <el-button v-if="showSignalBtn(data)" class="general" color="#2B2B4C" @click="emit('signal')">信号干扰</el-button>
+ <el-button v-if="showCounterBtn(data)" color="#284FE3" type="primary" @click="emit('counter')">诱导驱离</el-button>
</div>
</div>
</template>
@@ -90,6 +90,21 @@
return 'detecting'
}
+const normalizeCounterWay = (value) => {
+ if (value == null) return ''
+ return String(value).trim()
+}
+
+const showSignalBtn = (item) => {
+ const counterWay = normalizeCounterWay(item?.counterWay)
+ return counterWay !== '1'
+}
+
+const showCounterBtn = (item) => {
+ const counterWay = normalizeCounterWay(item?.counterWay)
+ return counterWay !== '2'
+}
+
const getDataSource = (item) => {
return item?.deviceName || item?.areaName || '-'
}
--
Gitblit v1.9.3