1.返回聊天时,改为跳转至上次的聊天Agent
2.排程记录界面增加横纵向滚动
This commit is contained in:
1 parent
71dcfd8ca4
commit
3642ed8529
4 files changed
+95
-58
No files matched your search
@@ -0,0 +1,20 @@
|
||||
const STORAGE_KEY = 'hxops_last_chat_agent_id';
|
||||
|
||||
export function getLastChatAgentId(fallback = 16): number {
|
||||
try {
|
||||
const raw = sessionStorage.getItem(STORAGE_KEY);
|
||||
const id = Number(raw);
|
||||
return Number.isFinite(id) && id > 0 ? id : fallback;
|
||||
} catch {
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
|
||||
export function setLastChatAgentId(agentId: number): void {
|
||||
if (!Number.isFinite(agentId) || agentId <= 0) return;
|
||||
try {
|
||||
sessionStorage.setItem(STORAGE_KEY, String(agentId));
|
||||
} catch {
|
||||
// ignore storage failures
|
||||
}
|
||||
}
|
||||
@@ -467,9 +467,9 @@ const scheduleRunColumnDefs = ref([
|
||||
{ key: 'total_count', label: '', width: 70, min: 40 },
|
||||
{ key: 'success_count', label: '', width: 70, min: 40 },
|
||||
{ key: 'failed_count', label: '', width: 70, min: 40 },
|
||||
{ key: 'wecom_notified', label: '', width: 90, min: 50 },
|
||||
{ key: 'detail', label: '', width: 90, min: 50 },
|
||||
{ key: 'log', label: '', width: 90, min: 50 },
|
||||
{ key: 'wecom_notified', label: '', width: 100, min: 80 },
|
||||
{ key: 'detail', label: '', width: 100, min: 80 },
|
||||
{ key: 'log', label: '', width: 100, min: 80 },
|
||||
]);
|
||||
|
||||
const syncScheduleRunColumnLabels = () => {
|
||||
@@ -4587,8 +4587,8 @@ const handlePermissionImport = async (event: Event) => {
|
||||
{{ $t('admin.schedule.reset') }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="overflow-x-auto rounded-xl border border-slate-100">
|
||||
<table class="w-full min-w-[920px] table-fixed text-left text-xs">
|
||||
<div class="max-h-[calc(100vh-20rem)] overflow-auto rounded-xl border border-slate-100 scrollbar-thin">
|
||||
<table class="w-full min-w-[1270px] table-fixed text-left text-xs">
|
||||
<colgroup>
|
||||
<col
|
||||
v-for="col in scheduleRunColumnDefs"
|
||||
@@ -4596,21 +4596,19 @@ const handlePermissionImport = async (event: Event) => {
|
||||
:style="{ width: `${col.width}px` }"
|
||||
/>
|
||||
</colgroup>
|
||||
<thead class="bg-slate-50">
|
||||
<thead class="sticky top-0 z-10 bg-slate-50">
|
||||
<tr class="text-slate-500">
|
||||
<th
|
||||
v-for="(col, colIndex) in scheduleRunColumnDefs"
|
||||
:key="col.key"
|
||||
class="group relative px-4 py-3 text-xs font-semibold uppercase select-none"
|
||||
class="group relative whitespace-nowrap bg-slate-50 px-4 py-3 text-xs font-semibold uppercase select-none"
|
||||
>
|
||||
<span class="whitespace-nowrap">{{ col.label }}</span>
|
||||
<span
|
||||
class="absolute inset-y-0 -right-1 z-10 w-3 cursor-col-resize"
|
||||
class="absolute inset-y-0 -right-1 z-10 w-2 cursor-col-resize"
|
||||
@mousedown.prevent="startScheduleColResize(colIndex, $event)"
|
||||
:title="$t('admin.schedule.resizeColumn', { label: col.label })"
|
||||
>
|
||||
<span class="mx-auto block h-full w-px bg-slate-300"></span>
|
||||
</span>
|
||||
></span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -4627,52 +4625,52 @@ const handlePermissionImport = async (event: Event) => {
|
||||
:key="r.id"
|
||||
class="text-slate-700 transition hover:bg-slate-50"
|
||||
>
|
||||
<td class="truncate px-4 py-2.5" :title="r.run_no">{{ r.run_no }}</td>
|
||||
<td class="truncate px-4 py-2.5" :title="formatDateTime(r.started_at)">{{ formatDateTime(r.started_at) }}</td>
|
||||
<td class="truncate px-4 py-2.5" :title="formatDateTime(r.finished_at)">{{ formatDateTime(r.finished_at) }}</td>
|
||||
<td class="truncate px-4 py-2.5">
|
||||
<td class="whitespace-nowrap px-4 py-2.5" :title="r.run_no">{{ r.run_no }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-2.5" :title="formatDateTime(r.started_at)">{{ formatDateTime(r.started_at) }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-2.5" :title="formatDateTime(r.finished_at)">{{ formatDateTime(r.finished_at) }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-2.5">
|
||||
<span class="inline-flex shrink-0 items-center whitespace-nowrap rounded-full px-2.5 py-1 text-xs font-semibold"
|
||||
:class="getScheduleRunStatusBadge(r.status).cls">
|
||||
{{ getScheduleRunStatusBadge(r.status).label }}
|
||||
</span>
|
||||
<span v-if="r.error_message" class="ml-1 text-xs text-slate-400" :title="r.error_message">...</span>
|
||||
</td>
|
||||
<td class="truncate px-4 py-2.5">{{ r.total_count }}</td>
|
||||
<td class="truncate px-4 py-2.5">{{ r.success_count }}</td>
|
||||
<td class="truncate px-4 py-2.5">{{ r.failed_count }}</td>
|
||||
<td class="truncate px-4 py-2.5">
|
||||
<span v-if="r.wecom_notified" class="inline-flex items-center gap-1 text-xs text-emerald-600">
|
||||
<svg class="h-3.5 w-3.5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" /></svg>
|
||||
<td class="whitespace-nowrap px-4 py-2.5">{{ r.total_count }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-2.5">{{ r.success_count }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-2.5">{{ r.failed_count }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-2.5">
|
||||
<span v-if="r.wecom_notified" class="inline-flex shrink-0 items-center gap-1 whitespace-nowrap text-xs text-emerald-600">
|
||||
<svg class="h-3.5 w-3.5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" /></svg>
|
||||
{{ $t('admin.schedule.notified') }}
|
||||
</span>
|
||||
<span v-else-if="r.wecom_notify_error" class="text-xs text-amber-500" :title="r.wecom_notify_error">{{ $t('admin.schedule.notifyError') }}</span>
|
||||
<span v-else-if="r.wecom_notify_error" class="whitespace-nowrap text-xs text-amber-500" :title="r.wecom_notify_error">{{ $t('admin.schedule.notifyError') }}</span>
|
||||
<span v-else class="text-xs text-slate-300">-</span>
|
||||
</td>
|
||||
<td class="px-4 py-2.5">
|
||||
<td class="whitespace-nowrap px-4 py-2.5">
|
||||
<div class="flex items-center">
|
||||
<a
|
||||
v-if="r.total_count > 0"
|
||||
href="#"
|
||||
@click.prevent="downloadScheduleExcel(r.id)"
|
||||
class="inline-flex items-center gap-1 rounded-lg border border-slate-200 px-2 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-slate-50"
|
||||
class="inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-lg border border-slate-200 px-2 py-1 text-xs font-medium text-slate-600 transition-colors hover:bg-slate-50"
|
||||
>
|
||||
<Download class="h-3 w-3" />
|
||||
<Download class="h-3 w-3 shrink-0" />
|
||||
{{ $t('admin.schedule.download') }}
|
||||
</a>
|
||||
<span v-if="r.total_count === 0" class="text-slate-300">-</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-2.5">
|
||||
<td class="whitespace-nowrap px-4 py-2.5">
|
||||
<div class="flex items-center">
|
||||
<button
|
||||
v-if="(r.step_logs && r.step_logs.length > 0) || r.dify_execution_snapshot"
|
||||
@click="expandedScheduleRunId = expandedScheduleRunId === r.id ? null : r.id"
|
||||
class="inline-flex items-center gap-1 rounded-lg border border-blue-200 px-2 py-1 text-xs font-medium text-blue-600 transition-colors hover:bg-blue-50"
|
||||
class="inline-flex shrink-0 items-center gap-1 whitespace-nowrap rounded-lg border border-blue-200 px-2 py-1 text-xs font-medium text-blue-600 transition-colors hover:bg-blue-50"
|
||||
>
|
||||
<Eye class="h-3 w-3" />
|
||||
<Eye class="h-3 w-3 shrink-0" />
|
||||
{{ $t('admin.schedule.log') }}
|
||||
<ChevronDown v-if="expandedScheduleRunId !== r.id" class="h-3 w-3" />
|
||||
<ChevronUp v-else class="h-3 w-3" />
|
||||
<ChevronDown v-if="expandedScheduleRunId !== r.id" class="h-3 w-3 shrink-0" />
|
||||
<ChevronUp v-else class="h-3 w-3 shrink-0" />
|
||||
</button>
|
||||
<span v-else class="text-slate-300">-</span>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@ import { useIsMobile } from '../composables/useIsMobile';
|
||||
import { useTheme } from '../composables/useTheme';
|
||||
import { getAuthHeaders, getStoredAuthUser, clearAuthUser } from '../utils/auth';
|
||||
import { copyTextToClipboard } from '../utils/clipboard';
|
||||
import { setLastChatAgentId } from '../utils/lastChatAgent';
|
||||
|
||||
const { t, locale } = useI18n();
|
||||
const { appliedTheme, toggleLightDark } = useTheme();
|
||||
@@ -1876,10 +1877,18 @@ const loadUserAgents = async () => {
|
||||
|
||||
const switchToAgent = (agent: { id: number; name: string }) => {
|
||||
if (agent.id === agentId) return;
|
||||
setLastChatAgentId(agent.id);
|
||||
const url = router.resolve(`/chat/${agent.id}`).href;
|
||||
window.open(url, '_blank');
|
||||
};
|
||||
|
||||
const goToWorkspace = (view?: string) => {
|
||||
setLastChatAgentId(Number(route.params.agentId));
|
||||
const query: Record<string, string> = { no_redirect: '1' };
|
||||
if (view) query.view = view;
|
||||
router.push({ path: '/workspace', query });
|
||||
};
|
||||
|
||||
// 组件挂载时,如果存在预设问题,则自动触发一次发送
|
||||
onMounted(async () => {
|
||||
document.addEventListener('mousedown', handleDocumentPointerDown);
|
||||
@@ -1888,6 +1897,7 @@ onMounted(async () => {
|
||||
document.addEventListener('touchstart', handleMobileAgentPopoverClickOutside, { passive: true });
|
||||
window.addEventListener('resize', syncViewportWidth);
|
||||
await syncCurrentUserProfile();
|
||||
setLastChatAgentId(Number(route.params.agentId));
|
||||
await loadAgent();
|
||||
await loadUserAgents();
|
||||
|
||||
@@ -1907,6 +1917,14 @@ onMounted(async () => {
|
||||
scheduleScrollChatToBottom();
|
||||
});
|
||||
|
||||
watch(
|
||||
() => route.params.agentId,
|
||||
(id) => {
|
||||
const nextId = Number(id);
|
||||
if (Number.isFinite(nextId) && nextId > 0) setLastChatAgentId(nextId);
|
||||
}
|
||||
);
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
document.removeEventListener('mousedown', handleDocumentPointerDown);
|
||||
document.removeEventListener('touchstart', handleDocumentPointerDown);
|
||||
@@ -1983,7 +2001,7 @@ const showChatRating = ref(false);
|
||||
{{ (currentUser?.username || 'I').charAt(0).toUpperCase() }}
|
||||
</div>
|
||||
<button @click="showGeneralFeedbackDialog = true" class="transition-colors hover:text-slate-600 dark:hover:text-slate-200" :title="$t('chat.generalFeedback')"><MessageSquareText class="h-5 w-5" /></button>
|
||||
<button @click="router.push('/workspace?no_redirect=1')" class="transition-colors hover:text-slate-600 dark:hover:text-slate-200" :title="$t('workspace.title')"><Briefcase class="h-5 w-5" /></button>
|
||||
<button @click="goToWorkspace()" class="transition-colors hover:text-slate-600 dark:hover:text-slate-200" :title="$t('workspace.title')"><Briefcase class="h-5 w-5" /></button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -2104,7 +2122,7 @@ const showChatRating = ref(false);
|
||||
<Moon v-else class="h-4 w-4" />
|
||||
</button>
|
||||
<button @click="showGeneralFeedbackDialog = true" class="transition-colors hover:text-slate-600 dark:hover:text-slate-200" :title="$t('chat.generalFeedback')"><MessageSquareText class="h-4 w-4" /></button>
|
||||
<button @click="router.push('/workspace?no_redirect=1')" class="transition-colors hover:text-slate-600 dark:hover:text-slate-200" :title="$t('workspace.title')"><Briefcase class="h-4 w-4" /></button>
|
||||
<button @click="goToWorkspace()" class="transition-colors hover:text-slate-600 dark:hover:text-slate-200" :title="$t('workspace.title')"><Briefcase class="h-4 w-4" /></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2122,7 +2140,7 @@ const showChatRating = ref(false);
|
||||
<button @click="toggleMobileAgentPopover" class="flex h-9 w-9 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800" :title="$t('chat.agents')">
|
||||
<LayoutGrid class="h-5 w-5" />
|
||||
</button>
|
||||
<button @click="router.push('/workspace?view=history')" class="flex h-9 w-9 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800" :title="$t('chat.history')">
|
||||
<button @click="goToWorkspace('history')" class="flex h-9 w-9 items-center justify-center rounded-full text-slate-500 transition-colors hover:bg-slate-100 dark:text-slate-300 dark:hover:bg-slate-800" :title="$t('chat.history')">
|
||||
<History class="h-5 w-5" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@ import {
|
||||
type WecomMatchField,
|
||||
} from '../utils/wecom';
|
||||
import { getAuthHeaders, getStoredAuthUser, saveAuthUser } from '../utils/auth';
|
||||
import { getLastChatAgentId } from '../utils/lastChatAgent';
|
||||
import {
|
||||
Settings,
|
||||
LayoutGrid,
|
||||
@@ -1163,7 +1164,7 @@ const loadChatHistories = async () => {
|
||||
};
|
||||
|
||||
const navigateToGeneralChat = () => {
|
||||
router.push(`/chat/${DEFAULT_POST_LOGIN_AGENT_ID}`);
|
||||
router.push(`/chat/${getLastChatAgentId(DEFAULT_POST_LOGIN_AGENT_ID)}`);
|
||||
};
|
||||
|
||||
const openAdminPanel = () => {
|
||||
@@ -1553,7 +1554,7 @@ onMounted(async () => {
|
||||
<div v-else class="min-h-screen animate-fade-in">
|
||||
<header v-if="isMobile" class="sticky top-0 z-30 flex items-center justify-between border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-800 dark:bg-slate-950">
|
||||
<div class="flex items-center gap-2">
|
||||
<button @click="router.push('/chat/16')" class="flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-brand-500 via-brand-600 to-purple-600 text-xs font-bold text-white shadow-sm shadow-brand-500/20" :title="$t('workspace.nav.backToChat')">AI</button>
|
||||
<button @click="navigateToGeneralChat" class="flex h-7 w-7 items-center justify-center rounded-lg bg-gradient-to-br from-brand-500 via-brand-600 to-purple-600 text-xs font-bold text-white shadow-sm shadow-brand-500/20" :title="$t('workspace.nav.backToChat')">AI</button>
|
||||
<span class="text-sm font-semibold text-slate-800 dark:text-slate-100">{{ mobileTabTitle }}</span>
|
||||
</div>
|
||||
</header>
|
||||
@@ -1929,44 +1930,44 @@ onMounted(async () => {
|
||||
<div v-if="workspaceScheduleLoading" class="rounded-2xl border border-dashed border-slate-200 py-10 text-center text-sm text-slate-400 dark:border-slate-800 dark:text-slate-500">{{ $t('workspace.schedule.loading') }}</div>
|
||||
<div v-else-if="workspaceScheduleRuns.length === 0" class="rounded-2xl border border-dashed border-slate-200 py-10 text-center text-sm text-slate-400 dark:border-slate-800 dark:text-slate-500">{{ $t('workspace.schedule.empty') }}</div>
|
||||
<div v-else class="overflow-hidden rounded-2xl border border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-800">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full text-sm">
|
||||
<thead>
|
||||
<tr class="border-b border-slate-100 bg-slate-50/60 dark:border-slate-700 dark:bg-slate-900/60">
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.name') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.runNo') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.triggerType') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.start') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.end') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.duration') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.status') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.total') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.success') }}</th>
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.failed') }}</th>
|
||||
<div class="max-h-[calc(100vh-17rem)] overflow-auto scrollbar-thin">
|
||||
<table class="w-full min-w-[1080px] text-sm">
|
||||
<thead class="sticky top-0 z-10">
|
||||
<tr class="border-b border-slate-100 bg-slate-50 dark:border-slate-700 dark:bg-slate-900">
|
||||
<th class="min-w-[120px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.name') }}</th>
|
||||
<th class="min-w-[168px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.runNo') }}</th>
|
||||
<th class="min-w-[72px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.triggerType') }}</th>
|
||||
<th class="min-w-[152px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.start') }}</th>
|
||||
<th class="min-w-[152px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.end') }}</th>
|
||||
<th class="min-w-[64px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.duration') }}</th>
|
||||
<th class="min-w-[88px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.status') }}</th>
|
||||
<th class="min-w-[72px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.total') }}</th>
|
||||
<th class="min-w-[72px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.success') }}</th>
|
||||
<th class="min-w-[72px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.failed') }}</th>
|
||||
|
||||
<th class="px-4 py-3 text-left font-semibold text-slate-600 dark:text-slate-400">{{ $t('workspace.schedule.columns.detail') }}</th>
|
||||
<th class="min-w-[72px] whitespace-nowrap bg-slate-50 px-4 py-3 text-left font-semibold text-slate-600 dark:bg-slate-900 dark:text-slate-400">{{ $t('workspace.schedule.columns.detail') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="r in workspaceScheduleRuns" :key="r.id" class="border-b border-slate-50 transition-colors hover:bg-slate-50/50 dark:border-slate-700/80 dark:hover:bg-slate-700/40">
|
||||
<td class="px-4 py-3 font-medium text-slate-900 dark:text-slate-100">{{ r.schedule_name || '-' }}</td>
|
||||
<td class="px-4 py-3 font-mono text-xs text-slate-500 dark:text-slate-400">{{ r.run_no }}</td>
|
||||
<td class="px-4 py-3 text-slate-500 dark:text-slate-400">{{ r.trigger_type === 'manual' ? $t('workspace.schedule.trigger.manual') : r.trigger_type === 'test' ? $t('workspace.schedule.trigger.test') : $t('workspace.schedule.trigger.timed') }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 font-medium text-slate-900 dark:text-slate-100">{{ r.schedule_name || '-' }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 font-mono text-xs text-slate-500 dark:text-slate-400">{{ r.run_no }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-slate-500 dark:text-slate-400">{{ r.trigger_type === 'manual' ? $t('workspace.schedule.trigger.manual') : r.trigger_type === 'test' ? $t('workspace.schedule.trigger.test') : $t('workspace.schedule.trigger.timed') }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-slate-500 dark:text-slate-400">{{ formatDateTime(r.started_at) }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-slate-500 dark:text-slate-400">{{ formatDateTime(r.finished_at) }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-slate-500 dark:text-slate-400">{{ r.duration_ms != null ? (r.duration_ms >= 1000 ? (r.duration_ms / 1000).toFixed(1) + 's' : r.duration_ms + 'ms') : '-' }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<td class="whitespace-nowrap px-4 py-3">
|
||||
<span class="inline-flex shrink-0 items-center whitespace-nowrap rounded-full px-2.5 py-1 text-xs font-semibold" :class="getWsScheduleStatusBadge(r.status).cls">
|
||||
{{ getWsScheduleStatusBadge(r.status).label }}
|
||||
</span>
|
||||
<span v-if="r.error_message && r.error_message !== '无待处理数据'" class="ml-1 text-xs text-slate-400 dark:text-slate-500" :title="r.error_message">...</span>
|
||||
<span v-else-if="r.error_message === '无待处理数据'" class="ml-1 text-xs text-slate-400 dark:text-slate-500">({{ $t('workspace.schedule.noPendingData') }})</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-slate-500 dark:text-slate-400">{{ r.total_count || 0 }}</td>
|
||||
<td class="px-4 py-3 font-medium text-emerald-600 dark:text-emerald-400">{{ r.success_count ?? 0 }}</td>
|
||||
<td class="px-4 py-3 font-medium text-rose-600 dark:text-rose-400">{{ r.failed_count ?? 0 }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 text-slate-500 dark:text-slate-400">{{ r.total_count || 0 }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 font-medium text-emerald-600 dark:text-emerald-400">{{ r.success_count ?? 0 }}</td>
|
||||
<td class="whitespace-nowrap px-4 py-3 font-medium text-rose-600 dark:text-rose-400">{{ r.failed_count ?? 0 }}</td>
|
||||
|
||||
<td class="px-4 py-3">
|
||||
<td class="whitespace-nowrap px-4 py-3">
|
||||
<a
|
||||
v-if="r.total_count > 0 && r.excel_file_name"
|
||||
href="#"
|
||||
|
||||
Reference in new issue
Block a user