From 4f0618a0fd7b7fff8fe5e939842adc3902710121 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 21 Jul 2025 14:45:34 +0800
Subject: [PATCH] fix: 尝试修复首次进入页面空白错误
---
src/views/algorithmRepository/algorithmRepository.vue | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/views/algorithmRepository/algorithmRepository.vue b/src/views/algorithmRepository/algorithmRepository.vue
index ad3ee3a..61acf86 100644
--- a/src/views/algorithmRepository/algorithmRepository.vue
+++ b/src/views/algorithmRepository/algorithmRepository.vue
@@ -181,8 +181,8 @@
};
// 日期选择
const changeselect = () => {
- params.value.start_date = taskData.value.length ? `${taskData.value[0]} 00:00:00` : null;
- params.value.end_date = taskData.value.length ? `${taskData.value[1]} 23:59:59` : null;
+ params.value.start_date = taskData.value?.length ? `${taskData.value[0]} 00:00:00` : null;
+ params.value.end_date = taskData.value?.length ? `${taskData.value[1]} 23:59:59` : null;
};
// 处理日期清空
const handleDateClear = () => {
@@ -192,6 +192,12 @@
getList();
};
const handleSearch = () => {
+// console.log('taskData',taskData.value);
+if(taskData.value === null){
+ params.value.start_date = null; // 重置开始日期参数
+ params.value.end_date = null; // 重置结束日期参数
+}
+
getList();
};
--
Gitblit v1.9.3