From 2864acd02938259b9fa5d530d5f39e32df090b9f Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Mon, 24 Mar 2025 11:14:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=90=8E=EF=BC=8C=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E6=B2=A1=E6=9C=89=E5=88=A0=E9=99=A4=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/knowledgebase.py | 5 +++++ web/src/views/DataBaseInfoView.vue | 2 +- web/src/views/GraphView.vue | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/knowledgebase.py b/src/core/knowledgebase.py index 4223ae92..43cb00c3 100644 --- a/src/core/knowledgebase.py +++ b/src/core/knowledgebase.py @@ -2,6 +2,7 @@ import os import json import time import traceback +import shutil from pymilvus import MilvusClient, MilvusException @@ -259,6 +260,10 @@ class KnowledgeBase: self.client.drop_collection(collection_name=db.db_id) self.data.remove(db) + # 删除数据库对应的文件夹 + db_folder = os.path.join(self.work_dir, db.db_id) + if os.path.exists(db_folder): + shutil.rmtree(db_folder) self._save_databases() return {"message": "删除成功"} diff --git a/web/src/views/DataBaseInfoView.vue b/web/src/views/DataBaseInfoView.vue index 0d6f0131..8f7fb059 100644 --- a/web/src/views/DataBaseInfoView.vue +++ b/web/src/views/DataBaseInfoView.vue @@ -19,7 +19,7 @@ - +
diff --git a/web/src/views/GraphView.vue b/web/src/views/GraphView.vue index 6283940b..b8fdecb4 100644 --- a/web/src/views/GraphView.vue +++ b/web/src/views/GraphView.vue @@ -365,7 +365,7 @@ const graphStatusText = computed(() => { }); const graphDescription = computed(() => { - const dbName = graphInfo.value?.database_name || ''; + const dbName = graphInfo.value?.graph_name || ''; const entityCount = graphInfo.value?.entity_count || 0; const relationCount = graphInfo.value?.relationship_count || 0; const modelName = graphInfo.value?.embed_model_name || '未上传文件';