From 769bd2b7b423183fa14b05f9feb7ec02b6410dae Mon Sep 17 00:00:00 2001 From: Nelson <1475262689@qq.com> Date: Thu, 9 Jul 2026 15:11:24 +0800 Subject: [PATCH] Replace dashboard date range picker --- .../apps/admin-web/src/App.vue | 28 +++++++++++-------- .../apps/admin-web/src/styles.css | 8 ++++++ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/ai_knowledge_base_v2/apps/admin-web/src/App.vue b/ai_knowledge_base_v2/apps/admin-web/src/App.vue index 1bb6d0e..7507af5 100644 --- a/ai_knowledge_base_v2/apps/admin-web/src/App.vue +++ b/ai_knowledge_base_v2/apps/admin-web/src/App.vue @@ -23,7 +23,10 @@ const loading = ref(false); const loginForm = reactive({ username: "admin", password: "admin123456" }); const stats = ref(null); -const dashboardDateRange = ref<[string, string] | null>(null); +const dashboardFilters = reactive({ + start: "", + end: "", +}); const users = ref([]); const userKeyword = ref(""); const knowledge = ref([]); @@ -504,8 +507,7 @@ async function switchMenu(menu: string) { } async function loadDashboard() { - const [start, end] = dashboardDateRange.value ?? ["", ""]; - stats.value = await api.dashboard(start, end); + stats.value = await api.dashboard(dashboardFilters.start, dashboardFilters.end); } async function loadCurrentMenu() { @@ -1110,15 +1112,17 @@ function formatRecordDateTime(value: string, boundary: "start" | "end") {