refactor: 重构知识库文件上传和处理, 支持 pdf

This commit is contained in:
2026-03-23 16:30:13 +08:00
parent 89af7c17f1
commit 63ea2686e1
17 changed files with 905 additions and 1782 deletions

View File

@@ -34,21 +34,15 @@ class ViewDocument extends ViewRecord
->modalSubmitActionLabel('确认重试')
->action(function () {
try {
// 重置转换状态
$this->record->conversion_status = 'pending';
$this->record->conversion_error = null;
$this->record->save();
// 重新派发转换任务
\App\Jobs\ConvertDocumentToMarkdown::dispatch($this->record);
app(\App\Services\DocumentConversionService::class)
->queueConversion($this->record);
Notification::make()
->success()
->title('重试成功')
->body('文档转换任务已重新加入队列,请稍后查看转换结果。')
->send();
// 刷新页面数据
$this->refreshFormData([
'conversion_status',
'conversion_error',