diff --git a/web/src/views/GraphView.vue b/web/src/views/GraphView.vue
index 2387d540..cde4a869 100644
--- a/web/src/views/GraphView.vue
+++ b/web/src/views/GraphView.vue
@@ -11,7 +11,7 @@
@@ -32,6 +32,7 @@
检索实体
@@ -204,6 +205,22 @@ const loadSampleNodes = () => {
}
const onSearch = () => {
+ if (state.searchLoading) {
+ message.error('请稍后再试')
+ return
+ }
+
+ if (graphInfo?.value?.embed_model_name !== cur_embed_model.value) {
+ if (!graphInfo?.value?.embed_model_name) {
+ message.error('请先上传文件(jsonl)')
+ return
+ }
+
+ if (!confirm(`构建图数据库时向量模型为 ${graphInfo?.value?.embed_model_name},当前向量模型为 ${cur_embed_model.value},是否继续查询?`)) {
+ return
+ }
+ }
+
if (!state.searchInput) {
message.error('请输入要查询的实体')
return
@@ -315,6 +332,15 @@ const graphStatusText = computed(() => {
return graphInfo.value?.status === 'open' ? '已连接' : '已关闭';
});
+const graphDescription = computed(() => {
+ const dbName = graphInfo.value?.database_name || '';
+ const entityCount = graphInfo.value?.entity_count || 0;
+ const relationCount = graphInfo.value?.relationship_count || 0;
+ const modelName = graphInfo.value?.embed_model_name || '未上传文件';
+
+ return `${dbName} - 共 ${entityCount} 实体,${relationCount} 个关系。向量模型:${modelName}`;
+});
+