feat: ai code

This commit is contained in:
xingyu4j
2025-10-22 14:52:42 +08:00
parent 7aacec3e69
commit 66647802af
26 changed files with 148 additions and 181 deletions

View File

@@ -1,6 +1,5 @@
<script lang="ts" setup>
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
import type { AiKnowledgeKnowledgeApi } from '#/api/ai/knowledge/knowledge';
import type { AiKnowledgeSegmentApi } from '#/api/ai/knowledge/segment';
import { onMounted } from 'vue';
@@ -41,12 +40,12 @@ function handleCreate() {
}
/** 编辑 */
function handleEdit(row: AiKnowledgeKnowledgeApi.Knowledge) {
function handleEdit(row: AiKnowledgeSegmentApi.KnowledgeSegment) {
formModalApi.setData(row).open();
}
/** 删除 */
async function handleDelete(row: AiKnowledgeKnowledgeApi.Knowledge) {
async function handleDelete(row: AiKnowledgeSegmentApi.KnowledgeSegment) {
const hideLoading = message.loading({
content: $t('ui.actionMessage.deleting', [row.id]),
duration: 0,
@@ -88,7 +87,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
refresh: true,
search: true,
},
} as VxeTableGridOptions<AiKnowledgeKnowledgeApi.Knowledge>,
} as VxeTableGridOptions<AiKnowledgeSegmentApi.KnowledgeSegment>,
});
/** 修改是否发布 */