From ba03d26b2c8bc22ff90023667c306df09c389a4d Mon Sep 17 00:00:00 2001
From: ssongliu <73214554+ssongliu@users.noreply.github.com>
Date: Fri, 25 Jul 2025 16:35:36 +0800
Subject: [PATCH] fix: Optimize cronjob report loading (#9665)
Refs #9412
---
frontend/src/components/log/file/index.vue | 3 +-
.../views/cronjob/cronjob/record/index.vue | 94 +++----------------
2 files changed, 17 insertions(+), 80 deletions(-)
diff --git a/frontend/src/components/log/file/index.vue b/frontend/src/components/log/file/index.vue
index 8679a09fa..37d57e55a 100644
--- a/frontend/src/components/log/file/index.vue
+++ b/frontend/src/components/log/file/index.vue
@@ -106,7 +106,7 @@ const stopSignals = [
'image push successful!',
'[TASK-END]',
];
-const emit = defineEmits(['update:loading', 'update:hasContent', 'update:isReading']);
+const emit = defineEmits(['update:loading', 'update:hasContent', 'update:isReading', 'stop-reading']);
const tailLog = ref(true);
const loading = ref(props.loading);
const readReq = reactive({
@@ -298,6 +298,7 @@ const onCloseLog = async () => {
timer = null;
}
timer = null;
+ emit('stop-reading');
isLoading.value = false;
emit('update:isReading', false);
bus.emit('refreshTask', true);
diff --git a/frontend/src/views/cronjob/cronjob/record/index.vue b/frontend/src/views/cronjob/cronjob/record/index.vue
index 357d240ed..850df9d79 100644
--- a/frontend/src/views/cronjob/cronjob/record/index.vue
+++ b/frontend/src/views/cronjob/cronjob/record/index.vue
@@ -63,7 +63,7 @@
-
+
{{ $t('commons.table.status') }}
@@ -119,7 +119,7 @@
-
+
@@ -158,22 +158,12 @@
{{ currentRecord?.message }}
-
- {{ $t('commons.table.records') }}
-
-
-
-
@@ -218,9 +208,9 @@