From 1954b8c71d2c17947d2b53d66369e17660da825b Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Fri, 13 Jun 2025 16:30:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=B3=BB=E7=BB=9F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/views/home.vue b/src/views/home.vue index fdd7467..eb94531 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -213,7 +213,9 @@ export default { console.log('res', res) if (res && Object.keys(res).length) { // cpu 占有率 (总的cpuTotal-空闲的cpuFree)/总的cpuTotal - this.systemData.cpuPercentage = Math.round((res.cpuTotal - res.cpuFree) / res.cpuTotal * 100) + // cpuSy cpu使用率 cpuFree cpu空闲率 + // this.systemData.cpuPercentage = Math.round((res.cpuTotal - res.cpuFree) / res.cpuTotal * 100) + this.systemData.cpuPercentage = Math.round(res.cpuSy / (res.cpuSy + res.cpuFree) * 100) // 内存占比 使用的memUsed/总的memTotal this.systemData.memPercentage = Math.round(res.memUsed / res.memTotal * 100)