deving
This commit is contained in:
+10
-4
@@ -56,8 +56,8 @@ function displayFileList(files) {
|
||||
<div class="file-info">
|
||||
<div class="file-name">📄 ${file.filename}</div>
|
||||
<div class="file-meta">
|
||||
总记录: ${file.record_count} 条 |
|
||||
最后上传: ${new Date(file.last_upload).toLocaleString()}
|
||||
总记录: ${file.record_count} 条 |
|
||||
最后上传: ${formatDateTime(file.last_upload)}
|
||||
</div>
|
||||
</div>
|
||||
<button class="expand-btn" onclick="event.stopPropagation(); toggleFileRecords('${file.filename}')">
|
||||
@@ -110,7 +110,7 @@ async function toggleFileRecords(filename) {
|
||||
<div class="record-item" onclick="viewRecordDetails('${record.task_id}')">
|
||||
<div class="record-header">
|
||||
<div class="record-time">
|
||||
📅 ${new Date(record.upload_time).toLocaleString()}
|
||||
📅 ${formatDateTime(record.upload_time)}
|
||||
</div>
|
||||
<div class="record-status status-${record.status}">
|
||||
${getStatusText(record.status)}
|
||||
@@ -120,7 +120,7 @@ async function toggleFileRecords(filename) {
|
||||
<div>文件大小: ${formatFileSize(record.file_size)}</div>
|
||||
<div>任务ID: ${record.task_id}</div>
|
||||
<div>状态: ${record.status}</div>
|
||||
${record.completed_at ? `<div>完成时间: ${new Date(record.completed_at).toLocaleTimeString()}</div>` : ''}
|
||||
${record.completed_at ? `<div>完成时间: ${formatDateTime(record.completed_at)}</div>` : ''}
|
||||
</div>
|
||||
</div>
|
||||
`).join('');
|
||||
@@ -186,6 +186,12 @@ function formatFileSize(bytes) {
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
function formatDateTime(dateString) {
|
||||
if (!dateString) return 'N/A';
|
||||
// 后端已经返回格式化的时间字符串,直接返回
|
||||
return dateString;
|
||||
}
|
||||
|
||||
// 跳转到上传页面
|
||||
async function goToUpload() {
|
||||
try {
|
||||
|
||||
+22
-2
@@ -173,11 +173,31 @@ body {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
/* 关键工艺参数三列布局 - 使用最高优先级 */
|
||||
.key-info-categories {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(3, 1fr) !important;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
gap: 20px !important;
|
||||
margin-bottom: 20px !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* 确保所有子元素正确布局 */
|
||||
.key-info-categories > .category-section {
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
.key-info-categories > .category-section .category-content {
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
gap: 12px !important;
|
||||
}
|
||||
|
||||
/* 覆盖 result.html 内联样式 */
|
||||
.result-section .key-info-categories {
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(3, 1fr) !important;
|
||||
}
|
||||
|
||||
.data-grid {
|
||||
|
||||
Reference in New Issue
Block a user