Initial commit: Car Maintenance Management System

Author: Yang Lu

School: Liaoning Institute of Science and Technology

Major: Computer Science and Technology

Class: BZ246

Tech Stack:

- Backend: Spring Boot 2.7.18 + JPA + MySQL

- Frontend: HTML5 + CSS3 + JavaScript

Features:

- User Management (Admin/Staff/Customer roles)

- Vehicle Archive Management

- Service Order Management

- Parts Inventory Management

- Online Appointment Service

- Data Statistics and Analysis

Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
wangziqi
2026-01-07 14:28:50 +08:00
commit cfae122685
45 changed files with 5447 additions and 0 deletions

377
frontend/css/common.css Normal file
View File

@@ -0,0 +1,377 @@
/* 通用样式 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
font-size: 14px;
color: #333;
background-color: #f5f5f5;
line-height: 1.6;
}
/* 容器 */
.container {
max-width: 1400px;
margin: 0 auto;
padding: 20px;
}
/* 卡片样式 */
.card {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
padding: 20px;
margin-bottom: 20px;
}
.card-header {
border-bottom: 2px solid #1890ff;
padding-bottom: 10px;
margin-bottom: 20px;
}
.card-header h2 {
font-size: 18px;
font-weight: 600;
color: #1890ff;
}
.card-body {
padding: 10px 0;
}
/* 按钮样式 */
.btn {
display: inline-block;
padding: 8px 16px;
font-size: 14px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s;
text-decoration: none;
text-align: center;
}
.btn-primary {
background-color: #1890ff;
color: #fff;
}
.btn-primary:hover {
background-color: #40a9ff;
}
.btn-success {
background-color: #52c41a;
color: #fff;
}
.btn-success:hover {
background-color: #73d13d;
}
.btn-danger {
background-color: #f5222d;
color: #fff;
}
.btn-danger:hover {
background-color: #ff4d4f;
}
.btn-warning {
background-color: #faad14;
color: #fff;
}
.btn-warning:hover {
background-color: #ffc53d;
}
.btn-info {
background-color: #13c2c2;
color: #fff;
}
.btn-info:hover {
background-color: #36cfc9;
}
.btn-secondary {
background-color: #d9d9d9;
color: #333;
}
.btn-secondary:hover {
background-color: #bfbfbf;
}
/* 表单样式 */
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
font-weight: 500;
color: #555;
}
.form-group input,
.form-group select,
.form-group textarea {
width: 100%;
padding: 8px 12px;
border: 1px solid #d9d9d9;
border-radius: 4px;
font-size: 14px;
transition: border-color 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: #1890ff;
}
.form-group textarea {
resize: vertical;
min-height: 80px;
}
.form-row {
display: flex;
gap: 15px;
}
.form-row .form-group {
flex: 1;
}
/* 表格样式 */
.table {
width: 100%;
border-collapse: collapse;
background: #fff;
}
.table th,
.table td {
padding: 12px;
text-align: left;
border-bottom: 1px solid #e8e8e8;
}
.table th {
background-color: #fafafa;
font-weight: 600;
color: #333;
}
.table tr:hover {
background-color: #f5f5f5;
}
.table-actions {
display: flex;
gap: 8px;
}
.table-actions button {
padding: 4px 12px;
font-size: 12px;
}
/* 状态标签 */
.badge {
display: inline-block;
padding: 2px 8px;
font-size: 12px;
border-radius: 4px;
font-weight: 500;
}
.badge-success {
background-color: #f6ffed;
color: #52c41a;
border: 1px solid #b7eb8f;
}
.badge-warning {
background-color: #fffbe6;
color: #faad14;
border: 1px solid #ffe58f;
}
.badge-danger {
background-color: #fff1f0;
color: #f5222d;
border: 1px solid #ffa39e;
}
.badge-info {
background-color: #e6f7ff;
color: #1890ff;
border: 1px solid #91d5ff;
}
.badge-secondary {
background-color: #fafafa;
color: #595959;
border: 1px solid #d9d9d9;
}
/* 模态框 */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
overflow-y: auto;
}
.modal.active {
display: flex;
align-items: center;
justify-content: center;
}
.modal-content {
background: #fff;
border-radius: 8px;
width: 90%;
max-width: 600px;
max-height: 90vh;
overflow-y: auto;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.modal-header {
padding: 16px 20px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
}
.modal-header h3 {
font-size: 16px;
font-weight: 600;
}
.modal-close {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
color: #999;
}
.modal-close:hover {
color: #333;
}
.modal-body {
padding: 20px;
}
.modal-footer {
padding: 12px 20px;
border-top: 1px solid #e8e8e8;
text-align: right;
display: flex;
justify-content: flex-end;
gap: 10px;
}
/* 警告框 */
.alert {
padding: 12px 16px;
border-radius: 4px;
margin-bottom: 15px;
}
.alert-success {
background-color: #f6ffed;
color: #52c41a;
border: 1px solid #b7eb8f;
}
.alert-error {
background-color: #fff1f0;
color: #f5222d;
border: 1px solid #ffa39e;
}
.alert-warning {
background-color: #fffbe6;
color: #faad14;
border: 1px solid #ffe58f;
}
.alert-info {
background-color: #e6f7ff;
color: #1890ff;
border: 1px solid #91d5ff;
}
/* 加载动画 */
.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid #f3f3f3;
border-top: 3px solid #1890ff;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* 空状态 */
.empty-state {
text-align: center;
padding: 40px;
color: #999;
}
.empty-state img {
width: 120px;
margin-bottom: 20px;
opacity: 0.5;
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 10px;
}
.form-row {
flex-direction: column;
}
.table {
font-size: 12px;
}
.table th,
.table td {
padding: 8px;
}
}

