parent
05609d63c2
commit
a49de52587
|
@ -10,10 +10,28 @@
|
||||||
导入您自己的文本数据或通过 Webhook 实时写入数据以增强 LLM 的上下文。
|
导入您自己的文本数据或通过 Webhook 实时写入数据以增强 LLM 的上下文。
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
<el-card class="document-card" v-if="loading">
|
||||||
|
<div class="document-header">
|
||||||
|
<el-icon>
|
||||||
|
<Folder />
|
||||||
|
</el-icon>
|
||||||
|
<el-skeleton animated :rows="1" />
|
||||||
|
</div>
|
||||||
|
<div class="document-info">
|
||||||
|
<el-skeleton animated :rows="1" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="document-description">
|
||||||
|
<el-skeleton animated :rows="3" />
|
||||||
|
</p>
|
||||||
|
</el-card>
|
||||||
<el-card
|
<el-card
|
||||||
v-for="item in tableData" :key="item.id" class="document-card" shadow="hover"
|
v-for="item in tableData"
|
||||||
@click="toDataset(item.id)">
|
:key="item.id"
|
||||||
|
class="document-card"
|
||||||
|
shadow="hover"
|
||||||
|
@click="toDataset(item.id)"
|
||||||
|
>
|
||||||
<div class="document-header">
|
<div class="document-header">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Folder />
|
<Folder />
|
||||||
|
@ -22,8 +40,12 @@ v-for="item in tableData" :key="item.id" class="document-card" shadow="hover"
|
||||||
</div>
|
</div>
|
||||||
<div class="document-info">
|
<div class="document-info">
|
||||||
<el-tag size="small">{{ item.docsNum || 0 }} 文档</el-tag>
|
<el-tag size="small">{{ item.docsNum || 0 }} 文档</el-tag>
|
||||||
<el-tag size="small" type="info">{{ (Number(item.totalSize) / 1000000).toFixed(2) }} MB</el-tag>
|
<el-tag size="small" type="info"
|
||||||
<el-tag size="small" type="warning" v-if="item.embedStore"> {{ item.embedStore.name }}</el-tag>
|
>{{ (Number(item.totalSize) / 1000000).toFixed(2) }} MB</el-tag
|
||||||
|
>
|
||||||
|
<el-tag size="small" type="warning" v-if="item.embedStore">
|
||||||
|
{{ item.embedStore.name }}</el-tag
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<p class="document-description">
|
<p class="document-description">
|
||||||
{{ item.des || '暂无描述' }}
|
{{ item.des || '暂无描述' }}
|
||||||
|
@ -61,12 +83,14 @@ const pageSize = ref(10)
|
||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const createRef = ref()
|
const createRef = ref()
|
||||||
|
const loading = ref(false)
|
||||||
const loadData = async () => {
|
const loadData = async () => {
|
||||||
try {
|
try {
|
||||||
|
loading.value = true
|
||||||
const res = await KnowledgeApi.getKnowledgePage({
|
const res = await KnowledgeApi.getKnowledgePage({
|
||||||
pageNo: currentPage.value,
|
pageNo: currentPage.value,
|
||||||
pageSize: pageSize.value
|
pageSize: pageSize.value
|
||||||
})
|
}).finally(() => loading.value = false)
|
||||||
tableData.value = res.list || []
|
tableData.value = res.list || []
|
||||||
total.value = res.total || 0
|
total.value = res.total || 0
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -88,7 +112,6 @@ const toDataset = (id: string) => {
|
||||||
router.push(`/ai/console/knowledge/${id}`)
|
router.push(`/ai/console/knowledge/${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleCreate = () => {
|
const handleCreate = () => {
|
||||||
createRef.value.open()
|
createRef.value.open()
|
||||||
}
|
}
|
||||||
|
@ -99,7 +122,8 @@ onMounted(() => {
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.knowledge-base-container {
|
.knowledge-base-container {
|
||||||
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
|
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei',
|
||||||
|
'微软雅黑', Arial, sans-serif;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue