deving
This commit is contained in:
+2
-24
@@ -147,30 +147,8 @@ async function toggleFileRecords(filename) {
|
||||
}
|
||||
|
||||
async function viewRecordDetails(taskId) {
|
||||
// 先检查任务状态,如果数据不完整,提示用户重新分析
|
||||
try {
|
||||
const response = await fetch(`/status/${taskId}`);
|
||||
if (response.ok) {
|
||||
const task = await response.json();
|
||||
if (task.status === 'completed' && task.key_info) {
|
||||
// 数据完整,跳转到结果页面
|
||||
window.location.href = `/result/${taskId}`;
|
||||
} else {
|
||||
// 数据不完整,提示用户重新分析
|
||||
if (confirm('该历史记录的分析数据不完整,是否重新分析?')) {
|
||||
// 重新分析逻辑
|
||||
await reanalyzeTask(taskId);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 任务不存在或无法访问,跳转到结果页面尝试显示
|
||||
window.location.href = `/result/${taskId}`;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('检查任务状态失败:', error);
|
||||
// 出错时直接跳转
|
||||
window.location.href = `/result/${taskId}`;
|
||||
}
|
||||
// 直接跳转到结果页面,由后端从数据库加载完整数据
|
||||
window.location.href = `/result/${taskId}`;
|
||||
}
|
||||
|
||||
async function reanalyzeTask(taskId) {
|
||||
|
||||
+8
-3
@@ -174,12 +174,18 @@ body {
|
||||
}
|
||||
|
||||
.key-info-categories {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
display: grid !important;
|
||||
grid-template-columns: repeat(3, 1fr) !important;
|
||||
gap: 20px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.data-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.category-section {
|
||||
background: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
@@ -508,5 +514,4 @@ body {
|
||||
.analysis-info {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user