diff --git a/frontend-vue/src/pages/brand/components/BrandBrandTab.vue b/frontend-vue/src/pages/brand/components/BrandBrandTab.vue index b66489f1..bd3d0373 100644 --- a/frontend-vue/src/pages/brand/components/BrandBrandTab.vue +++ b/frontend-vue/src/pages/brand/components/BrandBrandTab.vue @@ -40,16 +40,7 @@
运行方式
-
- - -
+

提交后立即开始检测,可在右侧任务列表查看进度或取消。

@@ -121,7 +112,6 @@ import type { TaskItemView, TaskStatCard } from '@/shared/components/tasks/types import { getPywebviewApi } from '@/shared/bridges/pywebview' import { cancelBrandTask, - createBrandTask, deleteBrandTask, getBrandTaskDownloadUrl, getBrandTasks, @@ -136,7 +126,6 @@ import type { BrandExpandFolderItem } from '@/shared/api/types/modules/brand' const uploadedFiles = ref([]) const strategy = ref<'Terms' | 'Simple'>('Terms') -const runMode = ref<'immediate' | 'queue'>('immediate') const submitting = ref(false) const tasks = ref([]) @@ -364,20 +353,11 @@ async function submitRun() { relativePath: f.relativePath, fileUrl: f.url || f.localPath, })) - if (runMode.value === 'immediate') { - const res = await runBrandNow(files, strategy.value) - if (res.success && res.task_id) { - ElMessage.success(`已创建任务 ${res.task_id},客户端开始检测`) - } else { - throw new Error((res as { error?: string }).error || '运行失败') - } + const res = await runBrandNow(files, strategy.value) + if (res.success && res.task_id) { + ElMessage.success(`已创建任务 ${res.task_id},开始检测`) } else { - const res = await createBrandTask(files, strategy.value) - if (res.success && res.task_id) { - ElMessage.success(`任务 ${res.task_id} 已添加到队列`) - } else { - throw new Error((res as { error?: string }).error || '添加失败') - } + throw new Error((res as { error?: string }).error || '运行失败') } uploadedFiles.value = [] await loadTasks()