Showing
1 changed file
with
6 additions
and
2 deletions
| @@ -538,7 +538,7 @@ | @@ -538,7 +538,7 @@ | ||
| 538 | </div> | 538 | </div> |
| 539 | 539 | ||
| 540 | <!-- 图谱容器 --> | 540 | <!-- 图谱容器 --> |
| 541 | - <div class="graph-container" id="graphContainer"> | 541 | + <div class="graph-container" id="graphContainer" data-report-id="{{ report_id | e if report_id else '' }}"> |
| 542 | <div id="network"></div> | 542 | <div id="network"></div> |
| 543 | 543 | ||
| 544 | <!-- 加载状态 --> | 544 | <!-- 加载状态 --> |
| @@ -616,7 +616,11 @@ | @@ -616,7 +616,11 @@ | ||
| 616 | let network = null; | 616 | let network = null; |
| 617 | let allNodes = []; | 617 | let allNodes = []; |
| 618 | let allEdges = []; | 618 | let allEdges = []; |
| 619 | - let reportId = {{ report_id | tojson if report_id else 'null' }}; | 619 | + let reportId = null; |
| 620 | + const graphContainer = document.getElementById('graphContainer'); | ||
| 621 | + if (graphContainer) { | ||
| 622 | + reportId = graphContainer.dataset.reportId || null; | ||
| 623 | + } | ||
| 620 | let graphReady = false; | 624 | let graphReady = false; |
| 621 | let graphPollTimer = null; | 625 | let graphPollTimer = null; |
| 622 | let graphSearchResults = []; | 626 | let graphSearchResults = []; |
-
Please register or login to post a comment