Merge branch 'hugo' into dev

This commit is contained in:
hugo committed 2026-05-20 17:50:35 +08:00
commit 40b25ec988
21 files changed
+2185 -593

No files matched your search

+21 -16
View File
@@ -1002,8 +1002,25 @@ const workspaceScheduleRuns = ref<ScheduleRun[]>([]);
const workspaceScheduleLoading = ref(false);
const wsScheduleStatusFilter = ref('all');
const wsScheduleNameFilter = ref('');
const wsScheduleStartedAfter = ref('');
const wsScheduleStartedBefore = ref('');
const toDateTimeLocalValue = (date: Date) => {
const pad = (n: number) => String(n).padStart(2, '0');
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}:${pad(date.getSeconds())}`;
};
const todayStartLocal = () => {
const d = new Date();
d.setHours(0, 0, 0, 0);
return toDateTimeLocalValue(d);
};
const todayEndLocal = () => {
const d = new Date();
d.setHours(23, 59, 59, 0);
return toDateTimeLocalValue(d);
};
const wsScheduleStartedAfter = ref(todayStartLocal());
const wsScheduleStartedBefore = ref(todayEndLocal());
const wsScheduleStatusOptions = [
{ value: 'all', label: '全部状态' },
@@ -1032,18 +1049,6 @@ const formatDateTime = (iso?: string | null) => {
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
};
const todayStart = () => {
const d = new Date();
d.setHours(0, 0, 0, 0);
return d.toISOString();
};
const todayEnd = () => {
const d = new Date();
d.setHours(23, 59, 59, 0);
return d.toISOString();
};
const loadWorkspaceScheduleRuns = async () => {
workspaceScheduleLoading.value = true;
try {
@@ -1063,8 +1068,8 @@ const loadWorkspaceScheduleRuns = async () => {
const resetWsScheduleFilters = () => {
wsScheduleStatusFilter.value = 'all';
wsScheduleNameFilter.value = '';
wsScheduleStartedAfter.value = todayStart().slice(0, 16);
wsScheduleStartedBefore.value = todayEnd().slice(0, 16);
wsScheduleStartedAfter.value = todayStartLocal();
wsScheduleStartedBefore.value = todayEndLocal();
loadWorkspaceScheduleRuns();
};