+
{{ onlineDevices }}
在线设备数
@@ -377,6 +377,19 @@ export default {
this.refreshDeviceStatus();
}, 60000);
},
+ activated() {
+ // 每次进入首页时刷新数据
+ this.refreshDeviceStatus();
+ this.loadDeviceTypeData();
+ this.loadAlertStatistics();
+ this.loadAlertTimes();
+ this.loadFloorDeviceDistribution();
+ this.updateTimeDisplay();
+
+ // 更新最后刷新时间
+ this.updateTime = this.currentTime;
+ },
+
beforeDestroy() {
// 移除事件监听
window.removeEventListener('resize', this.handleResize);
@@ -385,6 +398,14 @@ export default {
}
},
methods: {
+ // 跳转到设备档案页面
+ goToDeviceFiles() {
+ this.$router.push('/device/files');
+ },
+ // 跳转到设备状态监控页面
+ goToDeviceStateMonitor() {
+ this.$router.push('/inMonitoring/devicesState');
+ },
// 处理日期范围变化,将结束时间设置为23:59:59
handleDateRangeChange(range) {
if (range && range.length === 2) {
@@ -868,6 +889,37 @@ export default {
} else {
this.warningLevelFilter = level;
}
+
+ // 年度预警跳转到预警信息页面
+ if (level === 'annual') {
+ this.$router.push('/inMonitoring/inMonitoring/message');
+ }
+ // 1-3级预警跳转到预警信息页面并传递级别参数
+ else if (level === 'level1') {
+ this.$router.push({
+ path: '/inMonitoring/inMonitoring/message',
+ query: { level: '1' }
+ });
+ }
+ else if (level === 'level2') {
+ this.$router.push({
+ path: '/inMonitoring/inMonitoring/message',
+ query: { level: '2' }
+ });
+ }
+ else if (level === 'level3') {
+ this.$router.push({
+ path: '/inMonitoring/inMonitoring/message',
+ query: { level: '3' }
+ });
+ }
+ },
+ // 跳转到设备档案页面并传递楼层参数
+ jumpToDeviceFiles(floor) {
+ this.$router.push({
+ path: '/device/files',
+ query: { floor: floor }
+ });
},
refreshDeviceStatus() {
@@ -983,14 +1035,24 @@ export default {
}
.index-box {
- background-color: #0a1633;
- color: #e6e6e6;
- overflow: auto;
- padding: 16px;
- min-height: 100%;
- position: relative;
- box-sizing: border-box;
- }
+ background-color: #0a1633;
+ color: #e6e6e6;
+ overflow: auto;
+ padding: 16px;
+ min-height: 100%;
+ position: relative;
+ box-sizing: border-box;
+ }
+
+ /* 可点击元素的样式 */
+ .clickable-item {
+ cursor: pointer;
+ transition: all 0.3s;
+ }
+
+ .clickable-item:hover {
+ background-color: #f0f9ff;
+ }
.dashboard {
width: 100%;
diff --git a/ALOps_sys_fe/alops-ui/src/views/message/index.vue b/ALOps_sys_fe/alops-ui/src/views/message/index.vue
index 5d2c7238..70194b5d 100644
--- a/ALOps_sys_fe/alops-ui/src/views/message/index.vue
+++ b/ALOps_sys_fe/alops-ui/src/views/message/index.vue
@@ -82,7 +82,7 @@ export default {
getList() {
this.loading = true
messageList(this.queryParams).then(response => {
- this.dataList = response.data || []
+ this.dataList = response.rows || []
this.total = response.data?.length || 0
this.loading = false
}