207 lines
5.0 KiB
HTML
207 lines
5.0 KiB
HTML
<!-- templates/history.html -->
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>历史记录 - STP文件几何分析工具</title>
|
|
<link rel="stylesheet" href="/static/style.css">
|
|
<style>
|
|
.history-container {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
.header-nav {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 30px;
|
|
border-bottom: 1px solid #ddd;
|
|
padding-bottom: 20px;
|
|
}
|
|
|
|
.nav-buttons {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.file-list {
|
|
display: grid;
|
|
gap: 15px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.file-item {
|
|
background: white;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 8px;
|
|
padding: 15px;
|
|
cursor: pointer;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.file-item:hover {
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.file-item.expanded {
|
|
border-color: #4CAF50;
|
|
background: #f9fff9;
|
|
}
|
|
|
|
.file-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.file-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.file-name {
|
|
font-size: 18px;
|
|
font-weight: bold;
|
|
color: #333;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.file-meta {
|
|
color: #666;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.expand-btn {
|
|
background: none;
|
|
border: none;
|
|
font-size: 20px;
|
|
cursor: pointer;
|
|
color: #666;
|
|
}
|
|
|
|
.record-list {
|
|
margin-top: 15px;
|
|
padding-top: 15px;
|
|
border-top: 1px solid #eee;
|
|
display: none;
|
|
}
|
|
|
|
.file-item.expanded .record-list {
|
|
display: block;
|
|
}
|
|
|
|
.record-item {
|
|
background: white;
|
|
border: 1px solid #e0e0e0;
|
|
border-radius: 6px;
|
|
padding: 15px;
|
|
margin-bottom: 10px;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.record-item:hover {
|
|
background: #f5f5f5;
|
|
}
|
|
|
|
.record-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.record-time {
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.record-status {
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.status-completed {
|
|
background: #e8f5e8;
|
|
color: #2e7d32;
|
|
}
|
|
|
|
.status-processing {
|
|
background: #fff3e0;
|
|
color: #f57c00;
|
|
}
|
|
|
|
.status-failed {
|
|
background: #ffebee;
|
|
color: #c62828;
|
|
}
|
|
|
|
.record-details {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 10px;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
.no-records {
|
|
text-align: center;
|
|
color: #999;
|
|
padding: 40px;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
}
|
|
|
|
.spinner {
|
|
border: 4px solid #f3f3f3;
|
|
border-top: 4px solid #4CAF50;
|
|
border-radius: 50%;
|
|
width: 40px;
|
|
height: 40px;
|
|
animation: spin 1s linear infinite;
|
|
margin: 0 auto 20px;
|
|
}
|
|
|
|
@keyframes spin {
|
|
0% { transform: rotate(0deg); }
|
|
100% { transform: rotate(360deg); }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="history-container">
|
|
<div class="header-nav">
|
|
<div>
|
|
<h1>📊 历史记录</h1>
|
|
<p>查看所有上传的STP文件分析记录</p>
|
|
</div>
|
|
<div class="nav-buttons">
|
|
<button class="upload-btn" onclick="goToUpload()">
|
|
📁 上传新文件
|
|
</button>
|
|
<button class="upload-btn" onclick="goToHome()">
|
|
🔄 返回主页
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="file-list" id="fileList">
|
|
<div class="loading">
|
|
<div class="spinner"></div>
|
|
<p>正在加载历史记录...</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/static/history.js"></script>
|
|
</body>
|
|
</html> |