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 {
|
||||
|
||||
Reference in New Issue
Block a user