diff --git a/webs/sms-web/src/services/system/dashboard.js b/webs/sms-web/src/services/system/dashboard.js index 01589b8..f8e97f6 100644 --- a/webs/sms-web/src/services/system/dashboard.js +++ b/webs/sms-web/src/services/system/dashboard.js @@ -50,6 +50,10 @@ export function getTaskList(params) { export function getOrderStatistics(params) { return request.get(`${dashboardUrl}/workOrder/stattic`, { params }) } +// 平台容量统计 +export function getPlatformCapacity(params) { + return request.get('/ams/v1/module/statistics', { params }) +} // 右上角应用列表 // 应用信息说明 diff --git a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/PlatformCapacity.vue b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/PlatformCapacity.vue index 4488c3e..eb57b3b 100644 --- a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/PlatformCapacity.vue +++ b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/PlatformCapacity.vue @@ -17,6 +17,7 @@ import 服务器 from './images/服务器(台).png' import 虚拟机 from './images/虚拟机(台).png' import 网络设备 from './images/网络设备(台).png' import 安全设备 from './images/安全设备(台).png' +import { getPlatformCapacity } from 'services/system/dashboard' export default { components: { ItemCard }, @@ -29,6 +30,21 @@ export default { { label: '安全设备(台)', value: 0, bgImg: 安全设备, background: 'rgba(235, 246, 239, 1)' } ] } + }, + created() { + this.getTodayAlarm() + }, + methods: { + getTodayAlarm() { + getPlatformCapacity().then(res => { + if (res.success) { + this.numList[0].value = res.data.physicalServer + this.numList[1].value = res.data.vm + this.numList[2].value = res.data.networkEquipment + this.numList[3].value = res.data.safetyEquipment + } + }) + } } }