|
|
|
@ -3,7 +3,7 @@ |
|
|
|
<div id="app" class="dashboard" style="overflow-x: hidden;"> |
|
|
|
<div id="app" class="dashboard" style="overflow-x: hidden;"> |
|
|
|
|
|
|
|
|
|
|
|
<div class="header"> |
|
|
|
<div class="header"> |
|
|
|
<h1>设备监控中心大屏 - 智能管理版</h1> |
|
|
|
<h1>唐山烟草网络设备智能监管平台</h1> |
|
|
|
<div class="time-display">{{ currentTime }}</div> |
|
|
|
<div class="time-display">{{ currentTime }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +37,7 @@ |
|
|
|
<div class="floor-device-grid"> |
|
|
|
<div class="floor-device-grid"> |
|
|
|
<div v-for="floor in floorDeviceDistribution" |
|
|
|
<div v-for="floor in floorDeviceDistribution" |
|
|
|
:key="floor.level" |
|
|
|
:key="floor.level" |
|
|
|
class="floor-device-card"> |
|
|
|
class="floor-device-card" @click="jumpToDeviceFiles(floor.floor)"> |
|
|
|
<div class="floor-level">{{ floor.floor }}</div> |
|
|
|
<div class="floor-level">{{ floor.floor }}</div> |
|
|
|
<div class="floor-count">{{ floor.count }}</div> |
|
|
|
<div class="floor-count">{{ floor.count }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -52,11 +52,11 @@ |
|
|
|
<div class="panel"> |
|
|
|
<div class="panel"> |
|
|
|
<div class="panel-title">设备信息统计</div> |
|
|
|
<div class="panel-title">设备信息统计</div> |
|
|
|
<div class="device-stats-container"> |
|
|
|
<div class="device-stats-container"> |
|
|
|
<div class="device-stat-item"> |
|
|
|
<div class="device-stat-item clickable-item" @click="goToDeviceFiles"> |
|
|
|
<div class="device-stat-value">{{ totalDevices }}</div> |
|
|
|
<div class="device-stat-value">{{ totalDevices }}</div> |
|
|
|
<div class="device-stat-label">设备总数</div> |
|
|
|
<div class="device-stat-label">设备总数</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="device-stat-item"> |
|
|
|
<div class="device-stat-item clickable-item" @click="goToDeviceStateMonitor"> |
|
|
|
<div class="device-stat-value">{{ onlineDevices }}</div> |
|
|
|
<div class="device-stat-value">{{ onlineDevices }}</div> |
|
|
|
<div class="device-stat-label">在线设备数</div> |
|
|
|
<div class="device-stat-label">在线设备数</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -377,6 +377,19 @@ export default { |
|
|
|
this.refreshDeviceStatus(); |
|
|
|
this.refreshDeviceStatus(); |
|
|
|
}, 60000); |
|
|
|
}, 60000); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
activated() { |
|
|
|
|
|
|
|
// 每次进入首页时刷新数据 |
|
|
|
|
|
|
|
this.refreshDeviceStatus(); |
|
|
|
|
|
|
|
this.loadDeviceTypeData(); |
|
|
|
|
|
|
|
this.loadAlertStatistics(); |
|
|
|
|
|
|
|
this.loadAlertTimes(); |
|
|
|
|
|
|
|
this.loadFloorDeviceDistribution(); |
|
|
|
|
|
|
|
this.updateTimeDisplay(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新最后刷新时间 |
|
|
|
|
|
|
|
this.updateTime = this.currentTime; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
beforeDestroy() { |
|
|
|
beforeDestroy() { |
|
|
|
// 移除事件监听 |
|
|
|
// 移除事件监听 |
|
|
|
window.removeEventListener('resize', this.handleResize); |
|
|
|
window.removeEventListener('resize', this.handleResize); |
|
|
|
@ -385,6 +398,14 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
// 跳转到设备档案页面 |
|
|
|
|
|
|
|
goToDeviceFiles() { |
|
|
|
|
|
|
|
this.$router.push('/device/files'); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
// 跳转到设备状态监控页面 |
|
|
|
|
|
|
|
goToDeviceStateMonitor() { |
|
|
|
|
|
|
|
this.$router.push('/inMonitoring/devicesState'); |
|
|
|
|
|
|
|
}, |
|
|
|
// 处理日期范围变化,将结束时间设置为23:59:59 |
|
|
|
// 处理日期范围变化,将结束时间设置为23:59:59 |
|
|
|
handleDateRangeChange(range) { |
|
|
|
handleDateRangeChange(range) { |
|
|
|
if (range && range.length === 2) { |
|
|
|
if (range && range.length === 2) { |
|
|
|
@ -868,6 +889,37 @@ export default { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.warningLevelFilter = level; |
|
|
|
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() { |
|
|
|
refreshDeviceStatus() { |
|
|
|
@ -983,14 +1035,24 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.index-box { |
|
|
|
.index-box { |
|
|
|
background-color: #0a1633; |
|
|
|
background-color: #0a1633; |
|
|
|
color: #e6e6e6; |
|
|
|
color: #e6e6e6; |
|
|
|
overflow: auto; |
|
|
|
overflow: auto; |
|
|
|
padding: 16px; |
|
|
|
padding: 16px; |
|
|
|
min-height: 100%; |
|
|
|
min-height: 100%; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
box-sizing: border-box; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 可点击元素的样式 */ |
|
|
|
|
|
|
|
.clickable-item { |
|
|
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
|
|
transition: all 0.3s; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.clickable-item:hover { |
|
|
|
|
|
|
|
background-color: #f0f9ff; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.dashboard { |
|
|
|
.dashboard { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
|