4 changed files with 129 additions and 0 deletions
-
BINsrc/assets/images/download-icon.png
-
83src/components/layout/Header/downloadModal.jsx
-
13src/components/layout/Header/index.jsx
-
33src/components/layout/Header/index.scss
After Width: 200 | Height: 200 | Size: 7.5 KiB |
@ -0,0 +1,83 @@ |
|||
import React, {useState, useEffect} from 'react' |
|||
import { Modal, Form, Input, DatePicker, TreeSelect, Button, Tabs, Table } from 'antd' |
|||
import './index.scss' |
|||
|
|||
function DownloadModal (props) { |
|||
const { |
|||
visible, |
|||
onCancel |
|||
} = props |
|||
|
|||
const [formData, setFormData] = useState({ |
|||
type: '0', |
|||
pn: 1, |
|||
length: 20 |
|||
}) |
|||
const [loading, setLoading] = useState(false) |
|||
const [resultData, setResultDate] = useState({ |
|||
list: [], |
|||
total: 0 |
|||
}) |
|||
|
|||
const tableColumns = [ |
|||
{ |
|||
title: "序号", |
|||
width: 60, |
|||
align: 'center', |
|||
render: (text, record, index) => (pageInfo.pn - 1) * pageInfo.length + index + 1 |
|||
}, |
|||
] |
|||
|
|||
const handleTabChange = (v) => { |
|||
setFormData({ |
|||
...formData, |
|||
type: v, |
|||
pn: 1 |
|||
}) |
|||
} |
|||
|
|||
return ( |
|||
<Modal |
|||
open={visible} |
|||
onCancel={onCancel} |
|||
footer={null} |
|||
width={1400} |
|||
wrapClassName="yisa-modal modal-export" |
|||
title={``} |
|||
> |
|||
<div className="modal-export-container"> |
|||
<div className="modal-export-title"> |
|||
导出下载列表 |
|||
<span>(导出数量不足500时,将不计入排队序列)</span> |
|||
</div> |
|||
<div className="modal-export-content"> |
|||
<div className="export-tabs-wrapper"> |
|||
<Tabs |
|||
defaultActiveKey="1" |
|||
onChange={handleTabChange} |
|||
items={[ |
|||
{ label: `全部`, key: '0' }, |
|||
{ label: `导出中`, key: '1' }, |
|||
{ label: `已完成`, key: '2' }, |
|||
{ label: `等待中`, key: '3' } |
|||
]} |
|||
/> |
|||
</div> |
|||
<div className="export-table-wrapper"> |
|||
<Table |
|||
className='export-table' |
|||
dataSource={resultData?.list || []} |
|||
columns={tableColumns} |
|||
pagination={false} |
|||
scroll={{y: 'calc(100% - 50px)'}} |
|||
loading={loading} |
|||
/> |
|||
</div> |
|||
<div className="export-pagination-wrapper"></div> |
|||
</div> |
|||
</div> |
|||
</Modal> |
|||
) |
|||
} |
|||
|
|||
export default DownloadModal |
Write
Preview
Loading…
Cancel
Save
Reference in new issue