From a85d90985df45af75f8fbc165021b160d5e6500d Mon Sep 17 00:00:00 2001 From: Sun <95302870@qq.com> Date: Fri, 5 Jan 2024 22:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A3=81=E7=9B=98=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=8D=A1=E7=89=87=E7=9A=84=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/systemMonitor.ts | 6 + .../AppIconSystemMonitor/Disk.vue | 1 + .../AppIconSystemMonitor/index.vue | 2 +- .../SystemMonitor/Edit/DiskEditor/index.vue | 120 ++++++++++++++++++ .../deskModule/SystemMonitor/Edit/index.vue | 27 +++- .../deskModule/SystemMonitor/typings.ts | 4 + src/typings/systemMonitor.d.ts | 6 + 7 files changed, 159 insertions(+), 7 deletions(-) create mode 100644 src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue diff --git a/src/api/system/systemMonitor.ts b/src/api/system/systemMonitor.ts index 684c90b..0e17ff2 100644 --- a/src/api/system/systemMonitor.ts +++ b/src/api/system/systemMonitor.ts @@ -24,3 +24,9 @@ export function getMemonyState() { url: '/system/monitor/getMemonyState', }) } + +export function getDiskMountpoints() { + return post({ + url: '/system/monitor/getDiskMountpoints', + }) +} diff --git a/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue b/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue index 41898d2..9443215 100644 --- a/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue +++ b/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue @@ -31,6 +31,7 @@ function formatdiskToByte(v: number): number { } async function getData() { + console.log(props.path) try { const { data, code } = await getDiskStateByPath(props.path) if (code === 0) diff --git a/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/index.vue b/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/index.vue index 49fd477..d02f466 100644 --- a/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/index.vue +++ b/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/index.vue @@ -31,7 +31,7 @@ const iconText = computed(() => { } return '' }) -const refreshInterval = 50000 +const refreshInterval = 5000