286
frontend/css/dashboard.css Normal file
View File

@@ -0,0 +1,286 @@
/* 仪表板通用样式 */
.dashboard-container {
display: flex;
min-height: 100vh;
background-color: #f0f2f5;
}
/* 侧边栏 */
.sidebar {
width: 250px;
background: linear-gradient(180deg, #1890ff 0%, #0050b3 100%);
color: #fff;
position: fixed;
height: 100vh;
overflow-y: auto;
box-shadow: 2px 0 8px rgba(0,0,0,0.1);
}
.sidebar-header {
padding: 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-header h2 {
font-size: 18px;
margin-bottom: 5px;
}
.sidebar-header p {
font-size: 12px;
opacity: 0.8;
}
.sidebar-menu {
padding: 20px 0;
}
.menu-item {
padding: 12px 20px;
cursor: pointer;
transition: all 0.3s;
display: flex;
align-items: center;
gap: 10px;
color: rgba(255, 255, 255, 0.85);
text-decoration: none;
}
.menu-item:hover {
background-color: rgba(255, 255, 255, 0.1);
color: #fff;
}
.menu-item.active {
background-color: rgba(255, 255, 255, 0.2);
color: #fff;
border-left: 3px solid #fff;
}
.menu-icon {
font-size: 18px;
}
/* 主内容区 */
.main-content {
flex: 1;
margin-left: 250px;
padding: 20px;
}
/* 顶部导航 */
.top-nav {
background: #fff;
padding: 15px 20px;
border-radius: 8px;
margin-bottom: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex;
justify-content: space-between;
align-items: center;
}
.top-nav-left h1 {
font-size: 20px;
color: #333;
}
.top-nav-right {
display: flex;
align-items: center;
gap: 20px;
}
.user-info {
display: flex;
align-items: center;
gap: 10px;
}
.user-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
}
.user-name {
font-size: 14px;
color: #333;
}
.btn-logout {
padding: 6px 16px;
background-color: #ff4d4f;
color: #fff;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 13px;
}
.btn-logout:hover {
background-color: #ff7875;
}
/* 统计卡片 */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin-bottom: 20px;
}
.stat-card {
background: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex;
align-items: center;
gap: 15px;
transition: transform 0.3s;
}
.stat-card:hover {
transform: translateY(-5px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.stat-icon {
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 24px;
color: #fff;
}
.stat-icon.blue {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.stat-icon.green {
background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}
.stat-icon.orange {
background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}
.stat-icon.red {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.stat-info h3 {
font-size: 28px;
font-weight: 600;
margin-bottom: 5px;
color: #333;
}
.stat-info p {
font-size: 13px;
color: #666;
}
/* 工具栏 */
.toolbar {
background: #fff;
padding: 15px 20px;
border-radius: 8px;
margin-bottom: 20px;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.toolbar-left {
display: flex;
gap: 10px;
}
.search-box {
position: relative;
}
.search-box input {
padding: 8px 35px 8px 12px;
border: 1px solid #d9d9d9;
border-radius: 4px;
width: 250px;
}
.search-box button {
position: absolute;
right: 0;
top: 0;
padding: 8px 12px;
background: none;
border: none;
cursor: pointer;
color: #666;
}
/* 内容卡片 */
.content-card {
background: #fff;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
overflow: hidden;
}
.content-header {
padding: 15px 20px;
border-bottom: 1px solid #e8e8e8;
display: flex;
justify-content: space-between;
align-items: center;
}
.content-header h2 {
font-size: 16px;
font-weight: 600;
}
.content-body {
padding: 20px;
}
/* 响应式设计 */
@media (max-width: 768px) {
.sidebar {
width: 60px;
}
.sidebar-header h2,
.sidebar-header p,
.menu-item span {
display: none;
}
.main-content {
margin-left: 60px;
}
.stats-grid {
grid-template-columns: 1fr;
}
.toolbar {
flex-direction: column;
gap: 10px;
}
.search-box input {
width: 100%;
}
}

152
frontend/css/login.css Normal file
View File

@@ -0,0 +1,152 @@
/* 登录页面样式 */
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
.login-container {
width: 100%;
max-width: 450px;
padding: 20px;
}
.login-box {
background: #fff;
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
overflow: hidden;
}
.login-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
padding: 30px 20px;
text-align: center;
}
.login-header h1 {
font-size: 24px;
margin-bottom: 8px;
font-weight: 600;
}
.login-header p {
font-size: 12px;
opacity: 0.9;
font-weight: 300;
}
.login-form {
padding: 30px;
}
.login-form .form-group {
margin-bottom: 20px;
}
.login-form .form-group label {
display: block;
margin-bottom: 8px;
font-weight: 500;
color: #333;
}
.login-form input,
.login-form select {
width: 100%;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 14px;
transition: all 0.3s;
}
.login-form input:focus,
.login-form select:focus {
outline: none;
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.btn-login {
width: 100%;
padding: 12px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #fff;
border: none;
border-radius: 6px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: transform 0.2s, box-shadow 0.2s;
margin-top: 10px;
}
.btn-login:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}
.btn-login:active {
transform: translateY(0);
}
.login-footer {
margin-top: 20px;
text-align: center;
display: flex;
justify-content: space-between;
}
.login-footer a {
color: #667eea;
text-decoration: none;
font-size: 13px;
transition: color 0.3s;
}
.login-footer a:hover {
color: #764ba2;
text-decoration: underline;
}
.demo-accounts {
background: #f8f9fa;
padding: 15px 30px;
border-top: 1px solid #e9ecef;
}
.demo-accounts p {
font-size: 12px;
color: #666;
margin-bottom: 8px;
font-weight: 600;
}
.demo-accounts ul {
list-style: none;
}
.demo-accounts li {
font-size: 11px;
color: #888;
padding: 3px 0;
}
/* 响应式设计 */
@media (max-width: 480px) {
.login-container {
padding: 10px;
}
.login-header h1 {
font-size: 20px;
}
.login-form {
padding: 20px;
}
}