|
|
@ -37,6 +37,13 @@ export default function MeasureDetail() { |
|
|
|
|
|
|
|
const columns: TableColumnsType<DetailTable> = [ |
|
|
|
{ |
|
|
|
title: '序号', |
|
|
|
dataIndex: 'seq', |
|
|
|
render:(_, record, index)=>{ |
|
|
|
return index + 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '测量名称', |
|
|
|
dataIndex: 'name', |
|
|
|
}, |
|
|
@ -72,21 +79,21 @@ export default function MeasureDetail() { |
|
|
|
title: '时间', |
|
|
|
dataIndex: 'createTime', |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'op', |
|
|
|
width:180, |
|
|
|
align:'center', |
|
|
|
render:(_, record)=>{ |
|
|
|
return <div> |
|
|
|
<Button type="link" onClick={()=>onDel(record)}>删除</Button> |
|
|
|
<br/> |
|
|
|
<Button type="link" onClick={()=>onShowDetail(record)}>导出测量数据</Button> |
|
|
|
<br/> |
|
|
|
<Button type="link" onClick={()=>onDetaiResult(record)}>导出分析结果</Button> |
|
|
|
</div> |
|
|
|
} |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// title: '操作',
|
|
|
|
// dataIndex: 'op',
|
|
|
|
// width:180,
|
|
|
|
// align:'center',
|
|
|
|
// render:(_, record)=>{
|
|
|
|
// return <div>
|
|
|
|
// <Button type="link" onClick={()=>onDel(record)}>删除</Button>
|
|
|
|
// <br/>
|
|
|
|
// <Button type="link" onClick={()=>onShowDetail(record)}>导出测量数据</Button>
|
|
|
|
// <br/>
|
|
|
|
// <Button type="link" onClick={()=>onDetaiResult(record)}>导出分析结果</Button>
|
|
|
|
// </div>
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
]; |
|
|
|
|
|
|
|
const [tableData, setTableData] = useState<DetailTable[]>([]) |
|
|
@ -260,6 +267,8 @@ export default function MeasureDetail() { |
|
|
|
rowKey="id" |
|
|
|
dataSource={tableData && tableData.map(item => ({ ...item, key: item.name }))} |
|
|
|
pagination={false} |
|
|
|
scroll={{ y: 550 }} |
|
|
|
|
|
|
|
/> |
|
|
|
<div className="float-right"> |
|
|
|
<Pagination onChange={onPageChange} current={pageNum} pageSizeOptions={[5,10,20,30]} defaultCurrent={pageNum} defaultPageSize={pageSize} total={total}/> |
|
|
|