From 549e2991c6b3b60e0f6176ef45ecfb0535e3dc40 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 18 Jul 2025 16:36:07 +0800
Subject: [PATCH] feat:设备统计调整
---
src/views/wel/components/statistics.vue | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/src/views/wel/components/statistics.vue b/src/views/wel/components/statistics.vue
index ab9b6c4..8b57f02 100644
--- a/src/views/wel/components/statistics.vue
+++ b/src/views/wel/components/statistics.vue
@@ -67,7 +67,7 @@
</template>
<template v-else-if="test[item]?.name == '机巢保险'">
<div
- v-for="statusKey in [1, 0]"
+ v-for="statusKey in [1, 0,2]"
:key="statusKey"
class="status-item"
:class="getStatusStyle(test[item]?.name, statusKey)"
@@ -84,6 +84,28 @@
<span class="count">
{{ newtitleData[item].status_map[statusKey] }}
{{ test[item]?.name === '无人机' ? '架' : '个' }}
+ </span>
+ </div>
+ </template>
+ <template v-else-if="test[item]?.name == '无人机流量'">
+ <div
+ v-for="statusKey in [ 0,2,1]"
+ :key="statusKey"
+ class="status-item"
+ :class="getStatusStyle(test[item]?.name, statusKey)"
+ :style="{ color: getStatusColor(test[item]?.name, statusKey) }"
+ >
+ <span
+ class="indicator"
+ :style="{
+ backgroundColor: getStatusBackground(test[item]?.name, statusKey),
+ color: getStatusColor(test[item]?.name, statusKey),
+ }"
+ ></span>
+ <span class="label">{{ getStatusLabel(test[item]?.name, statusKey) }}</span>
+ <span class="count">
+ {{ newtitleData[item].status_map[statusKey] }}
+ {{ test[item]?.name === '无人机流量' ? '架' : '个' }}
</span>
</div>
</template>
@@ -190,6 +212,7 @@
const insureStatus = {
0: '临近到期',
1: '正常期限',
+ 2:'保险过期'
};
const moveListStatus = {
'-1': '离线中',
@@ -199,13 +222,14 @@
const statusStyles = {
机巢保险: {
0: { class: 'expired', color: '#FFA600', background: '#FFA600' },
- 1: { class: 'normal', color: 'rgba(27, 148, 255, 1)', background: 'rgba(27, 148, 255, 1)' },
+ 1: { class: 'normal', color: 'rgba(0, 180, 69, 1)', background: 'rgba(0, 180, 69, 1)' },
+ 2: { class: 'flying',color: 'rgba(255, 36, 36, 1)', background: 'rgba(255, 36, 36, 1)' },
},
无人机流量: {
0: { class: 'offline', color: 'rgba(0, 180, 69, 1)', background: 'rgba(0, 180, 69, 1)' },
- 1: { class: 'flying', color: 'rgba(186, 186, 186, 1)', background: 'rgba(186, 186, 186, 1)' },
- 2: { class: 'flying', color: 'rgba(255, 36, 36, 1)', background: 'rgba(255, 36, 36, 1)' },
+ 1: { class: 'flying', color: 'rgba(255, 36, 36, 1)', background: 'rgba(255, 36, 36, 1)' },
+ 2: { class: 'flying', color: '#FFA600', background: '#FFA600' },
},
监控设备: {
0: { class: 'offline', color: 'rgba(186, 186, 186, 1)', background: 'rgba(186, 186, 186, 1)' },
--
Gitblit v1.9.3