From eff70e8ab54adbb2ea7a0fee221bd56cab98fd1d Mon Sep 17 00:00:00 2001
From: zhangyue <82248909@qq.com>
Date: Tue, 28 Jul 2026 15:24:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8A=A5=E8=A1=A8=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E6=94=B9=E4=B8=BA=20=E9=BB=98=E8=AE=A4=E5=A4=A9?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/appmana/datacenter/statistics.vue | 95 +++++++++++++--------
1 file changed, 60 insertions(+), 35 deletions(-)
diff --git a/src/views/appmana/datacenter/statistics.vue b/src/views/appmana/datacenter/statistics.vue
index 6b7a64b..d2b328e 100644
--- a/src/views/appmana/datacenter/statistics.vue
+++ b/src/views/appmana/datacenter/statistics.vue
@@ -25,46 +25,60 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
模式
-
- 日统计
- 月统计
- 年统计
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -188,10 +202,15 @@
const params = {
stationCode: stationCode,
// deployId: deployId,
- summaryMode: summaryMode || 'dayhours',
- startTime: startTime,
+ summaryMode: summaryMode || 'customDays',
+ // startTime: startTime,
};
+ if (startTime && Array.isArray(startTime) && startTime.length === 2) {
+ params.startTime = startTime[0]?.format(dateFormat.value) || null;
+ params.endTime = startTime[1]?.format(dateFormat.value) || null;
+ }
+
getDeviceAlertStatistic(params)
.then((res) => {
if (res.success) {
@@ -204,7 +223,7 @@
// ✅ 高阈值:使用 highVal,名称为"高阈值"
if (itemDetail.highVal) {
markLines.push({
- name: itemDetail.itemName +'高阈值',
+ name: itemDetail.itemName + '高阈值',
value: itemDetail.highVal,
color: '#fcc419',
type: 'dashed',
@@ -213,7 +232,7 @@
// ✅ 低阈值:使用 lowVal,名称为"低阈值"
if (itemDetail.lowVal) {
markLines.push({
- name: itemDetail.itemName +'低阈值',
+ name: itemDetail.itemName + '低阈值',
value: itemDetail.lowVal,
color: '#ff6b6b',
type: 'dotted',
@@ -252,7 +271,7 @@
const chartInstances = [];
const chartRefs = {};
- const selectedDimension = ref('dayhours');
+ const selectedDimension = ref('customDays');
const selectedDate = ref(null);
// ==================== 根据统计模式动态计算日期格式 ====================
@@ -262,6 +281,8 @@
return 'YYYY-MM-DD';
case 'monthDays':
return 'YYYY-MM';
+ case 'customDays':
+ return 'YYYY-MM-DD';
case 'yearMonth':
return 'YYYY';
default:
@@ -275,6 +296,8 @@
return 'date';
case 'monthDays':
return 'month';
+ case 'customDays':
+ return 'date';
case 'yearMonth':
return 'year';
default:
@@ -288,6 +311,8 @@
return '选择日期';
case 'monthDays':
return '选择月份';
+ case 'customDays':
+ return '选择日期';
case 'yearMonth':
return '选择年份';
default: