mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-21 21:36:42 +08:00
### What problem does this PR solve? fix: fix uploaded file time error #680 feat: support preview of word and excel #684 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -106,8 +106,8 @@ const KnowledgeFile = () => {
|
||||
},
|
||||
{
|
||||
title: t('uploadDate'),
|
||||
dataIndex: 'create_date',
|
||||
key: 'create_date',
|
||||
dataIndex: 'create_time',
|
||||
key: 'create_time',
|
||||
render(value) {
|
||||
return formatDate(value);
|
||||
},
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { ReactComponent as NavigationPointerIcon } from '@/assets/svg/navigation-pointer.svg';
|
||||
import NewDocumentLink from '@/components/new-document-link';
|
||||
import { useGetDocumentUrl } from '@/hooks/documentHooks';
|
||||
import { ITestingDocument } from '@/interfaces/database/knowledge';
|
||||
import { isPdf } from '@/utils/documentUtils';
|
||||
import { Table, TableProps } from 'antd';
|
||||
@ -15,6 +16,7 @@ const SelectFiles = ({ handleTesting }: IProps) => {
|
||||
);
|
||||
|
||||
const dispatch = useDispatch();
|
||||
const getDocumentUrl = useGetDocumentUrl();
|
||||
|
||||
const columns: TableProps<ITestingDocument>['columns'] = [
|
||||
{
|
||||
@ -35,7 +37,10 @@ const SelectFiles = ({ handleTesting }: IProps) => {
|
||||
key: 'view',
|
||||
width: 50,
|
||||
render: (_, { doc_id, doc_name }) => (
|
||||
<NewDocumentLink documentId={doc_id} preventDefault={!isPdf(doc_name)}>
|
||||
<NewDocumentLink
|
||||
link={getDocumentUrl(doc_id)}
|
||||
preventDefault={!isPdf(doc_name)}
|
||||
>
|
||||
<NavigationPointerIcon />
|
||||
</NewDocumentLink>
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user