diff --git a/static/js/app.js b/static/js/app.js index 187fe92..3c6b428 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -656,7 +656,7 @@ function displayDifferences() {
${escapeHtml(diff.pro_value)}
 ${escapeHtml(diff.test_value)}
@@ -716,11 +716,11 @@ function displayIdenticalResults() {
${escapeHtml(String(proValue))} ${escapeHtml(String(testValue))} @@ -1171,127 +1171,59 @@ function escapeForJs(str) { .replace(/\0/g, '\\0'); // 空字符 } -// 显示原生数据 +// 显示原生数据(简化测试版本) function showRawData(keyStr) { - console.log('showRawData 调用,参数:', keyStr); + console.log('showRawData 开始执行,参数:', keyStr); + // 添加基本检查 if (!currentResults) { console.error('没有查询结果数据'); - showAlert('warning', '请先执行查询操作'); + alert('请先执行查询操作'); return; } try { - // 解析主键 - const key = JSON.parse(keyStr); - const keyValue = Object.values(key)[0]; + console.log('开始解析 keyStr:', keyStr); - console.log('解析主键成功:', key, '键值:', keyValue); - - // 查找对应的原生数据记录 - let proRecord = null; - let testRecord = null; - - if (currentResults.raw_pro_data && currentResults.raw_pro_data.length > 0) { - proRecord = currentResults.raw_pro_data.find(record => - Object.values(record).includes(keyValue) - ); + // 创建最简单的测试模态框 + const existingModal = document.getElementById('rawDataModal'); + if (existingModal) { + existingModal.remove(); } - if (currentResults.raw_test_data && currentResults.raw_test_data.length > 0) { - testRecord = currentResults.raw_test_data.find(record => - Object.values(record).includes(keyValue) - ); - } - - console.log('查找记录结果 - 生产:', !!proRecord, '测试:', !!testRecord); - - // 安全处理数据 - const proData = proRecord ? JSON.stringify(proRecord, null, 2) : '{}'; - const testData = testRecord ? JSON.stringify(testRecord, null, 2) : '{}'; - - // 创建重构后的简化模态框 - const modalHtml = ` -