import { connect } from 'react-redux';
import './protable.less'
import { Card, Button, Popconfirm, Badge, Col, Row, DatePicker, Input } from 'antd';
import ProTable from '@ant-design/pro-table';
// import { Badge, Button } from 'antd';
import React, { useEffect, useState } from 'react';
// @ts-ignore
import styles from './protable.less';
const DetailList = (props) => {
const { patrolName } = props;
const [tableListDataSource, setTableListDataSource] = useState([]);
const columns = [
{
title: '问题编号',
key: 'num',
dataIndex: 'num',
align: 'center'
}, {
title: '所属道路',
key: 'road',
dataIndex: 'road',
align: 'center'
}, {
title: '所在路段',
key: 'address',
dataIndex: 'address',
align: 'center'
}, {
title: '缺陷名称',
key: 'name',
dataIndex: 'name',
align: 'center'
}, {
title: '巡查人',
width: 100,
key: 'patrolName',
dataIndex: 'patrolName',
align: 'center'
}, {
title: '上报时间',
key: 'createdAt',
dataIndex: 'createdAt',
valueType: 'dateTime',
align: 'center'
}, {
title: '操作',
width: 200,
key: 'option',
valueType: 'option',
align: 'center',
render: () => [, ]
},
];
useEffect(() => {
const source = [];
for (let i = 0; i < 25; i += 1) {
source.push({
num: `${i + 1}`,
road: `成华大道${i + 2}`,
address: `二仙桥${i + 3}`,
name: `缺失内容${i + 4}`,
patrolName: patrolName,
createdAt: Date.now() - Math.floor(Math.random() * 10000),
key: i,
});
}
setTableListDataSource(source);
}, [patrolName]);
return (