diff --git a/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue b/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue index 9443215..41898d2 100644 --- a/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue +++ b/src/components/deskModule/SystemMonitor/AppIconSystemMonitor/Disk.vue @@ -31,7 +31,6 @@ 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/Edit/DiskEditor/index.vue b/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue index 77606be..db2e1ff 100644 --- a/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue +++ b/src/components/deskModule/SystemMonitor/Edit/DiskEditor/index.vue @@ -6,6 +6,7 @@ import GenericMonitorCard from '../../components/GenericMonitorCard/index.vue' import GenericProgress from '../../components/GenericProgress/index.vue' import { PanelPanelConfigStyleEnum } from '@/enums' import { getDiskMountpoints } from '@/api/system/systemMonitor' +import { defautSwatchesBackground } from '@/utils/defaultData' interface Emit { (e: 'update:diskExtendParam', visible: DiskExtendParam): void @@ -21,7 +22,7 @@ const mountPointList = ref<{ value: string }[]>([]) -const data = computed({ +const extendParam = computed({ get: () => props.diskExtendParam, set: (visible) => { emit('update:diskExtendParam', visible) @@ -34,8 +35,11 @@ async function getMountPointList() { mountPointList.value = [] for (let i = 0; i < data.length; i++) { const element = data[i] + if (i === 0 && !extendParam.value.path) + extendParam.value.path = element.mountpoint + mountPointList.value.push({ - label: element.device, + label: element.mountpoint, value: element.mountpoint, }) } @@ -52,26 +56,25 @@ onMounted(() => { + + diff --git a/src/components/deskModule/SystemMonitor/Edit/GenericProgressStyleEditor/index.vue b/src/components/deskModule/SystemMonitor/Edit/GenericProgressStyleEditor/index.vue index 6451c6c..bf23d44 100644 --- a/src/components/deskModule/SystemMonitor/Edit/GenericProgressStyleEditor/index.vue +++ b/src/components/deskModule/SystemMonitor/Edit/GenericProgressStyleEditor/index.vue @@ -5,6 +5,7 @@ import type { GenericProgressStyleExtendParam } from '../../typings' import GenericMonitorCard from '../../components/GenericMonitorCard/index.vue' import GenericProgress from '../../components/GenericProgress/index.vue' import { PanelPanelConfigStyleEnum } from '@/enums' +import { defautSwatchesBackground } from '@/utils/defaultData' interface Emit { (e: 'update:genericProgressStyleExtendParam', visible: GenericProgressStyleExtendParam): void @@ -27,7 +28,7 @@ const data = computed({
-
+
- + - + - + - +
+ + diff --git a/src/components/deskModule/SystemMonitor/Edit/index.vue b/src/components/deskModule/SystemMonitor/Edit/index.vue index 3456622..ee1a360 100644 --- a/src/components/deskModule/SystemMonitor/Edit/index.vue +++ b/src/components/deskModule/SystemMonitor/Edit/index.vue @@ -63,13 +63,16 @@ watch(() => props.visible, (value) => { active.value = props.monitorData?.monitorType || MonitorType.cpu if (props.monitorData?.monitorType === MonitorType.cpu || props.monitorData?.monitorType === MonitorType.memory) currentGenericProgressStyleExtendParam.value = { ...props.monitorData?.extendParam } + else if (props.monitorData?.monitorType === MonitorType.disk) + currentDiskExtendParam.value = { ...props.monitorData?.extendParam } if (!value) - handleResetGenericProgressStyleExtendParam() + handleResetExtendParam() }) -function handleResetGenericProgressStyleExtendParam() { +function handleResetExtendParam() { currentGenericProgressStyleExtendParam.value = { ...defaultGenericProgressStyleExtendParam } + currentDiskExtendParam.value = { ...defaultDiskExtendParam } } // 保存提交 @@ -109,25 +112,26 @@ async function handleSubmit() {