/** * STP模具几何分析中心 - 统一设计系统 * 优化版本:现代化UI设计,响应式布局 */ /* 设计系统变量 */ :root { /* 颜色系统 */ --primary-color: #2563eb; --primary-hover: #1d4ed8; --secondary-color: #64748b; --success-color: #10b981; --warning-color: #f59e0b; --error-color: #ef4444; --info-color: #3b82f6; /* 中性色 */ --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0; --gray-300: #cbd5e1; --gray-400: #94a3b8; --gray-500: #64748b; --gray-600: #475569; --gray-700: #334155; --gray-800: #1e293b; --gray-900: #0f172a; /* 间距系统 */ --space-xs: 0.25rem; --space-sm: 0.5rem; --space-md: 1rem; --space-lg: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem; /* 字体系统 */ --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; --font-size-xs: 0.75rem; --font-size-sm: 0.875rem; --font-size-base: 1rem; --font-size-lg: 1.125rem; --font-size-xl: 1.25rem; --font-size-2xl: 1.5rem; --font-size-3xl: 1.875rem; /* 阴影系统 */ --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1); --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1); /* 圆角系统 */ --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 9999px; } /* 基础重置 */ * { margin: 0; padding: 0; box-sizing: border-box; } html { scroll-behavior: smooth; } body { font-family: var(--font-family); background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%); min-height: 100vh; padding: var(--space-md); color: var(--gray-800); line-height: 1.6; } /* 应用外壳 */ .app-shell { max-width: 1400px; margin: 0 auto; min-height: calc(100vh - 2 * var(--space-md)); display: flex; flex-direction: column; } /* 通知系统 */ .notification-container { position: fixed; top: var(--space-md); right: var(--space-md); z-index: 1000; max-width: 400px; } .notification { background: white; border-radius: var(--radius-md); padding: var(--space-md); margin-bottom: var(--space-sm); box-shadow: var(--shadow-lg); border-left: 4px solid var(--info-color); animation: slideIn 0.3s ease-out; display: flex; align-items: center; justify-content: space-between; } .notification-success { border-left-color: var(--success-color); } .notification-error { border-left-color: var(--error-color); } .notification-warning { border-left-color: var(--warning-color); } .notification-message { flex: 1; color: var(--gray-700); } .notification-close { background: none; border: none; font-size: var(--font-size-lg); color: var(--gray-400); cursor: pointer; padding: var(--space-xs); margin-left: var(--space-sm); border-radius: var(--radius-sm); transition: all 0.2s; } .notification-close:hover { background: var(--gray-100); color: var(--gray-600); } @keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } } /* 应用头部 */ .app-header { background: white; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: var(--space-2xl); box-shadow: var(--shadow-md); margin-bottom: var(--space-lg); } .app-title { display: flex; align-items: center; gap: var(--space-lg); margin-bottom: var(--space-lg); } .logo { font-size: var(--font-size-3xl); background: linear-gradient(135deg, var(--primary-color), var(--info-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .app-title h1 { font-size: var(--font-size-3xl); color: var(--gray-900); margin-bottom: var(--space-xs); } .app-subtitle { color: var(--gray-600); font-size: var(--font-size-base); } .app-nav { display: flex; gap: var(--space-md); border-top: 1px solid var(--gray-200); padding-top: var(--space-lg); } .nav-link { padding: var(--space-sm) var(--space-md); text-decoration: none; color: var(--gray-600); border-radius: var(--radius-md); transition: all 0.2s; font-weight: 500; } .nav-link:hover { color: var(--primary-color); background: var(--gray-50); } .nav-link.active { color: var(--primary-color); background: var(--gray-50); box-shadow: var(--shadow-sm); } /* 主要内容区域 */ .app-main { flex: 1; background: white; border-radius: 0 0 var(--radius-xl) var(--radius-xl); padding: var(--space-2xl); box-shadow: var(--shadow-md); } /* 应用底部 */ .app-footer { background: var(--gray-800); color: white; padding: var(--space-lg); border-radius: var(--radius-md); margin-top: var(--space-lg); display: flex; justify-content: space-between; align-items: center; font-size: var(--font-size-sm); } .footer-left, .footer-right { display: flex; align-items: center; gap: var(--space-md); } .status-success { color: var(--success-color); } .status-error { color: var(--error-color); } .results-section { padding: 0 40px 40px; } .result-card { background: #f8f9fa; border-radius: 10px; padding: 25px; margin: 15px 0; border-left: 5px solid #3498db; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .result-card h3 { color: #2c3e50; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-size: 1.3em; } .task-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; } .geometry-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; } .bounding-box-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; } .topology-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; } .features-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 15px; } .recommendations-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 15px; } .metrics-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; } .analysis-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; } .data-item { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: transform 0.2s ease; } .data-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); } .data-label { font-weight: bold; color: #2c3e50; margin-bottom: 8px; font-size: 0.95em; display: flex; align-items: center; gap: 8px; } .data-value { color: #34495e; font-family: 'Courier New', monospace; font-size: 1.1em; font-weight: 600; } .data-unit { color: #7f8c8d; font-size: 0.9em; margin-left: 4px; } .coordinate-item { background: linear-gradient(135deg, #e8f4fc, #d1edff); padding: 15px; border-radius: 6px; } .coordinate-label { font-weight: bold; color: #2980b9; margin-bottom: 5px; } .coordinate-value { font-family: 'Courier New', monospace; color: #2c3e50; } .status-badge { padding: 6px 16px; border-radius: 20px; font-size: 0.9em; font-weight: bold; display: inline-block; } .status-processing { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; } .status-completed { background: #d1edff; color: #0c5460; border: 1px solid #bee5eb; } .status-failed { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; } .loading { display: none; text-align: center; padding: 30px; } .spinner { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; margin: 0 auto 20px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .error-message { background: #f8d7da; color: #721c24; padding: 20px; border-radius: 8px; margin: 20px 0; display: none; border-left: 5px solid #e74c3c; } .system-info { background: #2c3e50; color: white; padding: 20px; text-align: center; margin-top: 20px; border-radius: 0 0 15px 15px; } /* 特征和建议的特殊样式 */ .feature-item { background: linear-gradient(135deg, #e8f4fc, #d1edff); padding: 20px; border-radius: 10px; border-left: 4px solid #3498db; } .recommendation-item { background: linear-gradient(135deg, #fff3cd, #ffeaa7); padding: 20px; border-radius: 10px; border-left: 4px solid #f39c12; } .recommendation-high { border-left-color: #e74c3c; background: linear-gradient(135deg, #f8d7da, #f5c6cb); } .recommendation-medium { border-left-color: #f39c12; background: linear-gradient(135deg, #fff3cd, #ffeaa7); } .recommendation-low { border-left-color: #27ae60; background: linear-gradient(135deg, #d1edff, #bee5eb); } .feature-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .feature-type { font-weight: bold; color: #2c3e50; font-size: 1.1em; } .confidence-badge { background: #3498db; color: white; padding: 4px 12px; border-radius: 12px; font-size: 0.9em; } .recommendation-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } .priority-badge { padding: 4px 12px; border-radius: 12px; font-size: 0.9em; font-weight: bold; } .priority-high { background: #e74c3c; color: white; } .priority-medium { background: #f39c12; color: white; } .priority-low { background: #27ae60; color: white; } .recommendation-list { list-style: none; padding: 0; margin: 10px 0; } .recommendation-list li { padding: 8px 0; border-bottom: 1px solid #eee; display: flex; align-items: flex-start; gap: 8px; } .recommendation-list li:before { content: "💡"; font-size: 1.1em; } .recommendation-list li:last-child { border-bottom: none; } .metric-item { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); text-align: center; } .metric-value { font-size: 1.8em; font-weight: bold; color: #2c3e50; margin: 10px 0; } .metric-label { color: #7f8c8d; font-size: 0.9em; } .metric-good { color: #27ae60; } .metric-warning { color: #f39c12; } .metric-poor { color: #e74c3c; } /* 响应式设计 */ @media (max-width: 768px) { .container { margin: 10px; border-radius: 10px; } .header { padding: 20px; } .header h1 { font-size: 2em; } .upload-section { padding: 20px; } .upload-area { padding: 30px 20px; } .results-section { padding: 0 20px 20px; } .geometry-data, .bounding-box-data, .topology-data, .features-data, .recommendations-data, .metrics-data, .analysis-info { grid-template-columns: 1fr; } } /* ===== 新版 Vue SPA 布局样式 ===== */ .app-shell { max-width: 1280px; margin: 0 auto; min-height: calc(100vh - 32px); background: #0b1120; border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; overflow: hidden; } .app-header { padding: 18px 24px; background: radial-gradient(circle at top left, #1d4ed8, #020617 60%); border-bottom: 1px solid rgba(148, 163, 184, 0.4); display: flex; align-items: center; justify-content: space-between; gap: 16px; } .app-title { display: flex; align-items: center; gap: 14px; color: #e5e7eb; } .app-title h1 { font-size: 1.5rem; margin-bottom: 2px; } .app-title p { font-size: 0.9rem; color: #9ca3af; } .logo { width: 42px; height: 42px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: radial-gradient(circle at 30% 20%, #f59e0b, #ef4444 60%); font-size: 1.4rem; } .app-nav { display: flex; gap: 10px; align-items: center; } .nav-link { padding: 8px 16px; border-radius: 999px; text-decoration: none; color: #e5e7eb; font-size: 0.9rem; border: 1px solid transparent; transition: all 0.2s ease; } .nav-link:hover { border-color: rgba(148, 163, 184, 0.7); background: rgba(15, 23, 42, 0.7); } .nav-link.active { background: linear-gradient(135deg, #3b82f6, #6366f1); color: white; border-color: transparent; } .app-main { flex: 1; padding: 20px 24px 18px; background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.25), transparent 55%), radial-gradient(circle at bottom right, rgba(236, 72, 153, 0.18), transparent 55%), #020617; color: #e5e7eb; overflow-y: auto; } .app-footer { padding: 10px 18px; font-size: 0.8rem; color: #9ca3af; background: #020617; border-top: 1px solid rgba(148, 163, 184, 0.3); display: flex; justify-content: space-between; align-items: center; } .footer-left span + span { margin-left: 6px; } .dashboard, .history-view, .result-view { display: flex; flex-direction: column; gap: 18px; max-width: 1040px; margin: 0 auto; } .dashboard h2, .history-view h2, .result-view h2 { font-size: 1.3rem; margin-bottom: 4px; } .card-subtitle { color: #9ca3af; font-size: 0.9rem; } .grid-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; } .grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 12px; } .card { background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.22), transparent 60%), radial-gradient(circle at bottom right, rgba(8, 47, 73, 0.36), transparent 55%), #020617; border-radius: 16px; padding: 16px 18px; border: 1px solid rgba(148, 163, 184, 0.32); box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85); } .card h2, .card h3 { font-size: 1.05rem; margin-bottom: 8px; color: #e5e7eb; } .upload-panel { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; } .upload-dropzone { border-radius: 14px; border: 1px dashed rgba(148, 163, 184, 0.6); padding: 26px 18px; text-align: center; background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.4)); cursor: pointer; transition: all 0.2s ease; color: #e5e7eb; } .upload-dropzone:hover, .upload-dropzone.drag-over { border-color: #60a5fa; background: linear-gradient(135deg, rgba(15, 23, 42, 1), rgba(37, 99, 235, 0.6)); } .upload-icon { font-size: 2.3rem; margin-bottom: 6px; } .clear-file-btn { margin-top: 8px; padding: 4px 12px; font-size: 0.8rem; background: rgba(239, 68, 68, 0.2); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.4); border-radius: 6px; cursor: pointer; transition: all 0.2s ease; } .clear-file-btn:hover { background: rgba(239, 68, 68, 0.3); border-color: rgba(239, 68, 68, 0.6); } .upload-btn { background: linear-gradient(135deg, #3b82f6, #6366f1); color: white; border: none; padding: 10px 18px; font-size: 0.95rem; border-radius: 999px; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; gap: 6px; } .upload-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4); } .upload-btn:disabled { background: #4b5563; cursor: not-allowed; box-shadow: none; } .error-text { color: #fecaca; font-size: 0.85rem; } .current-task { margin-top: 10px; border-radius: 14px; border: 1px solid rgba(148, 163, 184, 0.4); background: radial-gradient(circle at top left, #020617, #020617 70%); } .info-row { display: flex; justify-content: space-between; font-size: 0.9rem; color: #e5e7eb; } .info-row + .info-row { margin-top: 4px; } .small-hint { margin-top: 6px; font-size: 0.8rem; color: #9ca3af; } .summary-card { display: flex; flex-direction: column; gap: 10px; } .summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 4px; } .summary-item { background: rgba(15, 23, 42, 0.92); border-radius: 12px; padding: 8px 10px; border: 1px solid rgba(148, 163, 184, 0.4); } .summary-label { font-size: 0.85rem; color: #9ca3af; margin-bottom: 2px; } .summary-value { font-size: 1.2rem; font-weight: 600; color: #e5e7eb; } .summary-value.text-left { font-size: 0.9rem; } .summary-value .filename { font-weight: 600; } .summary-value .meta { color: #9ca3af; margin-top: 2px; } .summary-empty { grid-column: 1 / -1; font-size: 0.9rem; color: #9ca3af; } .link-btn { margin-top: 4px; font-size: 0.9rem; color: #93c5fd; text-decoration: none; } .link-btn:hover { text-decoration: underline; } .center-block { text-align: center; padding: 24px 8px; color: #9ca3af; } .spinner { border: 3px solid rgba(148, 163, 184, 0.3); border-top: 3px solid #60a5fa; border-radius: 50%; width: 32px; height: 32px; animation: spin 0.9s linear infinite; margin: 0 auto 10px; } .spinner.small { width: 22px; height: 22px; margin-bottom: 6px; } .status-pill { padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; text-transform: none; } .status-pending { background: rgba(148, 163, 184, 0.15); color: #94a3b8; } .status-processing { background: rgba(250, 204, 21, 0.15); color: #facc15; } .status-completed { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; } .status-failed { background: rgba(248, 113, 113, 0.18); color: #fb7185; } .file-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; } .file-card { border-radius: 14px; border: 1px solid rgba(148, 163, 184, 0.4); background: rgba(15, 23, 42, 0.9); padding: 10px 12px; } .file-card.expanded { border-color: #60a5fa; } .file-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; cursor: pointer; } .file-name { font-size: 0.95rem; color: #e5e7eb; } .file-meta { font-size: 0.8rem; color: #9ca3af; } .expand-btn { border: none; background: transparent; color: #9ca3af; font-size: 0.8rem; cursor: pointer; } .record-list { margin-top: 8px; border-top: 1px dashed rgba(55, 65, 81, 0.8); padding-top: 6px; } .record-item { border-radius: 12px; border: 1px solid rgba(55, 65, 81, 0.9); background: rgba(15, 23, 42, 0.95); padding: 8px 10px; margin-top: 6px; cursor: pointer; transition: background 0.2s ease, transform 0.1s ease; } .record-item:hover { background: rgba(17, 24, 39, 1); transform: translateY(-1px); } .record-header { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; color: #e5e7eb; } .record-meta { margin-top: 4px; font-size: 0.78rem; color: #9ca3af; display: flex; gap: 10px; flex-wrap: wrap; } .result-layout { display: flex; flex-direction: column; gap: 14px; } .task-card .info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; font-size: 0.88rem; } .info-item { display: flex; flex-direction: column; gap: 2px; } .info-label { font-size: 0.8rem; color: #9ca3af; } .info-value { font-size: 0.92rem; color: #e5e7eb; } .data-grid { display: flex; flex-direction: column; gap: 6px; } .data-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.88rem; color: #e5e7eb; } .data-label { color: #9ca3af; } .data-value { font-weight: 500; } .placeholder { font-size: 0.85rem; color: #6b7280; } .error-box { margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(248, 113, 113, 0.5); background: rgba(127, 29, 29, 0.4); font-size: 0.85rem; color: #fecaca; } @media (max-width: 900px) { .app-shell { border-radius: 14px; } .app-header { flex-direction: column; align-items: flex-start; } .grid-2 { grid-template-columns: minmax(0, 1fr); } .grid-3 { grid-template-columns: minmax(0, 1fr); } .task-card .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }