修复
This commit is contained in:
@@ -736,7 +736,6 @@ function formatTimestamp(timestamp: number): string {
|
||||
line-height: 1.6;
|
||||
color: #4A5565;
|
||||
font-size: 14px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
letter-spacing: -0.01em;
|
||||
}
|
||||
|
||||
@@ -229,13 +229,14 @@
|
||||
|
||||
<!-- 文档分段对话框 -->
|
||||
<DocumentSegmentDialog
|
||||
v-if="selectedDocument && selectedDocument.difyDocumentId && props.knowledge?.difyDatasetId"
|
||||
v-if="segmentDialogVisible && selectedDocument && selectedDocument.difyDocumentId && props.knowledge?.difyDatasetId"
|
||||
:key="selectedDocument.difyDocumentId"
|
||||
:model-value="segmentDialogVisible"
|
||||
:dataset-id="props.knowledge.difyDatasetId"
|
||||
:document-id="selectedDocument.difyDocumentId"
|
||||
:can-write="hasWritePermission"
|
||||
:can-delete="hasDeletePermission"
|
||||
@update:model-value="segmentDialogVisible = $event"
|
||||
@update:model-value="handleSegmentDialogClose"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@@ -407,13 +408,19 @@ function handleViewSegments(document: AiUploadFile) {
|
||||
segmentDialogVisible.value = true;
|
||||
}
|
||||
|
||||
// 关闭分段对话框
|
||||
function handleSegmentDialogClose(val: boolean) {
|
||||
segmentDialogVisible.value = val;
|
||||
if (!val) {
|
||||
selectedDocument.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 下载文件
|
||||
function handleDownload(document: AiUploadFile) {
|
||||
if (document.sysFileId) {
|
||||
window.open(`/api/file/download/${document.sysFileId}`, '_blank');
|
||||
} else if (document.filePath) {
|
||||
window.open(`/api/file/download/${document.filePath}`, '_blank');
|
||||
} else {
|
||||
window.open(`${FILE_DOWNLOAD_URL}${document.sysFileId}`, '_blank');
|
||||
}else {
|
||||
ElMessage.warning('文件路径不存在');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user