From fc56328765b8a4d902b59f2393f43e10f3c3dac5 Mon Sep 17 00:00:00 2001
From: Sun <95302870@qq.com>
Date: Mon, 8 Jan 2024 22:37:24 +0800
Subject: [PATCH] =?UTF-8?q?=E7=A3=81=E7=9B=98=E7=9B=91=E6=8E=A7=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E8=A1=A8=E5=8D=95=E9=AA=8C=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../SystemMonitor/Edit/DiskEditor/index.vue | 34 +++++++++++++++++--
.../deskModule/SystemMonitor/Edit/index.vue | 16 ++++++---
2 files changed, 44 insertions(+), 6 deletions(-)
diff --git a/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue b/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue
index 78dafea..3d9bd81 100644
--- a/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue
+++ b/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue
@@ -1,5 +1,6 @@
@@ -102,8 +132,8 @@ onMounted(() => {
-
-
+
+
diff --git a/src/components/deskModule/SystemMonitor/Edit/index.vue b/src/components/deskModule/SystemMonitor/Edit/index.vue
index 6cf2bd4..2012996 100644
--- a/src/components/deskModule/SystemMonitor/Edit/index.vue
+++ b/src/components/deskModule/SystemMonitor/Edit/index.vue
@@ -17,6 +17,7 @@ interface Props {
const props = defineProps()
const emit = defineEmits()
+const DiskEditorRef = ref>()
// 默认通用的进度扩展参数
const defaultGenericProgressStyleExtendParam: GenericProgressStyleExtendParam = {
@@ -78,14 +79,21 @@ function handleResetExtendParam() {
// 保存提交
async function handleSubmit() {
+ let verificationRes = true
currentMonitorData.value.monitorType = active.value as MonitorType
- if (currentMonitorData.value.monitorType === MonitorType.cpu || currentMonitorData.value.monitorType === MonitorType.memory)
+ if (currentMonitorData.value.monitorType === MonitorType.cpu || currentMonitorData.value.monitorType === MonitorType.memory) {
currentMonitorData.value.extendParam = currentGenericProgressStyleExtendParam
-
- else if (currentMonitorData.value.monitorType === MonitorType.disk)
+ }
+ else if (currentMonitorData.value.monitorType === MonitorType.disk) {
currentMonitorData.value.extendParam = currentDiskExtendParam
+ const res = await DiskEditorRef.value?.verification()
+ if (res !== undefined)
+ verificationRes = res
+ }
// console.log('保存', currentMonitorData.value.extendParam)
+ if (!verificationRes)
+ return
if (props.index !== null) {
const res = await saveByIndex(props.index, currentMonitorData.value)
@@ -125,7 +133,7 @@ async function handleSubmit() {
-
+