修bug
This commit is contained in:
@@ -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 || '未知错误'));
|
||||
|
||||
Reference in New Issue
Block a user