feat:完成上传文档时调整嵌入参数模块初版

This commit is contained in:
PingChuan
2025-12-02 22:29:32 +08:00
parent 1baf99fe28
commit 0f49426a2e
7 changed files with 2637 additions and 145 deletions
@@ -1425,3 +1425,919 @@
.segment-manager-page .anticon-spin {
color: rgb(0 104 74) !important;
}
/* ============================================================================
* 上传配置对话框样式
* ============================================================================ */
.upload-config-modal .ant-modal-header {
border-bottom: 1px solid #f0f0f0;
padding: 16px 24px;
}
.upload-config-modal .ant-modal-title {
font-size: 16px;
font-weight: 600;
color: #1a1a1a;
}
.upload-config-modal .ant-modal-body {
padding: 24px;
}
.upload-config-modal .ant-modal-footer {
border-top: 1px solid #f0f0f0;
padding: 12px 24px;
}
.upload-config-modal .ant-btn-primary {
background-color: #00684a;
border-color: #00684a;
}
.upload-config-modal .ant-btn-primary:hover {
background-color: #005a3f;
border-color: #005a3f;
}
/* 文件信息区域 */
.upload-config-form .file-info-section,
.upload-progress-container .file-info-section {
margin-bottom: 16px;
}
.upload-config-form .file-info,
.upload-progress-container .file-info {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: #f5f7f9;
border-radius: 8px;
border: 1px solid #e5e5e5;
}
.upload-config-form .file-icon,
.upload-progress-container .file-icon {
font-size: 24px;
color: #00684a;
}
.upload-config-form .file-details,
.upload-progress-container .file-details {
display: flex;
flex-direction: column;
gap: 2px;
flex: 1;
min-width: 0;
}
.upload-config-form .file-name,
.upload-progress-container .file-name {
font-size: 14px;
font-weight: 500;
color: #1a1a1a;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.upload-config-form .file-size,
.upload-progress-container .file-size {
font-size: 12px;
color: #666;
}
/* 设置项样式 */
.upload-config-form .setting-item {
margin-bottom: 16px;
}
.upload-config-form .setting-label {
display: flex;
align-items: center;
gap: 6px;
font-size: 13px;
font-weight: 500;
color: #333;
margin-bottom: 8px;
}
.upload-config-form .help-icon {
color: #999;
font-size: 12px;
cursor: help;
}
.upload-config-form .checkbox-group {
display: flex;
flex-direction: column;
gap: 10px;
}
.upload-config-form .checkbox-group .ant-checkbox-wrapper {
color: #333;
font-size: 13px;
}
.upload-config-form .checkbox-group .ant-checkbox-checked .ant-checkbox-inner {
background-color: #00684a;
border-color: #00684a;
}
/* 进度容器 */
.upload-progress-container {
min-height: 200px;
}
.upload-progress-container .progress-section {
padding: 24px 0;
}
.upload-progress-container .status-text {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
margin-top: 16px;
font-size: 14px;
color: #666;
}
.upload-progress-container .status-icon {
color: #00684a;
}
/* 成功状态 */
.upload-progress-container .success-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 24px;
}
.upload-progress-container .success-icon {
font-size: 48px;
color: #52c41a;
margin-bottom: 16px;
}
.upload-progress-container .success-text {
font-size: 16px;
font-weight: 500;
color: #1a1a1a;
}
/* 错误状态 */
.upload-progress-container .error-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 24px;
}
.upload-progress-container .error-icon {
font-size: 48px;
color: #ff4d4f;
margin-bottom: 16px;
}
.upload-progress-container .error-text {
font-size: 14px;
color: #ff4d4f;
text-align: center;
}
/* 索引阶段指示器 */
.upload-progress-container .indexing-stages {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 24px;
padding: 16px;
background: #f5f7f9;
border-radius: 8px;
}
.upload-progress-container .stage-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #999;
padding: 4px 8px;
background: #fff;
border-radius: 4px;
border: 1px solid #e5e5e5;
transition: all 0.2s;
}
.upload-progress-container .stage-item.active {
color: #00684a;
border-color: #00684a;
background: rgba(0, 104, 74, 0.05);
}
.upload-progress-container .stage-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #d9d9d9;
transition: background 0.2s;
}
.upload-progress-container .stage-item.active .stage-dot {
background: #00684a;
}
/* 进度条主题色 */
.upload-config-modal .ant-progress-bg {
background-color: #00684a;
}
.upload-config-modal .ant-progress-status-active .ant-progress-bg::before {
background: #fff;
}
/* Divider 样式 */
.upload-config-form .ant-divider {
margin: 16px 0;
border-color: #e5e5e5;
}
.upload-config-form .ant-divider-inner-text {
font-size: 13px;
font-weight: 500;
color: #666;
}
/* Select 和 Input 主题色 */
.upload-config-modal .ant-select:hover .ant-select-selector {
border-color: #00684a !important;
}
.upload-config-modal .ant-select-focused .ant-select-selector {
border-color: #00684a !important;
box-shadow: 0 0 0 2px rgba(0, 104, 74, 0.1) !important;
}
.upload-config-modal .ant-input:hover,
.upload-config-modal .ant-input-number:hover {
border-color: #00684a;
}
.upload-config-modal .ant-input:focus,
.upload-config-modal .ant-input-focused,
.upload-config-modal .ant-input-number:focus,
.upload-config-modal .ant-input-number-focused {
border-color: #00684a;
box-shadow: 0 0 0 2px rgba(0, 104, 74, 0.1);
}
/* Spin 主题色 */
.upload-config-modal .ant-spin .ant-spin-dot-item {
background-color: #00684a !important;
}
/* ============================================================================
* 文档上传页面样式
* ============================================================================ */
.document-upload-page {
display: flex;
flex-direction: column;
height: 100%;
background: #fff;
overflow: hidden;
}
/* 上传页面头部 */
.upload-header {
display: flex;
align-items: center;
justify-content: center;
padding: 16px 24px;
border-bottom: 1px solid #f0f0f0;
flex-shrink: 0;
position: relative;
}
.upload-header .back-btn {
position: absolute;
left: 24px;
color: #666;
font-size: 14px;
padding: 4px 12px;
height: auto;
}
.upload-header .back-btn:hover {
color: #00684a;
background: rgba(0, 104, 74, 0.08);
}
/* 步骤指示器 */
.upload-steps {
display: inline-flex;
align-items: center;
gap: 0;
}
.step-item {
display: inline-flex;
align-items: center;
gap: 8px;
color: #999;
font-size: 13px;
white-space: nowrap;
}
.step-item.active {
color: #00684a;
}
.step-item.completed {
color: #52c41a;
}
.step-number {
width: 24px;
height: 24px;
border-radius: 50%;
background: #f0f0f0;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 600;
transition: all 0.2s;
flex-shrink: 0;
}
.step-item.active .step-number {
background: #00684a;
color: #fff;
}
.step-item.completed .step-number {
background: #52c41a;
color: #fff;
}
.step-title {
font-weight: 500;
}
.step-divider {
width: 40px;
height: 1px;
background: #e5e5e5;
margin: 0 12px;
flex-shrink: 0;
}
.step-divider.completed {
background: #52c41a;
}
/* 上传内容区域 */
.upload-content {
flex: 1;
overflow-y: auto;
padding: 24px;
}
/* 第一步:选择文件 */
.upload-step-content.step1 {
max-width: 800px;
margin: 0 auto;
}
.step-heading {
font-size: 24px;
font-weight: 600;
color: #1a1a1a;
margin: 0 0 8px 0;
}
.step-description {
font-size: 14px;
color: #666;
margin: 0 0 24px 0;
line-height: 1.6;
}
/* 文件拖拽区域 */
.file-drop-zone {
margin-bottom: 24px;
}
.file-drop-zone .ant-upload-drag {
border: 2px dashed #d9d9d9;
border-radius: 12px;
background: #fafafa;
padding: 40px 20px;
transition: all 0.2s;
}
.file-drop-zone .ant-upload-drag:hover {
border-color: #00684a;
background: rgba(0, 104, 74, 0.02);
}
.file-drop-zone .ant-upload-drag-icon {
color: #999;
font-size: 48px !important;
}
.file-drop-zone .ant-upload-text {
font-size: 14px;
color: #333;
}
.file-drop-zone .upload-link {
color: #00684a;
font-weight: 500;
cursor: pointer;
}
.file-drop-zone .ant-upload-hint {
font-size: 12px;
color: #999;
margin-top: 8px;
}
/* 已选文件区域 */
.selected-files-section {
margin-bottom: 24px;
}
.section-subtitle {
font-size: 14px;
font-weight: 600;
color: #1a1a1a;
margin: 0 0 12px 0;
}
.selected-files-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.selected-file-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
background: #f5f7f9;
border-radius: 8px;
border: 1px solid #e5e5e5;
}
.selected-file-item .file-icon {
font-size: 24px;
color: #00684a;
}
.selected-file-item .file-info {
flex: 1;
min-width: 0;
}
.selected-file-item .file-name {
font-size: 14px;
font-weight: 500;
color: #1a1a1a;
display: block;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.selected-file-item .file-size {
font-size: 12px;
color: #666;
}
.selected-file-item .remove-file-btn {
color: #999;
}
.selected-file-item .remove-file-btn:hover {
color: #ff4d4f;
}
/* 步骤操作按钮 */
.step-actions {
display: flex;
justify-content: flex-end;
margin-top: 24px;
}
.step-actions .next-btn {
min-width: 120px;
height: 40px;
font-size: 14px;
background: #00684a;
border-color: #00684a;
}
.step-actions .next-btn:hover {
background: #005a3f;
border-color: #005a3f;
}
.step-actions .next-btn:disabled {
background: #d9d9d9;
border-color: #d9d9d9;
}
/* 第二步:分段配置与预览 */
.upload-step-content.step2 {
height: 100%;
display: flex;
flex-direction: column;
}
/* 处理进度区 */
.processing-status {
background: #f5f7f9;
border-radius: 12px;
padding: 24px;
margin-bottom: 24px;
}
.processing-file {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 16px;
}
.processing-file .file-icon {
font-size: 24px;
color: #00684a;
}
.processing-file .file-name {
flex: 1;
font-size: 14px;
font-weight: 500;
color: #1a1a1a;
}
.processing-file .status-icon {
font-size: 18px;
}
.processing-file .status-icon.success {
color: #52c41a;
}
.processing-file .status-icon.error {
color: #ff4d4f;
}
.processing-file .status-icon.loading {
color: #00684a;
}
.processing-status .status-text {
text-align: center;
font-size: 13px;
color: #666;
margin-top: 12px;
}
/* 索引阶段指示器(Step2) */
.processing-status .indexing-stages {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 16px;
justify-content: center;
}
.processing-status .stage-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #999;
padding: 4px 10px;
background: #fff;
border-radius: 4px;
border: 1px solid #e5e5e5;
transition: all 0.2s;
}
.processing-status .stage-item.active {
color: #00684a;
border-color: #00684a;
background: rgba(0, 104, 74, 0.05);
}
.processing-status .stage-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #d9d9d9;
transition: background 0.2s;
}
.processing-status .stage-item.active .stage-dot {
background: #00684a;
}
/* 错误状态 */
.error-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 48px;
text-align: center;
}
.error-state .error-icon {
font-size: 48px;
color: #ff4d4f;
margin-bottom: 16px;
}
.error-state .error-text {
font-size: 14px;
color: #666;
margin-bottom: 24px;
}
/* 索引方式选项 */
.index-options {
display: flex;
flex-direction: column;
gap: 8px;
}
.index-option {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 16px;
background: #fff;
border: 1px solid #e5e5e5;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s;
}
.index-option:hover {
border-color: #00684a;
}
.index-option.active {
border-color: #00684a;
background: rgba(0, 104, 74, 0.05);
}
.index-option .option-radio {
width: 16px;
height: 16px;
border-radius: 50%;
border: 2px solid #d9d9d9;
position: relative;
transition: all 0.2s;
}
.index-option.active .option-radio {
border-color: #00684a;
}
.index-option.active .option-radio::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8px;
height: 8px;
border-radius: 50%;
background: #00684a;
}
.index-option .option-label {
font-size: 14px;
color: #333;
}
.index-option .option-badge {
font-size: 11px;
padding: 2px 6px;
border-radius: 4px;
margin-left: auto;
}
.index-option .option-badge.recommended {
background: rgba(0, 104, 74, 0.1);
color: #00684a;
}
/* 完成状态底部操作 */
.completion-actions {
display: flex;
justify-content: center;
padding: 24px;
border-top: 1px solid #f0f0f0;
margin-top: auto;
}
.completion-actions .ant-btn-primary {
min-width: 140px;
height: 40px;
font-size: 14px;
background: #00684a;
border-color: #00684a;
}
.completion-actions .ant-btn-primary:hover {
background: #005a3f;
border-color: #005a3f;
}
/* 上传页面的分段内容布局(复用 document-detail-content */
.upload-step-content .document-detail-content {
flex: 1;
min-height: 0;
}
/* 上传页面的设置操作按钮 */
.upload-step-content .settings-actions {
margin-top: 24px;
display: flex;
gap: 12px;
}
.upload-step-content .settings-actions .ant-btn-primary {
background: #00684a;
border-color: #00684a;
}
.upload-step-content .settings-actions .ant-btn-primary:hover {
background: #005a3f;
border-color: #005a3f;
}
/* 进度条主题色 */
.document-upload-page .ant-progress-bg {
background-color: #00684a;
}
.document-upload-page .ant-progress-status-active .ant-progress-bg::before {
background: #fff;
}
/* Spin 主题色 */
.document-upload-page .ant-spin .ant-spin-dot-item {
background-color: #00684a !important;
}
/* 预览框内的进度显示 */
.preview-processing {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 24px;
min-height: 300px;
}
.preview-processing .processing-file {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 24px;
width: 100%;
max-width: 400px;
}
.preview-processing .file-icon {
font-size: 24px;
color: #00684a;
}
.preview-processing .file-name {
flex: 1;
font-size: 14px;
font-weight: 500;
color: #1a1a1a;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.preview-processing .status-icon {
font-size: 18px;
}
.preview-processing .status-icon.loading {
color: #00684a;
}
.preview-processing .ant-progress {
width: 100%;
max-width: 400px;
}
.preview-processing .status-text {
text-align: center;
font-size: 13px;
color: #666;
margin-top: 12px;
}
.preview-processing .indexing-stages {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 24px;
justify-content: center;
max-width: 500px;
}
.preview-processing .stage-item {
display: flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: #999;
padding: 4px 10px;
background: #f5f7f9;
border-radius: 4px;
border: 1px solid #e5e5e5;
transition: all 0.2s;
}
.preview-processing .stage-item.active {
color: #00684a;
border-color: #00684a;
background: rgba(0, 104, 74, 0.05);
}
.preview-processing .stage-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #d9d9d9;
transition: background 0.2s;
}
.preview-processing .stage-item.active .stage-dot {
background: #00684a;
}
/* 索引选项禁用状态 */
.index-option.disabled {
opacity: 0.6;
cursor: not-allowed;
}
.index-option.disabled:hover {
border-color: #e5e5e5;
}
/* 预览框内错误状态 */
.preview-error {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 24px;
min-height: 300px;
}
.preview-error .error-icon {
font-size: 48px;
color: #ff4d4f;
margin-bottom: 16px;
}
.preview-error .error-text {
color: #666;
font-size: 14px;
text-align: center;
}
/* 完成统计样式 */
.completion-stats {
color: #666;
font-size: 14px;
margin-right: 16px;
}
/* 文件选择下拉选项 */
.file-select-option {
display: flex;
align-items: center;
}