feat(knowledge): 添加知识拆分预览功能

- 新增 SplitPreview 组件用于展示拆分预览结果
- 在 split 配置中集成预览功能,实现拆分和预览一体化
- 优化知识创建流程,支持预览确认后继续上传
-重构 API 调用,增加拆分结果预览接口
This commit is contained in:
du.meimei
2025-04-15 14:31:00 +08:00
parent 13205a1d84
commit 9e940180de
9 changed files with 306 additions and 58 deletions

View File

@@ -13,7 +13,12 @@
<div class="components">
<step-preprocessing ref="stepPreProcessing" v-show="active === 0" @getForm="getForm" @getDocumentId="getDocumentId"></step-preprocessing>
<step-split-config ref="splitConfig" v-show="active === 1"></step-split-config>
<step-split-config
ref="splitConfig"
v-show="active === 1"
@previewConfirmed="handlePreviewConfirm"
@handleReUpload="handleReUpload"
></step-split-config>
<step-words ref="words" v-show="active === 2"></step-words>
</div>
</div>
@@ -81,7 +86,6 @@ export default {
},
async nextStep() {
if (this.active === 0) {
// this.active++
this.$refs.stepPreProcessing.uploadFiled()
} else if (this.active === 1) {
const res = await this.$refs.splitConfig.nextStep(this.documentId)
@@ -98,6 +102,14 @@ export default {
this.$message.success('创建成功')
}
}
},
// 预览完成
handlePreviewConfirm() {
this.active = 2
},
// 重新上传
handleReUpload() {
this.active = 0
}
},
created() {},