1.返回聊天时,改为跳转至上次的聊天Agent
2.排程记录界面增加横纵向滚动
This commit is contained in:
1 parent
71dcfd8ca4
commit
3642ed8529
4 files changed
+95
-58
No files matched your search
@@ -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