1651 lines
63 KiB
JavaScript
1651 lines
63 KiB
JavaScript
import { ref, onMounted, computed } from 'vue';
|
||
import { useRoute } from 'vue-router';
|
||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||
import apiClient from '@/api/client';
|
||
import { copyToClipboard } from '@/utils/clipboard';
|
||
const route = useRoute();
|
||
const kbId = route.params.id;
|
||
const isMobile = ref(window.innerWidth <= 768);
|
||
const showMobileSidebar = ref(false);
|
||
window.addEventListener('resize', () => {
|
||
isMobile.value = window.innerWidth <= 768;
|
||
if (!isMobile.value)
|
||
showMobileSidebar.value = false;
|
||
});
|
||
const kb = ref(null);
|
||
const docs = ref([]);
|
||
const categories = ref([]);
|
||
const allCategoriesFlat = ref([]);
|
||
const loading = ref(false);
|
||
const uploading = ref(false);
|
||
const aiUrl = ref('');
|
||
const selectedCategoryId = ref(null);
|
||
const selectedCategoryPath = ref(null);
|
||
// 文本内容对话框
|
||
const showTextDialog = ref(false);
|
||
const textForm = ref({
|
||
title: '',
|
||
content: '',
|
||
content_format: 'markdown',
|
||
category_id: null,
|
||
});
|
||
const textLoading = ref(false);
|
||
// 目录管理
|
||
const showCatDialog = ref(false);
|
||
const catForm = ref({ name: '', parent_id: null, is_folder: true });
|
||
const catLoading = ref(false);
|
||
const editingCatId = ref(null);
|
||
// 编辑文档分类
|
||
const editingDocId = ref(null);
|
||
onMounted(async () => {
|
||
await loadKb();
|
||
await loadCategories();
|
||
await loadDocs();
|
||
await loadLink();
|
||
});
|
||
async function loadKb() {
|
||
try {
|
||
const { data } = await apiClient.get(`/knowledge-bases/${kbId}`);
|
||
kb.value = data;
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
async function loadCategories() {
|
||
try {
|
||
const { data } = await apiClient.get(`/knowledge-bases/${kbId}/categories/tree`);
|
||
categories.value = data;
|
||
// 同时加载平铺列表
|
||
const { data: flat } = await apiClient.get(`/knowledge-bases/${kbId}/categories`);
|
||
allCategoriesFlat.value = flat;
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
async function loadDocs() {
|
||
loading.value = true;
|
||
try {
|
||
let url = `/documents?kb_id=${kbId}`;
|
||
if (selectedCategoryId.value) {
|
||
url += `&category_id=${selectedCategoryId.value}`;
|
||
}
|
||
const { data } = await apiClient.get(url);
|
||
docs.value = data.items;
|
||
}
|
||
catch { /* ignore */ }
|
||
loading.value = false;
|
||
}
|
||
// 链接有效期
|
||
const expiryOptions = [
|
||
{ label: '10 分钟', value: 10 },
|
||
{ label: '30 分钟', value: 30 },
|
||
{ label: '1 小时', value: 60 },
|
||
{ label: '3 小时', value: 180 },
|
||
{ label: '24 小时', value: 1440 },
|
||
{ label: '长期有效', value: 0 },
|
||
];
|
||
const linkExpiry = ref({
|
||
expires_at: null,
|
||
is_expired: false,
|
||
});
|
||
const expiryText = computed(() => {
|
||
if (linkExpiry.value.is_expired)
|
||
return '⛔ 已失效';
|
||
if (!linkExpiry.value.expires_at)
|
||
return '♾️ 长期有效';
|
||
return `⏱️ 有效期至 ${linkExpiry.value.expires_at}`;
|
||
});
|
||
async function loadLink() {
|
||
try {
|
||
const { data } = await apiClient.get(`/knowledge-bases/${kbId}/link`);
|
||
aiUrl.value = `${window.location.origin}/k/${data.token}`;
|
||
linkExpiry.value = {
|
||
expires_at: data.expires_at,
|
||
is_expired: data.is_expired,
|
||
};
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
// 设置链接有效期(0 = 长期有效,需二次确认)
|
||
async function handleExpiryChange(val) {
|
||
if (val === 0) {
|
||
try {
|
||
await ElMessageBox.confirm('长期有效的链接一旦泄露,任何持有该链接的人都可永久访问此知识库,存在泄露风险。确定设为长期有效?', '⚠️ 泄露风险提示', { type: 'warning', confirmButtonText: '仍要设为长期有效', cancelButtonText: '取消' });
|
||
}
|
||
catch {
|
||
return; // 用户取消
|
||
}
|
||
}
|
||
try {
|
||
await apiClient.post(`/knowledge-bases/${kbId}/set-expiry`, {
|
||
expires_in_minutes: val === 0 ? null : val,
|
||
});
|
||
ElMessage.success('链接有效期已更新。');
|
||
loadLink();
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
function selectCategory(cat) {
|
||
selectedCategoryId.value = cat.id;
|
||
selectedCategoryPath.value = cat.path;
|
||
loadDocs();
|
||
}
|
||
function clearCategoryFilter() {
|
||
selectedCategoryId.value = null;
|
||
selectedCategoryPath.value = null;
|
||
loadDocs();
|
||
}
|
||
// 上传文档
|
||
async function handleUpload(options) {
|
||
uploading.value = true;
|
||
try {
|
||
const formData = new FormData();
|
||
formData.append('kb_id', kbId);
|
||
formData.append('file', options.file);
|
||
if (selectedCategoryId.value) {
|
||
formData.append('category_id', selectedCategoryId.value);
|
||
}
|
||
await apiClient.post('/documents/upload', formData, {
|
||
headers: { 'Content-Type': 'multipart/form-data' },
|
||
});
|
||
ElMessage.success('文档上传成功!');
|
||
loadDocs();
|
||
loadCategories();
|
||
}
|
||
catch { /* ignore */ }
|
||
uploading.value = false;
|
||
}
|
||
// 打开添加文本对话框(预填左侧选中的目录,对话框内的选择优先)
|
||
function openTextDialog() {
|
||
textForm.value.category_id = selectedCategoryId.value;
|
||
showTextDialog.value = true;
|
||
}
|
||
// 创建文本内容
|
||
async function handleCreateText() {
|
||
if (!textForm.value.title.trim() || !textForm.value.content.trim()) {
|
||
ElMessage.warning('请输入标题和内容。');
|
||
return;
|
||
}
|
||
textLoading.value = true;
|
||
try {
|
||
await apiClient.post('/documents/create-text', {
|
||
kb_id: kbId,
|
||
title: textForm.value.title,
|
||
content: textForm.value.content,
|
||
content_format: textForm.value.content_format,
|
||
category_id: textForm.value.category_id,
|
||
});
|
||
ElMessage.success('文本内容已创建!');
|
||
showTextDialog.value = false;
|
||
textForm.value = { title: '', content: '', content_format: 'markdown', category_id: null };
|
||
loadDocs();
|
||
loadCategories();
|
||
}
|
||
catch { /* ignore */ }
|
||
textLoading.value = false;
|
||
}
|
||
// 修改文档分类
|
||
async function handleChangeDocCategory(doc, newCategoryId) {
|
||
try {
|
||
await apiClient.put(`/documents/${doc.id}`, { category_id: newCategoryId });
|
||
ElMessage.success('目录已更新。');
|
||
loadDocs();
|
||
loadCategories();
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
async function handleDeleteDoc(doc) {
|
||
try {
|
||
await ElMessageBox.confirm(`确定删除「${doc.original_filename}」?`, '确认删除', { type: 'warning' });
|
||
await apiClient.delete(`/documents/${doc.id}`);
|
||
ElMessage.success('已删除。');
|
||
loadDocs();
|
||
loadCategories();
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
async function handleReprocess(doc) {
|
||
try {
|
||
await apiClient.post(`/documents/${doc.id}/reprocess`);
|
||
ElMessage.success('重新解析已提交。');
|
||
loadDocs();
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
async function handleCopyLink() {
|
||
const success = await copyToClipboard(aiUrl.value);
|
||
if (success) {
|
||
ElMessage.success('AI 链接已复制!');
|
||
}
|
||
else {
|
||
ElMessage.error('复制失败,请手动长按复制。');
|
||
}
|
||
}
|
||
// 重新生成 AI 链接
|
||
async function handleRegenerateLink() {
|
||
try {
|
||
await ElMessageBox.confirm('重新生成链接后,旧链接将立即失效。确定继续?', '确认', { type: 'warning' });
|
||
const { data } = await apiClient.post(`/knowledge-bases/${kbId}/regenerate-token`);
|
||
aiUrl.value = `${window.location.origin}/k/${data.token}`;
|
||
ElMessage.success('链接已重新生成!');
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
// 目录管理
|
||
function openAddCategory(parentId = null) {
|
||
editingCatId.value = null;
|
||
catForm.value = { name: '', parent_id: parentId, is_folder: true };
|
||
showCatDialog.value = true;
|
||
}
|
||
function openEditCategory(cat) {
|
||
editingCatId.value = cat.id;
|
||
catForm.value = { name: cat.name, parent_id: cat.parent_id || null, is_folder: cat.is_folder };
|
||
showCatDialog.value = true;
|
||
}
|
||
async function handleSaveCategory() {
|
||
if (!catForm.value.name.trim()) {
|
||
ElMessage.warning('请输入目录名称。');
|
||
return;
|
||
}
|
||
catLoading.value = true;
|
||
try {
|
||
if (editingCatId.value) {
|
||
await apiClient.put(`/knowledge-bases/${kbId}/categories/${editingCatId.value}`, catForm.value);
|
||
ElMessage.success('目录已更新。');
|
||
}
|
||
else {
|
||
await apiClient.post(`/knowledge-bases/${kbId}/categories`, catForm.value);
|
||
ElMessage.success('目录已创建。');
|
||
}
|
||
showCatDialog.value = false;
|
||
loadCategories();
|
||
}
|
||
catch { /* ignore */ }
|
||
catLoading.value = false;
|
||
}
|
||
async function handleDeleteCategory(cat) {
|
||
try {
|
||
await ElMessageBox.confirm(`确定删除目录「${cat.name}」及其所有子目录?`, '确认删除', { type: 'warning' });
|
||
await apiClient.delete(`/knowledge-bases/${kbId}/categories/${cat.id}`);
|
||
ElMessage.success('已删除。');
|
||
if (selectedCategoryId.value === cat.id) {
|
||
clearCategoryFilter();
|
||
}
|
||
loadCategories();
|
||
loadDocs();
|
||
}
|
||
catch { /* ignore */ }
|
||
}
|
||
function formatSize(bytes) {
|
||
if (bytes < 1024)
|
||
return bytes + ' B';
|
||
if (bytes < 1024 * 1024)
|
||
return (bytes / 1024).toFixed(1) + ' KB';
|
||
return (bytes / (1024 * 1024)).toFixed(1) + ' MB';
|
||
}
|
||
function statusType(status) {
|
||
if (status === 'READY')
|
||
return 'success';
|
||
if (status === 'FAILED')
|
||
return 'danger';
|
||
return 'warning';
|
||
}
|
||
// 获取分类名称
|
||
function getCategoryName(catId) {
|
||
const cat = allCategoriesFlat.value.find((c) => c.id === catId);
|
||
return cat ? cat.name : '未分类';
|
||
}
|
||
// AI 链接打码:显示域名,token 部分用 • 代替
|
||
const maskedAiUrl = computed(() => {
|
||
if (!aiUrl.value)
|
||
return '尚未生成';
|
||
const idx = aiUrl.value.indexOf('/k/');
|
||
if (idx === -1)
|
||
return '••••••••';
|
||
const prefix = aiUrl.value.slice(0, idx + 3);
|
||
const tokenLen = aiUrl.value.length - idx - 3;
|
||
return prefix + '•'.repeat(tokenLen);
|
||
});
|
||
debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
|
||
const __VLS_ctx = {};
|
||
let __VLS_components;
|
||
let __VLS_directives;
|
||
/** @type {__VLS_StyleScopedClasses['cat-item']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['cat-item']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['tree-label']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['main-layout']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['sidebar']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['sidebar']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-overlay']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['content']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-header']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['desktop-header']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-actions']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['desktop-actions']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-cards']} */ ;
|
||
// CSS variable injection
|
||
// CSS variable injection end
|
||
if (__VLS_ctx.kb) {
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "mobile-header" },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.h1, __VLS_intrinsicElements.h1)({
|
||
...{ style: {} },
|
||
});
|
||
(__VLS_ctx.kb.name);
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
const __VLS_0 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_2 = __VLS_1({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_1));
|
||
let __VLS_4;
|
||
let __VLS_5;
|
||
let __VLS_6;
|
||
const __VLS_7 = {
|
||
onClick: (__VLS_ctx.handleCopyLink)
|
||
};
|
||
__VLS_3.slots.default;
|
||
var __VLS_3;
|
||
const __VLS_8 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_9 = __VLS_asFunctionalComponent(__VLS_8, new __VLS_8({
|
||
...{ 'onClick': {} },
|
||
type: "warning",
|
||
size: "small",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_10 = __VLS_9({
|
||
...{ 'onClick': {} },
|
||
type: "warning",
|
||
size: "small",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_9));
|
||
let __VLS_12;
|
||
let __VLS_13;
|
||
let __VLS_14;
|
||
const __VLS_15 = {
|
||
onClick: (__VLS_ctx.handleRegenerateLink)
|
||
};
|
||
__VLS_11.slots.default;
|
||
var __VLS_11;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "main-layout" },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.aside, __VLS_intrinsicElements.aside)({
|
||
...{ class: "sidebar" },
|
||
...{ class: ({ 'mobile-show': __VLS_ctx.showMobileSidebar }) },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.h3, __VLS_intrinsicElements.h3)({
|
||
...{ style: {} },
|
||
});
|
||
const __VLS_16 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_17 = __VLS_asFunctionalComponent(__VLS_16, new __VLS_16({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
type: "primary",
|
||
}));
|
||
const __VLS_18 = __VLS_17({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
type: "primary",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_17));
|
||
let __VLS_20;
|
||
let __VLS_21;
|
||
let __VLS_22;
|
||
const __VLS_23 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.openAddCategory(null);
|
||
}
|
||
};
|
||
__VLS_19.slots.default;
|
||
var __VLS_19;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ onClick: (__VLS_ctx.clearCategoryFilter) },
|
||
...{ class: "cat-item" },
|
||
...{ class: ({ active: !__VLS_ctx.selectedCategoryId }) },
|
||
});
|
||
const __VLS_24 = {}.ElTree;
|
||
/** @type {[typeof __VLS_components.ElTree, typeof __VLS_components.elTree, typeof __VLS_components.ElTree, typeof __VLS_components.elTree, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_25 = __VLS_asFunctionalComponent(__VLS_24, new __VLS_24({
|
||
data: (__VLS_ctx.categories),
|
||
nodeKey: "id",
|
||
defaultExpandAll: true,
|
||
expandOnClickNode: (false),
|
||
}));
|
||
const __VLS_26 = __VLS_25({
|
||
data: (__VLS_ctx.categories),
|
||
nodeKey: "id",
|
||
defaultExpandAll: true,
|
||
expandOnClickNode: (false),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_25));
|
||
__VLS_27.slots.default;
|
||
{
|
||
const { default: __VLS_thisSlot } = __VLS_27.slots;
|
||
const [{ data }] = __VLS_getSlotParams(__VLS_thisSlot);
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "tree-node" },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.selectCategory(data);
|
||
} },
|
||
...{ class: "tree-label" },
|
||
...{ class: ({ selected: __VLS_ctx.selectedCategoryId === data.id }) },
|
||
});
|
||
(data.is_folder ? '📁' : '📄');
|
||
(data.name);
|
||
if (data.doc_count > 0) {
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: {} },
|
||
});
|
||
(data.doc_count);
|
||
}
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ class: "tree-actions" },
|
||
});
|
||
const __VLS_28 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_29 = __VLS_asFunctionalComponent(__VLS_28, new __VLS_28({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
text: true,
|
||
}));
|
||
const __VLS_30 = __VLS_29({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
text: true,
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_29));
|
||
let __VLS_32;
|
||
let __VLS_33;
|
||
let __VLS_34;
|
||
const __VLS_35 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.openAddCategory(data.id);
|
||
}
|
||
};
|
||
__VLS_31.slots.default;
|
||
var __VLS_31;
|
||
const __VLS_36 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_37 = __VLS_asFunctionalComponent(__VLS_36, new __VLS_36({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
text: true,
|
||
}));
|
||
const __VLS_38 = __VLS_37({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
text: true,
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_37));
|
||
let __VLS_40;
|
||
let __VLS_41;
|
||
let __VLS_42;
|
||
const __VLS_43 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.openEditCategory(data);
|
||
}
|
||
};
|
||
__VLS_39.slots.default;
|
||
var __VLS_39;
|
||
const __VLS_44 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_45 = __VLS_asFunctionalComponent(__VLS_44, new __VLS_44({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
text: true,
|
||
type: "danger",
|
||
}));
|
||
const __VLS_46 = __VLS_45({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
text: true,
|
||
type: "danger",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_45));
|
||
let __VLS_48;
|
||
let __VLS_49;
|
||
let __VLS_50;
|
||
const __VLS_51 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.handleDeleteCategory(data);
|
||
}
|
||
};
|
||
__VLS_47.slots.default;
|
||
var __VLS_47;
|
||
}
|
||
var __VLS_27;
|
||
if (__VLS_ctx.showMobileSidebar) {
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
if (!(__VLS_ctx.showMobileSidebar))
|
||
return;
|
||
__VLS_ctx.showMobileSidebar = false;
|
||
} },
|
||
...{ class: "mobile-overlay" },
|
||
});
|
||
}
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.main, __VLS_intrinsicElements.main)({
|
||
...{ class: "content" },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "desktop-header" },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.h1, __VLS_intrinsicElements.h1)({
|
||
...{ style: {} },
|
||
});
|
||
(__VLS_ctx.kb.name);
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
const __VLS_52 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_53 = __VLS_asFunctionalComponent(__VLS_52, new __VLS_52({
|
||
...{ 'onClick': {} },
|
||
size: "large",
|
||
}));
|
||
const __VLS_54 = __VLS_53({
|
||
...{ 'onClick': {} },
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_53));
|
||
let __VLS_56;
|
||
let __VLS_57;
|
||
let __VLS_58;
|
||
const __VLS_59 = {
|
||
onClick: (__VLS_ctx.handleCopyLink)
|
||
};
|
||
__VLS_55.slots.default;
|
||
var __VLS_55;
|
||
const __VLS_60 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_61 = __VLS_asFunctionalComponent(__VLS_60, new __VLS_60({
|
||
...{ 'onClick': {} },
|
||
type: "warning",
|
||
size: "large",
|
||
}));
|
||
const __VLS_62 = __VLS_61({
|
||
...{ 'onClick': {} },
|
||
type: "warning",
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_61));
|
||
let __VLS_64;
|
||
let __VLS_65;
|
||
let __VLS_66;
|
||
const __VLS_67 = {
|
||
onClick: (__VLS_ctx.handleRegenerateLink)
|
||
};
|
||
__VLS_63.slots.default;
|
||
var __VLS_63;
|
||
const __VLS_68 = {}.ElCard;
|
||
/** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_69 = __VLS_asFunctionalComponent(__VLS_68, new __VLS_68({
|
||
...{ style: {} },
|
||
shadow: "hover",
|
||
}));
|
||
const __VLS_70 = __VLS_69({
|
||
...{ style: {} },
|
||
shadow: "hover",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_69));
|
||
__VLS_71.slots.default;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: {} },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: {} },
|
||
});
|
||
(__VLS_ctx.maskedAiUrl);
|
||
const __VLS_72 = {}.ElSelect;
|
||
/** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_73 = __VLS_asFunctionalComponent(__VLS_72, new __VLS_72({
|
||
...{ 'onChange': {} },
|
||
modelValue: (null),
|
||
placeholder: "⏱️ 设置有效期",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_74 = __VLS_73({
|
||
...{ 'onChange': {} },
|
||
modelValue: (null),
|
||
placeholder: "⏱️ 设置有效期",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_73));
|
||
let __VLS_76;
|
||
let __VLS_77;
|
||
let __VLS_78;
|
||
const __VLS_79 = {
|
||
onChange: ((val) => __VLS_ctx.handleExpiryChange(val))
|
||
};
|
||
__VLS_75.slots.default;
|
||
for (const [opt] of __VLS_getVForSourceType((__VLS_ctx.expiryOptions))) {
|
||
const __VLS_80 = {}.ElOption;
|
||
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_81 = __VLS_asFunctionalComponent(__VLS_80, new __VLS_80({
|
||
key: (opt.value),
|
||
label: (opt.label),
|
||
value: (opt.value),
|
||
}));
|
||
const __VLS_82 = __VLS_81({
|
||
key: (opt.value),
|
||
label: (opt.label),
|
||
value: (opt.value),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_81));
|
||
}
|
||
var __VLS_75;
|
||
const __VLS_84 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_85 = __VLS_asFunctionalComponent(__VLS_84, new __VLS_84({
|
||
...{ 'onClick': {} },
|
||
type: "primary",
|
||
size: "large",
|
||
}));
|
||
const __VLS_86 = __VLS_85({
|
||
...{ 'onClick': {} },
|
||
type: "primary",
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_85));
|
||
let __VLS_88;
|
||
let __VLS_89;
|
||
let __VLS_90;
|
||
const __VLS_91 = {
|
||
onClick: (__VLS_ctx.handleCopyLink)
|
||
};
|
||
__VLS_87.slots.default;
|
||
var __VLS_87;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: ({ color: __VLS_ctx.linkExpiry.is_expired ? '#f56c6c' : '#67c23a', fontWeight: __VLS_ctx.linkExpiry.is_expired ? 'bold' : 'normal' }) },
|
||
});
|
||
(__VLS_ctx.expiryText);
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: {} },
|
||
});
|
||
var __VLS_71;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "mobile-actions" },
|
||
});
|
||
const __VLS_92 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_93 = __VLS_asFunctionalComponent(__VLS_92, new __VLS_92({
|
||
...{ 'onClick': {} },
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_94 = __VLS_93({
|
||
...{ 'onClick': {} },
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_93));
|
||
let __VLS_96;
|
||
let __VLS_97;
|
||
let __VLS_98;
|
||
const __VLS_99 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.showMobileSidebar = true;
|
||
}
|
||
};
|
||
__VLS_95.slots.default;
|
||
var __VLS_95;
|
||
const __VLS_100 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_101 = __VLS_asFunctionalComponent(__VLS_100, new __VLS_100({
|
||
...{ 'onClick': {} },
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_102 = __VLS_101({
|
||
...{ 'onClick': {} },
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_101));
|
||
let __VLS_104;
|
||
let __VLS_105;
|
||
let __VLS_106;
|
||
const __VLS_107 = {
|
||
onClick: (__VLS_ctx.openTextDialog)
|
||
};
|
||
__VLS_103.slots.default;
|
||
var __VLS_103;
|
||
const __VLS_108 = {}.ElUpload;
|
||
/** @type {[typeof __VLS_components.ElUpload, typeof __VLS_components.elUpload, typeof __VLS_components.ElUpload, typeof __VLS_components.elUpload, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_109 = __VLS_asFunctionalComponent(__VLS_108, new __VLS_108({
|
||
showFileList: (false),
|
||
httpRequest: (__VLS_ctx.handleUpload),
|
||
accept: ".docx,.pdf",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_110 = __VLS_109({
|
||
showFileList: (false),
|
||
httpRequest: (__VLS_ctx.handleUpload),
|
||
accept: ".docx,.pdf",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_109));
|
||
__VLS_111.slots.default;
|
||
const __VLS_112 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_113 = __VLS_asFunctionalComponent(__VLS_112, new __VLS_112({
|
||
type: "primary",
|
||
loading: (__VLS_ctx.uploading),
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_114 = __VLS_113({
|
||
type: "primary",
|
||
loading: (__VLS_ctx.uploading),
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_113));
|
||
__VLS_115.slots.default;
|
||
var __VLS_115;
|
||
var __VLS_111;
|
||
const __VLS_116 = {}.ElCard;
|
||
/** @type {[typeof __VLS_components.ElCard, typeof __VLS_components.elCard, typeof __VLS_components.ElCard, typeof __VLS_components.elCard, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_117 = __VLS_asFunctionalComponent(__VLS_116, new __VLS_116({
|
||
shadow: "hover",
|
||
}));
|
||
const __VLS_118 = __VLS_117({
|
||
shadow: "hover",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_117));
|
||
__VLS_119.slots.default;
|
||
{
|
||
const { header: __VLS_thisSlot } = __VLS_119.slots;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: {} },
|
||
});
|
||
if (__VLS_ctx.selectedCategoryPath) {
|
||
const __VLS_120 = {}.ElTag;
|
||
/** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_121 = __VLS_asFunctionalComponent(__VLS_120, new __VLS_120({
|
||
...{ 'onClose': {} },
|
||
closable: true,
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_122 = __VLS_121({
|
||
...{ 'onClose': {} },
|
||
closable: true,
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_121));
|
||
let __VLS_124;
|
||
let __VLS_125;
|
||
let __VLS_126;
|
||
const __VLS_127 = {
|
||
onClose: (__VLS_ctx.clearCategoryFilter)
|
||
};
|
||
__VLS_123.slots.default;
|
||
(__VLS_ctx.selectedCategoryPath);
|
||
var __VLS_123;
|
||
}
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "desktop-actions" },
|
||
});
|
||
const __VLS_128 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_129 = __VLS_asFunctionalComponent(__VLS_128, new __VLS_128({
|
||
...{ 'onClick': {} },
|
||
}));
|
||
const __VLS_130 = __VLS_129({
|
||
...{ 'onClick': {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_129));
|
||
let __VLS_132;
|
||
let __VLS_133;
|
||
let __VLS_134;
|
||
const __VLS_135 = {
|
||
onClick: (__VLS_ctx.openTextDialog)
|
||
};
|
||
__VLS_131.slots.default;
|
||
var __VLS_131;
|
||
const __VLS_136 = {}.ElUpload;
|
||
/** @type {[typeof __VLS_components.ElUpload, typeof __VLS_components.elUpload, typeof __VLS_components.ElUpload, typeof __VLS_components.elUpload, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_137 = __VLS_asFunctionalComponent(__VLS_136, new __VLS_136({
|
||
showFileList: (false),
|
||
httpRequest: (__VLS_ctx.handleUpload),
|
||
accept: ".docx,.pdf",
|
||
}));
|
||
const __VLS_138 = __VLS_137({
|
||
showFileList: (false),
|
||
httpRequest: (__VLS_ctx.handleUpload),
|
||
accept: ".docx,.pdf",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_137));
|
||
__VLS_139.slots.default;
|
||
const __VLS_140 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_141 = __VLS_asFunctionalComponent(__VLS_140, new __VLS_140({
|
||
type: "primary",
|
||
loading: (__VLS_ctx.uploading),
|
||
}));
|
||
const __VLS_142 = __VLS_141({
|
||
type: "primary",
|
||
loading: (__VLS_ctx.uploading),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_141));
|
||
__VLS_143.slots.default;
|
||
var __VLS_143;
|
||
var __VLS_139;
|
||
}
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "desktop-table" },
|
||
});
|
||
const __VLS_144 = {}.ElTable;
|
||
/** @type {[typeof __VLS_components.ElTable, typeof __VLS_components.elTable, typeof __VLS_components.ElTable, typeof __VLS_components.elTable, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_145 = __VLS_asFunctionalComponent(__VLS_144, new __VLS_144({
|
||
data: (__VLS_ctx.docs),
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_146 = __VLS_145({
|
||
data: (__VLS_ctx.docs),
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_145));
|
||
__VLS_asFunctionalDirective(__VLS_directives.vLoading)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.loading) }, null, null);
|
||
__VLS_147.slots.default;
|
||
const __VLS_148 = {}.ElTableColumn;
|
||
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_149 = __VLS_asFunctionalComponent(__VLS_148, new __VLS_148({
|
||
prop: "original_filename",
|
||
label: "标题",
|
||
minWidth: "180",
|
||
showOverflowTooltip: true,
|
||
}));
|
||
const __VLS_150 = __VLS_149({
|
||
prop: "original_filename",
|
||
label: "标题",
|
||
minWidth: "180",
|
||
showOverflowTooltip: true,
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_149));
|
||
const __VLS_152 = {}.ElTableColumn;
|
||
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_153 = __VLS_asFunctionalComponent(__VLS_152, new __VLS_152({
|
||
label: "目录",
|
||
width: "180",
|
||
}));
|
||
const __VLS_154 = __VLS_153({
|
||
label: "目录",
|
||
width: "180",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_153));
|
||
__VLS_155.slots.default;
|
||
{
|
||
const { default: __VLS_thisSlot } = __VLS_155.slots;
|
||
const [{ row }] = __VLS_getSlotParams(__VLS_thisSlot);
|
||
const __VLS_156 = {}.ElSelect;
|
||
/** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_157 = __VLS_asFunctionalComponent(__VLS_156, new __VLS_156({
|
||
...{ 'onChange': {} },
|
||
modelValue: (row.category_id),
|
||
placeholder: "选择目录",
|
||
size: "small",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_158 = __VLS_157({
|
||
...{ 'onChange': {} },
|
||
modelValue: (row.category_id),
|
||
placeholder: "选择目录",
|
||
size: "small",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_157));
|
||
let __VLS_160;
|
||
let __VLS_161;
|
||
let __VLS_162;
|
||
const __VLS_163 = {
|
||
onChange: ((val) => __VLS_ctx.handleChangeDocCategory(row, val))
|
||
};
|
||
__VLS_159.slots.default;
|
||
for (const [cat] of __VLS_getVForSourceType((__VLS_ctx.allCategoriesFlat))) {
|
||
const __VLS_164 = {}.ElOption;
|
||
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_165 = __VLS_asFunctionalComponent(__VLS_164, new __VLS_164({
|
||
key: (cat.id),
|
||
label: (cat.name),
|
||
value: (cat.id),
|
||
}));
|
||
const __VLS_166 = __VLS_165({
|
||
key: (cat.id),
|
||
label: (cat.name),
|
||
value: (cat.id),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_165));
|
||
}
|
||
var __VLS_159;
|
||
}
|
||
var __VLS_155;
|
||
const __VLS_168 = {}.ElTableColumn;
|
||
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_169 = __VLS_asFunctionalComponent(__VLS_168, new __VLS_168({
|
||
label: "状态",
|
||
width: "90",
|
||
align: "center",
|
||
}));
|
||
const __VLS_170 = __VLS_169({
|
||
label: "状态",
|
||
width: "90",
|
||
align: "center",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_169));
|
||
__VLS_171.slots.default;
|
||
{
|
||
const { default: __VLS_thisSlot } = __VLS_171.slots;
|
||
const [{ row }] = __VLS_getSlotParams(__VLS_thisSlot);
|
||
const __VLS_172 = {}.ElTag;
|
||
/** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_173 = __VLS_asFunctionalComponent(__VLS_172, new __VLS_172({
|
||
type: (__VLS_ctx.statusType(row.status)),
|
||
size: "small",
|
||
}));
|
||
const __VLS_174 = __VLS_173({
|
||
type: (__VLS_ctx.statusType(row.status)),
|
||
size: "small",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_173));
|
||
__VLS_175.slots.default;
|
||
(row.status);
|
||
var __VLS_175;
|
||
}
|
||
var __VLS_171;
|
||
const __VLS_176 = {}.ElTableColumn;
|
||
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_177 = __VLS_asFunctionalComponent(__VLS_176, new __VLS_176({
|
||
label: "大小",
|
||
width: "80",
|
||
align: "center",
|
||
}));
|
||
const __VLS_178 = __VLS_177({
|
||
label: "大小",
|
||
width: "80",
|
||
align: "center",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_177));
|
||
__VLS_179.slots.default;
|
||
{
|
||
const { default: __VLS_thisSlot } = __VLS_179.slots;
|
||
const [{ row }] = __VLS_getSlotParams(__VLS_thisSlot);
|
||
(__VLS_ctx.formatSize(row.file_size));
|
||
}
|
||
var __VLS_179;
|
||
const __VLS_180 = {}.ElTableColumn;
|
||
/** @type {[typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, typeof __VLS_components.ElTableColumn, typeof __VLS_components.elTableColumn, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_181 = __VLS_asFunctionalComponent(__VLS_180, new __VLS_180({
|
||
label: "操作",
|
||
width: "180",
|
||
align: "center",
|
||
}));
|
||
const __VLS_182 = __VLS_181({
|
||
label: "操作",
|
||
width: "180",
|
||
align: "center",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_181));
|
||
__VLS_183.slots.default;
|
||
{
|
||
const { default: __VLS_thisSlot } = __VLS_183.slots;
|
||
const [{ row }] = __VLS_getSlotParams(__VLS_thisSlot);
|
||
const __VLS_184 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_185 = __VLS_asFunctionalComponent(__VLS_184, new __VLS_184({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
}));
|
||
const __VLS_186 = __VLS_185({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_185));
|
||
let __VLS_188;
|
||
let __VLS_189;
|
||
let __VLS_190;
|
||
const __VLS_191 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.handleReprocess(row);
|
||
}
|
||
};
|
||
__VLS_187.slots.default;
|
||
var __VLS_187;
|
||
const __VLS_192 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_193 = __VLS_asFunctionalComponent(__VLS_192, new __VLS_192({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
type: "danger",
|
||
}));
|
||
const __VLS_194 = __VLS_193({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
type: "danger",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_193));
|
||
let __VLS_196;
|
||
let __VLS_197;
|
||
let __VLS_198;
|
||
const __VLS_199 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.handleDeleteDoc(row);
|
||
}
|
||
};
|
||
__VLS_195.slots.default;
|
||
var __VLS_195;
|
||
}
|
||
var __VLS_183;
|
||
var __VLS_147;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ class: "mobile-cards" },
|
||
});
|
||
for (const [doc] of __VLS_getVForSourceType((__VLS_ctx.docs))) {
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
key: (doc.id),
|
||
...{ class: "doc-card" },
|
||
});
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
(doc.original_filename);
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
const __VLS_200 = {}.ElTag;
|
||
/** @type {[typeof __VLS_components.ElTag, typeof __VLS_components.elTag, typeof __VLS_components.ElTag, typeof __VLS_components.elTag, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_201 = __VLS_asFunctionalComponent(__VLS_200, new __VLS_200({
|
||
type: (__VLS_ctx.statusType(doc.status)),
|
||
size: "small",
|
||
}));
|
||
const __VLS_202 = __VLS_201({
|
||
type: (__VLS_ctx.statusType(doc.status)),
|
||
size: "small",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_201));
|
||
__VLS_203.slots.default;
|
||
(doc.status);
|
||
var __VLS_203;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.span, __VLS_intrinsicElements.span)({
|
||
...{ style: {} },
|
||
});
|
||
(__VLS_ctx.formatSize(doc.file_size));
|
||
const __VLS_204 = {}.ElSelect;
|
||
/** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_205 = __VLS_asFunctionalComponent(__VLS_204, new __VLS_204({
|
||
...{ 'onChange': {} },
|
||
modelValue: (doc.category_id),
|
||
placeholder: "选择目录",
|
||
size: "small",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_206 = __VLS_205({
|
||
...{ 'onChange': {} },
|
||
modelValue: (doc.category_id),
|
||
placeholder: "选择目录",
|
||
size: "small",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_205));
|
||
let __VLS_208;
|
||
let __VLS_209;
|
||
let __VLS_210;
|
||
const __VLS_211 = {
|
||
onChange: ((val) => __VLS_ctx.handleChangeDocCategory(doc, val))
|
||
};
|
||
__VLS_207.slots.default;
|
||
for (const [cat] of __VLS_getVForSourceType((__VLS_ctx.allCategoriesFlat))) {
|
||
const __VLS_212 = {}.ElOption;
|
||
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_213 = __VLS_asFunctionalComponent(__VLS_212, new __VLS_212({
|
||
key: (cat.id),
|
||
label: (cat.name),
|
||
value: (cat.id),
|
||
}));
|
||
const __VLS_214 = __VLS_213({
|
||
key: (cat.id),
|
||
label: (cat.name),
|
||
value: (cat.id),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_213));
|
||
}
|
||
var __VLS_207;
|
||
__VLS_asFunctionalElement(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({
|
||
...{ style: {} },
|
||
});
|
||
const __VLS_216 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_217 = __VLS_asFunctionalComponent(__VLS_216, new __VLS_216({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_218 = __VLS_217({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_217));
|
||
let __VLS_220;
|
||
let __VLS_221;
|
||
let __VLS_222;
|
||
const __VLS_223 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.handleReprocess(doc);
|
||
}
|
||
};
|
||
__VLS_219.slots.default;
|
||
var __VLS_219;
|
||
const __VLS_224 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_225 = __VLS_asFunctionalComponent(__VLS_224, new __VLS_224({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
type: "danger",
|
||
...{ style: {} },
|
||
}));
|
||
const __VLS_226 = __VLS_225({
|
||
...{ 'onClick': {} },
|
||
size: "small",
|
||
type: "danger",
|
||
...{ style: {} },
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_225));
|
||
let __VLS_228;
|
||
let __VLS_229;
|
||
let __VLS_230;
|
||
const __VLS_231 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.handleDeleteDoc(doc);
|
||
}
|
||
};
|
||
__VLS_227.slots.default;
|
||
var __VLS_227;
|
||
}
|
||
var __VLS_119;
|
||
const __VLS_232 = {}.ElDialog;
|
||
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_233 = __VLS_asFunctionalComponent(__VLS_232, new __VLS_232({
|
||
modelValue: (__VLS_ctx.showTextDialog),
|
||
title: "✏️ 添加文本内容",
|
||
width: (__VLS_ctx.isMobile ? '95%' : '700px'),
|
||
}));
|
||
const __VLS_234 = __VLS_233({
|
||
modelValue: (__VLS_ctx.showTextDialog),
|
||
title: "✏️ 添加文本内容",
|
||
width: (__VLS_ctx.isMobile ? '95%' : '700px'),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_233));
|
||
__VLS_235.slots.default;
|
||
const __VLS_236 = {}.ElForm;
|
||
/** @type {[typeof __VLS_components.ElForm, typeof __VLS_components.elForm, typeof __VLS_components.ElForm, typeof __VLS_components.elForm, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_237 = __VLS_asFunctionalComponent(__VLS_236, new __VLS_236({
|
||
model: (__VLS_ctx.textForm),
|
||
labelPosition: "top",
|
||
}));
|
||
const __VLS_238 = __VLS_237({
|
||
model: (__VLS_ctx.textForm),
|
||
labelPosition: "top",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_237));
|
||
__VLS_239.slots.default;
|
||
const __VLS_240 = {}.ElFormItem;
|
||
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_241 = __VLS_asFunctionalComponent(__VLS_240, new __VLS_240({
|
||
label: "标题",
|
||
required: true,
|
||
}));
|
||
const __VLS_242 = __VLS_241({
|
||
label: "标题",
|
||
required: true,
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_241));
|
||
__VLS_243.slots.default;
|
||
const __VLS_244 = {}.ElInput;
|
||
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_245 = __VLS_asFunctionalComponent(__VLS_244, new __VLS_244({
|
||
modelValue: (__VLS_ctx.textForm.title),
|
||
placeholder: "文档标题",
|
||
size: "large",
|
||
}));
|
||
const __VLS_246 = __VLS_245({
|
||
modelValue: (__VLS_ctx.textForm.title),
|
||
placeholder: "文档标题",
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_245));
|
||
var __VLS_243;
|
||
const __VLS_248 = {}.ElFormItem;
|
||
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_249 = __VLS_asFunctionalComponent(__VLS_248, new __VLS_248({
|
||
label: "所属目录",
|
||
}));
|
||
const __VLS_250 = __VLS_249({
|
||
label: "所属目录",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_249));
|
||
__VLS_251.slots.default;
|
||
const __VLS_252 = {}.ElSelect;
|
||
/** @type {[typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, typeof __VLS_components.ElSelect, typeof __VLS_components.elSelect, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_253 = __VLS_asFunctionalComponent(__VLS_252, new __VLS_252({
|
||
modelValue: (__VLS_ctx.textForm.category_id),
|
||
placeholder: "选择目录",
|
||
clearable: true,
|
||
...{ style: {} },
|
||
size: "large",
|
||
}));
|
||
const __VLS_254 = __VLS_253({
|
||
modelValue: (__VLS_ctx.textForm.category_id),
|
||
placeholder: "选择目录",
|
||
clearable: true,
|
||
...{ style: {} },
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_253));
|
||
__VLS_255.slots.default;
|
||
for (const [cat] of __VLS_getVForSourceType((__VLS_ctx.allCategoriesFlat))) {
|
||
const __VLS_256 = {}.ElOption;
|
||
/** @type {[typeof __VLS_components.ElOption, typeof __VLS_components.elOption, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_257 = __VLS_asFunctionalComponent(__VLS_256, new __VLS_256({
|
||
key: (cat.id),
|
||
label: (cat.name),
|
||
value: (cat.id),
|
||
}));
|
||
const __VLS_258 = __VLS_257({
|
||
key: (cat.id),
|
||
label: (cat.name),
|
||
value: (cat.id),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_257));
|
||
}
|
||
var __VLS_255;
|
||
var __VLS_251;
|
||
const __VLS_260 = {}.ElFormItem;
|
||
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_261 = __VLS_asFunctionalComponent(__VLS_260, new __VLS_260({
|
||
label: "格式",
|
||
}));
|
||
const __VLS_262 = __VLS_261({
|
||
label: "格式",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_261));
|
||
__VLS_263.slots.default;
|
||
const __VLS_264 = {}.ElRadioGroup;
|
||
/** @type {[typeof __VLS_components.ElRadioGroup, typeof __VLS_components.elRadioGroup, typeof __VLS_components.ElRadioGroup, typeof __VLS_components.elRadioGroup, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_265 = __VLS_asFunctionalComponent(__VLS_264, new __VLS_264({
|
||
modelValue: (__VLS_ctx.textForm.content_format),
|
||
size: "large",
|
||
}));
|
||
const __VLS_266 = __VLS_265({
|
||
modelValue: (__VLS_ctx.textForm.content_format),
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_265));
|
||
__VLS_267.slots.default;
|
||
const __VLS_268 = {}.ElRadio;
|
||
/** @type {[typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_269 = __VLS_asFunctionalComponent(__VLS_268, new __VLS_268({
|
||
value: "markdown",
|
||
}));
|
||
const __VLS_270 = __VLS_269({
|
||
value: "markdown",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_269));
|
||
__VLS_271.slots.default;
|
||
var __VLS_271;
|
||
const __VLS_272 = {}.ElRadio;
|
||
/** @type {[typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_273 = __VLS_asFunctionalComponent(__VLS_272, new __VLS_272({
|
||
value: "text",
|
||
}));
|
||
const __VLS_274 = __VLS_273({
|
||
value: "text",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_273));
|
||
__VLS_275.slots.default;
|
||
var __VLS_275;
|
||
var __VLS_267;
|
||
var __VLS_263;
|
||
const __VLS_276 = {}.ElFormItem;
|
||
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_277 = __VLS_asFunctionalComponent(__VLS_276, new __VLS_276({
|
||
label: "内容",
|
||
required: true,
|
||
}));
|
||
const __VLS_278 = __VLS_277({
|
||
label: "内容",
|
||
required: true,
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_277));
|
||
__VLS_279.slots.default;
|
||
const __VLS_280 = {}.ElInput;
|
||
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_281 = __VLS_asFunctionalComponent(__VLS_280, new __VLS_280({
|
||
modelValue: (__VLS_ctx.textForm.content),
|
||
type: "textarea",
|
||
rows: (12),
|
||
placeholder: "输入文本内容(支持 Markdown)",
|
||
size: "large",
|
||
}));
|
||
const __VLS_282 = __VLS_281({
|
||
modelValue: (__VLS_ctx.textForm.content),
|
||
type: "textarea",
|
||
rows: (12),
|
||
placeholder: "输入文本内容(支持 Markdown)",
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_281));
|
||
var __VLS_279;
|
||
var __VLS_239;
|
||
{
|
||
const { footer: __VLS_thisSlot } = __VLS_235.slots;
|
||
const __VLS_284 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_285 = __VLS_asFunctionalComponent(__VLS_284, new __VLS_284({
|
||
...{ 'onClick': {} },
|
||
size: "large",
|
||
}));
|
||
const __VLS_286 = __VLS_285({
|
||
...{ 'onClick': {} },
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_285));
|
||
let __VLS_288;
|
||
let __VLS_289;
|
||
let __VLS_290;
|
||
const __VLS_291 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.showTextDialog = false;
|
||
}
|
||
};
|
||
__VLS_287.slots.default;
|
||
var __VLS_287;
|
||
const __VLS_292 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_293 = __VLS_asFunctionalComponent(__VLS_292, new __VLS_292({
|
||
...{ 'onClick': {} },
|
||
type: "primary",
|
||
loading: (__VLS_ctx.textLoading),
|
||
size: "large",
|
||
}));
|
||
const __VLS_294 = __VLS_293({
|
||
...{ 'onClick': {} },
|
||
type: "primary",
|
||
loading: (__VLS_ctx.textLoading),
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_293));
|
||
let __VLS_296;
|
||
let __VLS_297;
|
||
let __VLS_298;
|
||
const __VLS_299 = {
|
||
onClick: (__VLS_ctx.handleCreateText)
|
||
};
|
||
__VLS_295.slots.default;
|
||
var __VLS_295;
|
||
}
|
||
var __VLS_235;
|
||
const __VLS_300 = {}.ElDialog;
|
||
/** @type {[typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, typeof __VLS_components.ElDialog, typeof __VLS_components.elDialog, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_301 = __VLS_asFunctionalComponent(__VLS_300, new __VLS_300({
|
||
modelValue: (__VLS_ctx.showCatDialog),
|
||
title: (__VLS_ctx.editingCatId ? '✏️ 编辑目录' : '📁 新建目录'),
|
||
width: (__VLS_ctx.isMobile ? '95%' : '450px'),
|
||
}));
|
||
const __VLS_302 = __VLS_301({
|
||
modelValue: (__VLS_ctx.showCatDialog),
|
||
title: (__VLS_ctx.editingCatId ? '✏️ 编辑目录' : '📁 新建目录'),
|
||
width: (__VLS_ctx.isMobile ? '95%' : '450px'),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_301));
|
||
__VLS_303.slots.default;
|
||
const __VLS_304 = {}.ElForm;
|
||
/** @type {[typeof __VLS_components.ElForm, typeof __VLS_components.elForm, typeof __VLS_components.ElForm, typeof __VLS_components.elForm, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_305 = __VLS_asFunctionalComponent(__VLS_304, new __VLS_304({
|
||
model: (__VLS_ctx.catForm),
|
||
labelPosition: "top",
|
||
}));
|
||
const __VLS_306 = __VLS_305({
|
||
model: (__VLS_ctx.catForm),
|
||
labelPosition: "top",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_305));
|
||
__VLS_307.slots.default;
|
||
const __VLS_308 = {}.ElFormItem;
|
||
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_309 = __VLS_asFunctionalComponent(__VLS_308, new __VLS_308({
|
||
label: "目录名称",
|
||
required: true,
|
||
}));
|
||
const __VLS_310 = __VLS_309({
|
||
label: "目录名称",
|
||
required: true,
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_309));
|
||
__VLS_311.slots.default;
|
||
const __VLS_312 = {}.ElInput;
|
||
/** @type {[typeof __VLS_components.ElInput, typeof __VLS_components.elInput, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_313 = __VLS_asFunctionalComponent(__VLS_312, new __VLS_312({
|
||
modelValue: (__VLS_ctx.catForm.name),
|
||
placeholder: "如:公司基本信息",
|
||
size: "large",
|
||
}));
|
||
const __VLS_314 = __VLS_313({
|
||
modelValue: (__VLS_ctx.catForm.name),
|
||
placeholder: "如:公司基本信息",
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_313));
|
||
var __VLS_311;
|
||
const __VLS_316 = {}.ElFormItem;
|
||
/** @type {[typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, typeof __VLS_components.ElFormItem, typeof __VLS_components.elFormItem, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_317 = __VLS_asFunctionalComponent(__VLS_316, new __VLS_316({
|
||
label: "类型",
|
||
}));
|
||
const __VLS_318 = __VLS_317({
|
||
label: "类型",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_317));
|
||
__VLS_319.slots.default;
|
||
const __VLS_320 = {}.ElRadioGroup;
|
||
/** @type {[typeof __VLS_components.ElRadioGroup, typeof __VLS_components.elRadioGroup, typeof __VLS_components.ElRadioGroup, typeof __VLS_components.elRadioGroup, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_321 = __VLS_asFunctionalComponent(__VLS_320, new __VLS_320({
|
||
modelValue: (__VLS_ctx.catForm.is_folder),
|
||
size: "large",
|
||
}));
|
||
const __VLS_322 = __VLS_321({
|
||
modelValue: (__VLS_ctx.catForm.is_folder),
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_321));
|
||
__VLS_323.slots.default;
|
||
const __VLS_324 = {}.ElRadio;
|
||
/** @type {[typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_325 = __VLS_asFunctionalComponent(__VLS_324, new __VLS_324({
|
||
value: (true),
|
||
}));
|
||
const __VLS_326 = __VLS_325({
|
||
value: (true),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_325));
|
||
__VLS_327.slots.default;
|
||
var __VLS_327;
|
||
const __VLS_328 = {}.ElRadio;
|
||
/** @type {[typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, typeof __VLS_components.ElRadio, typeof __VLS_components.elRadio, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_329 = __VLS_asFunctionalComponent(__VLS_328, new __VLS_328({
|
||
value: (false),
|
||
}));
|
||
const __VLS_330 = __VLS_329({
|
||
value: (false),
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_329));
|
||
__VLS_331.slots.default;
|
||
var __VLS_331;
|
||
var __VLS_323;
|
||
var __VLS_319;
|
||
var __VLS_307;
|
||
{
|
||
const { footer: __VLS_thisSlot } = __VLS_303.slots;
|
||
const __VLS_332 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_333 = __VLS_asFunctionalComponent(__VLS_332, new __VLS_332({
|
||
...{ 'onClick': {} },
|
||
size: "large",
|
||
}));
|
||
const __VLS_334 = __VLS_333({
|
||
...{ 'onClick': {} },
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_333));
|
||
let __VLS_336;
|
||
let __VLS_337;
|
||
let __VLS_338;
|
||
const __VLS_339 = {
|
||
onClick: (...[$event]) => {
|
||
if (!(__VLS_ctx.kb))
|
||
return;
|
||
__VLS_ctx.showCatDialog = false;
|
||
}
|
||
};
|
||
__VLS_335.slots.default;
|
||
var __VLS_335;
|
||
const __VLS_340 = {}.ElButton;
|
||
/** @type {[typeof __VLS_components.ElButton, typeof __VLS_components.elButton, typeof __VLS_components.ElButton, typeof __VLS_components.elButton, ]} */ ;
|
||
// @ts-ignore
|
||
const __VLS_341 = __VLS_asFunctionalComponent(__VLS_340, new __VLS_340({
|
||
...{ 'onClick': {} },
|
||
type: "primary",
|
||
loading: (__VLS_ctx.catLoading),
|
||
size: "large",
|
||
}));
|
||
const __VLS_342 = __VLS_341({
|
||
...{ 'onClick': {} },
|
||
type: "primary",
|
||
loading: (__VLS_ctx.catLoading),
|
||
size: "large",
|
||
}, ...__VLS_functionalComponentArgsRest(__VLS_341));
|
||
let __VLS_344;
|
||
let __VLS_345;
|
||
let __VLS_346;
|
||
const __VLS_347 = {
|
||
onClick: (__VLS_ctx.handleSaveCategory)
|
||
};
|
||
__VLS_343.slots.default;
|
||
(__VLS_ctx.editingCatId ? '保存' : '创建');
|
||
var __VLS_343;
|
||
}
|
||
var __VLS_303;
|
||
}
|
||
/** @type {__VLS_StyleScopedClasses['mobile-header']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['main-layout']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['sidebar']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['cat-item']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['tree-node']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['tree-label']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['tree-actions']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-overlay']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['content']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['desktop-header']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-actions']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['desktop-actions']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['desktop-table']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['mobile-cards']} */ ;
|
||
/** @type {__VLS_StyleScopedClasses['doc-card']} */ ;
|
||
var __VLS_dollars;
|
||
const __VLS_self = (await import('vue')).defineComponent({
|
||
setup() {
|
||
return {
|
||
isMobile: isMobile,
|
||
showMobileSidebar: showMobileSidebar,
|
||
kb: kb,
|
||
docs: docs,
|
||
categories: categories,
|
||
allCategoriesFlat: allCategoriesFlat,
|
||
loading: loading,
|
||
uploading: uploading,
|
||
selectedCategoryId: selectedCategoryId,
|
||
selectedCategoryPath: selectedCategoryPath,
|
||
showTextDialog: showTextDialog,
|
||
textForm: textForm,
|
||
textLoading: textLoading,
|
||
showCatDialog: showCatDialog,
|
||
catForm: catForm,
|
||
catLoading: catLoading,
|
||
editingCatId: editingCatId,
|
||
expiryOptions: expiryOptions,
|
||
linkExpiry: linkExpiry,
|
||
expiryText: expiryText,
|
||
handleExpiryChange: handleExpiryChange,
|
||
selectCategory: selectCategory,
|
||
clearCategoryFilter: clearCategoryFilter,
|
||
handleUpload: handleUpload,
|
||
openTextDialog: openTextDialog,
|
||
handleCreateText: handleCreateText,
|
||
handleChangeDocCategory: handleChangeDocCategory,
|
||
handleDeleteDoc: handleDeleteDoc,
|
||
handleReprocess: handleReprocess,
|
||
handleCopyLink: handleCopyLink,
|
||
handleRegenerateLink: handleRegenerateLink,
|
||
openAddCategory: openAddCategory,
|
||
openEditCategory: openEditCategory,
|
||
handleSaveCategory: handleSaveCategory,
|
||
handleDeleteCategory: handleDeleteCategory,
|
||
formatSize: formatSize,
|
||
statusType: statusType,
|
||
maskedAiUrl: maskedAiUrl,
|
||
};
|
||
},
|
||
});
|
||
export default (await import('vue')).defineComponent({
|
||
setup() {
|
||
return {};
|
||
},
|
||
});
|
||
; /* PartiallyEnd: #4569/main.vue */
|