fix(ui): 调整任务卡片和上传模态框的样式

修复任务卡片圆角大小和背景色不一致问题
优化文件上传模态框的按钮布局和样式
调整OCR控制项的间距和按钮类型
This commit is contained in:
Wenjie Zhang 2025-12-19 00:41:51 +08:00
parent b3d15c5f57
commit be3abc00b5
4 changed files with 26 additions and 16 deletions

View File

@ -155,7 +155,7 @@ class MinerUParser(BaseDocumentProcessor):
self.parse_endpoint,
files=files,
data=data,
timeout=300, # 5分钟超时
timeout=os.environ.get("MINERU_TIMEOUT", 600), # 10分钟超时
)
# 检查响应状态
@ -221,7 +221,7 @@ class MinerUParser(BaseDocumentProcessor):
except DocumentParserException:
raise
except requests.exceptions.Timeout:
error_msg = f"MinerU 处理超时 ({time.time() - start_time:.2f}s)"
error_msg = f"MinerU 处理超时 ({time.time() - start_time:.2f}s), 可以配置 MINERU_TIMEOUT 环境变量。"
logger.error(error_msg)
raise DocumentParserException(error_msg, self.get_service_name(), "timeout")
except requests.exceptions.ConnectionError:

View File

@ -636,10 +636,10 @@ const _processStreamChunk = (chunk, threadId) => {
}
//
fetchThreadMessages({ agentId: currentAgentId.value, threadId: threadId, delay: 500 })
.finally(() => {
//
resetOnGoingConv(threadId, true);
});
.finally(() => {
//
resetOnGoingConv(threadId, true);
});
return true;
case 'interrupted':
//
@ -651,7 +651,7 @@ const _processStreamChunk = (chunk, threadId) => {
message.info(chunkMessage);
}
fetchThreadMessages({ agentId: currentAgentId.value, threadId: threadId, delay: 1000 })
.finally(() => {
.finally(() => {
resetOnGoingConv(threadId, true);
});
return true;

View File

@ -30,16 +30,15 @@
/>
</div>
<div class="config-controls">
<a-button type="link" class="doc-link-btn" @click="openDocLink">
<InfoCircleOutlined /> 文档处理与 OCR 说明
</a-button>
<a-button
type="dashed"
@click="showChunkConfigModal"
:disabled="isGraphBased"
>
<SettingOutlined /> 分块参数 ({{ chunkParams.chunk_size }}/{{ chunkParams.chunk_overlap }})
</a-button>
<a-button type="link" class="doc-link-btn" @click="openDocLink">
<InfoCircleOutlined /> 文档处理与 OCR 说明
</a-button>
</div>
</div>
@ -50,12 +49,10 @@
<a-select
v-model:value="chunkParams.enable_ocr"
:options="enableOcrOptions"
style="width: 220px; margin-right: 12px;"
style="width: 220px;"
:disabled="ocrHealthChecking"
/>
<a-button
size="small"
type="dashed"
@click="checkOcrHealth"
:loading="ocrHealthChecking"
:icon="h(CheckCircleOutlined)"
@ -781,6 +778,13 @@ const chunkData = async () => {
.config-controls {
display: flex;
align-items: center;
gap: 8px;
}
.doc-link-btn {
color: var(--main-600);
display: flex;
align-items: center;
}
.source-segmented {
@ -817,6 +821,12 @@ const chunkData = async () => {
padding: 16px;
background-color: var(--gray-50);
border-radius: 6px;
.ocr-controls {
display: flex;
align-items: center;
gap: 12px;
}
}
.param-description {

View File

@ -481,12 +481,12 @@ function canCancel(task) {
.task-card-error {
font-size: 13px;
line-height: 1.45;
border-radius: 10px;
border-radius: 6px;
padding: 10px 12px;
}
.task-card-message {
background: var(--gray-50);
background: var(--gray-100);
color: var(--gray-800);
}