feat(knowledge): 新增知识库上传预览功能

- 添加上传至知识库前的预览页面
- 实现分段设置和预处理规则配置
-增加文档详情和预估块数展示
- 优化预览界面样式,添加面包屑导航- 新增保存并处理功能,支持不同上传模式
This commit is contained in:
陈昱达
2025-05-07 17:56:37 +08:00
parent d3f2aa0bde
commit 185c8f12f5
10 changed files with 489 additions and 31 deletions

View File

@@ -288,18 +288,27 @@ export default {
methods: {
// 上传文档到知识库
uploadKnowledge() {
preprocessEmbedding({ documentId: this.documentId }).then(res => {
if (res) {
this.$message.success('上传成功')
this.$router.push({
path: '/knowledge/detail/segments',
query: {
documentId: this.documentId,
datasetId: this.$route.query.datasetId
}
})
this.$router.push({
path: '/knowledge/reviewKnowledge',
query: {
documentId: this.documentId,
datasetId: this.$route.query.datasetId,
active: '1'
}
})
// preprocessEmbedding({ documentId: this.documentId }).then(res => {
// if (res) {
// this.$message.success('上传成功')
// this.$router.push({
// path: '/knowledge/detail/segments',
// query: {
// documentId: this.documentId,
// datasetId: this.$route.query.datasetId
// }
// })
// }
// })
},
//changePage
// 分页发生改变时