From 17ccd3b50b37491c606c37674a182a96f590f9d1 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Sun, 16 Nov 2025 19:31:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/alarm/ThresholdAlarmList.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/alarm/ThresholdAlarmList.vue b/src/views/alarm/ThresholdAlarmList.vue index 76af4122..682b4f53 100644 --- a/src/views/alarm/ThresholdAlarmList.vue +++ b/src/views/alarm/ThresholdAlarmList.vue @@ -239,13 +239,15 @@ export default { if (currentTab === 'area') { const { currentPage, pageSize } = this.areaAlarms.pagination; const response = await AlarmApi.getAreaThresholdAlarms({ page: currentPage, page_size: pageSize }); - this.areaAlarms.list = response.list || []; - this.areaAlarms.pagination.total = response.pagination?.total || 0; + // 从 response.data 中获取 list 和 pagination + this.areaAlarms.list = response.data.list || []; + this.areaAlarms.pagination.total = response.data.pagination?.total || 0; } else { const { currentPage, pageSize } = this.deviceAlarms.pagination; const response = await AlarmApi.getDeviceThresholdAlarms({ page: currentPage, page_size: pageSize }); - this.deviceAlarms.list = response.list || []; - this.deviceAlarms.pagination.total = response.pagination?.total || 0; + // 从 response.data 中获取 list 和 pagination + this.deviceAlarms.list = response.data.list || []; + this.deviceAlarms.pagination.total = response.data.pagination?.total || 0; } } catch (error) { this.$message.error('加载告警规则失败: ' + (error.message || '未知错误'));