|
@@ -676,7 +676,7 @@
|
|
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, computed } from 'vue'
|
|
import { ref, computed } from 'vue'
|
|
|
-import { knowledgeDatasets,knowledgeDocuments,createKnowledge,createChunk,editChunk,chatMessages,baseTraining,creatTraining,baseStatistics,getAllChunks,getAllDocumnets,delDocuments,delChunk,getDocumentDetail,blocking,downloadDocument } from '../api/knowledge'
|
|
|
|
|
|
|
+import { knowledgeDatasets,knowledgeDocuments,createKnowledge,createChunk,editChunk,chatMessages,baseTraining,creatTraining,baseStatistics,getAllChunks,getChunks,getAllDocumnets,delDocuments,delChunk,getDocumentDetail,blocking,downloadDocument } from '../api/knowledge'
|
|
|
import { formatTimeAgo } from '@/utils/time'
|
|
import { formatTimeAgo } from '@/utils/time'
|
|
|
import { ElMessage } from 'element-plus'
|
|
import { ElMessage } from 'element-plus'
|
|
|
|
|
|
|
@@ -896,7 +896,8 @@ const chunkParams=ref({
|
|
|
// 获取知识分类
|
|
// 获取知识分类
|
|
|
const getChunkDatasets = () => {
|
|
const getChunkDatasets = () => {
|
|
|
chunkLoading.value = true
|
|
chunkLoading.value = true
|
|
|
- getAllChunks(chunkParams.value).then(res => {
|
|
|
|
|
|
|
+ const apiFn = chunkParams.value.document_id ? getChunks : getAllChunks
|
|
|
|
|
+ apiFn(chunkParams.value).then(res => {
|
|
|
chunkLoading.value = false
|
|
chunkLoading.value = false
|
|
|
chunkList.value = res.result.data
|
|
chunkList.value = res.result.data
|
|
|
res.result.data.forEach(el => {
|
|
res.result.data.forEach(el => {
|