|
@@ -346,6 +346,19 @@ function QueryNode({ id, data, sourcePosition, targetPosition }) {
|
|
|
{data.typeLabel || data.type_label}
|
|
{data.typeLabel || data.type_label}
|
|
|
</span>
|
|
</span>
|
|
|
)}
|
|
)}
|
|
|
|
|
+ {data.is_suggestion && data.suggestion_label && (
|
|
|
|
|
+ <span style={{
|
|
|
|
|
+ display: 'inline-block',
|
|
|
|
|
+ padding: '1px 6px',
|
|
|
|
|
+ borderRadius: '10px',
|
|
|
|
|
+ background: '#ede9fe',
|
|
|
|
|
+ color: '#6d28d9',
|
|
|
|
|
+ fontSize: '10px',
|
|
|
|
|
+ fontWeight: '600',
|
|
|
|
|
+ }}>
|
|
|
|
|
+ {data.suggestion_label}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
{data.parent && (
|
|
{data.parent && (
|
|
@@ -969,6 +982,21 @@ function TreeNode({ node, level, children, isCollapsed, onToggle, isSelected, on
|
|
|
</span>
|
|
</span>
|
|
|
)}
|
|
)}
|
|
|
|
|
|
|
|
|
|
+ {node.data.is_suggestion && node.data.suggestion_label && (
|
|
|
|
|
+ <span style={{
|
|
|
|
|
+ fontSize: '12px',
|
|
|
|
|
+ color: '#fff',
|
|
|
|
|
+ background: '#8b5cf6',
|
|
|
|
|
+ padding: '2px 5px',
|
|
|
|
|
+ borderRadius: '3px',
|
|
|
|
|
+ flexShrink: 0,
|
|
|
|
|
+ fontWeight: '600',
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ {node.data.suggestion_label}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ )}
|
|
|
|
|
+
|
|
|
{/* 类型标签 - 显示在右侧靠近分数,蓝色背景 */}
|
|
{/* 类型标签 - 显示在右侧靠近分数,蓝色背景 */}
|
|
|
{node.data.type_label && (
|
|
{node.data.type_label && (
|
|
|
<span style={{
|
|
<span style={{
|
|
@@ -1245,6 +1273,9 @@ function transformData(data) {
|
|
|
source_scores: node.source_scores || [], // 扁平来源得分
|
|
source_scores: node.source_scores || [], // 扁平来源得分
|
|
|
is_above_sources: node.is_above_sources || false, // 组合是否高于来源得分
|
|
is_above_sources: node.is_above_sources || false, // 组合是否高于来源得分
|
|
|
max_source_score: node.max_source_score !== undefined ? node.max_source_score : null, // 来源最高分
|
|
max_source_score: node.max_source_score !== undefined ? node.max_source_score : null, // 来源最高分
|
|
|
|
|
+ item_type: node.item_type || '', // 构建下一轮节点来源类型
|
|
|
|
|
+ is_suggestion: node.is_suggestion || false,
|
|
|
|
|
+ suggestion_label: node.suggestion_label || '',
|
|
|
},
|
|
},
|
|
|
position: { x: 0, y: 0 },
|
|
position: { x: 0, y: 0 },
|
|
|
});
|
|
});
|