feat(knowledge): 添加文档状态展示并优化知识详情页面

- 在知识详情页面添加文档状态字段- 新增文档状态选项数组,用于统一状态展示
- 移除问答模型弹窗的关闭按钮
- 优化轨迹页面知识信息组件
This commit is contained in:
陈昱达
2025-05-13 10:46:00 +08:00
parent 28b82ce330
commit 92b978dbaa
4 changed files with 55 additions and 3 deletions

View File

@@ -103,3 +103,46 @@ export const timeOptions = [
value: '9'
}
]
export const displayStatus = [
// * available: 可用
// * queuing: 排队中
// * indexing: 索引中
// * paused: 暂停
// * error: 错误
// * disabled: 禁用
// * archived: 被归档
// * uploading: 上传中
{
label: '可用',
value: 'available'
},
{
label: '排队中',
value: 'queuing'
},
{
label: '索引中',
value: 'indexing'
},
{
label: '暂停',
value: 'paused'
},
{
label: '错误',
value: 'error'
},
{
label: '禁用',
value: 'disabled'
},
{
label: '归档',
value: 'archived'
},
{
label: '上传中',
value: 'uploading'
}
]

View File

@@ -28,7 +28,6 @@
<!-- 弹窗 -->
<el-drawer
:wrapperClosable="false"
title="问答详情"
:visible.sync="dialogVisible"
width="50%"

View File

@@ -263,11 +263,12 @@ import hitTest from '@/views/knowledge/detail/components/HitTest/Index.vue'
import MetaData from '@/views/knowledge/detail/components/metaData/Index.vue'
import MetadataOperator from '@/views/knowledge/detail/components/metaData/MetadataOperator.vue'
import SearchSetting from '@/views/knowledge/detail/components/SearchSetting/Index.vue'
import { displayStatus } from '@/assets/js/utils/utilOptions'
export default {
name: 'index',
data() {
return {
displayStatus,
hitTestConfig: {
title: '命中测试',
visible: false
@@ -634,6 +635,16 @@ export default {
return h('div', [h('span', text)])
}
},
{
key: '文档状态',
prop: 'displayStatus',
render: (h, params) => {
let label = this.displayStatus.find(item => {
return item.value === params.row.displayStatus
}).label
return h('div', label ? label : 'N/A')
}
},
{
key: '召回次数',
prop: 'hitCount',

View File

@@ -92,7 +92,6 @@ export default {
_getSplitResultPreview() {
datasetQuerySegments({ documentId: this.form.id }).then(res => {
this.descriptions = res.content.content
// this.form.knowledgeContent = content
})
},
openMetaDrawer() {