From b57b3e286cc924b2092699b2cb2703afc54f4283 Mon Sep 17 00:00:00 2001 From: fuliqiang <1348994179@qq.com> Date: Mon, 5 Aug 2024 14:15:32 +0800 Subject: [PATCH] Fixed the problem that scheduled task acquisition does not take effect --- .../src/components/job-info/job.vue | 17 +++++------------ .../src/components/svg-icon/svg-icon.vue | 9 +++++---- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/bigtop-manager-ui/src/components/job-info/job.vue b/bigtop-manager-ui/src/components/job-info/job.vue index a3622719..eaaa5f1b 100644 --- a/bigtop-manager-ui/src/components/job-info/job.vue +++ b/bigtop-manager-ui/src/components/job-info/job.vue @@ -147,13 +147,10 @@ intervalId.value?.resume() return } - intervalId.value = useIntervalFn( - async () => { - await getJobsList() - }, - MONITOR_SCHEDULE_INTERVAL, - { immediate: false, immediateCallback: true } - ) + intervalId.value = useIntervalFn(getJobsList, MONITOR_SCHEDULE_INTERVAL, { + immediate: true, + immediateCallback: true + }) } const getJobsList = async () => { @@ -164,11 +161,7 @@ sort: 'desc' } as Pagination const { content, total } = await getJobs(clusterId.value, params) - jobs.value = content.map((v) => { - return { - ...v - } - }) + jobs.value = content.map((v) => ({ ...v })) paginationProps.value.total = total loading.value = false } catch (error) { diff --git a/bigtop-manager-ui/src/components/svg-icon/svg-icon.vue b/bigtop-manager-ui/src/components/svg-icon/svg-icon.vue index d8656c83..4255c8fe 100644 --- a/bigtop-manager-ui/src/components/svg-icon/svg-icon.vue +++ b/bigtop-manager-ui/src/components/svg-icon/svg-icon.vue @@ -21,15 +21,16 @@ import { computed } from 'vue' interface SvgIconProps { - prefix: string + prefix?: string name: string - color: string - className: string + color?: string + className?: string } const props = withDefaults(defineProps(), { prefix: 'icon', - color: '#000' + color: '#000', + className: '' }) const symbolId = computed(() => `#${props.prefix}-${props.name}`)