2025-03-21 17:36:23 +08:00
|
|
|
import React,{useState,useEffect} from 'react'
|
|
|
|
|
import {Card,Table} from 'antd'
|
|
|
|
|
import ModalToolBar from './ModalToolBar';
|
|
|
|
|
import { httppost5 } from '../../../utils/request';
|
|
|
|
|
import { exportFile } from '../../../utils/tools';
|
|
|
|
|
import apiurl from '../../../service/apiurl';
|
|
|
|
|
export default function ModalContent() {
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
key: 'inx',
|
|
|
|
|
width: 80,
|
|
|
|
|
render: (r, i) => <span>{i + 1}</span>
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '闸门名称',
|
|
|
|
|
key: 'project',
|
|
|
|
|
width: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作内容',
|
|
|
|
|
key: 'project',
|
|
|
|
|
width: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '操作结果',
|
|
|
|
|
key: 'project',
|
|
|
|
|
width: 150,
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
{
|
|
|
|
|
title: '操作时间',
|
|
|
|
|
key: 'project',
|
|
|
|
|
width: 150,
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
const [searchVal, setSearchVal] = useState(false)
|
|
|
|
|
|
|
|
|
|
const exportExcel = () => {
|
|
|
|
|
let params = {
|
|
|
|
|
...searchVal,
|
|
|
|
|
// pageSo: {
|
|
|
|
|
// pageNumber: tableProps.pagination.current,
|
|
|
|
|
// pageSize:tableProps.pagination.pageSize
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
httppost5(apiurl.gcaqjc.sjtjcx.ndsytjb.export, params).then(res => {
|
|
|
|
|
exportFile(`闸门操作记录.xlsx`,res.data)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<Card className='nonebox'>
|
|
|
|
|
<ModalToolBar
|
2025-03-24 18:00:36 +08:00
|
|
|
setSearchVal={setSearchVal}
|
|
|
|
|
exportFile={exportExcel}
|
2025-03-21 17:36:23 +08:00
|
|
|
/>
|
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
|
|
<div className="ant-card-body" style={{ padding: "20px 0 0 0" }}>
|
|
|
|
|
<Table columns={columns} rowKey="inx" dataSource={[]} />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|