增加预览 Word 功能

release
Jimmy Liow 2 years ago
parent 64e696dbe8
commit 331a8084c3

@ -14,6 +14,7 @@
"mobx-react": "^7.6.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-file-viewer": "^1.2.1",
"react-router-dom": "^6.10.0"
},
"devDependencies": {

@ -4,6 +4,7 @@ import { observer } from "mobx-react";
import { toJS } from "mobx";
import moment from "moment";
import { Row, Col, Space, Table, Typography, List, Watermark } from 'antd';
import FileViewer from 'react-file-viewer';
import { useStore } from '../../stores/StoreContext.js';
const { Title } = Typography;
@ -49,6 +50,33 @@ function Print() {
return (
<Watermark content={['Global Highlights', 'Discovery Your Way!']}>
<Space direction="vertical" style={{ width: '100%' }}>
<Row gutter={{ md: 24 }}>
<Col span={24}>
Stream
<FileViewer
fileType={'docx'}
filePath={'http://202.103.68.100:890/service-fileServer/DownloadPlanDoc?GRI_SN=331740&VEI_SN=32531'}
errorComponent={<span>Error</span>}/>
</Col>
</Row>
<Row gutter={{ md: 24 }}>
<Col span={24}>
reservationW220420009.doc
<FileViewer
fileType={'docx'}
filePath={'https://www.chinahighlights.com/public/reservationW220420009.doc'}
errorComponent={<span>Error</span>}/>
</Col>
</Row>
<Row gutter={{ md: 24 }}>
<Col span={24}>
SampleSpec.docx
<FileViewer
fileType={'docx'}
filePath={'https://www.chinahighlights.com/public/SampleSpec.docx'}
errorComponent={<span>Error</span>}/>
</Col>
</Row>
<Row gutter={{ md: 24 }}>
<Col span={24}>
<Title level={3}>Booking for Mr. Prasanna Venkatesa Nathan(United States) trip</Title>

Loading…
Cancel
Save