更新开发环境API服务地址至192.168.3.30,调整ESLint配置以忽略特定变量,添加数据集和文档相关的创建与更新接口,优化错误处理和用户反馈,移除模拟数据,增强代码可读性。
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
|
||||
<div
|
||||
class="chunk-item"
|
||||
v-for="(chunk, index) in filteredChunks"
|
||||
v-for="chunk in filteredChunks"
|
||||
:key="chunk.id"
|
||||
>
|
||||
<div class="chunk-checkbox">
|
||||
@@ -150,8 +150,8 @@ const selectAll = ref(false);
|
||||
// 过滤后的切片列表
|
||||
const filteredChunks = computed(() => {
|
||||
if (!chunkSearch.value) return chunkList.value;
|
||||
return chunkList.value.filter(chunk =>
|
||||
chunk.content.toLowerCase().includes(chunkSearch.value.toLowerCase())
|
||||
return chunkList.value.filter((chunk) =>
|
||||
(chunk.content || '').toLowerCase().includes(chunkSearch.value.toLowerCase())
|
||||
);
|
||||
});
|
||||
|
||||
@@ -182,8 +182,9 @@ const getDocumentDetail = async () => {
|
||||
|
||||
// 模拟文档内容
|
||||
documentContent.value = '<p>123</p>';
|
||||
} catch (error) {
|
||||
console.error('获取文档详情失败:', error);
|
||||
} catch (_error) {
|
||||
ElMessage.error('获取文档详情失败');
|
||||
documentContent.value = '';
|
||||
} finally {
|
||||
contentLoading.value = false;
|
||||
}
|
||||
@@ -203,8 +204,10 @@ const getChunkList = async () => {
|
||||
},
|
||||
];
|
||||
chunkTotal.value = 1;
|
||||
} catch (error) {
|
||||
console.error('获取切片列表失败:', error);
|
||||
} catch (_error) {
|
||||
ElMessage.error('获取切片列表失败');
|
||||
chunkList.value = [];
|
||||
chunkTotal.value = 0;
|
||||
} finally {
|
||||
chunkLoading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user