671 lines
12 KiB
CSS
671 lines
12 KiB
CSS
/* 知识库编辑页面样式 */
|
|
|
|
/* 覆盖container-fluid的padding */
|
|
.container-fluid:has(.edit-container) {
|
|
padding: 0 !important; /* 移除container-fluid的padding */
|
|
}
|
|
|
|
|
|
/* 只针对包含edit-container的#pageContent */
|
|
#pageContent:has(.edit-container) {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
/*height: 100%;*/
|
|
height: calc(100vh - 60px); /* 全屏减去导航栏高度 */
|
|
}
|
|
|
|
/* 主布局 */
|
|
.edit-container {
|
|
display: flex;
|
|
/*height: calc(100vh - 60px);*/
|
|
height: 100%; /* 填充父容器高度 */
|
|
background: #f5f5f5;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 左侧表格区域 */
|
|
.table-section {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding: 20px;
|
|
overflow: hidden;
|
|
min-width: 0;
|
|
}
|
|
|
|
.section-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 15px;
|
|
padding-bottom: 10px;
|
|
border-bottom: 2px solid #6666FF;
|
|
}
|
|
|
|
.header-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
}
|
|
|
|
.back-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 6px;
|
|
background: #f3f4f6;
|
|
color: #6b7280;
|
|
text-decoration: none;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.back-btn:hover {
|
|
background: #e5e7eb;
|
|
color: #6666FF;
|
|
}
|
|
|
|
.section-header h2 {
|
|
color: #404040;
|
|
font-size: 18px;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.doc-count {
|
|
color: #6b7280;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* 表格容器 */
|
|
.table-wrapper {
|
|
flex: 1;
|
|
overflow: auto;
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
position: relative;
|
|
}
|
|
|
|
/* 加载状态 */
|
|
.loading-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 200px;
|
|
color: #6b7280;
|
|
}
|
|
|
|
.spinner {
|
|
width: 32px;
|
|
height: 32px;
|
|
border: 3px solid #e5e7eb;
|
|
border-top-color: #6666FF;
|
|
border-radius: 50%;
|
|
animation: spin 0.8s linear infinite;
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
@keyframes spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
.error-text {
|
|
color: #dc2626;
|
|
}
|
|
|
|
/* 表格样式 */
|
|
.document-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 13px;
|
|
table-layout: fixed;
|
|
}
|
|
|
|
.document-table th,
|
|
.document-table td {
|
|
padding: 10px 12px;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
text-align: left;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.document-table th {
|
|
background: #f9fafb;
|
|
font-weight: 600;
|
|
color: #404040;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
.document-table th:first-child {
|
|
width: 120px;
|
|
}
|
|
|
|
.document-table th:nth-child(2) {
|
|
width: 250px;
|
|
}
|
|
|
|
.document-table tbody tr {
|
|
cursor: pointer;
|
|
transition: background-color 0.15s;
|
|
}
|
|
|
|
.document-table tbody tr:hover {
|
|
background: #f8f9fa;
|
|
}
|
|
|
|
.document-table tbody tr.selected {
|
|
background: linear-gradient(135deg, rgba(170, 169, 255, 0.15), rgba(181, 213, 255, 0.15));
|
|
border-left: 3px solid #6666FF;
|
|
}
|
|
|
|
.document-table tbody tr.selected td:first-child {
|
|
padding-left: 9px;
|
|
}
|
|
|
|
.empty-cell {
|
|
text-align: center !important;
|
|
color: #9ca3af;
|
|
padding: 40px !important;
|
|
}
|
|
|
|
/* 元数据单元格 */
|
|
.metadata-cell {
|
|
color: #6b7280;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.metadata-collapsed {
|
|
color: #9ca3af;
|
|
font-size: 12px;
|
|
font-style: italic;
|
|
}
|
|
|
|
/* 右侧侧边栏 */
|
|
.sidebar-section {
|
|
width: 400px;
|
|
background: white;
|
|
border-left: 1px solid #e5e7eb;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 15px 20px;
|
|
border-bottom: 2px solid #6666FF;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.sidebar-header h3 {
|
|
color: #404040;
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
}
|
|
|
|
.sidebar-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* 空状态 */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 200px;
|
|
color: #9ca3af;
|
|
}
|
|
|
|
.empty-state i {
|
|
font-size: 48px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
/* 编辑表单 */
|
|
.edit-form .form-group {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.edit-form label {
|
|
display: block;
|
|
font-weight: 500;
|
|
color: #404040;
|
|
margin-bottom: 6px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.edit-form .form-input,
|
|
.edit-form .form-textarea,
|
|
.edit-form .form-select {
|
|
width: 100%;
|
|
padding: 8px 10px;
|
|
border: 1px solid #e5e7eb;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
background: white;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.edit-form .form-input:focus,
|
|
.edit-form .form-textarea:focus,
|
|
.edit-form .form-select:focus {
|
|
outline: none;
|
|
border-color: #6666FF;
|
|
box-shadow: 0 0 0 3px rgba(102, 102, 255, 0.1);
|
|
}
|
|
|
|
.edit-form .form-input[readonly] {
|
|
background: #f9fafb;
|
|
color: #6b7280;
|
|
}
|
|
|
|
.edit-form .form-textarea {
|
|
resize: vertical;
|
|
min-height: 80px;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.form-hint {
|
|
display: block;
|
|
margin-top: 4px;
|
|
font-size: 11px;
|
|
color: #9ca3af;
|
|
}
|
|
|
|
/* 元数据折叠按钮样式 */
|
|
.metadata-toggle-btn {
|
|
font-size: 14px;
|
|
padding: 8px 16px;
|
|
border: 1px solid #d1d5db;
|
|
background: #f9fafb;
|
|
color: #404040;
|
|
transition: all 0.2s;
|
|
width: 100%;
|
|
text-align: left;
|
|
}
|
|
|
|
.metadata-toggle-btn:hover {
|
|
background: #f3f4f6;
|
|
border-color: #9ca3af;
|
|
}
|
|
|
|
.metadata-toggle-btn.active {
|
|
background: linear-gradient(135deg, #6647A9, #5553FF);
|
|
color: white;
|
|
border-color: #6666FF;
|
|
}
|
|
|
|
#metadataToggleIcon {
|
|
display: inline-block;
|
|
transition: transform 0.2s ease;
|
|
font-size: 12px;
|
|
margin-right: 5px;
|
|
}
|
|
|
|
#metadataToggleIcon.rotated {
|
|
transform: rotate(90deg);
|
|
}
|
|
|
|
/* 元数据字段 */
|
|
#metadataFields {
|
|
max-height: 300px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#metadataFields .metadata-field {
|
|
margin-bottom: 10px;
|
|
padding: 10px;
|
|
background: #f9fafb;
|
|
border-radius: 6px;
|
|
}
|
|
|
|
#metadataFields .metadata-field label {
|
|
font-size: 12px;
|
|
color: #6b7280;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
#metadataFields .metadata-field .form-input {
|
|
font-size: 12px;
|
|
padding: 6px 8px;
|
|
}
|
|
|
|
.no-metadata {
|
|
color: #9ca3af;
|
|
font-size: 13px;
|
|
text-align: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
/* 复选框样式 */
|
|
.checkbox-wrapper {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.checkbox-wrapper input[type="checkbox"] {
|
|
width: 16px;
|
|
height: 16px;
|
|
accent-color: #6666FF;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.checkbox-wrapper label {
|
|
margin-bottom: 0;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* 向量化选项 */
|
|
.vectorize-options {
|
|
padding: 15px;
|
|
background: linear-gradient(135deg, rgba(170, 169, 255, 0.1), rgba(181, 213, 255, 0.1));
|
|
border-radius: 8px;
|
|
border: 1px solid #AAA9FF;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.vectorize-options .form-group {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.vectorize-options .form-group:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/* 操作按钮 */
|
|
.form-actions {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 10px;
|
|
margin-top: 20px;
|
|
padding-top: 15px;
|
|
border-top: 1px solid #e5e7eb;
|
|
}
|
|
|
|
/* 分页控件 */
|
|
.pagination-wrapper {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 15px 0;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.pagination-info {
|
|
color: #6b7280;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.pagination-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
}
|
|
|
|
/* 页码按钮容器 */
|
|
.page-numbers {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.page-num-btn {
|
|
min-width: 32px;
|
|
height: 28px;
|
|
padding: 0 6px;
|
|
border: 1px solid #e5e7eb;
|
|
background: #fff;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.8rem;
|
|
color: #6b7280;
|
|
transition: all 0.2s ease;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.page-num-btn:hover:not(:disabled) {
|
|
border-color: #6666FF;
|
|
color: #6666FF;
|
|
}
|
|
|
|
.page-num-btn.active {
|
|
background: #6666FF;
|
|
border-color: #6666FF;
|
|
color: #fff;
|
|
cursor: default;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.page-ellipsis {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
min-width: 24px;
|
|
height: 28px;
|
|
color: #9ca3af;
|
|
font-size: 0.8rem;
|
|
user-select: none;
|
|
letter-spacing: 1px;
|
|
}
|
|
|
|
/* 每页行数选择器 */
|
|
.page-size-selector {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
color: #6b7280;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.page-size-buttons {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.page-size-btn {
|
|
padding: 0.25rem 0.5rem;
|
|
border: 1px solid #e5e7eb;
|
|
background: #fff;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 0.8rem;
|
|
color: #6b7280;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.page-size-btn:hover {
|
|
border-color: #6666FF;
|
|
color: #6666FF;
|
|
}
|
|
|
|
.page-size-btn.active {
|
|
background: #6666FF;
|
|
border-color: #6666FF;
|
|
color: #fff;
|
|
}
|
|
|
|
/* 按钮样式 */
|
|
.btn {
|
|
padding: 8px 16px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-primary {
|
|
background: linear-gradient(135deg, #6647A9, #5553FF);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover:not(:disabled) {
|
|
background: linear-gradient(135deg, #5553FF, #4440E8);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #f3f4f6;
|
|
color: #404040;
|
|
border: 1px solid #d1d5db;
|
|
}
|
|
|
|
.btn-secondary:hover:not(:disabled) {
|
|
background: #e5e7eb;
|
|
}
|
|
|
|
.btn-danger {
|
|
background: #fee2e2;
|
|
color: #dc2626;
|
|
border: 1px solid #fecaca;
|
|
}
|
|
|
|
.btn-danger:hover:not(:disabled) {
|
|
background: #dc2626;
|
|
color: white;
|
|
}
|
|
|
|
.btn-sm {
|
|
padding: 5px 10px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.btn-close {
|
|
background: none;
|
|
border: none;
|
|
color: #6b7280;
|
|
cursor: pointer;
|
|
padding: 5px;
|
|
font-size: 18px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 4px;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.btn-close:hover {
|
|
color: #404040;
|
|
background: #f3f4f6;
|
|
}
|
|
|
|
/* 临时消息提示 */
|
|
.temp-message {
|
|
position: fixed;
|
|
top: 80px;
|
|
right: 20px;
|
|
z-index: 10000;
|
|
min-width: 250px;
|
|
max-width: 400px;
|
|
padding: 12px 16px;
|
|
border-radius: 8px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
transform: translateX(120%);
|
|
transition: transform 0.3s ease;
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
}
|
|
|
|
.temp-message.show {
|
|
transform: translateX(0);
|
|
}
|
|
|
|
.temp-message.success {
|
|
background: linear-gradient(135deg, #6647A9, #5553FF);
|
|
color: white;
|
|
}
|
|
|
|
.temp-message.error {
|
|
background: #fee2e2;
|
|
color: #dc2626;
|
|
border: 1px solid #fecaca;
|
|
}
|
|
|
|
.temp-message i {
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 1024px) {
|
|
.edit-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.table-section {
|
|
flex: none;
|
|
height: 50%;
|
|
}
|
|
|
|
.sidebar-section {
|
|
width: 100%;
|
|
height: 50%;
|
|
border-left: none;
|
|
border-top: 1px solid #e5e7eb;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.section-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.header-actions {
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.table-section {
|
|
padding: 15px;
|
|
}
|
|
|
|
.document-table th,
|
|
.document-table td {
|
|
padding: 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.sidebar-section {
|
|
width: 100%;
|
|
}
|
|
}
|